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
be8ab26973298bf692bcc27dde1782ff3456ee23
376
asm
Assembly
programs/oeis/112/A112606.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/112/A112606.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/112/A112606.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A112606: Number of representations of n as a sum of six times a square and a triangular number. ; 1,1,0,1,0,0,3,2,0,2,1,0,2,0,0,1,2,0,0,0,0,3,0,0,2,2,0,4,1,0,2,0,0,0,4,0,1,0,0,2,0,0,2,0,0,3,0,0,0,0,0,2,2,0,2,3,0,2,0,0,4,2,0,0,2,0,1,0,0,4,0,0,2,0,0,2,0,0,1,2,0,0,2,0,2,0,0,0,0,0,4,1,0,0,0,0,2,4,0,4 mul $0,8 seq $0,1158 ; sigma_3(n): sum of cubes of divisors of n. mod $0,9
53.714286
201
0.598404
775deee53376fe8ac32e37a983b5d39149a8b5b2
321
asm
Assembly
programs/oeis/143/A143844.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/143/A143844.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/143/A143844.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A143844: Triangle T(n,k) = k^2 read by rows. ; 0,0,1,0,1,4,0,1,4,9,0,1,4,9,16,0,1,4,9,16,25,0,1,4,9,16,25,36,0,1,4,9,16,25,36,49,0,1,4,9,16,25,36,49,64,0,1,4,9,16,25,36,49,64,81,0,1,4,9,16,25,36,49,64,81,100,0,1,4,9,16,25,36,49,64,81,100,121 lpb $0 sub $0,1 mov $1,$0 add $2,1 trn $0,$2 lpe pow $1,2 mov $0,$1
26.75
196
0.573209
0d5622b3d80ee98276bd4cecaf0d26054f6b7edf
1,050
asm
Assembly
libsrc/stdio/osca/fgetc_cons.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/stdio/osca/fgetc_cons.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
null
null
null
libsrc/stdio/osca/fgetc_cons.asm
grancier/z180
e83f35e36c9b4d1457e40585019430e901c86ed9
[ "ClArtistic" ]
1
2019-12-03T23:57:48.000Z
2019-12-03T23:57:48.000Z
; ; Basic keyboard handling for the OSCA architecture ; By Stefano Bodrato Jul. 2011 ; ; getkey() Wait for keypress ; ; ; $Id: fgetc_cons.asm,v 1.6 2016/06/12 17:32:01 dom Exp $ ; INCLUDE "flos.def" SECTION code_clib PUBLIC fgetc_cons PUBLIC _fgetc_cons .fgetc_cons ._fgetc_cons .kwait ld a,(buf) and a jr z,nobuf ld b,a xor a ld (buf),a jr dokey .nobuf call kjt_get_key or a jr z,kwait cp 20 ; CTRL jr nz,noctrl ; Let's handle CTRL-Z and CTRL-C .ctrl_wait call kjt_get_key or a jr z,ctrl_wait cp 33 jr nz,nobreak ld a,3 .nobreak ; keyboard scan code for Z is 26 which is perfect ; for CTRL-Z without further conversions ld b,a jr dokey .noctrl cp $5a jr nz,noent ld b,13 ld a,10 ld (buf),a .noent cp $6b jr nz,noleft ld b,8 .noleft cp $74 jr nz,noright ld b,9 .noright cp $75 jr nz,noup ld b,11 .noup cp $72 jr nz,nodown ld b,10 .nodown cp $71 jr z,isdel cp $66 jr nz,nodel .isdel ld b,12 .nodel .dokey ld l,b ; ASCII CODE ld h,0 ret SECTION bss_clib .buf defb 0
11.797753
57
0.662857
b472a4778a17af78dafa1cce50028a96fe615cb2
1,318
asm
Assembly
programs/oeis/037/A037497.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/037/A037497.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/037/A037497.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A037497: Base-4 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,2. ; 1,4,18,73,292,1170,4681,18724,74898,299593,1198372,4793490,19173961,76695844,306783378,1227133513,4908534052,19634136210,78536544841,314146179364,1256584717458,5026338869833,20105355479332,80421421917330,321685687669321,1286742750677284,5146971002709138,20587884010836553,82351536043346212,329406144173384850,1317624576693539401,5270498306774157604,21081993227096630418,84327972908386521673,337311891633546086692,1349247566534184346770,5396990266136737387081,21587961064546949548324,86351844258187798193298,345407377032751192773193,1381629508131004771092772,5526518032524019084371090,22106072130096076337484361,88424288520384305349937444,353697154081537221399749778,1414788616326148885598999113,5659154465304595542395996452,22636617861218382169583985810,90546471444873528678335943241,362185885779494114713343772964,1448743543117976458853375091858,5794974172471905835413500367433,23179896689887623341654001469732,92719586759550493366616005878930,370878347038201973466464023515721,1483513388152807893865856094062884,5934053552611231575463424376251538,23736214210444926301853697505006153,94944856841779705207414790020024612,379779427367118820829659160080098450 mov $1,4 pow $1,$0 mul $1,8 div $1,7 mov $0,$1
146.444444
1,159
0.915023
9bbf44ea1091ff7c21bb1b46930a012024a763cd
6,837
asm
Assembly
audio/music/routes4.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
audio/music/routes4.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
audio/music/routes4.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
Music_Routes4_Ch1:: tempo 148 volume 7, 7 duty 3 vibrato 10, 3, 4 toggleperfectpitch notetype 12, 10, 2 octave 2 G# 4 G# 4 G# 4 notetype 12, 7, 15 G# 4 notetype 12, 10, 2 G# 4 G# 4 G# 4 notetype 12, 11, 7 B_ 1 octave 3 E_ 1 F# 1 B_ 1 Music_Routes4_branch_a28a:: notetype 12, 11, 7 B_ 6 E_ 2 E_ 4 octave 4 E_ 4 D_ 4 C# 4 octave 3 B_ 4 A_ 4 notetype 12, 11, 1 G# 3 notetype 12, 11, 7 E_ 1 F# 12 E_ 8 D# 4 F# 4 B_ 6 E_ 2 E_ 4 octave 4 E_ 4 D_ 4 C# 4 octave 3 B_ 4 octave 4 C# 4 notetype 12, 11, 1 E_ 3 notetype 12, 11, 7 D# 1 E_ 12 octave 3 B_ 3 A_ 1 G# 8 octave 4 E_ 4 octave 3 D_ 2 E_ 2 F# 2 G# 2 A_ 2 B_ 2 octave 4 C# 2 D_ 2 D_ 2 octave 3 A_ 2 F# 2 E_ 2 D_ 2 E_ 2 F# 2 A_ 2 G# 2 F# 2 E_ 2 F# 2 G# 2 A_ 2 B_ 2 octave 4 D# 2 E_ 2 octave 3 B_ 2 G# 2 F# 2 E_ 2 F# 2 G# 2 B_ 2 notetype 8, 11, 5 A_ 4 G# 4 F# 4 octave 4 E_ 4 D# 4 C# 4 C# 4 octave 3 B_ 4 A_ 4 B_ 4 octave 4 C# 4 D# 4 octave 3 E_ 3 F# 3 G# 3 A_ 3 B_ 4 octave 4 C# 4 D# 4 E_ 3 octave 3 B_ 3 G# 3 F# 3 E_ 3 F# 3 G# 3 A_ 3 loopchannel 0, Music_Routes4_branch_a28a Music_Routes4_Ch2:: vibrato 12, 2, 4 duty 1 notetype 12, 9, 2 octave 3 E_ 3 F# 1 notetype 12, 9, 0 E_ 12 notetype 12, 9, 2 octave 2 B_ 3 octave 3 C_ 1 notetype 12, 9, 0 octave 2 B_ 8 duty 3 notetype 12, 12, 7 octave 3 E_ 1 F# 1 B_ 1 octave 4 D# 1 Music_Routes4_branch_a325:: notetype 12, 12, 7 E_ 6 octave 3 B_ 2 B_ 4 octave 4 B_ 4 A_ 4 G# 4 F# 4 F# 1 A_ 1 G# 1 F# 1 notetype 12, 12, 2 G# 3 E_ 1 notetype 12, 10, 0 octave 3 B_ 12 duty 0 notetype 12, 12, 2 octave 2 B_ 3 notetype 12, 12, 7 octave 3 C_ 1 octave 2 B_ 8 octave 3 D# 4 duty 3 octave 4 E_ 6 octave 3 B_ 2 B_ 4 octave 4 B_ 4 A_ 4 G# 4 F# 4 A_ 1 octave 5 C# 1 octave 4 B_ 1 A_ 1 notetype 12, 12, 2 B_ 3 notetype 12, 12, 7 A_ 1 notetype 12, 11, 0 G# 6 notetype 12, 9, 0 G# 6 notetype 12, 7, 0 G# 6 notetype 12, 6, 15 G# 6 notetype 12, 12, 7 G# 4 notetype 8, 12, 3 A_ 4 G# 4 F# 4 notetype 8, 9, 0 F# 6 notetype 8, 7, 15 F# 6 duty 0 notetype 8, 9, 0 octave 3 F# 4 E_ 4 F# 4 A_ 6 duty 3 notetype 8, 12, 7 octave 4 F# 6 G# 4 F# 4 notetype 8, 12, 4 E_ 4 notetype 8, 10, 0 E_ 12 duty 0 notetype 8, 9, 0 octave 3 E_ 4 D# 4 E_ 4 G# 6 duty 3 notetype 8, 12, 7 octave 4 E_ 6 F# 4 D# 4 octave 3 B_ 4 notetype 8, 10, 0 octave 4 B_ 16 notetype 8, 10, 7 B_ 8 notetype 8, 11, 0 A_ 6 notetype 8, 11, 7 A_ 6 notetype 12, 10, 7 G# 1 F# 1 notetype 12, 11, 0 E_ 12 notetype 12, 10, 0 E_ 8 notetype 12, 10, 7 E_ 10 loopchannel 0, Music_Routes4_branch_a325 Music_Routes4_Ch3:: notetype 12, 1, 0 octave 4 E_ 1 rest 3 E_ 1 rest 3 E_ 1 rest 3 E_ 1 rest 3 E_ 1 rest 3 E_ 1 rest 3 E_ 1 rest 3 D# 1 rest 3 Music_Routes4_branch_a3d7:: E_ 1 rest 3 E_ 1 E_ 1 E_ 1 E_ 1 E_ 1 rest 1 E_ 1 rest 3 E_ 1 rest 1 F# 1 rest 3 F# 1 F# 1 F# 1 F# 1 F# 1 rest 1 F# 1 rest 3 A_ 1 rest 1 G# 1 rest 3 G# 1 G# 1 G# 1 G# 1 G# 1 rest 1 G# 1 rest 3 G# 1 rest 1 G# 1 rest 3 G# 1 G# 1 G# 1 G# 1 G# 1 rest 1 G# 1 rest 3 G# 1 rest 1 E_ 1 rest 3 E_ 1 E_ 1 E_ 1 E_ 1 E_ 1 rest 1 E_ 1 rest 3 E_ 1 rest 1 F# 1 rest 3 F# 1 F# 1 F# 1 F# 1 F# 1 rest 1 F# 1 rest 3 A_ 1 rest 1 B_ 1 rest 3 B_ 1 B_ 1 B_ 1 B_ 1 B_ 1 rest 1 B_ 1 rest 3 B_ 1 rest 1 E_ 1 rest 3 E_ 1 E_ 1 E_ 1 E_ 1 E_ 1 rest 1 E_ 1 rest 1 E_ 1 rest 1 A_ 1 rest 1 F# 1 rest 3 F# 1 F# 1 F# 1 F# 1 F# 1 rest 1 F# 1 rest 3 F# 1 rest 1 D_ 1 rest 3 D_ 1 D_ 1 D_ 1 D_ 1 D_ 1 rest 1 D_ 1 rest 3 D_ 1 rest 1 E_ 1 rest 3 E_ 1 E_ 1 E_ 1 E_ 1 E_ 1 rest 1 E_ 1 rest 3 E_ 1 rest 1 G# 1 rest 3 G# 1 G# 1 G# 1 G# 1 G# 1 rest 1 G# 1 rest 3 G# 1 rest 1 F# 1 rest 3 F# 1 F# 1 F# 1 F# 1 F# 1 rest 1 F# 1 rest 3 F# 1 rest 1 B_ 1 rest 3 B_ 1 B_ 1 B_ 1 B_ 1 B_ 1 rest 1 B_ 1 rest 3 B_ 1 rest 1 G# 1 rest 3 G# 1 G# 1 G# 1 G# 1 G# 1 rest 1 G# 1 rest 3 G# 1 rest 1 E_ 1 rest 3 E_ 1 E_ 1 E_ 1 E_ 1 E_ 1 rest 1 E_ 1 rest 3 D# 1 rest 1 loopchannel 0, Music_Routes4_branch_a3d7 Music_Routes4_Ch4:: dspeed 12 rest 16 rest 12 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 Music_Routes4_branch_a4a8:: mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare3 2 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare2 2 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare4 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare3 1 mutedsnare3 1 mutedsnare4 1 mutedsnare4 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare2 2 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare4 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare2 2 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare3 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 4 mutedsnare2 2 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare2 2 mutedsnare4 1 mutedsnare3 1 mutedsnare2 4 mutedsnare4 1 mutedsnare4 1 mutedsnare3 1 mutedsnare3 1 mutedsnare2 2 mutedsnare2 2 mutedsnare2 2 mutedsnare2 2 loopchannel 0, Music_Routes4_branch_a4a8
10.024927
41
0.654381
80d805ec01a53cc4229a044cf6a6231d2981ee51
5,508
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_45_1085.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_45_1085.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_45_1085.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 %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0xb12b, %rsi nop nop nop cmp $24811, %rdx mov (%rsi), %bx nop nop nop nop nop sub %rcx, %rcx lea addresses_UC_ht+0x4339, %rsi lea addresses_UC_ht+0x8af9, %rdi nop nop nop nop nop add $9272, %rdx mov $119, %rcx rep movsw nop nop sub $24963, %rsi lea addresses_normal_ht+0x7099, %r13 nop nop dec %r9 vmovups (%r13), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $1, %xmm7, %rsi nop nop nop nop nop add %rdi, %rdi lea addresses_normal_ht+0xb0f9, %rsi lea addresses_A_ht+0x13af9, %rdi nop nop nop xor $9741, %r14 mov $72, %rcx rep movsq nop nop nop add %rdx, %rdx lea addresses_UC_ht+0x5049, %rsi nop nop nop nop add %r13, %r13 mov $0x6162636465666768, %rdx movq %rdx, %xmm1 vmovups %ymm1, (%rsi) nop nop nop nop and %r13, %r13 lea addresses_normal_ht+0xdab5, %r14 nop cmp %r9, %r9 movb (%r14), %cl nop nop nop nop nop xor $19663, %rbx lea addresses_D_ht+0x19a39, %rbx nop nop cmp $61742, %rcx mov $0x6162636465666768, %r14 movq %r14, %xmm1 vmovups %ymm1, (%rbx) sub %r9, %r9 lea addresses_WC_ht+0xc96f, %rsi lea addresses_normal_ht+0x18cf9, %rdi nop nop nop nop nop and %rdx, %rdx mov $24, %rcx rep movsl nop nop nop xor $47082, %rbx lea addresses_D_ht+0x1d6f9, %rsi lea addresses_D_ht+0x4f9, %rdi nop cmp %r9, %r9 mov $120, %rcx rep movsl sub %r13, %r13 lea addresses_WC_ht+0x138f9, %rdi nop nop dec %rcx mov (%rdi), %r13w nop nop nop inc %r14 lea addresses_UC_ht+0x133c9, %rdi nop nop nop nop nop cmp %rsi, %rsi mov $0x6162636465666768, %r9 movq %r9, %xmm1 and $0xffffffffffffffc0, %rdi vmovntdq %ymm1, (%rdi) nop nop sub $65, %r9 lea addresses_WC_ht+0xff9, %r14 nop nop nop nop cmp %rsi, %rsi mov $0x6162636465666768, %rcx movq %rcx, (%r14) xor %r9, %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r15 push %r8 push %rdi push %rdx // Store lea addresses_D+0x1b011, %r13 nop and $943, %r15 movb $0x51, (%r13) nop nop nop cmp %r10, %r10 // Store lea addresses_normal+0xc0f9, %r15 clflush (%r15) nop nop cmp $23664, %r13 movb $0x51, (%r15) nop nop nop nop xor %r10, %r10 // Store lea addresses_normal+0x1ae95, %r13 nop nop nop inc %rdi movl $0x51525354, (%r13) nop nop sub $61541, %rdi // Store mov $0x484b360000000241, %r11 nop nop nop nop nop and %rdi, %rdi movw $0x5152, (%r11) and $8226, %r15 // Store mov $0x619, %rdi nop dec %r11 movw $0x5152, (%rdi) nop nop and %rdi, %rdi // Faulty Load lea addresses_PSE+0x1a4f9, %r13 nop nop nop xor %r10, %r10 vmovups (%r13), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $1, %xmm5, %r11 lea oracles, %r13 and $0xff, %r11 shlq $12, %r11 mov (%r13,%r11,1), %r11 pop %rdx pop %rdi pop %r8 pop %r15 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 8, 'same': False}} {'33': 45} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
20.475836
152
0.649237
cf64680a78b39ed88ed9d784d3ab1392971037c5
2,296
asm
Assembly
Driver/Printer/PrintCom/Styles/stylesTestPCL4.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Driver/Printer/PrintCom/Styles/stylesTestPCL4.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Driver/Printer/PrintCom/Styles/stylesTestPCL4.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) Berkeley Softworks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: laserjet print driver FILE: stylesTestPCL4.asm AUTHOR: Dave Durran ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 6/15/92 Initial revision from pcl4Text.asm DESCRIPTION: $Id: stylesTestPCL4.asm,v 1.1 97/04/18 11:51:51 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrintTestStyles %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Gets rid of illegal style combinations in the passed style word. DOES NOTHING IN LASERJET DOWNLOAD DRIVER! CALLED BY: GLOBAL PASS: bp - Segment of PSTATE dx - style word to check for illegal combinations RETURN: bp - Segment of PSTATE dx - legalized style word DESTROYED: nothing PSEUDO CODE/STRATEGY: The style word passed is scanned for a set bit. The corresponding word is then anded with the mode word to get rid of any incompatible features requested. The first bits read are the highest priority, and the last are the lowest. CONDENSED compatability bit b15 Highest Priority SUBSCRIPT compatability bit b14 | SUPERSCRIPT compatability bit b13 | NLQ compatability bit b12 | BOLD compatability bit b11 | ITALIC compatability bit b10 | UNDERLINE compatability bit b9 | STRIKE-THRU compatability bit b8 | SHADOW compatability bit b7 | OUTLINE compatability bit b6 | REVERSED OUT compatability bit b5 | DOUBLE WIDTH compatability bit b4 | DOUBLE HEIGHT compatability bit b3 | QUAD HEIGHT compatability bit b2 | FUTURE USE compatability bit b1 \|/ FUTURE USE compatability bit b0 Lowest Priority KNOWN BUGS/SIDE EFFECTS/IDEAS: none REVISION HISTORY: Name Date Description ---- ---- ----------- Dave 02/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrintTestStyles proc far clc ret PrintTestStyles endp
27.011765
79
0.577526
44e7d049de4774bcff56474e1dd1f505da58fc06
340
asm
Assembly
asm/patches/disable_tingle_bombs_on_tingle_chests.asm
Crain-32/wwrando
1832963c7a9339f4f004e7f4b8bee227bfd86f23
[ "MIT" ]
284
2018-07-05T15:18:18.000Z
2022-03-28T19:59:03.000Z
asm/patches/disable_tingle_bombs_on_tingle_chests.asm
Crain-32/wwrando
1832963c7a9339f4f004e7f4b8bee227bfd86f23
[ "MIT" ]
235
2018-07-06T18:39:36.000Z
2022-03-29T21:09:46.000Z
asm/patches/disable_tingle_bombs_on_tingle_chests.asm
Crain-32/wwrando
1832963c7a9339f4f004e7f4b8bee227bfd86f23
[ "MIT" ]
96
2018-07-12T02:33:40.000Z
2022-03-22T05:08:02.000Z
; This patch stops Tingle Bombs from revealing Tingle Chests. ; It should be applied *after* tingle_chests_without_tuner.asm. .open "files/rels/d_a_agbsw0.rel" .org 0x1D0C ; In ExeSubT__10daAgbsw0_cFv ; This line was originally beq 0x1D7C, we reverse the condition so normal bombs still work but Tingle Bombs don't. bne 0x1D7C .close
34
116
0.785294
a78e2fabfb121af57b8974c310b98e18d93ee410
559
asm
Assembly
dino/lcs/123p/A9.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
6
2020-10-14T15:29:10.000Z
2022-02-12T18:58:54.000Z
dino/lcs/123p/A9.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
dino/lcs/123p/A9.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
1
2020-12-17T08:59:10.000Z
2020-12-17T08:59:10.000Z
copyright zengfr site:http://github.com/zengfr/romhack 019FFA move.b #$3, ($a9,A6) [123p+ 4, 123p+ 6] 01A000 move.b ($a0,A6), D0 [123p+ A9] 01A39A move.b #$3, ($a9,A6) 01A3A0 moveq #$c, D0 [123p+ A9] 01A41C move.b #$3, ($a9,A6) 01A422 move.b ($22,A6), D0 [123p+ A9] 01D68E move.b #$78, ($a9,A6) [123p+ C8] 01D694 move.l #$2040002, ($4,A6) [123p+ A9] 01D6DA subq.b #1, ($a9,A6) 01D6DE bcs $1d72a [123p+ A9] 01D6E4 move.b #$78, ($a9,A6) 01D6EA jsr $63aa.l [123p+ A9] copyright zengfr site:http://github.com/zengfr/romhack
32.882353
54
0.602862
6afa7d1514799f66759b3e29969946190a8db674
557
asm
Assembly
oeis/016/A016778.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/016/A016778.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/016/A016778.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A016778: a(n) = (3*n+1)^2. ; 1,16,49,100,169,256,361,484,625,784,961,1156,1369,1600,1849,2116,2401,2704,3025,3364,3721,4096,4489,4900,5329,5776,6241,6724,7225,7744,8281,8836,9409,10000,10609,11236,11881,12544,13225,13924,14641,15376,16129,16900,17689,18496,19321,20164,21025,21904,22801,23716,24649,25600,26569,27556,28561,29584,30625,31684,32761,33856,34969,36100,37249,38416,39601,40804,42025,43264,44521,45796,47089,48400,49729,51076,52441,53824,55225,56644,58081,59536,61009,62500,64009,65536,67081,68644,70225,71824,73441 mul $0,3 add $0,1 pow $0,2
79.571429
499
0.780969
add4085aec1ce1da2e4f1bfbaea84590f605f0c9
19,781
asm
Assembly
xp-pic-asm-midi-routines.X/src/xp-midi-routines.asm
gom9000/pic-assembly-midi-xp
1b79be9dea8706f9ad220cbc544a3271c9b5e83a
[ "MIT" ]
1
2021-05-24T05:48:37.000Z
2021-05-24T05:48:37.000Z
xp-pic-asm-midi-routines.X/src/xp-midi-routines.asm
gom9000/pic-assembly-midi-xp
1b79be9dea8706f9ad220cbc544a3271c9b5e83a
[ "MIT" ]
null
null
null
xp-pic-asm-midi-routines.X/src/xp-midi-routines.asm
gom9000/pic-assembly-midi-xp
1b79be9dea8706f9ad220cbc544a3271c9b5e83a
[ "MIT" ]
null
null
null
;============================================================================= ; @(#)xp-midi-routines.asm ; ________.________ ; ____ ____ ______/ __ \ ____/ ; / ___\ / _ \/ ___/\____ /____ \ ; / /_/ > <_> )___ \ / // \ ; \___ / \____/____ > /____//______ / ;/_____/ \/ \/ ; Copyright (c) 2016 Alessandro Fraschetti (gos95@gommagomma.net). ; ; This file is part of the pic-assembly-midi-xp project: ; https://github.com/pic-assembly-midi-xp ; ; Author.....: Alessandro Fraschetti ; Company....: gos95 ; Target.....: Microchip PICmicro MidRange Microcontroller ; Compiler...: Microchip Assembler (MPASM) ; Version....: 1.0 2016/01/05 ; Description: MIDI protocol utility routines ; ; ----- voice message ; ---- channel message -----| ; | ----- mode message ; | ; MIDI message ----| ; | ---- common message ; ----- system message -----|---- real-time message ; ---- exclusive message ; ;============================================================================= ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: ; The above copyright notice and this permission notice shall be included in all ; copies or substantial portions of the Software. ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ; SOFTWARE. ;============================================================================= PROCESSOR 16f648a INCLUDE <p16f648a.inc> ;============================================================================= ; CONFIGURATION ;============================================================================= __CONFIG _CP_OFF & _DATA_CP_OFF & _LVP_OFF & _BOREN_OFF & _MCLRE_ON & _WDT_OFF & _PWRTE_ON & _HS_OSC ;============================================================================= ; CONSTANT DEFINITIONS ;============================================================================= ; XPMIDI_STATUS register flags constant XPMIDI_RXF = 0x00 ; midi-in byte received flag constant XPMIDI_OEF = 0x01 ; midi-in overrun error flag constant XPMIDI_FEF = 0x02 ; midi-in frame error flag constant XPMIDI_TXF = 0x05 ; midi-out byte transmitted flag ; XPMIDI_EVENT register flags constant XPMIDI_BYTE0 = 0x02 ; event byte0 (status) received flag constant XPMIDI_BYTE1 = 0x03 ; event byte1 (data1) received flag constant XPMIDI_BYTE2 = 0x04 ; event byte2 (data2) received flag constant XPMIDI_EFULL = 0x05 ; event full received flag constant XPMIDI_FAMILY = 0x06 ; event family: 0=Channel Message, 1=System Message ; XPMIDI common constants constant XPMIDI_CHANNEL_MSG = 0 ; event family: Channel Message constant XPMIDI_SYSTEM_MSG = 1 ; event family: System Message constant XPMIDI_STATUS_BYTE_MASK = b'11110000' constant XPMIDI_CHANNEL_MASK = b'00001111' constant XPMIDI_SYSTEM_MESS_MASK = b'11110000' ; Channel Messages constant XPMIDI_NOTE_OFF = 0x80 constant XPMIDI_NOTE_ON = 0x90 constant XPMIDI_POLY_PRESSURE = 0xA constant XPMIDI_CONTROL_CHANGE = 0xB constant XPMIDI_PROGRAM_CHANGE = 0xC constant XPMIDI_CHANNEL_PRESSURE = 0xD constant XPMIDI_PITCH_BEND = 0xE ; System Real-Time Messages ; System Common Messages ; System Exclusive Message ;============================================================================= ; VARIABLE DEFINITIONS ;============================================================================= XPMIDI_DATA UDATA XPMIDI_STATUS RES 1 ; midi usart Status Register ; <0> : In Byte Received Flag ; <1> : In Overrun Error Flag ; <2> : In Frame Error Flag ; <5> : Out Byte Transmitted Flag XPMIDI_EVENT RES 1 ; midi events status register ; <0-1> : size of event received ; <2-4> : event bytes 1-3 received Flags ; <5> : event full received Flag ; <6> : event family Flag midiInSettlingTime RES 1 ; midi-in settling time for start-up midiInByte RES 1 ; midi-in received byte eventInByte0 RES 1 ; midi-in received event byte0 (status) eventInByte1 RES 1 ; midi-in received event byte1 (data1) eventInByte2 RES 1 ; midi-in received event byte2 (data2) ;============================================================================= ; RESET VECTOR ;============================================================================= RESET_CODE CODE 0x0000 ; processor reset vector pagesel MAIN ; goto MAIN ; go to beginning of program ;============================================================================= ; XPMIDI INIT ROUTINES CODE VECTOR ;============================================================================= XPMIDI_INIT_CODE CODE ; routines code vector ; --------------------------------------------------------------------------- ; Clear All Registers ; --------------------------------------------------------------------------- xpmidi_clear_regs banksel XPMIDI_STATUS clrf XPMIDI_STATUS clrf XPMIDI_EVENT clrf midiInByte clrf eventInByte0 clrf eventInByte1 clrf eventInByte2 return ; --------------------------------------------------------------------------- ; Init Midi Port. Set RB1 (RX) and RB2(TX) as Input, the others PIN as Output ; --------------------------------------------------------------------------- xpmidi_init_port errorlevel -302 ; init PORTB movlw 1<<RB2 banksel PORTB movwf PORTB ; clear output data latches and set RB2=TX banksel TRISB movlw 1<<RB2|1<<RB1 movwf TRISB ; configure RB1 and RB2 as inputs errorlevel +302 return ; --------------------------------------------------------------------------- ; Init Midi USART ; --------------------------------------------------------------------------- xpmidi_init_usart errorlevel -302 banksel TXSTA bcf TXSTA, TX9 ; 8-bit tx bcf TXSTA, TXEN ; disable tx bcf TXSTA, SYNC ; asynchronous mode bcf TXSTA, BRGH ; high bound rate ; movlw d'07' ; 31250 bauds on 4MHz osc. (BRGH=1) ; movlw d'39' ; 31250 bauds on 20MHz osc. (BRGH=1) movlw d'09' ; 31250 bauds on 20MHz osc. (BRGH=0) movwf SPBRG bsf TXSTA, TXEN ; enable tx banksel RCSTA bsf RCSTA, SPEN ; enable serial port bcf RCSTA, RX9 ; 8-bit rx bsf RCSTA, CREN ; enable continuous rx banksel midiInSettlingTime clrf midiInSettlingTime ; provide a settling time for start-up decfsz midiInSettlingTime, F goto $-1 banksel RCREG movf RCREG, W ; flush buffer movf RCREG, W movf RCREG, W errorlevel +302 return ;============================================================================= ; XP-MIDI USART TX/RX ROUTINES CODE VECTOR ;============================================================================= XPMIDI_USART_CODE CODE ; routines code vector ; --------------------------------------------------------------------------- ; Midi TX routines ; --------------------------------------------------------------------------- xpmidi_send banksel TXREG movwf TXREG ; load tx register with W return xpmidi_send_and_wait banksel TXREG movwf TXREG ; load tx register with W ; nop xpmidi_tx_wait banksel PIR1 btfss PIR1, TXIF ; wait for end of transmission goto $-1 return ; --------------------------------------------------------------------------- ; Midi RX routines ; --------------------------------------------------------------------------- xpmidi_scan banksel PIR1 btfss PIR1, RCIF ; wait for data return banksel RCSTA btfsc RCSTA, OERR ; test for overrun error goto errOERR btfsc RCSTA, FERR ; test for frame error goto errFERR banksel RCREG movf RCREG, W ; read received data banksel midiInByte movwf midiInByte bsf XPMIDI_STATUS, XPMIDI_RXF ; set midi-in status flag return wait_until_receive_char banksel PIR1 btfss PIR1, RCIF ; wait for data goto $-1 banksel RCSTA btfsc RCSTA, OERR ; test for overrun error goto errOERR btfsc RCSTA, FERR ; test for frame error goto errFERR banksel RCREG movf RCREG, W ; read received data banksel midiInByte movwf midiInByte bsf XPMIDI_STATUS, XPMIDI_RXF ; set midi-in status flag return errOERR banksel RCSTA bcf RCSTA, CREN bsf RCSTA, CREN banksel XPMIDI_STATUS bsf XPMIDI_STATUS, XPMIDI_OEF ; set overrun error flag return errFERR banksel RCREG movf RCREG, W banksel XPMIDI_STATUS bsf XPMIDI_STATUS, XPMIDI_FEF ; set frame error flag return ; --------------------------------------------------------------------------- ; RX/TX handler routines ; --------------------------------------------------------------------------- error_handler banksel XPMIDI_STATUS clrf XPMIDI_STATUS return ;============================================================================= ; XP-MIDI MESSAGES ROUTINES CODE VECTOR ;============================================================================= XPMIDI_MSG_CODE CODE ; routines code vector ; --------------------------------------------------------------------------- ; Parse midi-in Event ; --------------------------------------------------------------------------- xpmidi_parse banksel midiInByte movf midiInByte, W ; test for statusbyte andlw XPMIDI_STATUS_BYTE_MASK btfss STATUS, Z goto found_statusbyte ; is statusbyte, check data btfss XPMIDI_EVENT, XPMIDI_BYTE0 ; isn't. Test if a statusbyte was received return ; ... lost data byte received btfss XPMIDI_EVENT, XPMIDI_BYTE1 ; test for databyte order goto found_databyte1 ; is databyte1, check data btfss XPMIDI_EVENT, XPMIDI_BYTE2 ; test for databyte order goto found_databyte2 ; is databyte2, check data return ; ... lost data byte received found_statusbyte movf midiInByte, W ; test for system message andlw XPMIDI_STATUS_BYTE_MASK ; or channel message sublw XPMIDI_SYSTEM_MESS_MASK btfsc STATUS, Z goto found_system_message clrf XPMIDI_EVENT ; reset status register clrf eventInByte1 ; reset databyte registers clrf eventInByte2 movf midiInByte, W ; save statusbyte movwf eventInByte0 bsf XPMIDI_EVENT, XPMIDI_BYTE0 ; and update status register check_note_off movf eventInByte0, W ; test for channel voice message andlw XPMIDI_STATUS_BYTE_MASK ; note off sublw XPMIDI_NOTE_OFF btfss STATUS, Z goto check_note_on movf XPMIDI_EVENT, W ; set # of expected bytes addlw 0x03 movwf XPMIDI_EVENT return check_note_on movf eventInByte0, W ; test for channel voice message andlw XPMIDI_STATUS_BYTE_MASK ; note on sublw XPMIDI_NOTE_ON btfss STATUS, Z goto check_poly_pressure movf XPMIDI_EVENT, W ; set # of expected bytes addlw 0x03 movwf XPMIDI_EVENT return check_poly_pressure movf eventInByte0, W ; test for channel voice message andlw XPMIDI_STATUS_BYTE_MASK ; polyphonic key pressure sublw XPMIDI_POLY_PRESSURE btfss STATUS, Z goto check_control_change movf XPMIDI_EVENT, W ; set # of expected bytes addlw 0x03 movwf XPMIDI_EVENT return check_control_change movf eventInByte0, W ; test for channel voice message andlw XPMIDI_STATUS_BYTE_MASK ; control change sublw XPMIDI_CONTROL_CHANGE btfss STATUS, Z goto check_program_change movf XPMIDI_EVENT, W ; set # of expected bytes addlw 0x03 movwf XPMIDI_EVENT return check_program_change movf eventInByte0, W ; test for channel voice message andlw XPMIDI_STATUS_BYTE_MASK ; program change sublw XPMIDI_PROGRAM_CHANGE btfss STATUS, Z goto check_channel_pressure movf XPMIDI_EVENT, W ; set # of expected bytes addlw 0x02 movwf XPMIDI_EVENT return check_channel_pressure movf eventInByte0, W ; test for channel voice message andlw XPMIDI_STATUS_BYTE_MASK ; channel pressure sublw XPMIDI_CHANNEL_PRESSURE btfss STATUS, Z goto check_pitch_bend_change movf XPMIDI_EVENT, W ; set # of expected bytes addlw 0x02 movwf XPMIDI_EVENT return check_pitch_bend_change movf eventInByte0, W ; test for channel voice message andlw XPMIDI_STATUS_BYTE_MASK ; pitch bend change sublw XPMIDI_PITCH_BEND btfss STATUS, Z return movf XPMIDI_EVENT, W ; set # of expected bytes addlw 0x03 movwf XPMIDI_EVENT return found_system_message bsf XPMIDI_EVENT, XPMIDI_FAMILY ; system message ; movf eventInByte0, W ; test for system real-time message ; andlw b'11111000' ; sublw b'11111000' ; btfss STATUS, Z ; goto check_system_common_message ; movf eventInStatus, W ; set # of expected bytes ; addlw 0x01 ; movwf eventInStatus ; bsf eventInStatus, EVENT_RECEIVED ; event fully received return check_system_common_message return found_databyte1 movf midiInByte, W ; save databyte movwf eventInByte1 bsf XPMIDI_EVENT, XPMIDI_BYTE1 ; and update status register movf XPMIDI_EVENT, W ; test for expected bytes andlw b'00000011' sublw b'00000010' btfss STATUS, Z ; waiting for databyte2 return bsf XPMIDI_EVENT, XPMIDI_EFULL ; event fully received return found_databyte2 movf midiInByte, W ; save databyte movwf eventInByte2 bsf XPMIDI_EVENT, XPMIDI_BYTE2 ; and update status register movf XPMIDI_EVENT, W ; test for expected bytes andlw b'00000011' sublw b'00000011' btfss STATUS, Z ; waiting for...? return bsf XPMIDI_EVENT, XPMIDI_EFULL ; event fully received return ;============================================================================= ; MAIN PROGRAM ;============================================================================= MAINPROGRAM CODE ; begin program MAIN pagesel xpmidi_init_port call xpmidi_init_port ; init the PIC modules (port and usart) call xpmidi_init_usart pagesel xpmidi_clear_regs call xpmidi_clear_regs ; clear the xp-midi registers mainloop pagesel wait_until_receive_char call wait_until_receive_char ; read usart data banksel XPMIDI_STATUS movf XPMIDI_STATUS, F ; test for usart errors btfss STATUS, Z call error_handler ; movf midiInByte, W ; test for system message family ; andlw b'11110000' ; sublw b'11110000' ; btfsc STATUS, Z ; skip system message family ; goto mainloop pagesel xpmidi_parse call xpmidi_parse banksel midiInByte movf midiInByte, W ; echo byte pagesel xpmidi_send_and_wait call xpmidi_send_and_wait pagesel $ goto mainloop END ; end program
42.087234
107
0.462009
2d052797480caf831d1d25e427e4263b5c8d6a39
10,836
asm
Assembly
Source/Source/KG3DEngine/KG3DSound/KMp3LibClass/src/asm_x86/mp3_fdct.asm
uvbs/FullSource
07601c5f18d243fb478735b7bdcb8955598b9a90
[ "MIT" ]
2
2018-07-26T07:58:14.000Z
2019-05-31T14:32:18.000Z
Jx3Full/Source/Source/KG3DEngine/KG3DSound/KMp3LibClass/src/asm_x86/mp3_fdct.asm
RivenZoo/FullSource
cfd7fd7ad422fd2dae5d657a18839c91ff9521fd
[ "MIT" ]
null
null
null
Jx3Full/Source/Source/KG3DEngine/KG3DSound/KMp3LibClass/src/asm_x86/mp3_fdct.asm
RivenZoo/FullSource
cfd7fd7ad422fd2dae5d657a18839c91ff9521fd
[ "MIT" ]
5
2021-02-03T10:25:39.000Z
2022-02-23T07:08:37.000Z
;/* ; * DCT functions ASM version for the XingMPG Decoder ; * ; * Copyright (c) 1999, Jean-Michel HERVE ; * ; * Code : TuO / StG ; * Date : 08/04/99 ; * ; * WARNING : only _fdct32_* has been tested. The other ones are made from ; * this function, but hasn't been tested at all. Should check it. ; * NOTE : I don't think that forward_bf and back_bf macros can be more ; * optimized (except maybe in changing algo) ; * ; * This program is free software; you can redistribute it and/or modify ; * it under the terms of the GNU General Public License as published by ; * the Free Software Foundation; either version 2 of the License, or ; * (at your option) any later version. ; * ; * This program is distributed in the hope that it will be useful, ; * but WITHOUT ANY WARRANTY; without even the implied warranty of ; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; * GNU General Public License for more details. ; * ; * You should have received a copy of the GNU General Public License ; * along with this program; if not, write to the Free Software ; * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ; * ; * $Id: mp3_fdct.asm,v 1.1 2007/07/30 02:03:53 huchangyin Exp $ ; */ BITS 32 SECTION .data USE32 GLOBAL _forward_bf_asm GLOBAL _back_bf_asm ;/* fdct function exportation */ GLOBAL _fdct32_asm GLOBAL _fdct32_dual_asm EXTERN _coef32 ValC dd 0 Val4N dd 0 ValN dd 0 ValN2 dd 0 ValN21 dd 0 ValX dd 0 ValF dd 0 ValCoef dd 0 ValP0 dd 0 ;/* 32 floats tables */ tab_a dd 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,0 tab_b dd 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,0 SECTION .text USE32 ;/* ; * forward_bf ASM Version ; */ _forward_bf_asm: ;// PROC m, n, x[], f[], coef[] : DWORD ;// ebp ebp+4 ebp+8 ebp+12 ebp+16 push ebp lea ebp,[esp+8] pushad ;/* Initialization part */ mov eax,[ebp+4] mov [ValN],eax shr eax,1 mov [ValN2],eax ;/* n2 is eax */ mov esi,[ebp+8] ;/* x[0] is esi */ mov ebx,[ebp+12] ;/* f[0] is ebx */ lea edx,[ebx+eax*4] ;/* f[n2] is edx */ mov edi,[ebp+16] ;/* coef[] is edi */ mov [ValCoef],edi mov dword [ValP0],0 mov ecx,[ebp] ;/* m-controled loop */ .BigLoop: push ecx mov edi,[ValCoef] ;/* coef is edi */ mov ecx,[ValP0] ;/* p is ecx */ mov ebp,ecx add ebp,[ValN2] dec ebp ;/* q-n2 is ebp */ lea ebp,[esi+ebp*4] ;/* x[q-n2] is ebp */ ;/* This way we can use the loop */ ;/* counter to index the table */ ;/* it save 1 dec per loop */ mov eax,[ValN2] ;/* n2-controled loop */ .SmallLoop: fld dword [esi+ecx*4] ;/* Load x[p] */ fld st0 ;/* Duplicate x[p] */ fld dword [ebp+eax*4] ;/* Load x[q] */ fld st0 ;/* Duplicate x[q] */ faddp st2,st0 ;/* x[p]+x[q] */ fxch st0,st1 ;/* put value to the top */ fstp dword [ebx+ecx*4] ;/* Store value */ fsubp st1,st0 ;/* x[p]-x[q] */ fmul dword [edi] ;/* coef[k] * (x[p]-x[q]) */ fstp dword [edx+ecx*4] add edi,4 ;/* Update coef[k] */ inc ecx ;/* Update p */ dec eax ;/* Update loop counter */ jnz .SmallLoop mov eax,[ValN] add [ValP0],eax ;/* Update p0 */ pop ecx dec ecx jnz .BigLoop popad pop ebp ret ;/* ; * back_bf ASM Version ; */ _back_bf_asm: ;// PROC m, n, x[], f[], : DWORD ;// ebp ebp+4 ebp+8 ebp+12 push ebp lea ebp,[esp+8] pushad mov edi,[ebp+8] ;/* x[0] is esi */ mov esi,[ebp+12] ;/* f[0] is esi */ mov eax,[ebp+4] mov [ValN],eax shl eax,2 mov [Val4N],eax shr eax,3 mov [ValN2],eax lea edx,[edi+eax*4] dec eax mov [ValN21],eax mov ecx,[ebp] mov ebp,edx .BigLoop: xor ebx,ebx mov eax,[ValN2] .SmallLoop1: mov edx,[edi+ebx*4] mov [esi+ebx*8],edx ;/* f[p]=x[q] */ inc ebx dec eax jnz .SmallLoop1 xor ebx,ebx mov eax,[ValN21] ;/* n/2 -1 */ .SmallLoop2: fld dword [ebp+ebx*4] ;/* x[q] */ fadd dword [ebp+ebx*4+4] ;/* x[q]+x[q+1] */ fstp dword [esi+ebx*8+4] ;/* f[p]=x[q]+x[q+1] */ inc ebx dec eax jnz .SmallLoop2 mov edx,[ebp+ebx*4] mov [esi+ebx*8+4],edx ;/* f[p]=x[q] */ mov eax,[Val4N] add edi,eax ;/* Update p0 (edi) */ add ebp,eax ;/* Update p0 (edi) */ add esi,eax ;/* Update p0 (esi) */ dec ecx jnz .BigLoop popad pop ebp ret ;/* ; * forward_bf macro ASM Version ; */ %macro forward_bf_macro 5 ;// PROC m, n, x[], f[], coef[] : DWORD ;// ebp ebp+4 ebp+8 ebp+12 ebp+16 ;/* Initialization part */ mov ebx,%4 ;/* f[0] is ebx */ mov esi,%3 ;/* x[0] is esi */ lea edx,[ebx+((%2)/2)*4] ;/* f[n2] is edx */ xor edi,edi ;/* edi is p0 */ mov ecx,%1 ;/* m-controled loop */ %%BigLoop: ;/* Hiho, unrolled loop */ %assign i 0 %assign j %2-1 %rep (%2)/2 fld dword [esi+edi*4+i*4] ;/* Load x[p] */ fld st0 ;/* Duplicate x[p] */ fld dword [esi+edi*4+j*4] ;/* Load x[q] */ fadd st1,st0 ;/* x[p]+x[q] */ fxch st1 ;/* put value to the top */ fstp dword [ebx+edi*4+i*4] ;/* Store value */ fsubp st1,st0 ;/* x[p]-x[q] */ fmul dword [%5+i*4] ;/* coef[k] * (x[p]-x[q]) */ fstp dword [edx+edi*4+i*4] %assign i i+1 %assign j j-1 %endrep add edi,%2 ;/* Update p0 */ dec ecx jnz near %%BigLoop %endmacro ;/* ; * back_bf macro ASM Version ; */ %macro back_bf_macro 4 ;// PROC m, n, x[], f[], : DWORD ;// ebp ebp+4 ebp+8 ebp+12 mov edi,%3 ;/* x[0] is esi */ mov esi,%4 ;/* f[0] is esi */ mov ebp,%3+((%2/2)*4) ;/* x[n2] is ebp */ xor eax,eax ;/* p0 is eax */ ;/* Main loop counter initialization (if needed!) */ %if (%1)>1 mov ecx,%1 ;/* Avoid 1 step loop */ %%BigLoop: %endif ;/* Unrolled loop */ %assign j 0 %rep (%2)/2 mov edx,[edi+eax+j*4] mov [esi+eax+j*8],edx ;/* f[p]=x[q] */ %assign j j+1 %endrep ;/* Another unrolled loop */ %assign j 0 %rep ((%2)/2)-1 fld dword [ebp+eax+j*4] ;/* x[q] */ fadd dword [ebp+eax+j*4+4] ;/* x[q]+x[q+1] */ fstp dword [esi+eax+j*8+4] ;/* f[p]=x[q]+x[q+1] */ %assign j j+1 %endrep mov edx,[ebp+eax+j*4] mov [esi+eax+j*8+4],edx ;/* f[p]=x[q] */ add eax,%2*4 ;/* Update p0 */ ;/* Loop */ %if (%1)>1 ;/* Avoid 1 step loop */ dec ecx jnz near %%BigLoop %endif %endmacro ;/* Special case of fdct32 and fdct32_dual functions */ %macro fdct32_specialcase 1 mov edi,[ebp] ;/* x[0] is edi */ ;/* Unrolled loop */ %assign p 0 %assign q 31 %rep 16 fld dword [edi+p*4*%1] ;/* Load x[p] */ fld st0 fld dword [edi+q*4*%1] ;/* Load x[q] */ fadd st1,st0 ;/* x[p]+x[q] */ fxch st1 ;/* put value to the top */ fstp dword [tab_a+p*4] ;/* Store value */ fsubp st1,st0 ;/* x[p]-x[q] */ fmul dword [_coef32+p*4] ;/* coef32[p] * (x[p]-x[q]) */ fstp dword [tab_a+p*4+16*4] %assign p p+1 %assign q q-1 %endrep %endmacro ;/* ; * fdct32 ASM Version ; */ _fdct32_asm: ;// PROC x[], c[] : DWORD ;// ebp ebp+4 push ebp lea ebp,[esp+8] pushad mov eax,[ebp+4] mov [ValC],eax ;/* Special first stage for single chan */ fdct32_specialcase 1 forward_bf_macro 2 , 16, tab_a, tab_b, _coef32 + (16)*4 forward_bf_macro 4 , 8 , tab_b, tab_a, _coef32 + (16 + 8)*4 forward_bf_macro 8 , 4 , tab_a, tab_b, _coef32 + (16 + 8 + 4)*4 forward_bf_macro 16, 2 , tab_b, tab_a, _coef32 + (16 + 8 + 4 + 2)*4 back_bf_macro 8 , 4 , tab_a, tab_b back_bf_macro 4 , 8 , tab_b, tab_a back_bf_macro 2 , 16, tab_a, tab_b back_bf_macro 1 , 32, tab_b, [ValC] popad pop ebp ret ;/* ; * fdct32_dual ASM Version ; */ _fdct32_dual_asm: ;// PROC x[], c[] : DWORD ;// ebp ebp+4 push ebp lea ebp,[esp+8] pushad mov eax,[ebp+4] mov [ValC],eax ;/* Special first stage for dual chan (interleaved x) */ fdct32_specialcase 2 forward_bf_macro 2 , 16, tab_a, tab_b, _coef32 + (16)*4 forward_bf_macro 4 , 8 , tab_b, tab_a, _coef32 + (16 + 8)*4 forward_bf_macro 8 , 4 , tab_a, tab_b, _coef32 + (16 + 8 + 4)*4 forward_bf_macro 16, 2 , tab_b, tab_a, _coef32 + (16 + 8 + 4 + 2)*4 back_bf_macro 8 , 4 , tab_a, tab_b back_bf_macro 4 , 8 , tab_b, tab_a back_bf_macro 2 , 16, tab_a, tab_b back_bf_macro 1 , 32, tab_b, [ValC] popad pop ebp ret end
30.96
77
0.433093
dd9a36e28264ceafe1c28469045fdc9841d42088
1,268
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_22_1531.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_22_1531.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0x48.log_22_1531.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r8 push %rax push %rcx push %rdx push %rsi // Store lea addresses_WC+0x9649, %rcx nop nop nop nop inc %r8 movw $0x5152, (%rcx) // Exception!!! nop nop nop mov (0), %rax nop nop nop sub %rax, %rax // Store lea addresses_WC+0x16d49, %r8 nop nop nop and $53521, %rdx movb $0x51, (%r8) nop and $57217, %rsi // Faulty Load lea addresses_A+0x18249, %rax and $27011, %r13 movb (%rax), %dl lea oracles, %rax and $0xff, %rdx shlq $12, %rdx mov (%rax,%rdx,1), %rdx pop %rsi pop %rdx pop %rcx pop %rax pop %r8 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': True}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} <gen_prepare_buffer> {'00': 22} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
17.369863
122
0.635647
c34ffa25e476f3229f3a4aeff7ec34f5f8c576f5
3,462
asm
Assembly
projects/08/FunctionCalls/FibonacciElement/FibonacciElement.asm
lhtin/Nand2TetrisLabs
2a9c8f0f6ff9b6a148f87904e188ac85a016baa4
[ "MulanPSL-1.0" ]
2
2021-02-06T17:26:17.000Z
2021-03-27T03:23:55.000Z
projects/08/FunctionCalls/FibonacciElement/FibonacciElement.asm
lhtin/Nand2TetrisLabs
2a9c8f0f6ff9b6a148f87904e188ac85a016baa4
[ "MulanPSL-1.0" ]
null
null
null
projects/08/FunctionCalls/FibonacciElement/FibonacciElement.asm
lhtin/Nand2TetrisLabs
2a9c8f0f6ff9b6a148f87904e188ac85a016baa4
[ "MulanPSL-1.0" ]
null
null
null
@256 D=A @SP M=D // call Sys.init 0 @undefined$ret.0 D=A @SP M=M+1 A=M-1 M=D @LCL D=M @SP M=M+1 A=M-1 M=D @ARG D=M @SP M=M+1 A=M-1 M=D @THIS D=M @SP M=M+1 A=M-1 M=D @THAT D=M @SP M=M+1 A=M-1 M=D @5 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @Sys.init 0;JMP (undefined$ret.0) // function Main.fibonacci 0 (Main.fibonacci) // push argument 0 @0 D=A @ARG A=M+D D=M @SP M=M+1 A=M-1 M=D // push constant 2 @2 D=A @SP M=M+1 A=M-1 M=D // lt @SP AM=M-1 D=M @SP A=M-1 D=M-D @TRUE.1 D;JLT (FALSE.1) D=0 @PUSH.1 0;JMP (TRUE.1) D=-1 (PUSH.1) @SP A=M-1 M=D // if-goto IF_TRUE @SP AM=M-1 D=M @Main.fibonacci$IF_TRUE D;JNE // goto IF_FALSE @Main.fibonacci$IF_FALSE 0;JMP // label IF_TRUE (Main.fibonacci$IF_TRUE) // push argument 0 @0 D=A @ARG A=M+D D=M @SP M=M+1 A=M-1 M=D // return @LCL D=M @frame_2 M=D @5 D=A @frame_2 A=M-D D=M @ret_3 M=D @SP M=M-1 A=M D=M @ARG A=M M=D @ARG D=M+1 @SP M=D @1 D=A @frame_2 A=M-D D=M @THAT M=D @2 D=A @frame_2 A=M-D D=M @THIS M=D @3 D=A @frame_2 A=M-D D=M @ARG M=D @4 D=A @frame_2 A=M-D D=M @LCL M=D @ret_3 A=M 0;JMP // label IF_FALSE (Main.fibonacci$IF_FALSE) // push argument 0 @0 D=A @ARG A=M+D D=M @SP M=M+1 A=M-1 M=D // push constant 2 @2 D=A @SP M=M+1 A=M-1 M=D // sub @SP AM=M-1 D=M @SP A=M-1 M=M-D // call Main.fibonacci 1 @Main.fibonacci$ret.4 D=A @SP M=M+1 A=M-1 M=D @LCL D=M @SP M=M+1 A=M-1 M=D @ARG D=M @SP M=M+1 A=M-1 M=D @THIS D=M @SP M=M+1 A=M-1 M=D @THAT D=M @SP M=M+1 A=M-1 M=D @6 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @Main.fibonacci 0;JMP (Main.fibonacci$ret.4) // push argument 0 @0 D=A @ARG A=M+D D=M @SP M=M+1 A=M-1 M=D // push constant 1 @1 D=A @SP M=M+1 A=M-1 M=D // sub @SP AM=M-1 D=M @SP A=M-1 M=M-D // call Main.fibonacci 1 @Main.fibonacci$ret.5 D=A @SP M=M+1 A=M-1 M=D @LCL D=M @SP M=M+1 A=M-1 M=D @ARG D=M @SP M=M+1 A=M-1 M=D @THIS D=M @SP M=M+1 A=M-1 M=D @THAT D=M @SP M=M+1 A=M-1 M=D @6 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @Main.fibonacci 0;JMP (Main.fibonacci$ret.5) // add @SP AM=M-1 D=M @SP A=M-1 M=M+D // return @LCL D=M @frame_6 M=D @5 D=A @frame_6 A=M-D D=M @ret_7 M=D @SP M=M-1 A=M D=M @ARG A=M M=D @ARG D=M+1 @SP M=D @1 D=A @frame_6 A=M-D D=M @THAT M=D @2 D=A @frame_6 A=M-D D=M @THIS M=D @3 D=A @frame_6 A=M-D D=M @ARG M=D @4 D=A @frame_6 A=M-D D=M @LCL M=D @ret_7 A=M 0;JMP // function Sys.init 0 (Sys.init) // push constant 4 @4 D=A @SP M=M+1 A=M-1 M=D // call Main.fibonacci 1 @Sys.init$ret.8 D=A @SP M=M+1 A=M-1 M=D @LCL D=M @SP M=M+1 A=M-1 M=D @ARG D=M @SP M=M+1 A=M-1 M=D @THIS D=M @SP M=M+1 A=M-1 M=D @THAT D=M @SP M=M+1 A=M-1 M=D @6 D=A @SP D=M-D @ARG M=D @SP D=M @LCL M=D @Main.fibonacci 0;JMP (Sys.init$ret.8) // label WHILE (Sys.init$WHILE) // goto WHILE @Sys.init$WHILE 0;JMP
8.282297
30
0.454073
ae2f2316323602aad9994b9378348eaf8ca1014c
8,045
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1058.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1058.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1058.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r14 push %rax push %rbp push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x3578, %r14 nop nop nop xor $42197, %rbx vmovups (%r14), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %rax nop nop nop nop add %r10, %r10 lea addresses_A_ht+0xe992, %rbp nop nop nop inc %rbx mov $0x6162636465666768, %r10 movq %r10, %xmm1 vmovups %ymm1, (%rbp) nop nop nop nop and $42231, %r10 lea addresses_D_ht+0x8e12, %rbx clflush (%rbx) nop nop nop nop nop cmp %r13, %r13 mov (%rbx), %ax add $48556, %rax lea addresses_UC_ht+0x2872, %rax nop xor $9627, %r13 mov (%rax), %ebx nop nop add $20028, %r14 lea addresses_WC_ht+0x7372, %r13 xor $38275, %rdx mov (%r13), %r10w nop nop nop nop nop and $46149, %r10 lea addresses_D_ht+0xd2, %rsi lea addresses_A_ht+0x10612, %rdi clflush (%rdi) nop nop nop nop nop xor %r14, %r14 mov $36, %rcx rep movsq nop nop nop nop add %rdi, %rdi lea addresses_D_ht+0x1e12, %rsi lea addresses_D_ht+0x1d612, %rdi nop inc %rbx mov $20, %rcx rep movsb nop nop nop nop nop xor %rcx, %rcx lea addresses_WC_ht+0xc462, %r10 nop lfence mov (%r10), %ax cmp %rdx, %rdx lea addresses_UC_ht+0x1c9ba, %rsi lea addresses_D_ht+0x1d112, %rdi nop nop and %r13, %r13 mov $108, %rcx rep movsl cmp %rbx, %rbx lea addresses_normal_ht+0xd714, %rsi lea addresses_WC_ht+0xe12, %rdi clflush (%rsi) nop nop nop and $32287, %rbx mov $1, %rcx rep movsw nop nop nop nop nop inc %rbp lea addresses_WT_ht+0x5e12, %rsi lea addresses_D_ht+0x14a12, %rdi clflush (%rdi) nop add %r10, %r10 mov $16, %rcx rep movsw add $65313, %rdi lea addresses_WT_ht+0x62d2, %rax nop nop nop add $26769, %rdx movb $0x61, (%rax) nop nop nop nop cmp $44523, %rdx lea addresses_WT_ht+0x5332, %rcx nop nop nop nop add %r10, %r10 movl $0x61626364, (%rcx) nop nop nop add %r10, %r10 lea addresses_D_ht+0x10532, %rdi sub $40222, %r10 movb (%rdi), %bl nop nop nop nop sub $642, %rcx lea addresses_UC_ht+0xb486, %rbx nop nop nop nop nop dec %r13 mov $0x6162636465666768, %rdx movq %rdx, %xmm2 vmovups %ymm2, (%rbx) nop nop xor $9207, %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r9 push %rbp push %rcx push %rdx // Load lea addresses_D+0x7c12, %rbp sub %r12, %r12 mov (%rbp), %ecx cmp $43111, %r12 // Faulty Load lea addresses_PSE+0x10212, %rdx nop nop nop and %r15, %r15 mov (%rdx), %r12w lea oracles, %r9 and $0xff, %r12 shlq $12, %r12 mov (%r9,%r12,1), %r12 pop %rdx pop %rcx pop %rbp pop %r9 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 2}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_A_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_D_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 4}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}, 'dst': {'same': True, 'congruent': 10, 'type': 'addresses_WC_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
32.703252
2,999
0.655438
44743bf0f581424c53e55905d4cff0dc614c2b69
1,935
asm
Assembly
src/arch/x86_64/common.asm
ESALP/ESALP-1
b4ee2b28e5cd9b49a3a1496a329deb3fd6594d9f
[ "MIT" ]
5
2016-08-17T01:09:14.000Z
2019-04-28T13:08:10.000Z
src/arch/x86_64/common.asm
ESALP/ESALP-1
b4ee2b28e5cd9b49a3a1496a329deb3fd6594d9f
[ "MIT" ]
45
2016-08-26T17:56:20.000Z
2018-09-03T21:17:19.000Z
src/arch/x86_64/common.asm
ESALP/ESALP-1
b4ee2b28e5cd9b49a3a1496a329deb3fd6594d9f
[ "MIT" ]
1
2016-10-20T23:03:13.000Z
2016-10-20T23:03:13.000Z
; Copyright 2016 Phillip Oppermann, Calvin Lee and JJ Garzella. ; See the README.md file at the top-level directory of this ; distribution. ; ; Licensed under the MIT license <LICENSE or ; http://opensource.org/licenses/MIT>, at your option. ; This file may not be copied, modified, or distributed ; except according to those terms. section .text bits 64 extern KEXIT ; We follow the System V calling conventions, which rust uses, in order to ; get and return arguments. In general, all calling arguments are passed in ; rdi, rsi, rdx, rcx( or r10?), r8 and r9 or varients thereof (the first 32 ; bit argument will be passed in edi, the first 16 in di, and the first 8 in ; di as well) and the return value is passed in rax. ; All registers except RBP, RBX, and r12-r15 are caller preserved :) ; Here we define the in and out functions we will use for interrupts global inb inb: mov dx, di in al, dx ret global outb outb: mov dx, di mov ax, si out dx, al ret global inw inw: mov dx, di in ax, dx ret global outw outw: mov dx, di mov ax, si out dx, ax ret global inl inl: mov dx, di in eax, dx ret global outl outl: mov dx, di mov eax, esi out dx, eax ret ; STI instruction that can ; be linked from Rust global sti sti: sti ret ; Error puts function for long mode, if we ; ever need to extend the file to need it ; result: printf("ERROR: %s",rdi); global eputs eputs: ;0x04, red on black. mov rax, 0x044F045204520445 mov [0xb8000], rax mov rax, 0x00000420043a0452 mov [0xb8008], rax ;prepare to "call" puts mov si, 0x04 ; Red on black ; Push cannot take a 64bit argument mov rax, KEXIT push rax ; Makes puts ret to KEXIT ; Regular puts, is called with a pointer ; to a string and a color byte. global puts puts: mov rcx, 0xb800e mov dx, si .loop: mov al, [rdi] test al, al jz .end ;char mov byte [rcx], al inc rcx ;color mov byte [rcx], dl inc rcx inc rdi jmp .loop .end: ret
18.428571
76
0.709044
fdec1e15034f18759e4c16480af8ce3d6a847f34
5,819
asm
Assembly
data/maps/town_map_entries.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/maps/town_map_entries.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/maps/town_map_entries.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
external_map: MACRO dn \2, \1 dw \3 ENDM ; the appearance of towns and routes in the town map ExternalMapEntries: table_width 3, ExternalMapEntries ; x, y, name external_map 2, 11, PalletTownName external_map 2, 8, ViridianCityName external_map 2, 3, PewterCityName external_map 10, 2, CeruleanCityName external_map 14, 5, LavenderTownName external_map 10, 9, VermilionCityName external_map 7, 5, CeladonCityName external_map 8, 13, FuchsiaCityName external_map 2, 15, CinnabarIslandName external_map 0, 2, IndigoPlateauName external_map 10, 5, SaffronCityName external_map 0, 0, PalletTownName ; unused external_map 2, 10, Route1Name external_map 2, 6, Route2Name external_map 4, 3, Route3Name external_map 8, 2, Route4Name external_map 10, 3, Route5Name external_map 10, 8, Route6Name external_map 8, 5, Route7Name external_map 13, 5, Route8Name external_map 13, 2, Route9Name external_map 14, 4, Route10Name external_map 12, 9, Route11Name external_map 14, 9, Route12Name external_map 13, 11, Route13Name external_map 11, 12, Route14Name external_map 10, 13, Route15Name external_map 5, 5, Route16Name external_map 4, 8, Route17Name external_map 6, 13, Route18Name external_map 6, 15, Route19Name external_map 4, 15, Route20Name external_map 2, 13, Route21Name external_map 0, 8, Route22Name external_map 0, 6, Route23Name external_map 10, 1, Route24Name external_map 11, 0, Route25Name assert_table_length FIRST_INDOOR_MAP internal_map: MACRO db \1 + 1 dn \3, \2 dw \4 ENDM ; the appearance of buildings and dungeons in the town map InternalMapEntries: ; maximum map id subject to this rule, x, y, name internal_map OAKS_LAB, 2, 11, PalletTownName internal_map VIRIDIAN_GYM, 2, 8, ViridianCityName internal_map VIRIDIAN_FOREST_SOUTH_GATE, 2, 6, Route2Name internal_map VIRIDIAN_FOREST, 2, 4, ViridianForestName internal_map PEWTER_POKECENTER, 2, 3, PewterCityName internal_map MT_MOON_B2F, 6, 2, MountMoonName internal_map CERULEAN_MART, 10, 2, CeruleanCityName internal_map MT_MOON_POKECENTER, 5, 2, Route4Name internal_map CERULEAN_TRASHED_HOUSE_COPY, 10, 2, CeruleanCityName internal_map DAYCARE, 10, 4, Route5Name internal_map UNDERGROUND_PATH_ROUTE_6_COPY, 10, 6, Route6Name internal_map UNDERGROUND_PATH_ROUTE_7_COPY, 9, 5, Route7Name internal_map UNDERGROUND_PATH_ROUTE_8, 11, 5, Route8Name internal_map ROCK_TUNNEL_1F, 14, 3, RockTunnelName internal_map POWER_PLANT, 15, 4, PowerPlantName internal_map ROUTE_11_GATE_2F, 13, 9, Route11Name internal_map ROUTE_12_GATE_1F, 14, 7, Route12Name internal_map BILLS_HOUSE, 12, 0, SeaCottageName internal_map VERMILION_DOCK, 10, 9, VermilionCityName internal_map SS_ANNE_B1F_ROOMS, 9, 10, SSAnneName internal_map VICTORY_ROAD_1F, 0, 4, VictoryRoadName internal_map HALL_OF_FAME, 0, 2, PokemonLeagueName internal_map UNDERGROUND_PATH_NORTH_SOUTH, 10, 5, UndergroundPathName internal_map CHAMPIONS_ROOM, 0, 2, PokemonLeagueName internal_map UNDERGROUND_PATH_WEST_EAST, 10, 5, UndergroundPathName internal_map CELADON_HOTEL, 7, 5, CeladonCityName internal_map LAVENDER_POKECENTER, 14, 5, LavenderTownName internal_map POKEMON_TOWER_7F, 15, 5, PokemonTowerName internal_map LAVENDER_CUBONE_HOUSE, 14, 5, LavenderTownName internal_map WARDENS_HOUSE, 8, 13, FuchsiaCityName internal_map SAFARI_ZONE_GATE, 8, 12, SafariZoneName internal_map FUCHSIA_MEETING_ROOM, 8, 13, FuchsiaCityName internal_map SEAFOAM_ISLANDS_B4F, 5, 15, SeafoamIslandsName internal_map VERMILION_OLD_ROD_HOUSE, 10, 9, VermilionCityName internal_map FUCHSIA_GOOD_ROD_HOUSE, 8, 13, FuchsiaCityName internal_map POKEMON_MANSION_1F, 2, 15, PokemonMansionName internal_map CINNABAR_MART_COPY, 2, 15, CinnabarIslandName internal_map INDIGO_PLATEAU_LOBBY, 0, 2, IndigoPlateauName internal_map MR_PSYCHICS_HOUSE, 10, 5, SaffronCityName internal_map ROUTE_15_GATE_2F, 9, 13, Route15Name internal_map ROUTE_16_FLY_HOUSE, 4, 5, Route16Name internal_map ROUTE_12_SUPER_ROD_HOUSE, 14, 10, Route12Name internal_map ROUTE_18_GATE_2F, 7, 13, Route18Name internal_map SEAFOAM_ISLANDS_1F, 5, 15, SeafoamIslandsName internal_map ROUTE_22_GATE, 0, 7, Route22Name internal_map VICTORY_ROAD_2F, 0, 4, VictoryRoadName internal_map ROUTE_12_GATE_2F, 14, 7, Route12Name internal_map VERMILION_TRADE_HOUSE, 10, 9, VermilionCityName internal_map DIGLETTS_CAVE, 3, 4, DiglettsCaveName internal_map VICTORY_ROAD_3F, 0, 4, VictoryRoadName internal_map UNUSED_MAP_CE, 7, 5, RocketHQName internal_map SILPH_CO_8F, 10, 5, SilphCoName internal_map POKEMON_MANSION_B1F, 2, 15, PokemonMansionName internal_map SAFARI_ZONE_NORTH_REST_HOUSE, 8, 12, SafariZoneName internal_map CERULEAN_CAVE_1F, 9, 1, CeruleanCaveName internal_map NAME_RATERS_HOUSE, 14, 5, LavenderTownName internal_map CERULEAN_BADGE_HOUSE, 10, 2, CeruleanCityName internal_map ROCK_TUNNEL_B1F, 14, 3, RockTunnelName internal_map SILPH_CO_ELEVATOR, 10, 5, SilphCoName internal_map AGATHAS_ROOM, 0, 2, PokemonLeagueName db -1 ; end
48.491667
72
0.701323
f651292583a56b5a5f036c7289f89619950d86eb
1,928
asm
Assembly
programs/oeis/184/A184044.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/184/A184044.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/184/A184044.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A184044: 1/9 the number of (n+1) X 6 0..2 arrays with all 2 X 2 subblocks having the same four values. ; 81,87,97,117,153,225,361,633,1161,2217,4297,8457,16713,33225,66121,131913,263241,525897,1050697,2100297,4198473,8394825,16785481,33566793,67125321,134242377,268468297,536920137,1073807433,2147582025,4295098441,8590131273,17180131401,34360131657,68720001097,137439739977,274878955593,549757386825,1099513725001,2199026401353,4398050705481,8796099313737,17592194433097,35184384671817,70368760954953,140737513521225,281475010265161,562950003753033,1125899973951561,2251799914348617,4503599761588297,9007199456067657,18014398777917513,36028797421617225,72057594574798921,144115188881162313,288230377225453641,576460753914036297,1152921506754330697,2305843012434919497,4611686022722355273,9223372043297226825,18446744082299486281,36893488160304005193,73786976312018075721,147573952615446216777,295147905213712564297,590295810410245259337,1180591620786130780233,2361183241537901822025,4722366483007084167241,9444732965945448857673,18889465931753458761801,37778931863369478570057,75557863726464079233097,151115727452653280559177,302231454904756805304393,604462909808963854794825,1208925819616828197961801,2417851639232556884295753,4835703278462914745335881,9671406556923630467416137,19342813113842862888321097,38685626227681327730131017,77371252455353859367239753,154742504910698922641457225,309485009821380253096869961,618970019642742914007695433,1237940039285450643643301961,2475880078570866102914515017,4951760157141661837084852297,9903520314283253305425526857,19807040628566365873362698313,39614081257132591009237041225,79228162514264900543497371721,158456325028529519612018032713,316912650057058476274082644041,633825300114116389598211866697,1267650600228231653296516890697,2535301200456462180693126938697 mov $1,7 mov $2,$0 trn $2,2 lpb $0 mul $1,2 add $1,$2 sub $1,$0 sub $0,1 trn $2,2 lpe add $1,74 mov $0,$1
120.5
1,705
0.900415
2c07370d7d9dfba81fca4fa927596ab8a30a4188
373
asm
Assembly
programs/oeis/130/A130296.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/130/A130296.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/130/A130296.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A130296: Triangle read by rows: T[i,1]=i, T[i,j]=1 for 1 < j <= i = 1,2,3,... ; 1,2,1,3,1,1,4,1,1,1,5,1,1,1,1,6,1,1,1,1,1,7,1,1,1,1,1,1,8,1,1,1,1,1,1,1,9,1,1,1,1,1,1,1,1,10,1,1,1,1,1,1,1,1,1,11,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,13,1,1,1,1,1,1,1,1,1,1,1,1,14,1,1,1,1,1,1,1,1,1,1 lpb $0,1 add $1,1 sub $0,$1 lpe lpb $0,1 div $0,8 mov $1,$2 lpe add $1,1
28.692308
210
0.509383
343cf1b09cf630bbcb82afe5819bf725caaa836c
8,097
asm
Assembly
Src/main.asm
enkomio/s4tanic0d3
aea692a22d3a7fb4c67e34dc563f2db9ef78ad75
[ "CC0-1.0" ]
16
2020-10-28T01:11:18.000Z
2022-01-21T05:20:14.000Z
Src/main.asm
enkomio/s4tanic0d3
aea692a22d3a7fb4c67e34dc563f2db9ef78ad75
[ "CC0-1.0" ]
null
null
null
Src/main.asm
enkomio/s4tanic0d3
aea692a22d3a7fb4c67e34dc563f2db9ef78ad75
[ "CC0-1.0" ]
null
null
null
comment ! -=[ s4tanic0d3 ]=- After more than 10 years I decided to create another crackme, the third one. Enjoy :) You can find my previous crackme at: - http://crackmes.cf/users/s4tan/crackme1_s4tan/ (2009) - http://crackmes.cf/users/s4tan/s4tanic0de/ (2009) 2020 (C) Antonio 's4tan' Parata ! .686 .model flat, stdcall .stack 4096 .xmm .data ; specify if the program must be traced g_is_trace_enabled dword 0h ; bytes containing the content that is encrypted and temporary decrypted for execution g_saved_encrypted_code_address dword 0h g_saved_encrypted_code byte 0Fh dup(0h) g_restore_address dword 0h ; constants used to mark the encrypted code g_saved_start_protected_code dword 0h g_saved_end_protected_code dword 0h ; console strings g_insert_license db "Please enter your license key: ", 0h g_insert_username db "Please enter your ID: ", 0h g_wrong_result db "The inserted license is not valid!", 0h g_wait db "License validation in process...", 0ah, 0dh, 0h g_license_separator db "-", 0h g_ascii_num word 030h g_ascii_upper word 037h g_ascii_lower word 057h ; rubik cube vars g_cube_color db "ywobrg" g_cube_moves dword 0h g_cube_moves_length dword 0h g_verification_magic dword 0b554a050h ; play wave vars g_element_name db 's4tanic0d3.S4T+',0h g_already_opened dword 0h g_device_id dword 0h include <media.inc> .code include <model.inc> include <utility.inc> include <obfuscation.inc> include <console.inc> includelib <Winmm> ; start protected code. The code running under this mode, cannot read "code" or "data" ; from addresses that are in the encrypted space. start_protected_code_marker include <rubik_cube.inc> include <validator.inc> end_protected_code_marker @function_table: dword offset compute_initialization_key dword offset gen_cube_random dword offset shuffle_cube dword offset verify_cube_result dword offset move_F dword offset move_F_prime dword offset move_R dword offset move_R_prime dword offset move_U dword offset move_U_prime dword offset move_L dword offset move_L_prime dword offset move_D dword offset move_D_prime dword offset move_B dword offset move_B_prime dword offset move_S dword offset move_S_prime dword offset move_M dword offset move_M_prime dword offset move_E dword offset move_E_prime ; ; restore bytes previously overwritten by decrypted code ; restore_bytes proc push ebp mov ebp, esp mov edi, dword ptr [g_saved_encrypted_code_address] test edi, edi jz @exit ; restore bytes temporarly decrypted mem_copy offset g_saved_encrypted_code, dword ptr [g_saved_encrypted_code_address], sizeof g_saved_encrypted_code mov dword ptr [g_saved_encrypted_code_address], 0h @exit: mov esp, ebp pop ebp ret restore_bytes endp ; ; handle the trap exception ; Parameter: CONTEXT ; trap_handler proc push ebp mov ebp, esp ; obtains the instruction address causing the fault assume ebx: ptr CONTEXT mov ebx, [ebp+arg0] mov eax, [ebx].rEip ; verify that the faulty EIP is inside the protected range, if not does not decrypt cmp eax, dword ptr [g_saved_start_protected_code] jb @exit cmp eax, dword ptr [g_saved_end_protected_code] ja @exit ; decrypt the code that must be executed push eax call decrypt_code @exit: mov esp, ebp pop ebp ret trap_handler endp ; ; call a specific function that was invoked via obfuscation ; Parameter: CONTEXT ; call_nano_handler proc push ebp mov ebp, esp mov esi, [ebp+arg0] assume esi: ptr CONTEXT ; adjust stack mov ebx, [esi].rEsp sub ebx, sizeof dword mov dword ptr [esi].rEsp, ebx ; get function mov eax, [esi].rEip inc eax movzx eax, byte ptr [eax] lea eax, dword ptr [@function_table + eax * sizeof dword] mov edx, dword ptr [eax] ; set return address mov eax, [esi].rEip add eax, 2 mov dword ptr [ebx], eax ; set new EIP mov [esi].rEip, edx xor eax, eax mov esp, ebp pop ebp ret call_nano_handler endp ; ; See https://docs.microsoft.com/en-us/windows/win32/devnotes/--c-specific-handler2 ; exception_handler proc push ebp mov ebp, esp ; verify if it is a nano call mov ebx, [ebp+arg0] cmp dword ptr [ebx], EXCEPTION_PRIVILEGED_INSTRUCTION jne @f push [ebp+arg2] call call_nano_handler ; replace previous instructions if necessary call restore_bytes ; invoke trap handler push [ebp+arg2] call trap_handler xor eax, eax jmp @set_trap_flag @@: ; verify that the exception is due to single step cmp dword ptr [ebx], EXCEPTION_SINGLE_STEP jne @not_handled ; replace previous instructions if necessary call restore_bytes ; invoke trap handler push [ebp+arg2] call trap_handler xor eax, eax jmp @set_trap_flag @not_handled: mov eax, 1 mov dword ptr [g_is_trace_enabled], 0h jmp @exit @set_trap_flag: ; check if single step is enabled cmp dword ptr [g_is_trace_enabled], 0h jz @exit ; set trap flag in CONTEXT again mov ebx, [ebp+arg2] assume ebx: ptr CONTEXT or dword ptr [ebx].EFlags, 100h @exit: mov esp, ebp pop ebp ret exception_handler endp ; ; Verify is a debugger is attached and if so modify then number to ; initialize the cube ; check_debugger proc push ebp mov ebp, esp ; load to ESI the value mov esi, dword ptr [g_verification_magic] ; transit to 64-bit world push 33h call $+5 add dword ptr [esp], 5h retf ; check debugger and return to 32-bit db 065h, 048h, 08bh, 004h, 025h, 030h, 000h, 000h, 000h db 048h, 08bh, 040h, 060h db 048h, 00fh, 0b6h, 040h, 002h db 048h, 085h, 0c0h db 048h, 0bbh, 0deh, 0c0h, 0adh, 0bah, 000h, 000h, 000h, 000h db 048h, 0b8h, 0beh, 0bah, 0feh, 0cah, 000h, 000h, 000h, 000h db 048h, 00fh, 044h, 0d8h db 048h, 033h, 0f3h db 0e8h, 000h, 000h, 000h, 000h db 0c7h, 044h, 024h, 004h, 023h, 000h, 000h, 000h db 083h, 004h, 024h, 00dh db 0cbh ; save back the result, the correct value should be 7faa1aeeh mov dword ptr [g_verification_magic], esi mov esp, ebp pop ebp ret check_debugger endp main proc push ebp mov ebp, esp max_input_length equ 60h sub esp, sizeof dword * 2 ; make space for username and license sub esp, max_input_length mov dword ptr [ebp+local0], esp sub esp, max_input_length mov dword ptr [ebp+local1], esp ; initialize console call init_console ; print username push offset [g_insert_username] call print_line ; read username push max_input_length sub dword ptr [esp], 1 push dword ptr [ebp+local0] call read_username ; print license key push offset [g_insert_license] call print_line ; read license key push max_input_length sub dword ptr [esp], 1 push dword ptr [ebp+local1] call read_lincese test eax, eax jz @license_not_valid mov dword ptr [g_cube_moves_length], eax ; unprotect all program memory call unprotect_code ; fill global vars with start and end addresses of protected code call find_protected_code ; print wait message push offset [g_wait] call print_line ; check debugger call check_debugger ; set the exception handler push offset exception_handler assume fs:nothing push dword ptr [fs:0] mov [fs:0], esp assume fs:error ; enable trap flag and execute obfuscated code that is inside marks mov dword ptr [g_is_trace_enabled], 1h pushfd or word ptr [esp], 100h popfd ; check the username/license values push dword ptr [ebp+local1] push dword ptr [ebp+local0] call check_input ; disable tracing mov dword ptr [g_is_trace_enabled], 0h ; save key push eax ; use the result to decrypt the data push dword ptr [g_sound_size] push offset [g_sound] push eax call rc4_decrypt add esp, 0ch ; play the sound call play_sound test eax, eax jz @license_not_valid ; decrypt congratz pop eax push dword ptr [g_success_size] push offset [g_success] push eax call rc4_decrypt ; print the congratz text push 1fh push dword ptr [g_success_size] push offset [g_success] call print_slow push 7d0h call sleep ; stop the sound call stop_sound xor eax, eax jmp @exit @license_not_valid: push offset [g_wrong_result] call print_line mov eax, 1h jmp @exit @exit: push eax call ExitProcess mov esp, ebp pop ebp ret main endp end main
20.042079
114
0.753983
8397b5d70ebf1a5d82b45147d3da2cebbca7b918
843
asm
Assembly
programs/oeis/129/A129008.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/129/A129008.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/129/A129008.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A129008: (n^3+n^2)*8^n. ; 16,768,18432,327680,4915200,66060288,822083584,9663676416,108716359680,1181116006400,12472585027584,128642860449792,1300722255659008,12930256742645760,126663739519795200,1224979098644774912,11713862630790660096,110896637224371093504,1040511657907679395840,9684540638697514598400,89485155501565034889216,821396620114138914357248,7494395608314126954135552,68002077353322891077222400,613907642773053877780480000,5516328514901552924184281088,49353187659947621428204929024,439778198956131342657913880576,3904153398896268041963113021440,34538527096062109669685565849600,304553056704832113709582945091584,2677278067682020495961037169754112,23468015562025210909908466441125888,205156573140936646338226446758051840 add $0,1 mov $3,$0 lpb $0 add $2,$0 sub $0,1 mov $1,$3 mul $1,$2 mul $3,8 lpe mul $1,16 mov $0,$1
56.2
707
0.875445
ca2d3281246f8f35d61b5883a8c2df641d9c08f6
267
asm
Assembly
programs/oeis/176/A176413.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/176/A176413.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/176/A176413.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A176413: a(n) = 19*3^n. ; 19,57,171,513,1539,4617,13851,41553,124659,373977,1121931,3365793,10097379,30292137,90876411,272629233,817887699,2453663097,7360989291,22082967873,66248903619,198746710857,596240132571,1788720397713 mov $1,3 pow $1,$0 mul $1,19 mov $0,$1
33.375
200
0.782772
ca46c3933b644a5fa154dd3d7248d0ff339f3ea4
2,498
asm
Assembly
release/src/router/gmp/source/mpn/powerpc64/mode64/mod_34lsub1.asm
zhoutao0712/rtn11pb1
09e6b6c7ef4b91be0a9374daeacc3ac9f2fa3a05
[ "Apache-2.0" ]
184
2020-04-15T14:28:37.000Z
2020-09-22T15:57:55.000Z
release/src/router/gmp/source/mpn/powerpc64/mode64/mod_34lsub1.asm
zhoutao0712/rtn11pb1
09e6b6c7ef4b91be0a9374daeacc3ac9f2fa3a05
[ "Apache-2.0" ]
8
2019-12-19T19:34:56.000Z
2022-03-10T10:11:28.000Z
release/src/router/gmp/source/mpn/powerpc64/mode64/mod_34lsub1.asm
zhoutao0712/rtn11pb1
09e6b6c7ef4b91be0a9374daeacc3ac9f2fa3a05
[ "Apache-2.0" ]
5
2020-04-21T19:50:23.000Z
2020-09-22T10:58:02.000Z
dnl PowerPC-64 mpn_mod_34lsub1 -- modulo 2^24-1. dnl Copyright 2005 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. dnl The GNU MP Library is free software; you can redistribute it and/or modify dnl it under the terms of the GNU Lesser General Public License as published dnl by the Free Software Foundation; either version 3 of the License, or (at dnl your option) any later version. 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 Lesser General Public dnl License for more details. dnl You should have received a copy of the GNU Lesser General Public License dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. include(`../config.m4') C cycles/limb C POWER3/PPC630: 1.33 C POWER4/PPC970: 1.5 C POWER5: 1.57 C INPUT PARAMETERS define(`up',`r3') define(`n',`r4') ASM_START() PROLOGUE(mpn_mod_34lsub1) li r8, 0 li r9, 0 li r10, 0 li r11, 0 cmpdi cr6, n, 3 blt cr6, L(lt3) li r0, -0x5556 C 0xFFFFFFFFFFFFAAAA rldimi r0, r0, 16, 32 C 0xFFFFFFFFAAAAAAAA rldimi r0, r0, 32, 63 C 0xAAAAAAAAAAAAAAAB mulhdu r0, r0, n srdi r0, r0, 1 C r0 = [n / 3] mtctr r0 ld r5, 0(up) ld r6, 8(up) ld r7, 16(up) addi up, up, 24 bdz L(end) ALIGN(16) L(top): addc r8, r8, r5 nop ld r5, 0(up) adde r9, r9, r6 ld r6, 8(up) adde r10, r10, r7 ld r7, 16(up) addi up, up, 48 addze r11, r11 bdz L(endx) addc r8, r8, r5 nop ld r5, -24(up) adde r9, r9, r6 ld r6, -16(up) adde r10, r10, r7 ld r7, -8(up) addze r11, r11 bdnz L(top) addi up, up, 24 L(endx): addi up, up, -24 L(end): addc r8, r8, r5 adde r9, r9, r6 adde r10, r10, r7 addze r11, r11 sldi r5, r0, 1 add r5, r5, r0 C r11 = n / 3 * 3 sub n, n, r5 C n = n mod 3 L(lt3): cmpdi cr6, n, 1 blt cr6, L(2) ld r5, 0(up) addc r8, r8, r5 li r6, 0 beq cr6, L(1) ld r6, 8(up) L(1): adde r9, r9, r6 addze r10, r10 addze r11, r11 L(2): rldicl r0, r8, 0, 16 C r0 = r8 mod 2^48 srdi r3, r8, 48 C r3 = r8 div 2^48 rldic r4, r9, 16, 16 C r4 = (r9 mod 2^32) << 16 srdi r5, r9, 32 C r5 = r9 div 2^32 rldic r6, r10, 32, 16 C r6 = (r10 mod 2^16) << 32 srdi r7, r10, 16 C r7 = r10 div 2^16 add r0, r0, r3 add r4, r4, r5 add r6, r6, r7 add r0, r0, r4 add r6, r6, r11 add r3, r0, r6 blr EPILOGUE() C |__r10__|__r9___|__r8___| C |-----|-----|-----|-----|
20.816667
79
0.645316
a1d7456f645f38c21e79015eb240f8dd7108da55
368
asm
Assembly
MEMZ/NyanMBR/Source/Stage2/Interrupts/timerHandler.asm
johnmelodyme/viruses
c8c4b628a6ae725a45312b4365fa8a6876509706
[ "BSD-2-Clause" ]
4
2018-11-15T08:23:06.000Z
2019-04-29T13:30:44.000Z
MEMZ/NyanMBR/Source/Stage2/Interrupts/timerHandler.asm
johnmelodyme/Viruses
c8c4b628a6ae725a45312b4365fa8a6876509706
[ "BSD-2-Clause" ]
null
null
null
MEMZ/NyanMBR/Source/Stage2/Interrupts/timerHandler.asm
johnmelodyme/Viruses
c8c4b628a6ae725a45312b4365fa8a6876509706
[ "BSD-2-Clause" ]
2
2019-02-13T19:53:26.000Z
2021-05-30T19:04:43.000Z
frameTickCounter db 0 noteTickCounter db 0 nyanTickCounter db 0 %macro onTimer 3 inc byte %1 cmp byte %1, %2 jne %%checkNext mov byte %1, 0 call %3 %%checkNext: %endmacro timerHandler: startInterrupt onTimer [frameTickCounter], 8, displayFrame onTimer [noteTickCounter], 12, playNote onTimer [nyanTickCounter], 10, countNyan finishInterrupt
14.72
45
0.733696
00be816e8ef4fda660399dacd7679238a4f9aeb8
70
asm
Assembly
Asm/4.6.asm
cquca/csco_book_codes
ccf709d744454695ad9460cad4c241439592d3ab
[ "MIT" ]
3
2020-05-08T03:12:53.000Z
2021-05-02T10:25:19.000Z
Asm/4.6.asm
cquca/csco_book_codes
ccf709d744454695ad9460cad4c241439592d3ab
[ "MIT" ]
null
null
null
Asm/4.6.asm
cquca/csco_book_codes
ccf709d744454695ad9460cad4c241439592d3ab
[ "MIT" ]
null
null
null
li $a0,0 li $t0,10 loop: add $a0,$a0,$t0 addi $t0,$t0,-1 bgtz $t0,loop
11.666667
15
0.614286
c7bce18bcb6f9394031b0707ed067a41e4e425a9
1,424
asm
Assembly
programs/oeis/032/A032438.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/032/A032438.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/032/A032438.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A032438: a(n) = n^2 - floor((n+1)/2)^2. ; 0,0,3,5,12,16,27,33,48,56,75,85,108,120,147,161,192,208,243,261,300,320,363,385,432,456,507,533,588,616,675,705,768,800,867,901,972,1008,1083,1121,1200,1240,1323,1365,1452,1496,1587,1633,1728,1776,1875,1925,2028,2080,2187,2241,2352,2408,2523,2581,2700,2760,2883,2945,3072,3136,3267,3333,3468,3536,3675,3745,3888,3960,4107,4181,4332,4408,4563,4641,4800,4880,5043,5125,5292,5376,5547,5633,5808,5896,6075,6165,6348,6440,6627,6721,6912,7008,7203,7301,7500,7600,7803,7905,8112,8216,8427,8533,8748,8856,9075,9185,9408,9520,9747,9861,10092,10208,10443,10561,10800,10920,11163,11285,11532,11656,11907,12033,12288,12416,12675,12805,13068,13200,13467,13601,13872,14008,14283,14421,14700,14840,15123,15265,15552,15696,15987,16133,16428,16576,16875,17025,17328,17480,17787,17941,18252,18408,18723,18881,19200,19360,19683,19845,20172,20336,20667,20833,21168,21336,21675,21845,22188,22360,22707,22881,23232,23408,23763,23941,24300,24480,24843,25025,25392,25576,25947,26133,26508,26696,27075,27265,27648,27840,28227,28421,28812,29008,29403,29601,30000,30200,30603,30805,31212,31416,31827,32033,32448,32656,33075,33285,33708,33920,34347,34561,34992,35208,35643,35861,36300,36520,36963,37185,37632,37856,38307,38533,38988,39216,39675,39905,40368,40600,41067,41301,41772,42008,42483,42721,43200,43440,43923,44165,44652,44896,45387,45633,46128,46376 mov $1,$0 div $0,2 mul $1,2 sub $1,$0 mul $1,$0
158.222222
1,332
0.79073
5c8ed77389cc3795b6c6790c6b926ea7241d6942
3,328
asm
Assembly
P2/P2_play_mergesort.asm
flyinglandlord/BUAA-CO-2021
1aa28b09762dfb2376ed2aac4126839f0e6fcf93
[ "MIT" ]
5
2021-12-05T12:58:26.000Z
2022-03-31T02:05:13.000Z
P2/P2_play_mergesort.asm
OliverDu8-24/BUAA-CO-2021
9959abd90de9039d751bab64f153547e76066665
[ "MIT" ]
null
null
null
P2/P2_play_mergesort.asm
OliverDu8-24/BUAA-CO-2021
9959abd90de9039d751bab64f153547e76066665
[ "MIT" ]
2
2021-12-19T11:49:48.000Z
2021-12-22T10:25:38.000Z
.data array: .space 1024 temp: .space 1024 .macro input(%tar) li $v0, 5 syscall move %tar, $v0 .end_macro .macro input_char(%tar) li $v0, 12 syscall move %tar, $v0 .end_macro .macro printspace() addiu $sp, $sp, -8 sw $v0, 0($sp) sw $a0, 4($sp) li $v0, 11 li $a0, ' ' syscall lw $v0, 0($sp) lw $a0, 4($sp) addiu $sp, $sp, 8 .end_macro .macro println() addiu $sp, $sp, -8 sw $v0, 0($sp) sw $a0, 4($sp) li $v0, 11 li $a0, '\n' syscall lw $v0, 0($sp) lw $a0, 4($sp) addiu $sp, $sp, 8 .end_macro .macro print(%tar) addiu $sp, $sp, -8 sw $v0, 0($sp) sw $a0, 4($sp) li $v0, 1 move $a0, %tar syscall lw $v0, 0($sp) lw $a0, 4($sp) addiu $sp, $sp, 8 .end_macro .macro get(%addr, %i, %j, %rank, %tar) addiu $sp, $sp, -4 sw $t9, 0($sp) mult %i, %rank mflo $t9 add $t9, $t9, %j sll $t9, $t9, 2 lw %tar, %addr($t9) lw $t9, 0($sp) addiu $sp, $sp, 4 .end_macro .macro set(%addr, %i, %j, %rank, %tar) addiu $sp, $sp, -4 sw $t9, 0($sp) mult %i, %rank mflo $t9 add $t9, $t9, %j sll $t9, $t9, 2 sw %tar, %addr($t9) lw $t9, 0($sp) addiu $sp, $sp, 4 .end_macro .text main: input($s0) li $t0, 0 for_input: beq $t0, $s0, endfor_input input($t1) set(array, $0, $t0, $0, $t1) addiu $t0, $t0, 1 j for_input endfor_input: # merge_sort(l, r), $a0 - l, $a1 - r li $a0, 0 addiu $a1, $s0, -1 jal merge_sort li $t0, 0 for_output: beq $t0, $s0, endfor_output get(array, $0, $t0, $0, $t1) print($t1) printspace() addiu $t0, $t0, 1 j for_output endfor_output: li $v0, 10 syscall merge_sort: addiu $sp, $sp, -8 sw $ra, 0($sp) sw $t0, 4($sp) bne $a0, $a1, else j return else: # $t0 - mid = (l + r) >> 1 add $t0, $a0, $a1 sra $t0, $t0, 1 # merge_sort(l, mid) addiu $sp, $sp, -8 sw $a0, 0($sp) sw $a1, 4($sp) move $a1, $t0 jal merge_sort lw $a0, 0($sp) lw $a1, 4($sp) addiu $sp, $sp, 8 # merge_sort(mid+1, r) addiu $sp, $sp, -8 sw $a0, 0($sp) sw $a1, 4($sp) add $a0, $t0, 1 jal merge_sort lw $a0, 0($sp) lw $a1, 4($sp) addiu $sp, $sp, 8 # --------------------------- # -- MergeProcess C++ Code -- # --------------------------- # i = l, j = mid+1, t = l # while(i <= mid && j <= r) if(array[i] < array[j]) temp[t++] = array[i++]; else temp[t++] = array[j++]; # while(i <= mid) temp[t++] = array[i++]; # while(j <= r) temp[t++] = array[j++]; # for(t=l;t<=r;t++) array[t] = temp[t]; move $t1, $a0 # i addiu $t2, $t0, 1 # j move $t3, $a0 # t while1: bgt $t1, $t0, endwhile1 bgt $t2, $a1, endwhile1 get(array, $0, $t1, $0, $t4) get(array, $0, $t2, $0, $t5) if_inwhile: bgt $t4, $t5, else_inwhile set(temp, $0, $t3, $0, $t4) addiu $t3, $t3, 1 addiu $t1, $t1, 1 j endif_inwhile else_inwhile: set(temp, $0, $t3, $0, $t5) addiu $t3, $t3, 1 addiu $t2, $t2, 1 endif_inwhile: j while1 endwhile1: while2: bgt $t1, $t0, endwhile2 get(array, $0, $t1, $0, $t4) set(temp, $0, $t3, $0, $t4) addiu $t3, $t3, 1 addiu $t1, $t1, 1 j while2 endwhile2: while3: bgt $t2, $a1, endwhile3 get(array, $0, $t2, $0, $t5) set(temp, $0, $t3, $0, $t5) addiu $t3, $t3, 1 addiu $t2, $t2, 1 j while3 endwhile3: move $t3, $a0 for1: bgt $t3, $a1, endfor1 get(temp, $0, $t3, $0, $t4) set(array, $0, $t3, $0, $t4) addiu $t3, $t3, 1 j for1 endfor1: return: lw $ra, 0($sp) lw $t0, 4($sp) addiu $sp, $sp, 8 jr $ra
17.066667
105
0.53125
323e010381a878b6df759dd34df68c3aa23c03bb
691
asm
Assembly
programs/oeis/011/A011751.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/011/A011751.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/011/A011751.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A011751: Expansion of (1 + x^4)/(1 + x + x^3 + x^4 + x^5) mod 2. ; 1,1,1,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1,1,0,1,0,0,0,1,0,0,1,0,1,0,1,1,0,0,0,0,1,1,1,0,0,1,1,0,1,1,1,1 cal $0,70614 ; a(n) = n^5 mod 31. mov $1,$0 lpb $0 cal $1,136008 ; a(n) = n^6 - n^2. mov $0,$1 lpe gcd $1,3 div $1,2
57.583333
501
0.497829
7f2b0892fe00a1dc442086e75263dcdff5cc9a33
747
asm
Assembly
oeis/349/A349070.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/349/A349070.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/349/A349070.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A349070: a(n) = T(3*n, n), where T(n, x) is the Chebyshev polynomial of the first kind. ; Submitted by Jon Maiga ; 1,1,1351,3880899,28355806081,429364731169925,11731978174095849671,525735133485219615486151,36049049892983023583045990401,3588952618789973294871796462342089,497937643558017209960022199517744044999,93156956377055671178035977181412016527566091,22874959874171549974215788174640470009828232240001,7208075790050396745393362794494758180421979786145228749,2859544798297786444784495030340356452620502017308017570833991,1404997209880159608893165478718481057126292450946666822476901868175 mov $3,$0 sub $4,$0 mul $0,3 lpb $0 sub $0,1 add $1,1 mov $2,$3 sub $2,1 mul $2,2 mul $2,$1 add $4,$2 add $1,$4 lpe mov $0,$1 add $0,1
37.35
479
0.819277
e1c33c2de838c685af5911deeee83814a39711f2
294
asm
Assembly
libsrc/_DEVELOPMENT/arch/hbios/c/sccz80/hbios_e_de_hl.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/hbios/c/sccz80/hbios_e_de_hl.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/hbios/c/sccz80/hbios_e_de_hl.asm
Frodevan/z88dk
f27af9fe840ff995c63c80a73673ba7ee33fffac
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; uint8_t hbios_e_de_hl(uint16_t func_device, uint16_t arg, void * buffer) __smallc SECTION code_clib SECTION code_arch PUBLIC hbios_e_de_hl EXTERN asm_hbios_e .hbios_e_de_hl pop af pop hl pop de pop bc push bc push de push hl push af jp asm_hbios_e
12.25
83
0.70068
eafdf1d0726a4f47b13f791bcbdb64b7e6242e5d
517
asm
Assembly
data/maps/objects/Route18.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/maps/objects/Route18.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/maps/objects/Route18.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
Route18_Object: db $43 ; border block def_warps warp 33, 8, 0, ROUTE_18_GATE_1F warp 33, 9, 1, ROUTE_18_GATE_1F warp 40, 8, 2, ROUTE_18_GATE_1F warp 40, 9, 3, ROUTE_18_GATE_1F def_signs sign 43, 7, 4 ; Route18Text4 sign 33, 5, 5 ; Route18Text5 def_objects object SPRITE_COOLTRAINER_M, 36, 11, STAY, RIGHT, 1, OPP_BIRD_KEEPER, 8 object SPRITE_COOLTRAINER_M, 40, 15, STAY, LEFT, 2, OPP_BIRD_KEEPER, 9 object SPRITE_COOLTRAINER_M, 42, 13, STAY, LEFT, 3, OPP_BIRD_KEEPER, 10 def_warps_to ROUTE_18
25.85
72
0.736944
04ea5c50f960454a389ce69c7c33ad60a4305d98
639
asm
Assembly
maps/TinTower7F.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
maps/TinTower7F.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
maps/TinTower7F.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
object_const_def ; object_event constants const TINTOWER7F_POKE_BALL TinTower7F_MapScripts: db 0 ; scene scripts db 0 ; callbacks TinTower7FMaxRevive: itemball MAX_REVIVE TinTower7F_MapEvents: db 0, 0 ; filler db 5 ; warp events warp_event 3, 9, TIN_TOWER_6F, 1 warp_event 10, 15, TIN_TOWER_8F, 1 warp_event 12, 7, TIN_TOWER_7F, 4 warp_event 8, 3, TIN_TOWER_7F, 3 warp_event 6, 9, TIN_TOWER_9F, 5 db 0 ; coord events db 0 ; bg events db 1 ; object events object_event 16, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower7FMaxRevive, EVENT_TIN_TOWER_7F_MAX_REVIVE
22.821429
153
0.754304
6b73a7993676d5f1fa60e3434af48f83738ae894
11
asm
Assembly
Lib/Platform/Windows/Win64.asm
kimbethstonehouse/wavm
f07201f720b90cc510d899c8f1a52371b56e238f
[ "BSD-3-Clause" ]
1,631
2018-09-11T04:57:08.000Z
2022-03-29T20:20:35.000Z
Lib/Platform/Windows/Win64.asm
kimbethstonehouse/wavm
f07201f720b90cc510d899c8f1a52371b56e238f
[ "BSD-3-Clause" ]
243
2018-09-11T21:54:01.000Z
2022-02-10T10:26:23.000Z
Lib/Platform/Windows/Win64.asm
kimbethstonehouse/wavm
f07201f720b90cc510d899c8f1a52371b56e238f
[ "BSD-3-Clause" ]
146
2018-09-11T14:45:14.000Z
2022-03-24T10:52:44.000Z
.code End
2.75
5
0.636364
d46441d0b51ff050b7184b8c48ec762fa3d55df9
711
asm
Assembly
oeis/007/A007611.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/007/A007611.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/007/A007611.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A007611: a(n) = n! + 2^n. ; Submitted by Jamie Morken(s3) ; 2,3,6,14,40,152,784,5168,40576,363392,3629824,39918848,479005696,6227028992,87178307584,1307674400768,20922789953536,355687428227072,6402373705990144,121645100409356288,2432902008177688576,51090942171711537152,1124000727777611874304,25852016738884985028608,620448401733239456137216,15511210043330986017554432,403291461126605635651108864,10888869450418352160902217728,304888344611713860501772435456,8841761993739701954544152870912,265252859812191058636309553741824,8222838654177922817725565027483648 mov $1,2 pow $1,$0 seq $0,142 ; Factorial numbers: n! = 1*2*3*4*...*n (order of symmetric group S_n, number of permutations of n letters). add $0,$1
79
500
0.845288
faa24e124ba837e67062665e73d0e9480ec52243
44
asm
Assembly
kernel/picarch.asm
jpbottaro/minios
7fb159438f5ab5d19cdf35ef6d99f12ed4f2a09d
[ "MIT" ]
2
2016-12-06T23:45:43.000Z
2018-10-12T10:47:11.000Z
kernel/picarch.asm
jpbottaro/minios
7fb159438f5ab5d19cdf35ef6d99f12ed4f2a09d
[ "MIT" ]
null
null
null
kernel/picarch.asm
jpbottaro/minios
7fb159438f5ab5d19cdf35ef6d99f12ed4f2a09d
[ "MIT" ]
null
null
null
global handler_void handler_void: iret
8.8
19
0.772727
6cb261491f285ba4e249745a542dd582a46f06d5
511
asm
Assembly
programs/oeis/138/A138639.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/138/A138639.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/138/A138639.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A138639: Nonnegative integers n such that 19*n-1 is prime. ; 2,6,8,12,20,30,32,36,42,48,56,68,72,78,90,92,96,98,110,116,126,138,140,152,156,158,168,170,176,182,186,188,198,210,212,222,236,242,246,252,272,278,288,296,302,306,308,312,320,330,338,356,368,380,386,396,398,410,422,426,456,470,476,482,498,506,510,516,530,540,552,558,560,566,572,582,588,600,602,608,620,630,632,642,660,662,666,680,686,690,692,702,708,720,728,732,746,750,758,768 seq $0,138638 ; Primes of form 19*n-1. sub $0,29 div $0,19 add $0,2
63.875
380
0.720157
447bf0e889cf368562cb494804aa12d95c39ebbe
1,900
asm
Assembly
tests/vscrollo.asm
laullon/b2t80s
33ef502f2d889fb6876cd64c2bb7789b18562768
[ "MIT" ]
4
2020-04-16T17:47:36.000Z
2021-04-17T18:41:32.000Z
tests/vscrollo.asm
laullon/b2t80s
33ef502f2d889fb6876cd64c2bb7789b18562768
[ "MIT" ]
3
2020-04-17T21:46:19.000Z
2020-04-24T15:56:31.000Z
tests/vscrollo.asm
laullon/b2t80s
33ef502f2d889fb6876cd64c2bb7789b18562768
[ "MIT" ]
null
null
null
org &4000 nolist scr_set_mode equ &bc0e txt_output equ &bb5a km_read_char equ &bb09 start: call set_crtc ld a,2 call scr_set_mode ld bc,24*80 ld d,' ' l2: inc d ld a,d cp &7f jr nz,no_char_reset ld d,' ' no_char_reset: ld a,d call txt_output dec bc ld a,b or c jr nz,l2 ;;--------------------------------------------- loop1: ld b,&f5 l1: in a,(c) rra jr nc,l1 call check_keys ld bc,&bc0c out (c),c ld hl,(scrl2) inc b out (c),h ld bc,&bc0d out (c),c inc b out (c),l halt halt halt jp loop1 set_crtc: ld bc,&bc00 set_crtc_vals: out (c),c inc b ld a,(hl) out (c),a dec b inc hl inc c ld a,c cp 14 jr nz,set_crtc_vals ret crtc_vals: defb &3f defb 48 defb 49 defb &89 defb 38 defb 0 defb 35 defb 35 defb 0 defb 7 defb 0 defb 0 defb &0c defb 208 ;; check if a key has been pressed and perform action if it has check_keys: call km_read_char ret nc ;; A = ascii char of key pressed ;; we check for both upper and lower case chars cp '8' jp z,scroll_up cp '2' jp z,scroll_down cp '4' jp z,scroll_left cp '6' jp z,scroll_right cp '7' jp z,scroll_up_left cp '9' jp z,scroll_up_right cp '1' jp z,scroll_down_left cp '3' jp z,scroll_down_right ret scroll_down_right: ld c,1 call scroll_down call scroll_right ret scroll_down_left: ld c,1 call scroll_down call scroll_left ret scroll_up_left: ld c,1 call scroll_up call scroll_left ret scroll_up_right: ld c,1 call scroll_up call scroll_right ret scroll_right: ld hl,(scrl2) inc hl ld a,h and &3 or &c ld h,a ld (scrl2),hl ret scroll_left: ld hl,(scrl2) dec hl ld a,h and &3 or &c ld h,a ld (scrl2),hl ret ;;--------------------------------------------- ;; update these seperate of display scroll_up: ld hl,(scrl2) ld bc,48 add hl,bc ld a,h and &3 or &c ld h,a ld (scrl2),hl ret ;; update these seperate of display scroll_down: ld hl,(scrl2) or a ld bc,48 sbc hl,bc ld a,h and &3 or &c ld h,a ld (scrl2),hl ret scrl2: defw 0 end start
9.947644
63
0.678421
d8866824462ab8671fe8d226b77d1cd6137d4002
3,950
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_397.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_397.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_397.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %rax push %rcx push %rdx // Store lea addresses_D+0x1587e, %r11 nop nop cmp $19904, %rax movl $0x51525354, (%r11) nop nop nop add $36765, %r14 // Faulty Load lea addresses_PSE+0x707e, %r10 nop xor $22080, %rcx mov (%r10), %r14d lea oracles, %r10 and $0xff, %r14 shlq $12, %r14 mov (%r10,%r14,1), %r14 pop %rdx pop %rcx pop %rax pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_PSE', 'congruent': 0}} {'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_D', 'congruent': 9}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_PSE', 'congruent': 0}} <gen_prepare_buffer> {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
71.818182
2,999
0.661772
d4cc7e9523420827a54b67f28e0886ec3a69e3ba
429
asm
Assembly
oeis/245/A245356.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/245/A245356.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/245/A245356.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A245356: Number of numbers whose base-4/3 expansion (see A024631) has n digits. ; 4,4,4,4,8,8,12,16,20,28,36,48,64,88,116,156,208,276,368,492,656,872,1164,1552,2068,2760,3680,4904,6540,8720,11628,15504,20672,27560,36748,48996,65328,87104,116140,154852,206472,275296,367060,489412,652552,870068 mov $2,$0 mul $0,2 sub $0,$2 lpb $0 sub $0,1 mul $1,2 add $1,3 div $1,3 mul $1,2 lpe div $1,8 mul $1,4 add $1,4 mov $0,$1
23.833333
213
0.687646
618854106061dd696193b863904704e189f42a16
1,060
asm
Assembly
programs/oeis/286/A286810.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/286/A286810.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/286/A286810.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A286810: Number of non-attacking bishop positions on a cylindrical 2 X 2n chessboard. ; 1,9,49,324,2209,15129,103684,710649,4870849,33385284,228826129,1568397609,10749957124,73681302249,505019158609,3461452808004,23725150497409,162614600673849,1114577054219524,7639424778862809,52361396397820129,358890350005878084,2459871053643326449,16860207025497407049,115561578124838522884,792070839848372253129,5428934300813767249009,37210469265847998489924,255044350560122222180449,1748099984655007556773209,11981655542024930675232004,82123488809519507169850809,562882766124611619513723649,3858055874062761829426214724,26443508352314721186469779409,181246502592140286475862241129,1242282009792667284144565908484,8514727565956530702536099118249,58360810951903047633608127919249,400010949097364802732720796316484,2741715832729650571495437446296129,18791999880010189197735341327756409,128802283327341673812651951847998724,882823983411381527490828321608234649 lpb $0 mov $1,$0 mul $0,2 mod $0,2 seq $1,56854 ; a(n) = Lucas(4*n). add $1,1 lpe add $1,1 mov $0,$1
81.538462
859
0.885849
a668d662bfc1b457d49b75794997c0536abc563f
302
asm
Assembly
libsrc/stdio/ansi/z88/f_ansi_cls.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
1
2018-09-04T23:07:24.000Z
2018-09-04T23:07:24.000Z
libsrc/stdio/ansi/z88/f_ansi_cls.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
libsrc/stdio/ansi/z88/f_ansi_cls.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
; ; f_ansi_cls ; ; Clear the screen ; ; djm 6/6/2000 ; ; ; $Id: f_ansi_cls.asm,v 1.2 2001/04/13 14:13:59 stefano Exp $ ; XLIB ansi_CLS INCLUDE "#stdio.def" .ansi_CLS ld a,$0c call_oz(os_out) ret IF Blah ld hl,clstxt call_oz(gn_sop) ret .clstxt defb 1,'3','@',32,32,1,'2','C',254,0 ENDIF
10.785714
61
0.63245
a50575e0f936baa70ed7df6c6cb56530bf2af253
6,980
asm
Assembly
src/deck.asm
hundredrabbits/Donsol
0945e1d4f3a7bad1c1a71a48b70ec86f80188a38
[ "MIT" ]
113
2016-12-01T14:03:21.000Z
2022-02-18T09:12:49.000Z
src/deck.asm
hundredrabbits/Donsol
0945e1d4f3a7bad1c1a71a48b70ec86f80188a38
[ "MIT" ]
18
2016-11-30T15:15:38.000Z
2020-04-16T10:30:30.000Z
src/deck.asm
hundredrabbits/Donsol
0945e1d4f3a7bad1c1a71a48b70ec86f80188a38
[ "MIT" ]
20
2016-11-30T02:59:14.000Z
2022-02-18T09:13:17.000Z
;; deck: Create a deck of 54($36) cards, from zeropage $80 init@deck: ; LDA #$35 ; set deck length STA length@deck LDX #$00 @loop: ; TXA STA $80, x ; fill the deck with cards(ordered) INX CPX #$36 BNE @loop RTS ;; take last card from the deck pullCard@deck: ; LDA length@deck CMP #$00 BEQ @finished ; when cards are left LDA $80 STA hand@deck JSR shift@deck RTS @finished: ; LDA #$36 STA hand@deck RTS ;; return card to deck returnCard@deck: ; (a:card_id) LDX length@deck INX STA $80, x INC length@deck RTS ;; Shift deck forward by 1 shift@deck: ; DEC length@deck LDX #$00 @loop: ; TXA TAY INY LDA $80, y STA $80, x INX ; experiment TXA SBC #$01 CMP length@deck ; BNE @loop @done: ; RTS ;; Pick card from the deck pickCard@deck: ; (y:card_id) TYA ; transfer from Y to A ; check if card is flipped CMP #$36 ; if card is $36(flipped) BEQ @done ; skip selection ; load card data LDA card_types, y STA card_last_type ; load type LDA card_values, y STA card_last_value ; load value ; branch types LDA card_types, y @heart: ; CMP #$00 BNE @diamond JSR pickPotion@deck JSR addSickness@player RTS @diamond: ; CMP #$01 BNE @enemies JSR pickShield@deck JSR removeSickness@player RTS @enemies: ; JSR pickEnemy@deck JSR removeSickness@player @done: ; RTS ;; turn(potion) pickPotion@deck: ; ; check for potion sickness LDA sickness@player CMP #$01 BNE @tryWaste ; when sick LDA #$01 ; dialog:sickness JSR show@dialog RTS @tryWaste: ; LDA hp@player CMP #$15 BNE @heal ; when already full health LDA #$07 ; dialog:potion JSR show@dialog RTS @heal: ; LDA hp@player CLC ADC card_last_value STA hp@player ; specials JSR clampHealth@player LDA #$06 ; dialog:potion JSR show@dialog RTS ;; turn(shield) pickShield@deck: ; LDA card_last_value STA sp@player LDA #$16 ; max durability is $15+1 STA dp@player LDA #$05 ; dialog: shield JSR show@dialog RTS ;; turn(attack) pickEnemy@deck: ; ; check if can block LDA sp@player CMP #$00 BNE @blocking LDA #$08 ; dialog:unshielded JSR show@dialog ; load damages(unblocked) LDA card_last_value STA damages@player JSR runDamages RTS @blocking: ; ; check if shield breaking LDA card_last_value CMP dp@player BCC @shielded LDA #$02 ; dialog:shield break JSR show@dialog ; break shield LDA #$00 STA sp@player STA dp@player ; load damages(unblocked) LDA card_last_value STA damages@player JSR runDamages RTS @shielded: ; ; check for overflow LDA card_last_value CMP sp@player BCC @blocked LDA #$0B ; dialog:damages JSR show@dialog ; load damages(partial) LDA card_last_value SEC SBC sp@player ; damages is now stored in A STA damages@player JSR runDamages ; damage shield LDA card_last_value STA dp@player RTS @blocked: ; ; damage shield LDA card_last_value STA dp@player LDA #$0A ; dialog:blocked JSR show@dialog RTS ;; damages runDamages: ; ; check if killing LDA damages@player CMP hp@player BCC @survive LDA #$00 STA hp@player STA sp@player LDA #$03 ; dialog:death JSR show@dialog RTS ; stop attack phase @survive: ; LDA hp@player SEC SBC damages@player STA hp@player RTS ;; Shuffle shuffle@deck: ; shuffle deck by pushing all cards to $C0 on zero-page ; initial shuffle LDX #$00 @send0_loop: ; LDY shuffle0, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send0_loop ; JSR mix@deck LDA seed2@deck STA seed1@deck JSR mix@deck RTS ;; mix@deck: ; @send0: ; LDA seed1@deck AND #%00000001 BEQ @send1 ; begin LDX #$00 @send0_loop: ; LDY shuffle0, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send0_loop JSR return@deck ; end @send1: ; LDA seed1@deck AND #%00000010 BEQ @send2 ; begin LDX #$00 @send1_loop: ; LDY shuffle1, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send1_loop JSR return@deck ; end @send2: ; LDA seed1@deck AND #%00000100 BEQ @send3 ; begin LDX #$00 @send2_loop: ; LDY shuffle2, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send2_loop JSR return@deck ; end @send3: ; LDA seed1@deck AND #%00001000 BEQ @send4 ; begin LDX #$00 @send3_loop: ; LDY shuffle3, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send3_loop JSR return@deck ; end @send4: ; LDA seed1@deck AND #%00010000 BEQ @send5 ; begin LDX #$00 @send4_loop: ; LDY shuffle4, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send4_loop JSR return@deck ; end @send5: ; LDA seed1@deck AND #%00100000 BEQ @send6 ; begin LDX #$00 @send5_loop: ; LDY shuffle5, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send5_loop JSR return@deck ; end @send6: ; LDA seed1@deck AND #%01000000 BEQ @send7 ; begin LDX #$00 @send6_loop: ; LDY shuffle6, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send6_loop JSR return@deck ; end @send7: ; LDA seed1@deck AND #%10000000 BEQ @done ; begin LDX #$00 @send7_loop: ; LDY shuffle7, x ; store the value LDA $80, y STA $C0, x INX CPX #$36 BNE @send7_loop JSR return@deck ; end @done RTS ;; return@deck: ; LDX #$00 @loop: ; LDA $C0, x ; move $C0 to $80 STA $80, x LDA #$00 ; clear STA $C0, x INX CPX #$36 BNE @loop RTS
19.071038
86
0.50745
aa1808fb34fb14e9e321a06a8ed7f1296bf4db09
1,520
asm
Assembly
src/main.asm
icebreaker/floppybird
511ffa5f5f7e6d5dbe9c2942557670ae6fc85a53
[ "MIT" ]
354
2015-01-23T05:39:16.000Z
2022-03-18T07:21:31.000Z
src/main.asm
KCarretto/floppybird
511ffa5f5f7e6d5dbe9c2942557670ae6fc85a53
[ "MIT" ]
4
2015-09-14T04:07:52.000Z
2022-01-05T13:00:14.000Z
src/main.asm
KCarretto/floppybird
511ffa5f5f7e6d5dbe9c2942557670ae6fc85a53
[ "MIT" ]
50
2015-01-20T03:05:25.000Z
2022-02-10T14:17:26.000Z
main: call set_vga_mode call randomize .start: call new_highscore call center_bird .intro: call animate_bird call draw_background call draw_ground call draw_flats call draw_bushes call draw_clouds call draw_bird call draw_highscore call vsync call flpscr mov dx, 2 call sleep call kbhit test al, al jz .intro cmp al, 27 ; escape je .reboot ; reboot :P cmp al, 8 ; backspace je .rndbg ; randomize background cmp al, 9 ; tab je .rndbrd ; randomize bird call reset_pipes call randomize_pipes call reset_bird mov ax, 4242 mov dx, 1 call beep .loop: call draw call update_bird jc .end call update_pipes call collide_pipe jc .end call vsync call flpscr mov dx, 1 call sleep jmp .loop ret .end: call draw call vsync call flpscr mov ax, 6969 mov dx, 1 call beep mov dx, 15 call sleep jmp .start ret .rndbg: call randomize_backgroundcolor jmp .intro ret .rndbrd: call randomize_birdcolor jmp .intro ret .reboot: %ifdef COM call set_text_mode int 20h ; exit this bad-boy :P %else call reboot ; reboot this bad-boy :P ret %endif draw: call draw_background call draw_flats call draw_bushes call draw_clouds call draw_pipes call draw_bird call draw_score ret %include 'game/background.asm' %include 'game/score.asm' %include 'game/ground.asm' %include 'game/flats.asm' %include 'game/bushes.asm' %include 'game/clouds.asm' %include 'game/pipes.asm' %include 'game/bird.asm' %include 'game/data.asm'
12.459016
41
0.713816
c173c14e06d1873854acc9590adb83fafa2856a3
27,495
asm
Assembly
input.asm
unlink2/nesrpg
be08966cb171d8e54287bf0e59ec6262be7e8463
[ "MIT" ]
5
2020-01-23T14:58:55.000Z
2021-06-27T15:00:29.000Z
input.asm
unlink2/nano_dungeons
be08966cb171d8e54287bf0e59ec6262be7e8463
[ "MIT" ]
null
null
null
input.asm
unlink2/nano_dungeons
be08966cb171d8e54287bf0e59ec6262be7e8463
[ "MIT" ]
null
null
null
; handles all inputs input_handler: ; reset latch lda #$01 sta $4016 lda #$00 sta $4016 ; both controllers are latching now lda nmi_flags and #%00100000 ; check disable input flag beq @not_disabled ; latch buttons anyway lda $4016 rts @not_disabled: lda last_inputs sta prev_inputs lda #$00 sta last_inputs ; latch all inputs and place them in last input register ldx #$08 @read_loop: asl sta last_inputs lda $4016 ; read each input in order A, B, select, start, u, d, l, r and #$01 ora last_inputs dex bne @read_loop sta last_inputs ; all inputs are now read lda last_inputs ; p1 - A and #%10000000 beq @no_a lda prev_inputs and #%10000000 bne @skip_a ; don't allow held inputs jsr a_input @skip_a: @no_a: lda last_inputs ; p1 - B and #%01000000 beq @no_b lda prev_inputs and #%01000000 bne @skip_b ; don't allow held input jsr b_input @skip_b: @no_b: lda last_inputs ; p1 - select and #%00100000 beq @no_select jsr select_input @no_select: lda last_inputs ; p1 - start and #%00010000 beq @no_start jsr start_input @no_start: lda last_inputs ; p1 - up and #%00001000 beq @no_up jsr go_up @no_up: lda last_inputs ; p1 - down and #%00000100 beq @no_down jsr go_down @no_down: lda last_inputs ; p1 - left and #%00000010 beq @no_left jsr go_left @no_left: lda last_inputs ; p1 - right and #%00000001 beq @no_right jsr go_right @no_right: rts ; make movement check ; uses move delay ; inputs: ; none ; returns: ; a -> 0 if move can go ahead ; a -> 1 if move cannot go ahead can_move: lda move_delay rts ; makse select check, ; uses select delay ; inputs: ; none ; returns: ; a-> 0 if select possible ; a-> 1 if select cannot go ahead can_select: lda select_delay rts ; a input ; places the player's current tile at the player's current ; location. only works in EDITOR_MODE a_input: jsr can_select bne @done lda #MOVE_DELAY_FRAMES sta select_delay lda game_mode cmp #GAME_MODE_EDITOR bne @not_editor jsr update_tile rts @not_editor: cmp #GAME_MODE_EDITOR_MENU bne @not_editor_menu jsr a_input_editor_menu rts @not_editor_menu: cmp #GAME_MODE_MENU bne @not_main_menu jsr a_input_main_menu rts @not_main_menu: cmp #GAME_MODE_GAME bne @not_game jsr a_input_game rts @not_game: cmp #GAME_MODE_PAUSE bne @done jsr a_input_pause @done: rts ; in-game a input a_input_game: ldy weapon_type ; no weapon if 0 bne @init rts @init: ; disable blinking animation lda sprite_data+1 and #%01111111 sta sprite_data+1 jsr init_sword_noise lda weapon_update_lo, y sta delay_update lda weapon_update_hi, y sta delay_update+1 lda weapon_done_lo, y sta delay_done lda weapon_done_hi, y sta delay_done+1 lda weapon_timer_16, y sta delay_timer+1 lda weapon_timer, y sta delay_timer ; disable inputs lda nmi_flags ora #%00100000 sta nmi_flags ; move weapon x and y based on last inputs lda player_x sta weapon_x lda player_y sta weapon_y lda weapon_sprite, y ; tile sta sprite_data_1+1 lda last_move cmp #UP bne @no_up dec weapon_y lda #%10000000 ; flip sta sprite_data_1+2 rts @no_up: cmp #DOWN bne @no_down inc weapon_y lda #%00000000 ; no flip sta sprite_data_1+2 rts @no_down: lda weapon_sprite, y ; tile ora #%10000000 ; get horizontal version sta sprite_data_1+1 lda last_move cmp #LEFT bne @no_left dec weapon_x lda #%01000000 ; flip sta sprite_data_1+2 rts @no_left: cmp #RIGHT bne @no_right inc weapon_x lda #%00000000 ; flip sta sprite_data_1+2 rts @no_right: rts ; editor menu code for a input a_input_editor_menu: lda editor_flags and #%10000000 beq @not_tile_select_mode ldx #$01 ; get current tile from nt 1 lda player_x sta get_tile_x lda player_y sta get_tile_y jsr get_tile_nametable sta sprite_data_1+1 rts @not_tile_select_mode: lda #MOVE_DELAY_FRAMES*2 sta select_delay ; set up the right pointers for data write ; save slot is based on menu select lda menu_select cmp #EDITOR_MENU_SAVE3 bne @not_slot3 lda #<save_3 sta level_data_ptr lda #>save_3 sta level_data_ptr+1 lda #<attr_3 sta attr_ptr lda #>attr_3 sta attr_ptr+1 lda #<palette_3 sta dest_ptr lda #>palette_3 sta dest_ptr+1 jmp @slot_slected @not_slot3: cmp #EDITOR_MENU_SAVE2 bne @not_slot2 lda #<save_2 sta level_data_ptr lda #>save_2 sta level_data_ptr+1 lda #<attr_2 sta attr_ptr lda #>attr_2 sta attr_ptr+1 lda #<palette_2 sta dest_ptr lda #>palette_2 sta dest_ptr+1 jmp @slot_slected @not_slot2: ; new slot should not save, but instead is a debug feature that loads a map based on the selected tile id cmp #EDITOR_MENU_NEW bne @dont_load_debug_map jmp @load_debug_map @dont_load_debug_map: cmp #EDITOR_MENU_SAVE1 beq @slot_1 jmp @no_slot: @slot_1: ; always pick slot 1 as default option lda #<save_1 sta level_data_ptr lda #>save_1 sta level_data_ptr+1 lda #<attr_1 sta attr_ptr lda #>attr_1 sta attr_ptr+1 lda #<palette_1 sta dest_ptr lda #>palette_1 sta dest_ptr+1 @slot_slected: lda #$00 sta $2001 ; disable rendering lda #<level_data sta level_ptr lda #>level_data sta level_ptr+1 ; disable NMI, don't change other flags ; NMI needs to be disabled ; to prevent it being called again ; while compression is ongoing set_nmi_flag jsr compress_level vblank_wait ldx #$00 ; stx $2005 ; stx $2005 ; no scrolling jsr write_attr ;lda $2000 ;ora #%10000000 ;sta $2000 ; enable NMI again ; copy palette lda #<level_palette sta src_ptr lda #>level_palette sta src_ptr+1 ldy #PALETTE_SIZE jsr memcpy vblank_wait rts @no_slot: cmp #EDITOR_MENU_BACK bne @not_back ; load nametable lda #$00 sta $2001 ; no rendering set_nmi_flag ldx #$00 stx menu_select jsr load_menu vblank_wait ; lda #$00 ; sta $2005 ; sta $2005 ; no scrolling jsr init_main_menu vblank_wait rts @not_back: @done: rts @load_debug_map: ldx #$00 stx $2001 ; disable rendering ; select the map to load ldx sprite_data_1+1 ; based on tile lda map_table_lo, x sta level_data_ptr lda map_table_hi, x sta level_data_ptr+1 lda attr_table_lo, x sta attr_ptr lda attr_table_hi, x sta attr_ptr+1 ; for memcpy, copy palette lda palette_table_lo, x sta src_ptr lda palette_table_hi, x sta src_ptr+1 lda #<level_palette sta dest_ptr lda #>level_palette sta dest_ptr+1 lda #<level_data sta level_ptr lda #>level_data sta level_ptr+1 ; disable NMI until load is complete set_nmi_flag jsr decompress_level ; copy palette we set up earlier ldy #PALETTE_SIZE ; size to copy jsr memcpy ldx #$00 ; nametable 0 jsr load_level jsr load_attr vblank_wait ; lda #$00 ; sta $2005 ; sta $2005 ; no scrolling jsr load_palette lda #GAME_MODE_EDITOR sta game_mode vblank_wait ; lda #$00 ; sta $2005 ; sta $2005 ; no scrolling again jsr init_editor lda #$00 sta nametable jsr init_ai_tiles jsr find_start vblank_wait rts ; main menu code for A a_input_main_menu: ldx #$00 stx $2001 ; disable rendering ; disable NMI until load is complete set_nmi_flag lda menu_select cmp #MAIN_MENU_EDITOR bne @not_editor ; init editor lda #GAME_MODE_EDITOR_MENU sta game_mode tax jsr load_menu lda #$00 sta menu_select sta sprite_data+1 vblank_wait ; lda #$00 ; sta $2005 ; sta $2005 ; no scrolling jsr init_editor_menu rts @not_editor: ; at this point all choices will load a map ; load pause menu into nt1 ldx #GAME_MODE_PAUSE jsr load_menu lda menu_select ; need to restore menu_select in A after load cmp #MAIN_MENU_LEVEL bne @not_level_select @level_select: ; select the map to load ldx level_select ; based on tile lda map_table_lo, x sta level_data_ptr lda map_table_hi, x sta level_data_ptr+1 lda attr_table_lo, x sta attr_ptr lda attr_table_hi, x sta attr_ptr+1 ; for memcpy, copy palette lda palette_table_lo, x sta src_ptr lda palette_table_hi, x sta src_ptr+1 ; load sub routine lda map_sub_lo, x sta map_sub_ptr lda map_sub_hi, x sta map_sub_ptr+1 jmp @slot_selected @not_level_select: cmp #MAIN_MENU_RANDOM bne @not_random lda #%10000000 sta load_flags jmp @level_select @not_random: cmp #MAIN_MENU_RESUME bne @no_resume lda #%10100000 sta load_flags jmp @level_select @no_resume: cmp #MAIN_MENU_SET_SEED bne @not_set_seed lda seed_input sta seed lda seed_input+1 sta seed+1 lda #%10000000 sta load_flags jmp @level_select @not_set_seed: ; check which slot is selected cmp #MAIN_MENU_SLOT_1 bne @not_slot_1 ; slot 1 selected, set up pointers lda #<save_1 sta level_data_ptr lda #>save_1 sta level_data_ptr+1 lda #<attr_1 sta attr_ptr lda #>attr_1 sta attr_ptr+1 lda #<palette_1 sta src_ptr lda #>palette_1 sta src_ptr+1 ; load no update routine for custom levels lda #<save_sub_1 sta map_sub_ptr lda #>save_sub_1 sta map_sub_ptr+1 jmp @slot_selected @not_slot_1: cmp #MAIN_MENU_SLOT_2 bne @not_slot2 lda #<save_2 sta level_data_ptr lda #>save_2 sta level_data_ptr+1 lda #<attr_2 sta attr_ptr lda #>attr_2 sta attr_ptr+1 lda #<palette_2 sta src_ptr lda #>palette_2 sta src_ptr+1 ; load no update routine for custom levels lda #<save_sub_2 sta map_sub_ptr lda #>save_sub_2 sta map_sub_ptr+1 jmp @slot_selected @not_slot2: cmp #MAIN_MENU_SLOT_3 beq @slot3 jmp @no_slot @slot3: lda #<save_3 sta level_data_ptr lda #>save_3 sta level_data_ptr+1 lda #<attr_3 sta attr_ptr lda #>attr_3 sta attr_ptr+1 lda #<palette_3 sta src_ptr lda #>palette_3 sta src_ptr+1 ; load no update routine for custom levels lda #<save_sub_3 sta map_sub_ptr lda #>save_sub_3 sta map_sub_ptr+1 @slot_selected: ; store pointers in backup lda level_data_ptr sta level_data_ptr_bac lda level_data_ptr+1 sta level_data_ptr_bac+1 lda attr_ptr sta attr_ptr_bac lda attr_ptr+1 sta attr_ptr_bac+1 lda src_ptr sta palette_ptr_bac lda src_ptr+1 sta palette_ptr_bac+1 lda seed sta seed_bac lda seed+1 sta seed_bac+1 ; now all pointers are backed up ; load level $00 because init_game increments it lda #$00 sta level ; enable low visiblity mode lda load_flags ora #%01000000 sta load_flags jsr reload_room ;ldx #$00 ;stx $2001 ; disable rendering ; load an empty map first ;lda #<empty_map ;sta level_data_ptr ;lda #>empty_map ;sta level_data_ptr+1 ;lda #<level_data ;sta level_ptr ;lda #>level_data ;sta level_ptr+1 ; disable NMI until load is complete ;set_nmi_flag ;jsr decompress_level ;ldx #$00 ; nt 0 ;jsr load_level ; load actual map ;lda level_data_ptr_bac ;sta level_data_ptr ;lda level_data_ptr_bac+1 ;sta level_data_ptr+1 ;lda #<level_data ;sta level_ptr ;lda #>level_data ;sta level_ptr+1 ;jsr decompress_level ;ldx #$00 ; nametable 0 ; test which load needs to be done ;lda load_flags ;and #%01000000 ; flag for partial load ;bne @load_part ;jsr load_level ; partial load depends on start tile ; therefore it will happen after init_game is called ;@load_part: ;jsr load_attr ; copy palette ;lda #<level_palette ;sta dest_ptr ;lda #>level_palette ;sta dest_ptr+1 ;ldy #PALETTE_SIZE ;jsr memcpy ;lda #$00 ;sta nametable ;vblank_wait ; lda #$00 ; sta $2005 ; sta $2005 ; no scrolling ;jsr init_game ; test if partial load is needed now ; if so we have start location and can go ahead ;lda load_flags ;and #%01000000 ; flag for partial load ;beq @no_part_load ;lda player_x ;sta get_tile_x ;lda player_y ;sta get_tile_y ;ldx #$00 ; nametable 0 ;jsr load_level_part ;@no_part_load: ;vblank_wait @no_slot: @done: rts ; a input pause menu a_input_pause: lda menu_select cmp #PAUSE_MENU_RESUME bne @not_resume: jsr resume_game rts @not_resume: cmp #PAUSE_MENU_QUIT bne @not_quit jsr resume_game jsr start_input_message ; back to main menu rts @not_quit: @done: rts ; b button input ; b loads a map in editor menu b_input: lda game_mode cmp #GAME_MODE_EDITOR_MENU beq @editor_menu jmp @not_editor_menu ; branch was out of range qq @editor_menu: jsr b_input_editor_menu rts @not_editor_menu: cmp #GAME_MODE_EDITOR bne @not_editor ; editor mode jsr update_attr rts @not_editor: cmp #GAME_MODE_GAME bne @done ; debug decrease magic jsr b_input_game ; debug projectile spawn ; TODO remove ; lda player_x ; sta get_tile_x ; lda player_y ; sta get_tile_y ; lda last_move ; jsr spawn_projectile @done: rts ; in-game a input b_input_game: ldy spell_type ; no weapon if 0 bne @init rts @init: lda pmagic bne @magic rts ; if not enough magic @magic: dec pmagic ; -1 ; disable blinking animation lda sprite_data+1 and #%01111111 sta sprite_data+1 jsr init_sword_noise lda weapon_update_lo, y sta delay_update lda weapon_update_hi, y sta delay_update+1 lda weapon_done_lo, y sta delay_done lda weapon_done_hi, y sta delay_done+1 lda weapon_timer_16, y sta delay_timer+1 lda weapon_timer, y sta delay_timer ; store player damage and load ; spell damage lda player_damage sta seed_input ; unused area in ram, use it as temp storage lda spell_damage, y ; damage sta player_damage ; disable inputs lda nmi_flags ora #%00100000 sta nmi_flags ; move weapon x and y based on last inputs lda player_x sta weapon_x lda player_y sta weapon_y lda weapon_sprite, y ; tile sta sprite_data_1+1 rts ; b input for editor menu b_input_editor_menu: lda editor_flags and #%10000000 beq @not_tile_select_mode rts @not_tile_select_mode: lda #MOVE_DELAY_FRAMES*2 sta select_delay lda menu_select cmp #EDITOR_MENU_NEW bne @not_new_map lda #<empty_map sta level_data_ptr lda #>empty_map sta level_data_ptr+1 lda #<test_attr sta attr_ptr lda #>test_attr sta attr_ptr+1 lda #<palette_data sta src_ptr lda #>palette_data sta src_ptr+1 jmp @slot_selected @not_new_map: cmp #EDITOR_MENU_SAVE2 bne @not_slot2 lda #<save_2 sta level_data_ptr lda #>save_2 sta level_data_ptr+1 lda #<attr_2 sta attr_ptr lda #>attr_2 sta attr_ptr+1 lda #<palette_2 sta src_ptr lda #>palette_2 sta src_ptr+1 jmp @slot_selected @not_slot2: cmp #EDITOR_MENU_SAVE3 bne @not_slot3 lda #<save_3 sta level_data_ptr lda #>save_3 sta level_data_ptr+1 lda #<attr_3 sta attr_ptr lda #>attr_3 sta attr_ptr+1 lda #<palette_3 sta src_ptr lda #>palette_3 sta src_ptr+1 jmp @slot_selected ; set up for load @not_slot3: ; otherwise it is slot 1 cmp #EDITOR_MENU_SAVE1 beq @slot_1 rts @slot_1: lda #<save_1 sta level_data_ptr lda #>save_1 sta level_data_ptr+1 lda #<attr_1 sta attr_ptr lda #>attr_1 sta attr_ptr+1 lda #<palette_1 sta src_ptr lda #>palette_1 sta src_ptr+1 @slot_selected: ldx #$00 stx $2001 ; disable rendering ; disable NMI until load is complete set_nmi_flag lda #<level_data sta level_ptr lda #>level_data sta level_ptr+1 jsr decompress_level ldx $00 ; nametable 0 jsr load_level jsr load_attr ; copy palette lda #<level_palette sta dest_ptr lda #>level_palette sta dest_ptr+1 ldy #PALETTE_SIZE jsr memcpy lda #GAME_MODE_EDITOR sta game_mode vblank_wait ; lda #$00 ; sta $2005 ; sta $2005 ; no scrolling jsr init_editor lda #$00 sta nametable jsr init_ai_tiles jsr find_start vblank_wait rts ; select button input ; select changes the players sprite index ; this is only temporary select_input: jsr can_select bne @done lda #MOVE_DELAY_FRAMES sta select_delay lda game_mode cmp #GAME_MODE_EDITOR bne @not_editor ; change sprite 0s sprite index ; inc sprite_data+1 lda player_x sta get_tile_x lda player_y sta get_tile_y jsr get_tile sta sprite_data+1 rts @not_editor: cmp #GAME_MODE_EDITOR_MENU bne @not_editor_menu jsr select_input_editor_menu rts @not_editor_menu: cmp #GAME_MODE_GAME bne @not_game dec level ; level -1 to not inc level during reload jsr reload_room rts @not_game: cmp #GAME_MODE_PAUSE bne @done jsr resume_game jsr start_input_message ; back to main menu @done: rts ; select input editor menu select_input_editor_menu: ; cmp #EDITOR_MENU_TILE ; bne @done ; enable/disable tile select mode lda editor_flags eor #%10000000 sta editor_flags rts ; start button input ; start button saves the ; current level to save_1 for now ; this is only temporary start_input: jsr can_select bne @done lda #MOVE_DELAY_FRAMES sta select_delay ; decide what action to take lda game_mode cmp #GAME_MODE_MENU bne @not_menu ; TODO start puzzle rts @not_menu: cmp #GAME_MODE_EDITOR bne @not_editor jsr start_input_editor rts @not_editor: cmp #GAME_MODE_EDITOR_MENU bne @not_editor_menu jsr start_input_editor_menu rts @not_editor_menu: cmp #GAME_MODE_GAME bne @not_puzzle ; jsr start_input_message jsr init_pause_menu rts @not_puzzle: cmp #GAME_MODE_MESSAGE bne @not_win jsr start_input_message rts @not_win: cmp #GAME_MODE_TITLE bne @not_title jsr start_input_message @not_title: cmp #GAME_MODE_PAUSE bne @done jsr resume_game @done: rts ; start input for win start_input_message: ; load nametable lda #$00 sta $2001 ; no rendering set_nmi_flag lda #$01 sta nametable ldx #$00 stx menu_select jsr load_menu vblank_wait ; lda #$00 ; sta $2005 ; sta $2005 ; no scrolling jsr init_main_menu vblank_wait rts ; editor menu start input start_input_editor_menu: ; sawp to editor mode and nt 0 lda #GAME_MODE_EDITOR sta game_mode lda #$00 sta nametable jsr init_editor rts ; start input editor start_input_editor: ; swap to menu and nametable 1 lda #GAME_MODE_EDITOR_MENU sta game_mode lda #$01 sta nametable jsr init_editor_menu rts ; left input go_left: jsr can_move bne @done lda #MOVE_DELAY_FRAMES sta move_delay ; check gamemode lda game_mode cmp #GAME_MODE_EDITOR bne @not_editor jsr go_left_editor lda #$08 sta smooth_left rts @not_editor: cmp #GAME_MODE_EDITOR_MENU bne @not_editor_menu jsr go_left_editor_menu rts @not_editor_menu: cmp #GAME_MODE_MENU bne @not_main_menu jsr go_left_main_menu rts @not_main_menu: cmp #GAME_MODE_GAME bne @done lda #LEFT jsr check_move_delay beq @done jsr go_left_editor lda #$08 sta smooth_left @done: rts ; editor code go_left_editor: lda #$00 cmp player_x ; dont allow underflow beq @no_dec lda #LEFT sta last_move dec player_x @no_dec: rts ; ediotr menu code go_left_editor_menu: ; check for bit 1 of flags lda editor_flags and #%10000000 beq @not_tile_select_mode dec player_x rts @not_tile_select_mode: ; if in editor menu we decrement tile id lda menu_select cmp #EDITOR_MENU_TILE bne @not_tile_select ldx sprite_data_1+1 dex ;check for invalid values cpx #$FF bne @not_invalid ldx #$FE @not_invalid: stx sprite_data_1+1 rts @not_tile_select: cmp #EDITOR_MENU_ATTR_1 bcc @not_attr cmp #EDITOR_MENU_ATTR_1+4 bcs @not_attr sec sbc #EDITOR_MENU_ATTR_1 tay ldx #$00 ; dec jsr inc_dec_attr ; dec attr_value rts @not_attr: cmp #EDITOR_MENU_COLOR bne @not_color dec color_select jsr init_color_display jsr init_value_display rts @not_color: cmp #EDITOR_MENU_VALUE bne @not_value ldy color_select lda level_palette, y tax dex txa sta level_palette, y jsr init_value_display @not_value: cmp #EDITOR_MENU_BANK bne @not_bank ldy level_data_ptr_bac dey cpy #$3F bne @not_outside_ram ldy #$07 @not_outside_ram: sty level_data_ptr_bac @not_bank: cmp #EDITOR_MENU_ADDR bne @not_addr dec level_data_ptr_bac+1 @not_addr: cmp #EDITOR_MENU_MEMVALUE bne @done lda level_data_ptr_bac sta src_ptr+1 lda level_data_ptr_bac+1 sta src_ptr ldy #$00 lda (src_ptr), y sec sbc #$01 sta (src_ptr), y @done: rts ; main menu left input go_left_main_menu: lda menu_select cmp #MAIN_MENU_LEVEL bne @not_level dec level_select rts @not_level: cmp #MAIN_MENU_SET_SEED bne @not_seed lda seed_input+1 sec sbc #$01 sta seed_input+1 bcs @no_underflow dec seed_input @no_underflow: @not_seed: @done: rts ; right input go_right: jsr can_move bne @done lda #MOVE_DELAY_FRAMES sta move_delay ; check gamemode lda game_mode cmp #GAME_MODE_EDITOR bne @not_editor jsr go_right_editor lda #$08 sta smooth_right rts @not_editor: cmp #GAME_MODE_EDITOR_MENU bne @not_editor_menu jsr go_right_editor_menu rts @not_editor_menu: cmp #GAME_MODE_MENU bne @not_main_menu jsr go_right_main_menu rts @not_main_menu: cmp #GAME_MODE_GAME bne @done lda #RIGHT jsr check_move_delay beq @done jsr go_right_editor lda #$08 sta smooth_right @done: rts ; editor code go_right_editor: lda #$1F cmp player_x ; dont allow overflow beq @no_inc lda #RIGHT sta last_move inc player_x @no_inc: rts ; editor menu code go_right_editor_menu: ; check for bit 1 of flags lda editor_flags and #%10000000 beq @not_tile_select_mode inc player_x rts @not_tile_select_mode: ; if in editor menu we increment tile id ; check cursor positon lda menu_select cmp #EDITOR_MENU_TILE bne @not_tile_select ; increment sprite location ldx sprite_data_1+1 inx ; check for invalid value cpx #$FF bne @not_invalid ldx #$00 @not_invalid: txa ; and #$7F ; only first 128 tiles are valid sta sprite_data_1+1 rts @not_tile_select: cmp #EDITOR_MENU_ATTR_1 bcc @not_attr cmp #EDITOR_MENU_ATTR_1+4 bcs @not_attr ; increment attr value ; inc attr_value sec sbc #EDITOR_MENU_ATTR_1 tay ldx #$01 ; inc jsr inc_dec_attr rts @not_attr: cmp #EDITOR_MENU_COLOR bne @not_color inc color_select jsr init_color_display jsr init_value_display rts @not_color: cmp #EDITOR_MENU_VALUE bne @not_value ldy color_select lda level_palette, y tax inx txa sta level_palette, y jsr init_value_display @not_value: cmp #EDITOR_MENU_BANK bne @not_bank ldy level_data_ptr_bac iny cpy #$08 bne @not_outside_ram ldy #$40 @not_outside_ram: sty level_data_ptr_bac @not_bank: cmp #EDITOR_MENU_ADDR bne @not_addr inc level_data_ptr_bac+1 @not_addr: cmp #EDITOR_MENU_MEMVALUE bne @done lda level_data_ptr_bac sta src_ptr+1 lda level_data_ptr_bac+1 sta src_ptr ldy #$00 lda (src_ptr), y clc adc #$01 sta (src_ptr), y @done: rts ; main menu right input go_right_main_menu: lda menu_select cmp #MAIN_MENU_LEVEL bne @not_level inc level_select rts @not_level: cmp #MAIN_MENU_SET_SEED bne @not_seed lda seed_input+1 clc adc #$01 sta seed_input+1 bcc @no_overflow inc seed_input @no_overflow: @not_seed: @done: rts ; up input go_up: jsr can_move bne @done lda #MOVE_DELAY_FRAMES sta move_delay ; check gamemode lda game_mode cmp #GAME_MODE_EDITOR bne @not_editor jsr go_up_editor lda #$08 sta smooth_up rts @not_editor: cmp #GAME_MODE_EDITOR_MENU bne @not_editor_menu ; check for bit 1 of flags lda editor_flags and #%10000000 beq @not_tile_select_mode dec player_y rts @not_tile_select_mode: dec menu_select rts @not_editor_menu: cmp #GAME_MODE_MENU bne @not_main_menu dec menu_select rts @not_main_menu: cmp #GAME_MODE_GAME bne @not_game lda #UP jsr check_move_delay beq @done jsr go_up_editor lda #$08 sta smooth_up rts @not_game: cmp #GAME_MODE_PAUSE bne @done dec menu_select @done: rts ; editor code go_up_editor: lda #$00 cmp player_y ; dont allow underflow beq @no_dec lda #UP sta last_move dec player_y @no_dec: rts ; down input go_down: jsr can_move bne @done lda #MOVE_DELAY_FRAMES sta move_delay ; check gamemode lda game_mode cmp #GAME_MODE_EDITOR bne @not_editor jsr go_down_editor lda #$08 sta smooth_down rts @not_editor: cmp #GAME_MODE_EDITOR_MENU bne @not_editor_menu ; check for bit 1 of flags lda editor_flags and #%10000000 beq @not_tile_select_mode inc player_y rts @not_tile_select_mode: inc menu_select rts @not_editor_menu: cmp #GAME_MODE_MENU bne @not_main_menu inc menu_select rts @not_main_menu: cmp #GAME_MODE_GAME bne @not_game lda #DOWN jsr check_move_delay beq @done jsr go_down_editor lda #$08 sta smooth_down rts @not_game: cmp #GAME_MODE_PAUSE bne @done inc menu_select @done: rts ; editor code go_down_editor: lda #$1D cmp player_y ; dont allow overflow beq @no_inc lda #DOWN sta last_move inc player_y @no_inc: rts
17.045877
109
0.654955
c1e7be76735638891f90c3cb1b48ae36e205794b
3,622
asm
Assembly
tablets.asm
youngkingtut/z3randomizer
983d0d6efc9dde2a08e47144530d80081aeceb2b
[ "MIT" ]
1
2019-11-21T20:35:05.000Z
2019-11-21T20:35:05.000Z
tablets.asm
youngkingtut/z3randomizer
983d0d6efc9dde2a08e47144530d80081aeceb2b
[ "MIT" ]
null
null
null
tablets.asm
youngkingtut/z3randomizer
983d0d6efc9dde2a08e47144530d80081aeceb2b
[ "MIT" ]
null
null
null
;================================================================================ ; Randomize Tablets ;-------------------------------------------------------------------------------- ItemSet_EtherTablet: PHA : LDA !NPC_FLAGS_2 : ORA.b #$01 : STA !NPC_FLAGS_2 : PLA RTL ;-------------------------------------------------------------------------------- ItemSet_BombosTablet: PHA : LDA !NPC_FLAGS_2 : ORA.b #$02 : STA !NPC_FLAGS_2 : PLA RTL ;-------------------------------------------------------------------------------- ItemCheck_EtherTablet: LDA !NPC_FLAGS_2 : AND.b #$01 RTL ;-------------------------------------------------------------------------------- ItemCheck_BombosTablet: LDA !NPC_FLAGS_2 : AND.b #$02 RTL ;-------------------------------------------------------------------------------- SetTabletItem: JSL.l GetSpriteID PHA LDA $8A : CMP.b #$03 : BEQ .ether ; if we're on the map where ether is, we're the ether tablet .bombos JSL.l ItemSet_BombosTablet : BRA .done .ether JSL.l ItemSet_EtherTablet .done PLA RTL ;-------------------------------------------------------------------------------- SpawnTabletItem: ; JSL.l HeartPieceGet ;RTL JSL.l LoadOutdoorValue PHA JSL.l PrepDynamicTile LDA.b #$01 : STA !FORCE_HEART_SPAWN : STA !SKIP_HEART_SAVE JSL.l SetTabletItem LDA.b #$EB STA $7FFE00 JSL Sprite_SpawnDynamically PLA : STA $0E80, Y ; Store item type LDA $22 : STA $0D10, Y LDA $23 : STA $0D30, Y LDA $20 : STA $0D00, Y LDA $21 : STA $0D20, Y LDA.b #$00 : STA $0F20, Y LDA.b #$7F : STA $0F70, Y ; spawn WAY up high RTL ;-------------------------------------------------------------------------------- MaybeUnlockTabletAnimation: PHA : PHP JSL.l IsMedallion : BCC + STZ $0112 ; disable falling-medallion mode STZ $03EF ; release link from item-up pose LDA.b #$00 : STA $5D ; set link to ground state REP #$20 ; set 16-bit accumulator LDA $8A : CMP.w #$0030 : BNE ++ ; Desert SEP #$20 ; set 8-bit accumulator LDA.b #$02 : STA $2F ; face link forward LDA.b #$3C : STA $46 ; lock link for 60f ++ SEP #$20 ; set 8-bit accumulator + PLP : PLA RTL ;-------------------------------------------------------------------------------- IsMedallion: REP #$20 ; set 16-bit accumulator LDA $8A CMP.w #$03 : BNE + ; Death Mountain LDA $22 : CMP.w #1890 : !BGE ++ SEC BRL .done ++ BRA .false + CMP.w #$30 : BNE + ; Desert LDA $22 : CMP.w #512 : !BLT ++ SEC BRL .done ++ + .false CLC .done SEP #$20 ; set 8-bit accumulator RTL ;-------------------------------------------------------------------------------- LoadNarrowObject: LDA AddReceivedItemExpanded_wide_item_flag, X : STA ($92), Y ; AddReceiveItem.wide_item_flag? RTL ;-------------------------------------------------------------------------------- DrawNarrowDroppedObject: ; If it's a 16x16 sprite, we'll only draw one, otherwise we'll end up drawing ; two 8x8 sprites stack on top of each other CMP.b #$02 : BEQ .large_sprite REP #$20 ; Shift Y coordinate 8 pixels down LDA $08 : STA $00 SEP #$20 JSL.l Ancilla_SetOam_XY_Long ; always use the same character graphic (0x34) LDA.b #$34 : STA ($90), Y : INY LDA AddReceivedItemExpanded_properties, X : BPL .valid_lower_properties LDA $74 .valid_lower_properties ASL A : ORA.b #$30 : STA ($90), Y INY : PHY TYA : !SUB.b #$04 : LSR #2 : TAY LDA.b #$00 : STA ($92), Y PLY .large_sprite RTL ;--------------------------------------------------------------------------------
26.82963
96
0.464936
c1e943ee2158f299cb9add9d8ec681d774f6952d
326
asm
Assembly
programs/oeis/084/A084899.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/084/A084899.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/084/A084899.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A084899: Binomial transform of heptagonal numbers A000566. ; 0,1,9,42,152,480,1392,3808,9984,25344,62720,152064,362496,851968,1978368,4546560,10354688,23396352,52494336,117047296,259522560,572522496,1257242624,2749366272,5989466112,13002342400,28135391232 mov $1,2 mov $2,$0 mul $0,5 bin $0,2 pow $1,$2 mul $0,$1 div $0,20
29.636364
196
0.779141
f4dcbb7203586f0b2c91de8f6a765baa78169cd4
7,401
asm
Assembly
Transynther/x86/_processed/NC/_st_zr_sm_/i7-7700_9_0x48.log_21829_41.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_st_zr_sm_/i7-7700_9_0x48.log_21829_41.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_st_zr_sm_/i7-7700_9_0x48.log_21829_41.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0xc6d3, %rbp dec %rcx movl $0x61626364, (%rbp) nop nop nop nop and %rax, %rax lea addresses_UC_ht+0xb373, %r12 add %r13, %r13 mov (%r12), %ebp sub %rax, %rax lea addresses_WC_ht+0xd93, %rbp nop nop nop cmp %rdi, %rdi mov (%rbp), %ax nop xor $37147, %rax lea addresses_A_ht+0x17053, %rcx nop nop nop dec %rbp movb (%rcx), %al nop inc %rsi lea addresses_normal_ht+0x6b42, %r13 nop nop nop nop add $24639, %rsi mov $0x6162636465666768, %rdi movq %rdi, %xmm3 movups %xmm3, (%r13) nop nop nop nop xor $1881, %rax lea addresses_UC_ht+0x18653, %rsi lea addresses_WT_ht+0x14053, %rdi nop cmp $27407, %rbx mov $59, %rcx rep movsq nop nop nop nop nop cmp $17493, %r13 lea addresses_D_ht+0xb733, %rax nop add %rdi, %rdi vmovups (%rax), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r13 nop nop cmp $3270, %rcx lea addresses_WC_ht+0x1e53, %rax nop nop nop nop nop cmp %rbx, %rbx mov $0x6162636465666768, %r13 movq %r13, (%rax) nop mfence lea addresses_WC_ht+0x1808b, %rsi lea addresses_D_ht+0x25, %rdi nop nop sub $49353, %rbp mov $125, %rcx rep movsq nop nop nop nop inc %r13 pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r8 push %r9 push %rax push %rbp push %rcx // Store lea addresses_PSE+0x18d93, %rax nop nop nop nop xor %r9, %r9 movw $0x5152, (%rax) nop xor $33364, %rbp // Load lea addresses_RW+0x9853, %r9 nop xor $21085, %r10 movaps (%r9), %xmm5 vpextrq $0, %xmm5, %rax nop nop nop dec %r9 // Store lea addresses_normal+0x18b53, %rax nop and %r10, %r10 movb $0x51, (%rax) nop cmp $27783, %r8 // Load mov $0x74010a0000000353, %rax nop nop nop nop nop dec %rcx vmovups (%rax), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $1, %xmm7, %rbp nop nop and %rbp, %rbp // Store mov $0x39b7f60000000c53, %r8 nop nop nop cmp $9806, %r9 mov $0x5152535455565758, %rbp movq %rbp, %xmm3 movups %xmm3, (%r8) nop inc %r10 // Faulty Load mov $0x39b7f60000000c53, %r15 nop add %rax, %rax mov (%r15), %rcx lea oracles, %r9 and $0xff, %rcx shlq $12, %rcx mov (%r9,%rcx,1), %rcx pop %rcx pop %rbp pop %rax pop %r9 pop %r8 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'AVXalign': True, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 8, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 7, 'size': 8, 'same': False, 'NT': True}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}} {'58': 1, '00': 21828} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
34.263889
2,999
0.652479
b90613d81b3cee58946ad6b03468b5e785a10731
1,490
asm
Assembly
syzygy/pe/dos_stub.asm
nzeh/syzygy
3573e3d458dbb4285753c28a7cb42ced739f9f55
[ "Apache-2.0" ]
343
2015-01-07T05:58:44.000Z
2022-03-15T14:55:21.000Z
syzygy/pe/dos_stub.asm
nzeh/syzygy-nzeh
3757e53f850644721284073de318e218224dd411
[ "Apache-2.0" ]
61
2015-03-19T18:20:21.000Z
2019-10-23T12:58:23.000Z
syzygy/pe/dos_stub.asm
nzeh/syzygy-nzeh
3757e53f850644721284073de318e218224dd411
[ "Apache-2.0" ]
66
2015-01-20T15:35:05.000Z
2021-11-25T16:49:41.000Z
; Copyright 2012 Google Inc. All Rights Reserved. ; ; Licensed under the Apache License, Version 2.0 (the "License"); ; you may not use this file except in compliance with the License. ; You may obtain a copy of the License at ; ; http://www.apache.org/licenses/LICENSE-2.0 ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; See the License for the specific language governing permissions and ; limitations under the License. ; ; Compile this with: ; ; ml.exe /safeseh /Fo dos_stub.obj /c dos_stub.asm ; ; The output of this is then converted into an array in dos_stub.h. .386 .MODEL TINY, C .CODE PUBLIC end_dos_stub begin_dos_stub PROC ; Fold the code and data segments, as our data is in this function. ; Note that begin_dos_stub is implicitly the start of the data segment. push cs pop ds ; Compute the distance to the string through this subtraction instead ; of e.g. a lea instruction to avoid the need for relocation entries mov dx, message - begin_dos_stub ; Print the message to the console mov ah, 09h int 21h ; Terminate the program mov ah, 00h int 21h message DB 'This is a Windows program, you cannot run it in DOS.\r\n$' ; Expose the end of the DOS stub as a function to make it easy to ; calculate its length. end_dos_stub LABEL PROC begin_dos_stub ENDP END
27.592593
74
0.740268
ec61d41965dbb12ff5f8ef503140ade3a31f7a63
304
asm
Assembly
programs/oeis/128/A128057.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/128/A128057.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/128/A128057.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A128057: Expansion of (1+x)/sqrt(1+4x^2). ; 1,1,-2,-2,6,6,-20,-20,70,70,-252,-252,924,924,-3432,-3432,12870,12870,-48620,-48620,184756,184756,-705432,-705432,2704156,2704156,-10400600,-10400600,40116600,40116600,-155117520,-155117520 div $0,2 mov $1,2 mov $2,3 add $2,$0 sub $1,$2 bin $1,$0 mov $0,$1
27.636364
191
0.674342
e2a0631673ce46e982e1882ca372bd9c772983c0
642
asm
Assembly
oeis/165/A165150.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/165/A165150.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/165/A165150.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A165150: a(n) = (3*10^n-6^n)/2. ; Submitted by Jamie Morken(s1.) ; 1,12,132,1392,14352,146112,1476672,14860032,149160192,1494961152,14969766912,149818601472,1498911608832,14993469652992,149960817917952,1499764907507712,14998589445046272,149991536670277632,1499949220021665792,14999695320129994752,149998171920779968512,1499989031524679811072,14999934189148078866432,149999605134888473198592,1499997630809330839191552,14999985784855985035149312,149999914709135910210895872,1499999488254815461265375232,14999996929528892767592251392,149999981577173356605553508352 mov $1,10 pow $1,$0 mul $1,3 mov $2,6 pow $2,$0 sub $1,$2 mov $0,$1 div $0,2
49.384615
496
0.850467
46bafad1cf8f906d9b7cc38833aa9465d90c790f
7,816
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_5045_2914.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_5045_2914.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_5045_2914.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r15 push %r8 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x185d6, %r15 nop nop and %r8, %r8 vmovups (%r15), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $0, %xmm4, %rbx nop nop nop nop nop cmp %rbx, %rbx lea addresses_D_ht+0x959e, %rsi nop lfence mov (%rsi), %edi and $53553, %r11 lea addresses_UC_ht+0xcf9e, %r15 nop nop nop sub %r10, %r10 mov $0x6162636465666768, %rbx movq %rbx, %xmm0 movups %xmm0, (%r15) cmp $62961, %rdi lea addresses_UC_ht+0x1239e, %rdi nop nop nop nop and %r8, %r8 movb $0x61, (%rdi) nop nop nop nop nop cmp %r8, %r8 lea addresses_normal_ht+0x11afe, %rsi lea addresses_WC_ht+0xd93e, %rdi nop dec %rbx mov $65, %rcx rep movsl nop and %rbx, %rbx lea addresses_UC_ht+0xe19e, %r15 nop xor $46607, %r10 mov $0x6162636465666768, %rbx movq %rbx, %xmm7 and $0xffffffffffffffc0, %r15 movaps %xmm7, (%r15) nop nop xor %r11, %r11 lea addresses_D_ht+0xb9e, %rsi lea addresses_WT_ht+0x16f9e, %rdi nop nop dec %r8 mov $77, %rcx rep movsw sub $9226, %r15 lea addresses_normal_ht+0x239e, %rsi lea addresses_normal_ht+0x10466, %rdi nop sub %rbx, %rbx mov $10, %rcx rep movsw nop nop inc %r10 lea addresses_WC_ht+0xe79e, %rsi clflush (%rsi) nop nop cmp $41188, %rdi mov (%rsi), %r11d nop nop nop cmp %rcx, %rcx lea addresses_normal_ht+0x159e, %rsi lea addresses_WC_ht+0x1b8be, %rdi nop nop xor %r15, %r15 mov $6, %rcx rep movsq nop inc %rbx lea addresses_D_ht+0x1c79e, %rsi lea addresses_WC_ht+0x4bde, %rdi nop inc %rbx mov $78, %rcx rep movsq nop and %r15, %r15 lea addresses_A_ht+0xe5cd, %rbx nop nop nop sub %r8, %r8 mov $0x6162636465666768, %r11 movq %r11, %xmm4 vmovups %ymm4, (%rbx) nop nop nop nop cmp %rbx, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r15 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r13 push %r14 push %r9 push %rbx push %rdi push %rsi // Store lea addresses_RW+0x10a3e, %rbx clflush (%rbx) nop inc %r14 movl $0x51525354, (%rbx) nop sub %rsi, %rsi // Load mov $0x41e, %r10 clflush (%r10) nop nop nop nop nop add $4671, %rdi mov (%r10), %esi nop dec %rbx // Store lea addresses_WT+0x1439e, %rsi nop nop nop nop nop inc %r9 mov $0x5152535455565758, %r10 movq %r10, %xmm4 movups %xmm4, (%rsi) nop nop nop nop nop dec %r9 // Faulty Load lea addresses_A+0xb9e, %r13 dec %r9 movb (%r13), %bl lea oracles, %r13 and $0xff, %rbx shlq $12, %rbx mov (%r13,%rbx,1), %rbx pop %rsi pop %rdi pop %rbx pop %r9 pop %r14 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_A', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_RW', 'same': False, 'size': 4, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_P', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_A', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_UC_ht', 'same': True, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'00': 5045} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
34.280702
2,999
0.656986
a0884686baac58e7453662cdbc529ac487b23a16
450
asm
Assembly
bddisasm_test/fred/fred_64.asm
CrackerCat/bddisasm
5a617986b7372dc6fe9ba63f67553c5ee2728d09
[ "Apache-2.0" ]
675
2020-07-09T12:57:49.000Z
2022-03-26T15:03:53.000Z
bddisasm_test/fred/fred_64.asm
FDlucifer/bddisasm
76d92e73c29eaaf175f2c77465b1c6eacaef6f3c
[ "Apache-2.0" ]
41
2020-07-22T07:15:07.000Z
2022-03-23T08:34:28.000Z
bddisasm_test/fred/fred_64.asm
FDlucifer/bddisasm
76d92e73c29eaaf175f2c77465b1c6eacaef6f3c
[ "Apache-2.0" ]
94
2020-07-09T14:39:02.000Z
2022-03-27T10:37:03.000Z
bits 64 db 0xF3, 0x0F, 0x01, 0xCA ; ERETU db 0xF2, 0x0F, 0x01, 0xCA ; ERETS db 0xF2, 0x0F, 0x00, 0x30 ; LKGS word ptr [rax] db 0xF2, 0x48, 0x0F, 0x00, 0x30 ; LKGS word ptr [rax] db 0xF2, 0x66, 0x0F, 0x00, 0x30 ; LKGS word ptr [rax] db 0xF2, 0x0F, 0x00, 0xF1 ; LKGS ecx db 0xF2, 0x48, 0x0F, 0x00, 0xF1 ; LKGS rcx db 0xF2, 0x66, 0x0F, 0x00, 0xF1 ; LKGS cx
45
61
0.528889
75f29d13c90f5c8f6c221a6816695884ccab3b85
47,449
asm
Assembly
kernel/linux-5.4/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm
josehu07/SplitFS
d7442fa67a17de7057664f91defbfdbf10dd7f4a
[ "Apache-2.0" ]
31
2021-04-27T08:50:40.000Z
2022-03-01T02:26:21.000Z
kernel/linux-5.4/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm
josehu07/SplitFS
d7442fa67a17de7057664f91defbfdbf10dd7f4a
[ "Apache-2.0" ]
13
2021-07-10T04:36:17.000Z
2022-03-03T10:50:05.000Z
kernel/linux-5.4/drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm
josehu07/SplitFS
d7442fa67a17de7057664f91defbfdbf10dd7f4a
[ "Apache-2.0" ]
12
2021-04-06T02:23:10.000Z
2022-02-28T11:43:19.000Z
/* * Copyright 2016 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ /* To compile this assembly code: * PROJECT=greenland ./sp3 cwsr_trap_handler_gfx9.asm -hex tmp.hex */ var ACK_SQC_STORE = 1 //workaround for suspected SQC store bug causing incorrect stores under concurrency var SAVE_AFTER_XNACK_ERROR = 1 //workaround for TCP store failure after XNACK error when ALLOW_REPLAY=0, for debugger var SINGLE_STEP_MISSED_WORKAROUND = 1 //workaround for lost MODE.DEBUG_EN exception when SAVECTX raised /**************************************************************************/ /* variables */ /**************************************************************************/ var SQ_WAVE_STATUS_INST_ATC_SHIFT = 23 var SQ_WAVE_STATUS_INST_ATC_MASK = 0x00800000 var SQ_WAVE_STATUS_SPI_PRIO_SHIFT = 1 var SQ_WAVE_STATUS_SPI_PRIO_MASK = 0x00000006 var SQ_WAVE_STATUS_HALT_MASK = 0x2000 var SQ_WAVE_STATUS_PRE_SPI_PRIO_SHIFT = 0 var SQ_WAVE_STATUS_PRE_SPI_PRIO_SIZE = 1 var SQ_WAVE_STATUS_POST_SPI_PRIO_SHIFT = 3 var SQ_WAVE_STATUS_POST_SPI_PRIO_SIZE = 29 var SQ_WAVE_STATUS_ALLOW_REPLAY_MASK = 0x400000 var SQ_WAVE_LDS_ALLOC_LDS_SIZE_SHIFT = 12 var SQ_WAVE_LDS_ALLOC_LDS_SIZE_SIZE = 9 var SQ_WAVE_GPR_ALLOC_VGPR_SIZE_SHIFT = 8 var SQ_WAVE_GPR_ALLOC_VGPR_SIZE_SIZE = 6 var SQ_WAVE_GPR_ALLOC_SGPR_SIZE_SHIFT = 24 var SQ_WAVE_GPR_ALLOC_SGPR_SIZE_SIZE = 3 //FIXME sq.blk still has 4 bits at this time while SQ programming guide has 3 bits var SQ_WAVE_TRAPSTS_SAVECTX_MASK = 0x400 var SQ_WAVE_TRAPSTS_EXCE_MASK = 0x1FF // Exception mask var SQ_WAVE_TRAPSTS_SAVECTX_SHIFT = 10 var SQ_WAVE_TRAPSTS_MEM_VIOL_MASK = 0x100 var SQ_WAVE_TRAPSTS_MEM_VIOL_SHIFT = 8 var SQ_WAVE_TRAPSTS_PRE_SAVECTX_MASK = 0x3FF var SQ_WAVE_TRAPSTS_PRE_SAVECTX_SHIFT = 0x0 var SQ_WAVE_TRAPSTS_PRE_SAVECTX_SIZE = 10 var SQ_WAVE_TRAPSTS_POST_SAVECTX_MASK = 0xFFFFF800 var SQ_WAVE_TRAPSTS_POST_SAVECTX_SHIFT = 11 var SQ_WAVE_TRAPSTS_POST_SAVECTX_SIZE = 21 var SQ_WAVE_TRAPSTS_ILLEGAL_INST_MASK = 0x800 var SQ_WAVE_TRAPSTS_XNACK_ERROR_MASK = 0x10000000 var SQ_WAVE_IB_STS_RCNT_SHIFT = 16 //FIXME var SQ_WAVE_IB_STS_FIRST_REPLAY_SHIFT = 15 //FIXME var SQ_WAVE_IB_STS_RCNT_FIRST_REPLAY_MASK = 0x1F8000 var SQ_WAVE_IB_STS_RCNT_FIRST_REPLAY_MASK_NEG = 0x00007FFF //FIXME var SQ_WAVE_MODE_DEBUG_EN_MASK = 0x800 var SQ_BUF_RSRC_WORD1_ATC_SHIFT = 24 var SQ_BUF_RSRC_WORD3_MTYPE_SHIFT = 27 var TTMP11_SAVE_RCNT_FIRST_REPLAY_SHIFT = 26 // bits [31:26] unused by SPI debug data var TTMP11_SAVE_RCNT_FIRST_REPLAY_MASK = 0xFC000000 /* Save */ var S_SAVE_BUF_RSRC_WORD1_STRIDE = 0x00040000 //stride is 4 bytes var S_SAVE_BUF_RSRC_WORD3_MISC = 0x00807FAC //SQ_SEL_X/Y/Z/W, BUF_NUM_FORMAT_FLOAT, (0 for MUBUF stride[17:14] when ADD_TID_ENABLE and BUF_DATA_FORMAT_32 for MTBUF), ADD_TID_ENABLE var S_SAVE_SPI_INIT_ATC_MASK = 0x08000000 //bit[27]: ATC bit var S_SAVE_SPI_INIT_ATC_SHIFT = 27 var S_SAVE_SPI_INIT_MTYPE_MASK = 0x70000000 //bit[30:28]: Mtype var S_SAVE_SPI_INIT_MTYPE_SHIFT = 28 var S_SAVE_SPI_INIT_FIRST_WAVE_MASK = 0x04000000 //bit[26]: FirstWaveInTG var S_SAVE_SPI_INIT_FIRST_WAVE_SHIFT = 26 var S_SAVE_PC_HI_RCNT_SHIFT = 27 //FIXME check with Brian to ensure all fields other than PC[47:0] can be used var S_SAVE_PC_HI_RCNT_MASK = 0xF8000000 //FIXME var S_SAVE_PC_HI_FIRST_REPLAY_SHIFT = 26 //FIXME var S_SAVE_PC_HI_FIRST_REPLAY_MASK = 0x04000000 //FIXME var s_save_spi_init_lo = exec_lo var s_save_spi_init_hi = exec_hi var s_save_pc_lo = ttmp0 //{TTMP1, TTMP0} = {3'h0,pc_rewind[3:0], HT[0],trapID[7:0], PC[47:0]} var s_save_pc_hi = ttmp1 var s_save_exec_lo = ttmp2 var s_save_exec_hi = ttmp3 var s_save_tmp = ttmp14 var s_save_trapsts = ttmp15 //not really used until the end of the SAVE routine var s_save_xnack_mask_lo = ttmp6 var s_save_xnack_mask_hi = ttmp7 var s_save_buf_rsrc0 = ttmp8 var s_save_buf_rsrc1 = ttmp9 var s_save_buf_rsrc2 = ttmp10 var s_save_buf_rsrc3 = ttmp11 var s_save_status = ttmp12 var s_save_mem_offset = ttmp4 var s_save_alloc_size = s_save_trapsts //conflict var s_save_m0 = ttmp5 var s_save_ttmps_lo = s_save_tmp //no conflict var s_save_ttmps_hi = s_save_trapsts //no conflict /* Restore */ var S_RESTORE_BUF_RSRC_WORD1_STRIDE = S_SAVE_BUF_RSRC_WORD1_STRIDE var S_RESTORE_BUF_RSRC_WORD3_MISC = S_SAVE_BUF_RSRC_WORD3_MISC var S_RESTORE_SPI_INIT_ATC_MASK = 0x08000000 //bit[27]: ATC bit var S_RESTORE_SPI_INIT_ATC_SHIFT = 27 var S_RESTORE_SPI_INIT_MTYPE_MASK = 0x70000000 //bit[30:28]: Mtype var S_RESTORE_SPI_INIT_MTYPE_SHIFT = 28 var S_RESTORE_SPI_INIT_FIRST_WAVE_MASK = 0x04000000 //bit[26]: FirstWaveInTG var S_RESTORE_SPI_INIT_FIRST_WAVE_SHIFT = 26 var S_RESTORE_PC_HI_RCNT_SHIFT = S_SAVE_PC_HI_RCNT_SHIFT var S_RESTORE_PC_HI_RCNT_MASK = S_SAVE_PC_HI_RCNT_MASK var S_RESTORE_PC_HI_FIRST_REPLAY_SHIFT = S_SAVE_PC_HI_FIRST_REPLAY_SHIFT var S_RESTORE_PC_HI_FIRST_REPLAY_MASK = S_SAVE_PC_HI_FIRST_REPLAY_MASK var s_restore_spi_init_lo = exec_lo var s_restore_spi_init_hi = exec_hi var s_restore_mem_offset = ttmp12 var s_restore_accvgpr_offset = ttmp13 var s_restore_alloc_size = ttmp3 var s_restore_tmp = ttmp2 var s_restore_mem_offset_save = s_restore_tmp //no conflict var s_restore_accvgpr_offset_save = ttmp7 var s_restore_m0 = s_restore_alloc_size //no conflict var s_restore_mode = s_restore_accvgpr_offset_save var s_restore_pc_lo = ttmp0 var s_restore_pc_hi = ttmp1 var s_restore_exec_lo = ttmp4 var s_restore_exec_hi = ttmp5 var s_restore_status = ttmp14 var s_restore_trapsts = ttmp15 var s_restore_xnack_mask_lo = xnack_mask_lo var s_restore_xnack_mask_hi = xnack_mask_hi var s_restore_buf_rsrc0 = ttmp8 var s_restore_buf_rsrc1 = ttmp9 var s_restore_buf_rsrc2 = ttmp10 var s_restore_buf_rsrc3 = ttmp11 var s_restore_ttmps_lo = s_restore_tmp //no conflict var s_restore_ttmps_hi = s_restore_alloc_size //no conflict /**************************************************************************/ /* trap handler entry points */ /**************************************************************************/ /* Shader Main*/ shader main asic(DEFAULT) type(CS) s_branch L_SKIP_RESTORE //NOT restore. might be a regular trap or save L_JUMP_TO_RESTORE: s_branch L_RESTORE //restore L_SKIP_RESTORE: s_getreg_b32 s_save_status, hwreg(HW_REG_STATUS) //save STATUS since we will change SCC s_andn2_b32 s_save_status, s_save_status, SQ_WAVE_STATUS_SPI_PRIO_MASK //check whether this is for save if SINGLE_STEP_MISSED_WORKAROUND // No single step exceptions if MODE.DEBUG_EN=0. s_getreg_b32 ttmp2, hwreg(HW_REG_MODE) s_and_b32 ttmp2, ttmp2, SQ_WAVE_MODE_DEBUG_EN_MASK s_cbranch_scc0 L_NO_SINGLE_STEP_WORKAROUND // Second-level trap already handled exception if STATUS.HALT=1. s_and_b32 ttmp2, s_save_status, SQ_WAVE_STATUS_HALT_MASK // Prioritize single step exception over context save. // Second-level trap will halt wave and RFE, re-entering for SAVECTX. s_cbranch_scc0 L_FETCH_2ND_TRAP L_NO_SINGLE_STEP_WORKAROUND: end s_getreg_b32 s_save_trapsts, hwreg(HW_REG_TRAPSTS) s_and_b32 ttmp2, s_save_trapsts, SQ_WAVE_TRAPSTS_SAVECTX_MASK //check whether this is for save s_cbranch_scc1 L_SAVE //this is the operation for save // ********* Handle non-CWSR traps ******************* // Illegal instruction is a non-maskable exception which blocks context save. // Halt the wavefront and return from the trap. s_and_b32 ttmp2, s_save_trapsts, SQ_WAVE_TRAPSTS_ILLEGAL_INST_MASK s_cbranch_scc1 L_HALT_WAVE // If STATUS.MEM_VIOL is asserted then we cannot fetch from the TMA. // Instead, halt the wavefront and return from the trap. s_and_b32 ttmp2, s_save_trapsts, SQ_WAVE_TRAPSTS_MEM_VIOL_MASK s_cbranch_scc0 L_FETCH_2ND_TRAP L_HALT_WAVE: // If STATUS.HALT is set then this fault must come from SQC instruction fetch. // We cannot prevent further faults. Spin wait until context saved. s_and_b32 ttmp2, s_save_status, SQ_WAVE_STATUS_HALT_MASK s_cbranch_scc0 L_NOT_ALREADY_HALTED L_WAIT_CTX_SAVE: s_sleep 0x10 s_getreg_b32 ttmp2, hwreg(HW_REG_TRAPSTS) s_and_b32 ttmp2, ttmp2, SQ_WAVE_TRAPSTS_SAVECTX_MASK s_cbranch_scc0 L_WAIT_CTX_SAVE L_NOT_ALREADY_HALTED: s_or_b32 s_save_status, s_save_status, SQ_WAVE_STATUS_HALT_MASK // If the PC points to S_ENDPGM then context save will fail if STATUS.HALT is set. // Rewind the PC to prevent this from occurring. The debugger compensates for this. s_sub_u32 ttmp0, ttmp0, 0x8 s_subb_u32 ttmp1, ttmp1, 0x0 L_FETCH_2ND_TRAP: // Preserve and clear scalar XNACK state before issuing scalar reads. // Save IB_STS.FIRST_REPLAY[15] and IB_STS.RCNT[20:16] into unused space ttmp11[31:26]. s_getreg_b32 ttmp2, hwreg(HW_REG_IB_STS) s_and_b32 ttmp3, ttmp2, SQ_WAVE_IB_STS_RCNT_FIRST_REPLAY_MASK s_lshl_b32 ttmp3, ttmp3, (TTMP11_SAVE_RCNT_FIRST_REPLAY_SHIFT - SQ_WAVE_IB_STS_FIRST_REPLAY_SHIFT) s_andn2_b32 ttmp11, ttmp11, TTMP11_SAVE_RCNT_FIRST_REPLAY_MASK s_or_b32 ttmp11, ttmp11, ttmp3 s_andn2_b32 ttmp2, ttmp2, SQ_WAVE_IB_STS_RCNT_FIRST_REPLAY_MASK s_setreg_b32 hwreg(HW_REG_IB_STS), ttmp2 // Read second-level TBA/TMA from first-level TMA and jump if available. // ttmp[2:5] and ttmp12 can be used (others hold SPI-initialized debug data) // ttmp12 holds SQ_WAVE_STATUS s_getreg_b32 ttmp14, hwreg(HW_REG_SQ_SHADER_TMA_LO) s_getreg_b32 ttmp15, hwreg(HW_REG_SQ_SHADER_TMA_HI) s_lshl_b64 [ttmp14, ttmp15], [ttmp14, ttmp15], 0x8 s_load_dwordx2 [ttmp2, ttmp3], [ttmp14, ttmp15], 0x0 glc:1 // second-level TBA s_waitcnt lgkmcnt(0) s_load_dwordx2 [ttmp14, ttmp15], [ttmp14, ttmp15], 0x8 glc:1 // second-level TMA s_waitcnt lgkmcnt(0) s_and_b64 [ttmp2, ttmp3], [ttmp2, ttmp3], [ttmp2, ttmp3] s_cbranch_scc0 L_NO_NEXT_TRAP // second-level trap handler not been set s_setpc_b64 [ttmp2, ttmp3] // jump to second-level trap handler L_NO_NEXT_TRAP: s_getreg_b32 s_save_trapsts, hwreg(HW_REG_TRAPSTS) s_and_b32 s_save_trapsts, s_save_trapsts, SQ_WAVE_TRAPSTS_EXCE_MASK // Check whether it is an exception s_cbranch_scc1 L_EXCP_CASE // Exception, jump back to the shader program directly. s_add_u32 ttmp0, ttmp0, 4 // S_TRAP case, add 4 to ttmp0 s_addc_u32 ttmp1, ttmp1, 0 L_EXCP_CASE: s_and_b32 ttmp1, ttmp1, 0xFFFF // Restore SQ_WAVE_IB_STS. s_lshr_b32 ttmp2, ttmp11, (TTMP11_SAVE_RCNT_FIRST_REPLAY_SHIFT - SQ_WAVE_IB_STS_FIRST_REPLAY_SHIFT) s_and_b32 ttmp2, ttmp2, SQ_WAVE_IB_STS_RCNT_FIRST_REPLAY_MASK s_setreg_b32 hwreg(HW_REG_IB_STS), ttmp2 // Restore SQ_WAVE_STATUS. s_and_b64 exec, exec, exec // Restore STATUS.EXECZ, not writable by s_setreg_b32 s_and_b64 vcc, vcc, vcc // Restore STATUS.VCCZ, not writable by s_setreg_b32 set_status_without_spi_prio(s_save_status, ttmp2) s_rfe_b64 [ttmp0, ttmp1] // ********* End handling of non-CWSR traps ******************* /**************************************************************************/ /* save routine */ /**************************************************************************/ L_SAVE: s_and_b32 s_save_pc_hi, s_save_pc_hi, 0x0000ffff //pc[47:32] s_mov_b32 s_save_tmp, 0 //clear saveCtx bit s_setreg_b32 hwreg(HW_REG_TRAPSTS, SQ_WAVE_TRAPSTS_SAVECTX_SHIFT, 1), s_save_tmp //clear saveCtx bit s_getreg_b32 s_save_tmp, hwreg(HW_REG_IB_STS, SQ_WAVE_IB_STS_RCNT_SHIFT, SQ_WAVE_IB_STS_RCNT_SIZE) //save RCNT s_lshl_b32 s_save_tmp, s_save_tmp, S_SAVE_PC_HI_RCNT_SHIFT s_or_b32 s_save_pc_hi, s_save_pc_hi, s_save_tmp s_getreg_b32 s_save_tmp, hwreg(HW_REG_IB_STS, SQ_WAVE_IB_STS_FIRST_REPLAY_SHIFT, SQ_WAVE_IB_STS_FIRST_REPLAY_SIZE) //save FIRST_REPLAY s_lshl_b32 s_save_tmp, s_save_tmp, S_SAVE_PC_HI_FIRST_REPLAY_SHIFT s_or_b32 s_save_pc_hi, s_save_pc_hi, s_save_tmp s_getreg_b32 s_save_tmp, hwreg(HW_REG_IB_STS) //clear RCNT and FIRST_REPLAY in IB_STS s_and_b32 s_save_tmp, s_save_tmp, SQ_WAVE_IB_STS_RCNT_FIRST_REPLAY_MASK_NEG s_setreg_b32 hwreg(HW_REG_IB_STS), s_save_tmp /* inform SPI the readiness and wait for SPI's go signal */ s_mov_b32 s_save_exec_lo, exec_lo //save EXEC and use EXEC for the go signal from SPI s_mov_b32 s_save_exec_hi, exec_hi s_mov_b64 exec, 0x0 //clear EXEC to get ready to receive s_sendmsg sendmsg(MSG_SAVEWAVE) //send SPI a message and wait for SPI's write to EXEC // Set SPI_PRIO=2 to avoid starving instruction fetch in the waves we're waiting for. s_or_b32 s_save_tmp, s_save_status, (2 << SQ_WAVE_STATUS_SPI_PRIO_SHIFT) s_setreg_b32 hwreg(HW_REG_STATUS), s_save_tmp L_SLEEP: s_sleep 0x2 // sleep 1 (64clk) is not enough for 8 waves per SIMD, which will cause SQ hang, since the 7,8th wave could not get arbit to exec inst, while other waves are stuck into the sleep-loop and waiting for wrexec!=0 s_cbranch_execz L_SLEEP // Save trap temporaries 4-11, 13 initialized by SPI debug dispatch logic // ttmp SR memory offset : size(VGPR)+size(SGPR)+0x40 get_vgpr_size_bytes(s_save_ttmps_lo) get_sgpr_size_bytes(s_save_ttmps_hi) s_add_u32 s_save_ttmps_lo, s_save_ttmps_lo, s_save_ttmps_hi s_add_u32 s_save_ttmps_lo, s_save_ttmps_lo, s_save_spi_init_lo s_addc_u32 s_save_ttmps_hi, s_save_spi_init_hi, 0x0 s_and_b32 s_save_ttmps_hi, s_save_ttmps_hi, 0xFFFF s_store_dwordx4 [ttmp4, ttmp5, ttmp6, ttmp7], [s_save_ttmps_lo, s_save_ttmps_hi], 0x50 glc:1 ack_sqc_store_workaround() s_store_dwordx4 [ttmp8, ttmp9, ttmp10, ttmp11], [s_save_ttmps_lo, s_save_ttmps_hi], 0x60 glc:1 ack_sqc_store_workaround() s_store_dword ttmp13, [s_save_ttmps_lo, s_save_ttmps_hi], 0x74 glc:1 ack_sqc_store_workaround() /* setup Resource Contants */ s_mov_b32 s_save_buf_rsrc0, s_save_spi_init_lo //base_addr_lo s_and_b32 s_save_buf_rsrc1, s_save_spi_init_hi, 0x0000FFFF //base_addr_hi s_or_b32 s_save_buf_rsrc1, s_save_buf_rsrc1, S_SAVE_BUF_RSRC_WORD1_STRIDE s_mov_b32 s_save_buf_rsrc2, 0 //NUM_RECORDS initial value = 0 (in bytes) although not neccessarily inited s_mov_b32 s_save_buf_rsrc3, S_SAVE_BUF_RSRC_WORD3_MISC s_and_b32 s_save_tmp, s_save_spi_init_hi, S_SAVE_SPI_INIT_ATC_MASK s_lshr_b32 s_save_tmp, s_save_tmp, (S_SAVE_SPI_INIT_ATC_SHIFT-SQ_BUF_RSRC_WORD1_ATC_SHIFT) //get ATC bit into position s_or_b32 s_save_buf_rsrc3, s_save_buf_rsrc3, s_save_tmp //or ATC s_and_b32 s_save_tmp, s_save_spi_init_hi, S_SAVE_SPI_INIT_MTYPE_MASK s_lshr_b32 s_save_tmp, s_save_tmp, (S_SAVE_SPI_INIT_MTYPE_SHIFT-SQ_BUF_RSRC_WORD3_MTYPE_SHIFT) //get MTYPE bits into position s_or_b32 s_save_buf_rsrc3, s_save_buf_rsrc3, s_save_tmp //or MTYPE //FIXME right now s_save_m0/s_save_mem_offset use tma_lo/tma_hi (might need to save them before using them?) s_mov_b32 s_save_m0, m0 //save M0 /* global mem offset */ s_mov_b32 s_save_mem_offset, 0x0 //mem offset initial value = 0 /* save HW registers */ ////////////////////////////// L_SAVE_HWREG: // HWREG SR memory offset : size(VGPR)+size(SGPR) get_vgpr_size_bytes(s_save_mem_offset) get_sgpr_size_bytes(s_save_tmp) s_add_u32 s_save_mem_offset, s_save_mem_offset, s_save_tmp s_mov_b32 s_save_buf_rsrc2, 0x4 //NUM_RECORDS in bytes s_mov_b32 s_save_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes write_hwreg_to_mem(s_save_m0, s_save_buf_rsrc0, s_save_mem_offset) //M0 write_hwreg_to_mem(s_save_pc_lo, s_save_buf_rsrc0, s_save_mem_offset) //PC write_hwreg_to_mem(s_save_pc_hi, s_save_buf_rsrc0, s_save_mem_offset) write_hwreg_to_mem(s_save_exec_lo, s_save_buf_rsrc0, s_save_mem_offset) //EXEC write_hwreg_to_mem(s_save_exec_hi, s_save_buf_rsrc0, s_save_mem_offset) write_hwreg_to_mem(s_save_status, s_save_buf_rsrc0, s_save_mem_offset) //STATUS //s_save_trapsts conflicts with s_save_alloc_size s_getreg_b32 s_save_trapsts, hwreg(HW_REG_TRAPSTS) write_hwreg_to_mem(s_save_trapsts, s_save_buf_rsrc0, s_save_mem_offset) //TRAPSTS write_hwreg_to_mem(xnack_mask_lo, s_save_buf_rsrc0, s_save_mem_offset) //XNACK_MASK_LO write_hwreg_to_mem(xnack_mask_hi, s_save_buf_rsrc0, s_save_mem_offset) //XNACK_MASK_HI //use s_save_tmp would introduce conflict here between s_save_tmp and s_save_buf_rsrc2 s_getreg_b32 s_save_m0, hwreg(HW_REG_MODE) //MODE write_hwreg_to_mem(s_save_m0, s_save_buf_rsrc0, s_save_mem_offset) /* the first wave in the threadgroup */ s_and_b32 s_save_tmp, s_save_spi_init_hi, S_SAVE_SPI_INIT_FIRST_WAVE_MASK // extract fisrt wave bit s_mov_b32 s_save_exec_hi, 0x0 s_or_b32 s_save_exec_hi, s_save_tmp, s_save_exec_hi // save first wave bit to s_save_exec_hi.bits[26] /* save SGPRs */ // Save SGPR before LDS save, then the s0 to s4 can be used during LDS save... ////////////////////////////// // SGPR SR memory offset : size(VGPR) get_vgpr_size_bytes(s_save_mem_offset) // TODO, change RSRC word to rearrange memory layout for SGPRS s_getreg_b32 s_save_alloc_size, hwreg(HW_REG_GPR_ALLOC,SQ_WAVE_GPR_ALLOC_SGPR_SIZE_SHIFT,SQ_WAVE_GPR_ALLOC_SGPR_SIZE_SIZE) //spgr_size s_add_u32 s_save_alloc_size, s_save_alloc_size, 1 s_lshl_b32 s_save_alloc_size, s_save_alloc_size, 4 //Number of SGPRs = (sgpr_size + 1) * 16 (non-zero value) s_lshl_b32 s_save_buf_rsrc2, s_save_alloc_size, 2 //NUM_RECORDS in bytes s_mov_b32 s_save_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes // backup s_save_buf_rsrc0,1 to s_save_pc_lo/hi, since write_16sgpr_to_mem function will change the rsrc0 //s_mov_b64 s_save_pc_lo, s_save_buf_rsrc0 s_mov_b64 s_save_xnack_mask_lo, s_save_buf_rsrc0 s_add_u32 s_save_buf_rsrc0, s_save_buf_rsrc0, s_save_mem_offset s_addc_u32 s_save_buf_rsrc1, s_save_buf_rsrc1, 0 s_mov_b32 m0, 0x0 //SGPR initial index value =0 s_nop 0x0 //Manually inserted wait states L_SAVE_SGPR_LOOP: // SGPR is allocated in 16 SGPR granularity s_movrels_b64 s0, s0 //s0 = s[0+m0], s1 = s[1+m0] s_movrels_b64 s2, s2 //s2 = s[2+m0], s3 = s[3+m0] s_movrels_b64 s4, s4 //s4 = s[4+m0], s5 = s[5+m0] s_movrels_b64 s6, s6 //s6 = s[6+m0], s7 = s[7+m0] s_movrels_b64 s8, s8 //s8 = s[8+m0], s9 = s[9+m0] s_movrels_b64 s10, s10 //s10 = s[10+m0], s11 = s[11+m0] s_movrels_b64 s12, s12 //s12 = s[12+m0], s13 = s[13+m0] s_movrels_b64 s14, s14 //s14 = s[14+m0], s15 = s[15+m0] write_16sgpr_to_mem(s0, s_save_buf_rsrc0, s_save_mem_offset) //PV: the best performance should be using s_buffer_store_dwordx4 s_add_u32 m0, m0, 16 //next sgpr index s_cmp_lt_u32 m0, s_save_alloc_size //scc = (m0 < s_save_alloc_size) ? 1 : 0 s_cbranch_scc1 L_SAVE_SGPR_LOOP //SGPR save is complete? // restore s_save_buf_rsrc0,1 //s_mov_b64 s_save_buf_rsrc0, s_save_pc_lo s_mov_b64 s_save_buf_rsrc0, s_save_xnack_mask_lo /* save first 4 VGPR, then LDS save could use */ // each wave will alloc 4 vgprs at least... ///////////////////////////////////////////////////////////////////////////////////// s_mov_b32 s_save_mem_offset, 0 s_mov_b32 exec_lo, 0xFFFFFFFF //need every thread from now on s_mov_b32 exec_hi, 0xFFFFFFFF s_mov_b32 xnack_mask_lo, 0x0 s_mov_b32 xnack_mask_hi, 0x0 s_mov_b32 s_save_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes // VGPR Allocated in 4-GPR granularity if SAVE_AFTER_XNACK_ERROR check_if_tcp_store_ok() s_cbranch_scc1 L_SAVE_FIRST_VGPRS_WITH_TCP write_vgprs_to_mem_with_sqc(v0, 4, s_save_buf_rsrc0, s_save_mem_offset) s_branch L_SAVE_LDS L_SAVE_FIRST_VGPRS_WITH_TCP: end buffer_store_dword v0, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 buffer_store_dword v1, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256 buffer_store_dword v2, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256*2 buffer_store_dword v3, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256*3 /* save LDS */ ////////////////////////////// L_SAVE_LDS: // Change EXEC to all threads... s_mov_b32 exec_lo, 0xFFFFFFFF //need every thread from now on s_mov_b32 exec_hi, 0xFFFFFFFF s_getreg_b32 s_save_alloc_size, hwreg(HW_REG_LDS_ALLOC,SQ_WAVE_LDS_ALLOC_LDS_SIZE_SHIFT,SQ_WAVE_LDS_ALLOC_LDS_SIZE_SIZE) //lds_size s_and_b32 s_save_alloc_size, s_save_alloc_size, 0xFFFFFFFF //lds_size is zero? s_cbranch_scc0 L_SAVE_LDS_DONE //no lds used? jump to L_SAVE_DONE s_barrier //LDS is used? wait for other waves in the same TG s_and_b32 s_save_tmp, s_save_exec_hi, S_SAVE_SPI_INIT_FIRST_WAVE_MASK //exec is still used here s_cbranch_scc0 L_SAVE_LDS_DONE // first wave do LDS save; s_lshl_b32 s_save_alloc_size, s_save_alloc_size, 6 //LDS size in dwords = lds_size * 64dw s_lshl_b32 s_save_alloc_size, s_save_alloc_size, 2 //LDS size in bytes s_mov_b32 s_save_buf_rsrc2, s_save_alloc_size //NUM_RECORDS in bytes // LDS at offset: size(VGPR)+SIZE(SGPR)+SIZE(HWREG) // get_vgpr_size_bytes(s_save_mem_offset) get_sgpr_size_bytes(s_save_tmp) s_add_u32 s_save_mem_offset, s_save_mem_offset, s_save_tmp s_add_u32 s_save_mem_offset, s_save_mem_offset, get_hwreg_size_bytes() s_mov_b32 s_save_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes s_mov_b32 m0, 0x0 //lds_offset initial value = 0 v_mbcnt_lo_u32_b32 v2, 0xffffffff, 0x0 v_mbcnt_hi_u32_b32 v3, 0xffffffff, v2 // tid if SAVE_AFTER_XNACK_ERROR check_if_tcp_store_ok() s_cbranch_scc1 L_SAVE_LDS_WITH_TCP v_lshlrev_b32 v2, 2, v3 L_SAVE_LDS_LOOP_SQC: ds_read2_b32 v[0:1], v2 offset0:0 offset1:0x40 s_waitcnt lgkmcnt(0) write_vgprs_to_mem_with_sqc(v0, 2, s_save_buf_rsrc0, s_save_mem_offset) v_add_u32 v2, 0x200, v2 v_cmp_lt_u32 vcc[0:1], v2, s_save_alloc_size s_cbranch_vccnz L_SAVE_LDS_LOOP_SQC s_branch L_SAVE_LDS_DONE L_SAVE_LDS_WITH_TCP: end v_mul_i32_i24 v2, v3, 8 // tid*8 v_mov_b32 v3, 256*2 s_mov_b32 m0, 0x10000 s_mov_b32 s0, s_save_buf_rsrc3 s_and_b32 s_save_buf_rsrc3, s_save_buf_rsrc3, 0xFF7FFFFF // disable add_tid s_or_b32 s_save_buf_rsrc3, s_save_buf_rsrc3, 0x58000 //DFMT L_SAVE_LDS_LOOP_VECTOR: ds_read_b64 v[0:1], v2 //x =LDS[a], byte address s_waitcnt lgkmcnt(0) buffer_store_dwordx2 v[0:1], v2, s_save_buf_rsrc0, s_save_mem_offset offen:1 glc:1 slc:1 // s_waitcnt vmcnt(0) // v_add_u32 v2, vcc[0:1], v2, v3 v_add_u32 v2, v2, v3 v_cmp_lt_u32 vcc[0:1], v2, s_save_alloc_size s_cbranch_vccnz L_SAVE_LDS_LOOP_VECTOR // restore rsrc3 s_mov_b32 s_save_buf_rsrc3, s0 L_SAVE_LDS_DONE: /* save VGPRs - set the Rest VGPRs */ ////////////////////////////////////////////////////////////////////////////////////// L_SAVE_VGPR: // VGPR SR memory offset: 0 // TODO rearrange the RSRC words to use swizzle for VGPR save... s_mov_b32 s_save_mem_offset, (0+256*4) // for the rest VGPRs s_mov_b32 exec_lo, 0xFFFFFFFF //need every thread from now on s_mov_b32 exec_hi, 0xFFFFFFFF s_getreg_b32 s_save_alloc_size, hwreg(HW_REG_GPR_ALLOC,SQ_WAVE_GPR_ALLOC_VGPR_SIZE_SHIFT,SQ_WAVE_GPR_ALLOC_VGPR_SIZE_SIZE) //vpgr_size s_add_u32 s_save_alloc_size, s_save_alloc_size, 1 s_lshl_b32 s_save_alloc_size, s_save_alloc_size, 2 //Number of VGPRs = (vgpr_size + 1) * 4 (non-zero value) //FIXME for GFX, zero is possible s_lshl_b32 s_save_buf_rsrc2, s_save_alloc_size, 8 //NUM_RECORDS in bytes (64 threads*4) s_mov_b32 s_save_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes // VGPR store using dw burst s_mov_b32 m0, 0x4 //VGPR initial index value =0 s_cmp_lt_u32 m0, s_save_alloc_size s_cbranch_scc0 L_SAVE_VGPR_END s_set_gpr_idx_on m0, 0x1 //M0[7:0] = M0[7:0] and M0[15:12] = 0x1 s_add_u32 s_save_alloc_size, s_save_alloc_size, 0x1000 //add 0x1000 since we compare m0 against it later if SAVE_AFTER_XNACK_ERROR check_if_tcp_store_ok() s_cbranch_scc1 L_SAVE_VGPR_LOOP L_SAVE_VGPR_LOOP_SQC: write_vgprs_to_mem_with_sqc(v0, 4, s_save_buf_rsrc0, s_save_mem_offset) s_add_u32 m0, m0, 4 s_cmp_lt_u32 m0, s_save_alloc_size s_cbranch_scc1 L_SAVE_VGPR_LOOP_SQC s_set_gpr_idx_off s_branch L_SAVE_VGPR_END end L_SAVE_VGPR_LOOP: v_mov_b32 v0, v0 //v0 = v[0+m0] v_mov_b32 v1, v1 //v0 = v[0+m0] v_mov_b32 v2, v2 //v0 = v[0+m0] v_mov_b32 v3, v3 //v0 = v[0+m0] buffer_store_dword v0, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 buffer_store_dword v1, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256 buffer_store_dword v2, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256*2 buffer_store_dword v3, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256*3 s_add_u32 m0, m0, 4 //next vgpr index s_add_u32 s_save_mem_offset, s_save_mem_offset, 256*4 //every buffer_store_dword does 256 bytes s_cmp_lt_u32 m0, s_save_alloc_size //scc = (m0 < s_save_alloc_size) ? 1 : 0 s_cbranch_scc1 L_SAVE_VGPR_LOOP //VGPR save is complete? s_set_gpr_idx_off L_SAVE_VGPR_END: if ASIC_TARGET_ARCTURUS // Save ACC VGPRs s_mov_b32 m0, 0x0 //VGPR initial index value =0 s_set_gpr_idx_on m0, 0x1 //M0[7:0] = M0[7:0] and M0[15:12] = 0x1 if SAVE_AFTER_XNACK_ERROR check_if_tcp_store_ok() s_cbranch_scc1 L_SAVE_ACCVGPR_LOOP L_SAVE_ACCVGPR_LOOP_SQC: for var vgpr = 0; vgpr < 4; ++ vgpr v_accvgpr_read v[vgpr], acc[vgpr] // v[N] = acc[N+m0] end write_vgprs_to_mem_with_sqc(v0, 4, s_save_buf_rsrc0, s_save_mem_offset) s_add_u32 m0, m0, 4 s_cmp_lt_u32 m0, s_save_alloc_size s_cbranch_scc1 L_SAVE_ACCVGPR_LOOP_SQC s_set_gpr_idx_off s_branch L_SAVE_ACCVGPR_END end L_SAVE_ACCVGPR_LOOP: for var vgpr = 0; vgpr < 4; ++ vgpr v_accvgpr_read v[vgpr], acc[vgpr] // v[N] = acc[N+m0] end buffer_store_dword v0, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 buffer_store_dword v1, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256 buffer_store_dword v2, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256*2 buffer_store_dword v3, v0, s_save_buf_rsrc0, s_save_mem_offset slc:1 glc:1 offset:256*3 s_add_u32 m0, m0, 4 s_add_u32 s_save_mem_offset, s_save_mem_offset, 256*4 s_cmp_lt_u32 m0, s_save_alloc_size s_cbranch_scc1 L_SAVE_ACCVGPR_LOOP s_set_gpr_idx_off L_SAVE_ACCVGPR_END: end s_branch L_END_PGM /**************************************************************************/ /* restore routine */ /**************************************************************************/ L_RESTORE: /* Setup Resource Contants */ s_mov_b32 s_restore_buf_rsrc0, s_restore_spi_init_lo //base_addr_lo s_and_b32 s_restore_buf_rsrc1, s_restore_spi_init_hi, 0x0000FFFF //base_addr_hi s_or_b32 s_restore_buf_rsrc1, s_restore_buf_rsrc1, S_RESTORE_BUF_RSRC_WORD1_STRIDE s_mov_b32 s_restore_buf_rsrc2, 0 //NUM_RECORDS initial value = 0 (in bytes) s_mov_b32 s_restore_buf_rsrc3, S_RESTORE_BUF_RSRC_WORD3_MISC s_and_b32 s_restore_tmp, s_restore_spi_init_hi, S_RESTORE_SPI_INIT_ATC_MASK s_lshr_b32 s_restore_tmp, s_restore_tmp, (S_RESTORE_SPI_INIT_ATC_SHIFT-SQ_BUF_RSRC_WORD1_ATC_SHIFT) //get ATC bit into position s_or_b32 s_restore_buf_rsrc3, s_restore_buf_rsrc3, s_restore_tmp //or ATC s_and_b32 s_restore_tmp, s_restore_spi_init_hi, S_RESTORE_SPI_INIT_MTYPE_MASK s_lshr_b32 s_restore_tmp, s_restore_tmp, (S_RESTORE_SPI_INIT_MTYPE_SHIFT-SQ_BUF_RSRC_WORD3_MTYPE_SHIFT) //get MTYPE bits into position s_or_b32 s_restore_buf_rsrc3, s_restore_buf_rsrc3, s_restore_tmp //or MTYPE /* global mem offset */ // s_mov_b32 s_restore_mem_offset, 0x0 //mem offset initial value = 0 /* the first wave in the threadgroup */ s_and_b32 s_restore_tmp, s_restore_spi_init_hi, S_RESTORE_SPI_INIT_FIRST_WAVE_MASK s_cbranch_scc0 L_RESTORE_VGPR /* restore LDS */ ////////////////////////////// L_RESTORE_LDS: s_mov_b32 exec_lo, 0xFFFFFFFF //need every thread from now on //be consistent with SAVE although can be moved ahead s_mov_b32 exec_hi, 0xFFFFFFFF s_getreg_b32 s_restore_alloc_size, hwreg(HW_REG_LDS_ALLOC,SQ_WAVE_LDS_ALLOC_LDS_SIZE_SHIFT,SQ_WAVE_LDS_ALLOC_LDS_SIZE_SIZE) //lds_size s_and_b32 s_restore_alloc_size, s_restore_alloc_size, 0xFFFFFFFF //lds_size is zero? s_cbranch_scc0 L_RESTORE_VGPR //no lds used? jump to L_RESTORE_VGPR s_lshl_b32 s_restore_alloc_size, s_restore_alloc_size, 6 //LDS size in dwords = lds_size * 64dw s_lshl_b32 s_restore_alloc_size, s_restore_alloc_size, 2 //LDS size in bytes s_mov_b32 s_restore_buf_rsrc2, s_restore_alloc_size //NUM_RECORDS in bytes // LDS at offset: size(VGPR)+SIZE(SGPR)+SIZE(HWREG) // get_vgpr_size_bytes(s_restore_mem_offset) get_sgpr_size_bytes(s_restore_tmp) s_add_u32 s_restore_mem_offset, s_restore_mem_offset, s_restore_tmp s_add_u32 s_restore_mem_offset, s_restore_mem_offset, get_hwreg_size_bytes() //FIXME, Check if offset overflow??? s_mov_b32 s_restore_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes s_mov_b32 m0, 0x0 //lds_offset initial value = 0 L_RESTORE_LDS_LOOP: buffer_load_dword v0, v0, s_restore_buf_rsrc0, s_restore_mem_offset lds:1 // first 64DW buffer_load_dword v0, v0, s_restore_buf_rsrc0, s_restore_mem_offset lds:1 offset:256 // second 64DW s_add_u32 m0, m0, 256*2 // 128 DW s_add_u32 s_restore_mem_offset, s_restore_mem_offset, 256*2 //mem offset increased by 128DW s_cmp_lt_u32 m0, s_restore_alloc_size //scc=(m0 < s_restore_alloc_size) ? 1 : 0 s_cbranch_scc1 L_RESTORE_LDS_LOOP //LDS restore is complete? /* restore VGPRs */ ////////////////////////////// L_RESTORE_VGPR: // VGPR SR memory offset : 0 s_mov_b32 s_restore_mem_offset, 0x0 s_mov_b32 exec_lo, 0xFFFFFFFF //need every thread from now on //be consistent with SAVE although can be moved ahead s_mov_b32 exec_hi, 0xFFFFFFFF s_getreg_b32 s_restore_alloc_size, hwreg(HW_REG_GPR_ALLOC,SQ_WAVE_GPR_ALLOC_VGPR_SIZE_SHIFT,SQ_WAVE_GPR_ALLOC_VGPR_SIZE_SIZE) //vpgr_size s_add_u32 s_restore_alloc_size, s_restore_alloc_size, 1 s_lshl_b32 s_restore_alloc_size, s_restore_alloc_size, 2 //Number of VGPRs = (vgpr_size + 1) * 4 (non-zero value) s_lshl_b32 s_restore_buf_rsrc2, s_restore_alloc_size, 8 //NUM_RECORDS in bytes (64 threads*4) if ASIC_TARGET_ARCTURUS s_mov_b32 s_restore_accvgpr_offset, s_restore_buf_rsrc2 //ACC VGPRs at end of VGPRs end s_mov_b32 s_restore_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes // VGPR load using dw burst s_mov_b32 s_restore_mem_offset_save, s_restore_mem_offset // restore start with v1, v0 will be the last s_add_u32 s_restore_mem_offset, s_restore_mem_offset, 256*4 if ASIC_TARGET_ARCTURUS s_mov_b32 s_restore_accvgpr_offset_save, s_restore_accvgpr_offset s_add_u32 s_restore_accvgpr_offset, s_restore_accvgpr_offset, 256*4 end s_mov_b32 m0, 4 //VGPR initial index value = 1 s_set_gpr_idx_on m0, 0x8 //M0[7:0] = M0[7:0] and M0[15:12] = 0x8 s_add_u32 s_restore_alloc_size, s_restore_alloc_size, 0x8000 //add 0x8000 since we compare m0 against it later L_RESTORE_VGPR_LOOP: if ASIC_TARGET_ARCTURUS buffer_load_dword v0, v0, s_restore_buf_rsrc0, s_restore_accvgpr_offset slc:1 glc:1 buffer_load_dword v1, v0, s_restore_buf_rsrc0, s_restore_accvgpr_offset slc:1 glc:1 offset:256 buffer_load_dword v2, v0, s_restore_buf_rsrc0, s_restore_accvgpr_offset slc:1 glc:1 offset:256*2 buffer_load_dword v3, v0, s_restore_buf_rsrc0, s_restore_accvgpr_offset slc:1 glc:1 offset:256*3 s_add_u32 s_restore_accvgpr_offset, s_restore_accvgpr_offset, 256*4 s_waitcnt vmcnt(0) for var vgpr = 0; vgpr < 4; ++ vgpr v_accvgpr_write acc[vgpr], v[vgpr] end end buffer_load_dword v0, v0, s_restore_buf_rsrc0, s_restore_mem_offset slc:1 glc:1 buffer_load_dword v1, v0, s_restore_buf_rsrc0, s_restore_mem_offset slc:1 glc:1 offset:256 buffer_load_dword v2, v0, s_restore_buf_rsrc0, s_restore_mem_offset slc:1 glc:1 offset:256*2 buffer_load_dword v3, v0, s_restore_buf_rsrc0, s_restore_mem_offset slc:1 glc:1 offset:256*3 s_waitcnt vmcnt(0) //ensure data ready v_mov_b32 v0, v0 //v[0+m0] = v0 v_mov_b32 v1, v1 v_mov_b32 v2, v2 v_mov_b32 v3, v3 s_add_u32 m0, m0, 4 //next vgpr index s_add_u32 s_restore_mem_offset, s_restore_mem_offset, 256*4 //every buffer_load_dword does 256 bytes s_cmp_lt_u32 m0, s_restore_alloc_size //scc = (m0 < s_restore_alloc_size) ? 1 : 0 s_cbranch_scc1 L_RESTORE_VGPR_LOOP //VGPR restore (except v0) is complete? s_set_gpr_idx_off /* VGPR restore on v0 */ if ASIC_TARGET_ARCTURUS buffer_load_dword v0, v0, s_restore_buf_rsrc0, s_restore_accvgpr_offset_save slc:1 glc:1 buffer_load_dword v1, v0, s_restore_buf_rsrc0, s_restore_accvgpr_offset_save slc:1 glc:1 offset:256 buffer_load_dword v2, v0, s_restore_buf_rsrc0, s_restore_accvgpr_offset_save slc:1 glc:1 offset:256*2 buffer_load_dword v3, v0, s_restore_buf_rsrc0, s_restore_accvgpr_offset_save slc:1 glc:1 offset:256*3 s_waitcnt vmcnt(0) for var vgpr = 0; vgpr < 4; ++ vgpr v_accvgpr_write acc[vgpr], v[vgpr] end end buffer_load_dword v0, v0, s_restore_buf_rsrc0, s_restore_mem_offset_save slc:1 glc:1 buffer_load_dword v1, v0, s_restore_buf_rsrc0, s_restore_mem_offset_save slc:1 glc:1 offset:256 buffer_load_dword v2, v0, s_restore_buf_rsrc0, s_restore_mem_offset_save slc:1 glc:1 offset:256*2 buffer_load_dword v3, v0, s_restore_buf_rsrc0, s_restore_mem_offset_save slc:1 glc:1 offset:256*3 /* restore SGPRs */ ////////////////////////////// // SGPR SR memory offset : size(VGPR) get_vgpr_size_bytes(s_restore_mem_offset) get_sgpr_size_bytes(s_restore_tmp) s_add_u32 s_restore_mem_offset, s_restore_mem_offset, s_restore_tmp s_sub_u32 s_restore_mem_offset, s_restore_mem_offset, 16*4 // restore SGPR from S[n] to S[0], by 16 sgprs group // TODO, change RSRC word to rearrange memory layout for SGPRS s_getreg_b32 s_restore_alloc_size, hwreg(HW_REG_GPR_ALLOC,SQ_WAVE_GPR_ALLOC_SGPR_SIZE_SHIFT,SQ_WAVE_GPR_ALLOC_SGPR_SIZE_SIZE) //spgr_size s_add_u32 s_restore_alloc_size, s_restore_alloc_size, 1 s_lshl_b32 s_restore_alloc_size, s_restore_alloc_size, 4 //Number of SGPRs = (sgpr_size + 1) * 16 (non-zero value) s_lshl_b32 s_restore_buf_rsrc2, s_restore_alloc_size, 2 //NUM_RECORDS in bytes s_mov_b32 s_restore_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes s_mov_b32 m0, s_restore_alloc_size L_RESTORE_SGPR_LOOP: read_16sgpr_from_mem(s0, s_restore_buf_rsrc0, s_restore_mem_offset) //PV: further performance improvement can be made s_waitcnt lgkmcnt(0) //ensure data ready s_sub_u32 m0, m0, 16 // Restore from S[n] to S[0] s_nop 0 // hazard SALU M0=> S_MOVREL s_movreld_b64 s0, s0 //s[0+m0] = s0 s_movreld_b64 s2, s2 s_movreld_b64 s4, s4 s_movreld_b64 s6, s6 s_movreld_b64 s8, s8 s_movreld_b64 s10, s10 s_movreld_b64 s12, s12 s_movreld_b64 s14, s14 s_cmp_eq_u32 m0, 0 //scc = (m0 < s_restore_alloc_size) ? 1 : 0 s_cbranch_scc0 L_RESTORE_SGPR_LOOP //SGPR restore (except s0) is complete? /* restore HW registers */ ////////////////////////////// L_RESTORE_HWREG: // HWREG SR memory offset : size(VGPR)+size(SGPR) get_vgpr_size_bytes(s_restore_mem_offset) get_sgpr_size_bytes(s_restore_tmp) s_add_u32 s_restore_mem_offset, s_restore_mem_offset, s_restore_tmp s_mov_b32 s_restore_buf_rsrc2, 0x4 //NUM_RECORDS in bytes s_mov_b32 s_restore_buf_rsrc2, 0x1000000 //NUM_RECORDS in bytes read_hwreg_from_mem(s_restore_m0, s_restore_buf_rsrc0, s_restore_mem_offset) //M0 read_hwreg_from_mem(s_restore_pc_lo, s_restore_buf_rsrc0, s_restore_mem_offset) //PC read_hwreg_from_mem(s_restore_pc_hi, s_restore_buf_rsrc0, s_restore_mem_offset) read_hwreg_from_mem(s_restore_exec_lo, s_restore_buf_rsrc0, s_restore_mem_offset) //EXEC read_hwreg_from_mem(s_restore_exec_hi, s_restore_buf_rsrc0, s_restore_mem_offset) read_hwreg_from_mem(s_restore_status, s_restore_buf_rsrc0, s_restore_mem_offset) //STATUS read_hwreg_from_mem(s_restore_trapsts, s_restore_buf_rsrc0, s_restore_mem_offset) //TRAPSTS read_hwreg_from_mem(xnack_mask_lo, s_restore_buf_rsrc0, s_restore_mem_offset) //XNACK_MASK_LO read_hwreg_from_mem(xnack_mask_hi, s_restore_buf_rsrc0, s_restore_mem_offset) //XNACK_MASK_HI read_hwreg_from_mem(s_restore_mode, s_restore_buf_rsrc0, s_restore_mem_offset) //MODE s_waitcnt lgkmcnt(0) //from now on, it is safe to restore STATUS and IB_STS s_mov_b32 m0, s_restore_m0 s_mov_b32 exec_lo, s_restore_exec_lo s_mov_b32 exec_hi, s_restore_exec_hi s_and_b32 s_restore_m0, SQ_WAVE_TRAPSTS_PRE_SAVECTX_MASK, s_restore_trapsts s_setreg_b32 hwreg(HW_REG_TRAPSTS, SQ_WAVE_TRAPSTS_PRE_SAVECTX_SHIFT, SQ_WAVE_TRAPSTS_PRE_SAVECTX_SIZE), s_restore_m0 s_and_b32 s_restore_m0, SQ_WAVE_TRAPSTS_POST_SAVECTX_MASK, s_restore_trapsts s_lshr_b32 s_restore_m0, s_restore_m0, SQ_WAVE_TRAPSTS_POST_SAVECTX_SHIFT s_setreg_b32 hwreg(HW_REG_TRAPSTS, SQ_WAVE_TRAPSTS_POST_SAVECTX_SHIFT, SQ_WAVE_TRAPSTS_POST_SAVECTX_SIZE), s_restore_m0 //s_setreg_b32 hwreg(HW_REG_TRAPSTS), s_restore_trapsts //don't overwrite SAVECTX bit as it may be set through external SAVECTX during restore s_setreg_b32 hwreg(HW_REG_MODE), s_restore_mode // Restore trap temporaries 4-11, 13 initialized by SPI debug dispatch logic // ttmp SR memory offset : size(VGPR)+size(SGPR)+0x40 get_vgpr_size_bytes(s_restore_ttmps_lo) get_sgpr_size_bytes(s_restore_ttmps_hi) s_add_u32 s_restore_ttmps_lo, s_restore_ttmps_lo, s_restore_ttmps_hi s_add_u32 s_restore_ttmps_lo, s_restore_ttmps_lo, s_restore_buf_rsrc0 s_addc_u32 s_restore_ttmps_hi, s_restore_buf_rsrc1, 0x0 s_and_b32 s_restore_ttmps_hi, s_restore_ttmps_hi, 0xFFFF s_load_dwordx4 [ttmp4, ttmp5, ttmp6, ttmp7], [s_restore_ttmps_lo, s_restore_ttmps_hi], 0x50 glc:1 s_load_dwordx4 [ttmp8, ttmp9, ttmp10, ttmp11], [s_restore_ttmps_lo, s_restore_ttmps_hi], 0x60 glc:1 s_load_dword ttmp13, [s_restore_ttmps_lo, s_restore_ttmps_hi], 0x74 glc:1 s_waitcnt lgkmcnt(0) //reuse s_restore_m0 as a temp register s_and_b32 s_restore_m0, s_restore_pc_hi, S_SAVE_PC_HI_RCNT_MASK s_lshr_b32 s_restore_m0, s_restore_m0, S_SAVE_PC_HI_RCNT_SHIFT s_lshl_b32 s_restore_m0, s_restore_m0, SQ_WAVE_IB_STS_RCNT_SHIFT s_mov_b32 s_restore_tmp, 0x0 //IB_STS is zero s_or_b32 s_restore_tmp, s_restore_tmp, s_restore_m0 s_and_b32 s_restore_m0, s_restore_pc_hi, S_SAVE_PC_HI_FIRST_REPLAY_MASK s_lshr_b32 s_restore_m0, s_restore_m0, S_SAVE_PC_HI_FIRST_REPLAY_SHIFT s_lshl_b32 s_restore_m0, s_restore_m0, SQ_WAVE_IB_STS_FIRST_REPLAY_SHIFT s_or_b32 s_restore_tmp, s_restore_tmp, s_restore_m0 s_and_b32 s_restore_m0, s_restore_status, SQ_WAVE_STATUS_INST_ATC_MASK s_lshr_b32 s_restore_m0, s_restore_m0, SQ_WAVE_STATUS_INST_ATC_SHIFT s_setreg_b32 hwreg(HW_REG_IB_STS), s_restore_tmp s_and_b32 s_restore_pc_hi, s_restore_pc_hi, 0x0000ffff //pc[47:32] //Do it here in order not to affect STATUS s_and_b64 exec, exec, exec // Restore STATUS.EXECZ, not writable by s_setreg_b32 s_and_b64 vcc, vcc, vcc // Restore STATUS.VCCZ, not writable by s_setreg_b32 set_status_without_spi_prio(s_restore_status, s_restore_tmp) // SCC is included, which is changed by previous salu s_barrier //barrier to ensure the readiness of LDS before access attempts from any other wave in the same TG //FIXME not performance-optimal at this time // s_rfe_b64 s_restore_pc_lo //Return to the main shader program and resume execution s_rfe_restore_b64 s_restore_pc_lo, s_restore_m0 // s_restore_m0[0] is used to set STATUS.inst_atc /**************************************************************************/ /* the END */ /**************************************************************************/ L_END_PGM: s_endpgm end /**************************************************************************/ /* the helper functions */ /**************************************************************************/ //Only for save hwreg to mem function write_hwreg_to_mem(s, s_rsrc, s_mem_offset) s_mov_b32 exec_lo, m0 //assuming exec_lo is not needed anymore from this point on s_mov_b32 m0, s_mem_offset s_buffer_store_dword s, s_rsrc, m0 glc:1 ack_sqc_store_workaround() s_add_u32 s_mem_offset, s_mem_offset, 4 s_mov_b32 m0, exec_lo end // HWREG are saved before SGPRs, so all HWREG could be use. function write_16sgpr_to_mem(s, s_rsrc, s_mem_offset) s_buffer_store_dwordx4 s[0], s_rsrc, 0 glc:1 ack_sqc_store_workaround() s_buffer_store_dwordx4 s[4], s_rsrc, 16 glc:1 ack_sqc_store_workaround() s_buffer_store_dwordx4 s[8], s_rsrc, 32 glc:1 ack_sqc_store_workaround() s_buffer_store_dwordx4 s[12], s_rsrc, 48 glc:1 ack_sqc_store_workaround() s_add_u32 s_rsrc[0], s_rsrc[0], 4*16 s_addc_u32 s_rsrc[1], s_rsrc[1], 0x0 // +scc end function read_hwreg_from_mem(s, s_rsrc, s_mem_offset) s_buffer_load_dword s, s_rsrc, s_mem_offset glc:1 s_add_u32 s_mem_offset, s_mem_offset, 4 end function read_16sgpr_from_mem(s, s_rsrc, s_mem_offset) s_buffer_load_dwordx16 s, s_rsrc, s_mem_offset glc:1 s_sub_u32 s_mem_offset, s_mem_offset, 4*16 end function check_if_tcp_store_ok // If STATUS.ALLOW_REPLAY=0 and TRAPSTS.XNACK_ERROR=1 then TCP stores will fail. s_and_b32 s_save_tmp, s_save_status, SQ_WAVE_STATUS_ALLOW_REPLAY_MASK s_cbranch_scc1 L_TCP_STORE_CHECK_DONE s_getreg_b32 s_save_tmp, hwreg(HW_REG_TRAPSTS) s_andn2_b32 s_save_tmp, SQ_WAVE_TRAPSTS_XNACK_ERROR_MASK, s_save_tmp L_TCP_STORE_CHECK_DONE: end function write_vgpr_to_mem_with_sqc(v, s_rsrc, s_mem_offset) s_mov_b32 s4, 0 L_WRITE_VGPR_LANE_LOOP: for var lane = 0; lane < 4; ++ lane v_readlane_b32 s[lane], v, s4 s_add_u32 s4, s4, 1 end s_buffer_store_dwordx4 s[0:3], s_rsrc, s_mem_offset glc:1 ack_sqc_store_workaround() s_add_u32 s_mem_offset, s_mem_offset, 0x10 s_cmp_eq_u32 s4, 0x40 s_cbranch_scc0 L_WRITE_VGPR_LANE_LOOP end function write_vgprs_to_mem_with_sqc(v, n_vgprs, s_rsrc, s_mem_offset) for var vgpr = 0; vgpr < n_vgprs; ++ vgpr write_vgpr_to_mem_with_sqc(v[vgpr], s_rsrc, s_mem_offset) end end function get_lds_size_bytes(s_lds_size_byte) // SQ LDS granularity is 64DW, while PGM_RSRC2.lds_size is in granularity 128DW s_getreg_b32 s_lds_size_byte, hwreg(HW_REG_LDS_ALLOC, SQ_WAVE_LDS_ALLOC_LDS_SIZE_SHIFT, SQ_WAVE_LDS_ALLOC_LDS_SIZE_SIZE) // lds_size s_lshl_b32 s_lds_size_byte, s_lds_size_byte, 8 //LDS size in dwords = lds_size * 64 *4Bytes // granularity 64DW end function get_vgpr_size_bytes(s_vgpr_size_byte) s_getreg_b32 s_vgpr_size_byte, hwreg(HW_REG_GPR_ALLOC,SQ_WAVE_GPR_ALLOC_VGPR_SIZE_SHIFT,SQ_WAVE_GPR_ALLOC_VGPR_SIZE_SIZE) //vpgr_size s_add_u32 s_vgpr_size_byte, s_vgpr_size_byte, 1 s_lshl_b32 s_vgpr_size_byte, s_vgpr_size_byte, (2+8) //Number of VGPRs = (vgpr_size + 1) * 4 * 64 * 4 (non-zero value) //FIXME for GFX, zero is possible if ASIC_TARGET_ARCTURUS s_lshl_b32 s_vgpr_size_byte, s_vgpr_size_byte, 1 // Double size for ACC VGPRs end end function get_sgpr_size_bytes(s_sgpr_size_byte) s_getreg_b32 s_sgpr_size_byte, hwreg(HW_REG_GPR_ALLOC,SQ_WAVE_GPR_ALLOC_SGPR_SIZE_SHIFT,SQ_WAVE_GPR_ALLOC_SGPR_SIZE_SIZE) //spgr_size s_add_u32 s_sgpr_size_byte, s_sgpr_size_byte, 1 s_lshl_b32 s_sgpr_size_byte, s_sgpr_size_byte, 6 //Number of SGPRs = (sgpr_size + 1) * 16 *4 (non-zero value) end function get_hwreg_size_bytes return 128 //HWREG size 128 bytes end function ack_sqc_store_workaround if ACK_SQC_STORE s_waitcnt lgkmcnt(0) end end function set_status_without_spi_prio(status, tmp) // Do not restore STATUS.SPI_PRIO since scheduler may have raised it. s_lshr_b32 tmp, status, SQ_WAVE_STATUS_POST_SPI_PRIO_SHIFT s_setreg_b32 hwreg(HW_REG_STATUS, SQ_WAVE_STATUS_POST_SPI_PRIO_SHIFT, SQ_WAVE_STATUS_POST_SPI_PRIO_SIZE), tmp s_nop 0x2 // avoid S_SETREG => S_SETREG hazard s_setreg_b32 hwreg(HW_REG_STATUS, SQ_WAVE_STATUS_PRE_SPI_PRIO_SHIFT, SQ_WAVE_STATUS_PRE_SPI_PRIO_SIZE), status end
45.66795
233
0.724589
41bc9a95f7e3a28fb636bfb17d9ac0f0b836da68
4,275
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_648.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_648.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0xca_notsx.log_21829_648.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 %r15 push %rbx push %rsi lea addresses_WC_ht+0xdc6c, %rsi nop cmp $53110, %r11 movups (%rsi), %xmm4 vpextrq $1, %xmm4, %r15 mfence lea addresses_WC_ht+0xcc8c, %rbx xor $50538, %r12 mov $0x6162636465666768, %r11 movq %r11, %xmm2 vmovups %ymm2, (%rbx) nop nop nop nop nop and %rbx, %rbx pop %rsi pop %rbx pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %r8 // Faulty Load lea addresses_UC+0x1648c, %r12 nop and %r8, %r8 movb (%r12), %r11b lea oracles, %r12 and $0xff, %r11 shlq $12, %r11 mov (%r12,%r11,1), %r11 pop %r8 pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': True, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_UC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, '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 */
62.867647
2,999
0.661988
d9fa5c84d72f88181222404f1e3e1f4d7c8c9560
696
asm
Assembly
19-reverse-string/reverse.asm
gashev/assembly-examples
3e7e5d37af00e6d6202a589ffa36a888edb5be16
[ "Unlicense" ]
1
2021-01-06T01:45:37.000Z
2021-01-06T01:45:37.000Z
19-reverse-string/reverse.asm
gashev/assembly-examples
3e7e5d37af00e6d6202a589ffa36a888edb5be16
[ "Unlicense" ]
null
null
null
19-reverse-string/reverse.asm
gashev/assembly-examples
3e7e5d37af00e6d6202a589ffa36a888edb5be16
[ "Unlicense" ]
null
null
null
extern exit extern puts SECTION .data str: db 'abcdefghijklmnopqrstuvwxyz', 0 SECTION .text GLOBAL _start _start: ; Print string. mov edi, str call puts ; Start string. mov rax, str ; Find end of string str. mov rbx, str loop: mov cl, [rbx] cmp cl, 0 je init_reverse_string inc rbx jmp loop init_reverse_string: dec rbx jmp reverse_string finish: ; Print string. mov edi, str call puts ; Exit application. mov rdi, 0 call exit reverse_string: cmp rax, rbx jge finish mov cl, [rax] mov dl, [rbx] mov [rax], dl mov [rbx], cl inc rax dec rbx jmp reverse_string
12.654545
43
0.600575
908bc688e47efd78fe152e479c4f71ea0761940d
7,421
asm
Assembly
work/ff3_floor_treasure.asm
ypyp-pprn-mnmn/ff3_hack
f6b8590de1bd47ff617e56e2813c25305846c002
[ "MIT" ]
4
2018-03-29T15:33:26.000Z
2022-03-09T13:35:31.000Z
work/ff3_floor_treasure.asm
take-the-bath/ff3_hack
f6b8590de1bd47ff617e56e2813c25305846c002
[ "MIT" ]
45
2017-11-17T23:46:35.000Z
2021-09-27T11:35:47.000Z
work/ff3_floor_treasure.asm
take-the-bath/ff3_hack
f6b8590de1bd47ff617e56e2813c25305846c002
[ "MIT" ]
null
null
null
;; encoding: utf-8 ; ff3_floor_treasure.asm ; ;description: ; implements treasure related functions ; ;version: ; 0.3 ;====================================================================================================== ;.ifndef ff3_floor_treasure_begin .include "ff3_floor.h.asm" DEFINE_DEFAULT TREASURE_ARROW_AMOUNT, 20 ff3_floor_treasure_begin: ;INIT_PATCH_EX treasure,$3f,$e917,$e9bb,$e917 INIT_PATCH $3f,$e917,$e9bb ;e917 floor_processChipEvent: ;[in] .isTreasureGil = $49 .worldId = $78 .pFloorChips = $80 .treasureIdList = $0710 .leaderOffset = $600e .treasureFlags = $6040 ;[local/params for functions] .chipAttributes = $44 .eventParams = $45 .isTreasureNaked = $ba ;-------------------------------------------- jsr floor_getChipEvent ;$e51c() [out] y = chipid lda <.chipAttributes bpl .no_event .has_event: cpy #$90 bcc .no_event cpy #$a0 bcc .door_event cpy #$d0 bcc .no_event cpy #$f0 bcc .treasure_event .no_event: clc rts .door_event: ;[90 <= chipid < a0] ;$e968: ldx .leaderOffset ;600e lda playerBaseParams,x ;6100 .ifdef _DISABLE_THIEF_LOCKPICKING cmp #$ff .else cmp #JOB_THIEF ;08 .endif beq .door_is_unlocked lda #$03 sec rts .door_is_unlocked: lda $6021 ora #$40 sta $6021 lda #$7a sec rts .treasure_event: ;[d0 <= chipid < f0] ldx #0 cpy #$e0 bcc .store_naked dex .store_naked: stx <.isTreasureNaked jsr floor_getTreasureFlagMaskAndIndex and .treasureFlags,y beq .no_event ;has treasure lda #$3f | $80 sta sound.effect_id lda <.isTreasureNaked bmi .fetch_treasure jsr $e6f0 ;unk .fetch_treasure: lda <$80 pha lda <$81 pha jsr floor_getTreasure ;f549 [out] a = message id tax pla sta <$81 pla sta <$80 ldy #0 cpx #$50 ;message ("もちものがいっぱいです") bne .got_treasure sty <.chipAttributes sty <$0d beq .finish ; .got_treasure: lda <.isTreasureNaked bmi .finish lda #CHIPID_OPENED_TREASURE_BOX ;7d sta [.pFloorChips],y .finish: txa sec rts floor_getTreasureId: ;[in] .eventParams = $45 .treasureIdList = $0710 ;[out] ; a : treasureId ; x : list index lda <.eventParams and #$0f tax lda .treasureIdList,x rts floor_getTreasureFlagMaskAndIndex: ;[in] .eventParams = $45 .worldId = $78 .treasureIdList = $0710 .treasureFlags = $6040 ;[out] ; a : mask value ; x : bit index ; y : byte index jsr floor_getTreasureId pha and #$07 ;mask to bit index tax pla lsr a lsr a lsr a ldy <.worldId beq .test_flag clc adc #$20 .test_flag: tay lda floor_setBitMask,x rts floor_setBitMask: .db $01,$02,$04,$08,$10,$20,$40,$80 ;e9bb VERIFY_PC $e9bb ;----------------------------------------------------------------------------------------------------- ; treasure functions ; ;INIT_PATCH $3f,$f549,$f670 INIT_PATCH_EX floor.treasure, $3f, $f549, $f670, $f549 ;$3f:f549 getTreasure ;// [in] u8 $0710[0x10] : treasureIds ;// [in] u8 $45 : eventParam ;// [in] u8 $49 : warpparam.+01 & 0x20 ;// [in] u8 $ba : 00: chipId=d0-df, FF: chipId=e0-ef ;// chipId:D0-DF = staticChipId:7C(宝箱) ;// [out] a : messageId floor_getTreasure: ;[in] .eventParams = $45 .isTreasureGil = $49 .worldId = $78 .treasureId = $8f .eventFlag = $ab .encounterId = $6a .isTreasureNaked = $ba .messageParam = $bb .treasureItem = $80 ;u24 .treasureItemCount = $81 .treasureIdList = $0710 .treasureParams = $9c00 ;512params ;------------------------------------------ jsr floor_getTreasureId sta <.treasureId tax .getTreasureParam: lda #$01 jsr call_switch1stBank ;ff06 lda .treasureParams,x ldy <.worldId beq .got_param lda .treasureParams+$100,x .got_param: tax stx <.messageParam lda <.isTreasureNaked bne .treasure_is_item lda <.isTreasureGil bne .treasure_is_gil .treasure_is_item: stx <.treasureItem lda #$01 cpx #$57 ;leather shield bcs .store_increment cpx #$4f ;wooden arrow bcc .store_increment lda #TREASURE_ARROW_AMOUNT ;20 .store_increment: sta <.treasureItemCount jsr switch_to_character_logics_bank;switchBanksTo3c3d ;f727 ;lda <.treasureParam ;sta <.messageParam ;$bb jsr floor_searchSpaceForItem ;3c:937e [out] x = index to put bcc .put_item ;item_full lda #$50 ;"もちものがいっぱいです" rts .put_item: lda <.treasureItem sta backpackItems,x lda backpackItems+$20,x ;count clc adc <.treasureItemCount cmp #100 bcc .store_item_count lda #99 .store_item_count: sta backpackItems+$20,x jsr floor_invertTreasureFlag lda <.isTreasureNaked beq .treasure_in_box lda #$76 ;"こんなところにxxが!" rts .treasure_in_box: lda <.treasureId cmp #TREASURE_WITH_ENCOUNTER_BASE ;$e0 bcs .encounter lda #$59 ;"たからばこのなかから..." rts .encounter: sta <.encounterId lda #EVENT_FLAG_ENCOUNTER ;$20 sta <.eventFlag lda #$02 ;"たからばこの...とつぜんモンスターが..." rts .treasure_is_gil: ;here x == (itemid) jsr floor.get_item_price ;f5d4 jsr floor_incrementPartyGil jsr floor_invertTreasureFlag lda #$01 ;"たからばこの...ぎるてにいれた" rts ;$3f:f640 invertTreasureFlag floor_invertTreasureFlag: ;[in] .eventParams = $45 .worldId = $78 .treasureIdList = $0710 .treasureFlags = $6040 jsr floor_getTreasureFlagMaskAndIndex eor .treasureFlags,y sta .treasureFlags,y rts VERIFY_PC $f5d4 ;------------------------------------------------------------------------------------------------- ;$3f:f5d4 getItemValue ;getTreasureGil ; [in] x : itemid ; [out] u24 $80 : = $10:9e00[x] ;caller: ; $3d:b230 @ floor::shop::getItemValues ; $3d:b271 @ floor::shop::getItemValue ; $3f:ef73 @ field::decodeString ; $3f:f5b8 @ floor::getTreasure ; caller expects y has been unchanged floor.get_item_price: ;; fixups. FIX_ADDR_ON_CALLER $3d,$b230+1 FIX_ADDR_ON_CALLER $3d,$b271+1 .ifndef _OPTIMIZE_FIELD_WINDOW FIX_ADDR_ON_CALLER $3f,$ef73+1 .endif ;; ---- .value = $80 .itemValues = $9e00 ;------------------------ lda #$10 jsr call_switch1stBank txa asl a tax bcs .item_80_to_ff lda .itemValues,x sta <.value lda .itemValues+1,x bcc .store_value .item_80_to_ff: lda .itemValues+$100,x sta <.value lda .itemValues+$101,x .store_value: sta <.value+1 lda #0 sta <.value+2 txa lsr a tax lda #$3c jmp call_switch1stBank ;-------------------------------------------------------------------------------------------------- ;$3f:f5ff incrementGil ;// [in] u24 $80 : gil ; INIT_PATCH $3f,$f5ff,$f670 ;.bank $3d ;.org $b1c2 ;jsr floor_incrementPartyGil floor_incrementPartyGil: FIX_ADDR_ON_CALLER $3d,$b1c2+1 ;[in] .gil = $80 .partyGil = $601c ldx #0 txa .add24: ror a lda .partyGil,x adc <.gil,x sta .partyGil,x rol a;save carry inx cpx #3 bne .add24 ldx #$fd sec .cmp24: lda .partyGil-$fd,x sbc .maxGil-$fd,x inx bne .cmp24 bcc .finish ;here x == 0 ldx #2 .init24: lda .maxGil,x sta .partyGil,x dex bpl .init24 .finish: rts .maxGil: .db $7f,$96,$98 ;9999999 ;VERIFY_PC $f670 VERIFY_PC_TO_PATCH_END floor.treasure floor.treasure.FREE_BEGIN: ;===================================================================================================== RESTORE_PC ff3_floor_treasure_begin ;.endif ;;ff3_floor_treasure_begin
19.47769
104
0.608274
d38d7874973f8127888c75ff55a3f632f56110be
60,448
asm
Assembly
target/cos_117/disasm/iop_overlay1/COMM02.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
49
2020-10-09T12:29:16.000Z
2022-03-12T02:33:35.000Z
target/cos_117/disasm/iop_overlay1/COMM02.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
1
2021-12-29T15:59:25.000Z
2021-12-29T15:59:25.000Z
target/cos_117/disasm/iop_overlay1/COMM02.asm
jrrk2/cray-sim
52c9639808d6890517092637b188282c00cce4f7
[ "BSL-1.0" ]
6
2021-04-12T06:10:32.000Z
2022-02-08T23:11:19.000Z
0x0000 (0x000000) 0x2100- f:00020 d: 256 | A = OR[256] 0x0001 (0x000002) 0x1437- f:00012 d: 55 | A = A + 55 (0x0037) 0x0002 (0x000004) 0x291E- f:00024 d: 286 | OR[286] = A 0x0003 (0x000006) 0x211E- f:00020 d: 286 | A = OR[286] 0x0004 (0x000008) 0x290D- f:00024 d: 269 | OR[269] = A 0x0005 (0x00000A) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x0006 (0x00000C) 0x8612- f:00103 d: 18 | P = P + 18 (0x0018), A # 0 0x0007 (0x00000E) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x0008 (0x000010) 0x2923- f:00024 d: 291 | OR[291] = A 0x0009 (0x000012) 0x210D- f:00020 d: 269 | A = OR[269] 0x000A (0x000014) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x000B (0x000016) 0x2924- f:00024 d: 292 | OR[292] = A 0x000C (0x000018) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x000D (0x00001A) 0x2925- f:00024 d: 293 | OR[293] = A 0x000E (0x00001C) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x000F (0x00001E) 0x5800- f:00054 d: 0 | B = A 0x0010 (0x000020) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x0012 (0x000024) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0013 (0x000026) 0x2006- f:00020 d: 6 | A = OR[6] 0x0014 (0x000028) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B) 0x0015 (0x00002A) 0x2908- f:00024 d: 264 | OR[264] = A 0x0016 (0x00002C) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0017 (0x00002E) 0x7214- f:00071 d: 20 | P = P - 20 (0x0003) 0x0018 (0x000030) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0019 (0x000032) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x001A (0x000034) 0x2118- f:00020 d: 280 | A = OR[280] 0x001B (0x000036) 0x1E00-0x0000 f:00017 d: 0 | A = A - 0 (0x0000) 0x001D (0x00003A) 0x8402- f:00102 d: 2 | P = P + 2 (0x001F), A = 0 0x001E (0x00003C) 0x7022- f:00070 d: 34 | P = P + 34 (0x0040) 0x001F (0x00003E) 0x3100- f:00030 d: 256 | A = (OR[256]) 0x0020 (0x000040) 0x2913- f:00024 d: 275 | OR[275] = A 0x0021 (0x000042) 0x2113- f:00020 d: 275 | A = OR[275] 0x0022 (0x000044) 0x1601- f:00013 d: 1 | A = A - 1 (0x0001) 0x0023 (0x000046) 0x9486- f:00112 d: 134 | R = P + 134 (0x00A9), A = 0 0x0024 (0x000048) 0x211E- f:00020 d: 286 | A = OR[286] 0x0025 (0x00004A) 0x290D- f:00024 d: 269 | OR[269] = A 0x0026 (0x00004C) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x0027 (0x00004E) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x0028 (0x000050) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1 0x0029 (0x000052) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x002A (0x000054) 0x8409- f:00102 d: 9 | P = P + 9 (0x0033), A = 0 0x002B (0x000056) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x002C (0x000058) 0x2923- f:00024 d: 291 | OR[291] = A 0x002D (0x00005A) 0x210D- f:00020 d: 269 | A = OR[269] 0x002E (0x00005C) 0x2924- f:00024 d: 292 | OR[292] = A 0x002F (0x00005E) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0030 (0x000060) 0x5800- f:00054 d: 0 | B = A 0x0031 (0x000062) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0032 (0x000064) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0033 (0x000066) 0x1029- f:00010 d: 41 | A = 41 (0x0029) 0x0034 (0x000068) 0x2923- f:00024 d: 291 | OR[291] = A 0x0035 (0x00006A) 0x1800-0x010E f:00014 d: 0 | A = 270 (0x010E) 0x0037 (0x00006E) 0x2924- f:00024 d: 292 | OR[292] = A 0x0038 (0x000070) 0x1800-0x0001 f:00014 d: 0 | A = 1 (0x0001) 0x003A (0x000074) 0x2925- f:00024 d: 293 | OR[293] = A 0x003B (0x000076) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x003C (0x000078) 0x5800- f:00054 d: 0 | B = A 0x003D (0x00007A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x003E (0x00007C) 0x7C09- f:00076 d: 9 | R = OR[9] 0x003F (0x00007E) 0x7041- f:00070 d: 65 | P = P + 65 (0x0080) 0x0040 (0x000080) 0x2118- f:00020 d: 280 | A = OR[280] 0x0041 (0x000082) 0x1E00-0x0003 f:00017 d: 0 | A = A - 3 (0x0003) 0x0043 (0x000086) 0x8402- f:00102 d: 2 | P = P + 2 (0x0045), A = 0 0x0044 (0x000088) 0x7034- f:00070 d: 52 | P = P + 52 (0x0078) 0x0045 (0x00008A) 0x2038- f:00020 d: 56 | A = OR[56] 0x0046 (0x00008C) 0x8402- f:00102 d: 2 | P = P + 2 (0x0048), A = 0 0x0047 (0x00008E) 0x7015- f:00070 d: 21 | P = P + 21 (0x005C) 0x0048 (0x000090) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0049 (0x000092) 0x2923- f:00024 d: 291 | OR[291] = A 0x004A (0x000094) 0x1800-0x0137 f:00014 d: 0 | A = 311 (0x0137) 0x004C (0x000098) 0x2924- f:00024 d: 292 | OR[292] = A 0x004D (0x00009A) 0x1800-0x001D f:00014 d: 0 | A = 29 (0x001D) 0x004F (0x00009E) 0x2925- f:00024 d: 293 | OR[293] = A 0x0050 (0x0000A0) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0051 (0x0000A2) 0x2926- f:00024 d: 294 | OR[294] = A 0x0052 (0x0000A4) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0053 (0x0000A6) 0x2927- f:00024 d: 295 | OR[295] = A 0x0054 (0x0000A8) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0055 (0x0000AA) 0x2928- f:00024 d: 296 | OR[296] = A 0x0056 (0x0000AC) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0057 (0x0000AE) 0x5800- f:00054 d: 0 | B = A 0x0058 (0x0000B0) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x005A (0x0000B4) 0x7C09- f:00076 d: 9 | R = OR[9] 0x005B (0x0000B6) 0x701C- f:00070 d: 28 | P = P + 28 (0x0077) 0x005C (0x0000B8) 0x211E- f:00020 d: 286 | A = OR[286] 0x005D (0x0000BA) 0x290D- f:00024 d: 269 | OR[269] = A 0x005E (0x0000BC) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x005F (0x0000BE) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x0060 (0x0000C0) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1 0x0061 (0x0000C2) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x0062 (0x0000C4) 0x8409- f:00102 d: 9 | P = P + 9 (0x006B), A = 0 0x0063 (0x0000C6) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x0064 (0x0000C8) 0x2923- f:00024 d: 291 | OR[291] = A 0x0065 (0x0000CA) 0x210D- f:00020 d: 269 | A = OR[269] 0x0066 (0x0000CC) 0x2924- f:00024 d: 292 | OR[292] = A 0x0067 (0x0000CE) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0068 (0x0000D0) 0x5800- f:00054 d: 0 | B = A 0x0069 (0x0000D2) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x006A (0x0000D4) 0x7C09- f:00076 d: 9 | R = OR[9] 0x006B (0x0000D6) 0x1029- f:00010 d: 41 | A = 41 (0x0029) 0x006C (0x0000D8) 0x2923- f:00024 d: 291 | OR[291] = A 0x006D (0x0000DA) 0x1800-0x010E f:00014 d: 0 | A = 270 (0x010E) 0x006F (0x0000DE) 0x2924- f:00024 d: 292 | OR[292] = A 0x0070 (0x0000E0) 0x1800-0x0002 f:00014 d: 0 | A = 2 (0x0002) 0x0072 (0x0000E4) 0x2925- f:00024 d: 293 | OR[293] = A 0x0073 (0x0000E6) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0074 (0x0000E8) 0x5800- f:00054 d: 0 | B = A 0x0075 (0x0000EA) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0076 (0x0000EC) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0077 (0x0000EE) 0x7009- f:00070 d: 9 | P = P + 9 (0x0080) 0x0078 (0x0000F0) 0x2118- f:00020 d: 280 | A = OR[280] 0x0079 (0x0000F2) 0x1E00-0x0001 f:00017 d: 0 | A = A - 1 (0x0001) 0x007B (0x0000F6) 0x8402- f:00102 d: 2 | P = P + 2 (0x007D), A = 0 0x007C (0x0000F8) 0x7003- f:00070 d: 3 | P = P + 3 (0x007F) 0x007D (0x0000FA) 0x742C- f:00072 d: 44 | R = P + 44 (0x00A9) 0x007E (0x0000FC) 0x7002- f:00070 d: 2 | P = P + 2 (0x0080) 0x007F (0x0000FE) 0x748D- f:00072 d: 141 | R = P + 141 (0x010C) 0x0080 (0x000100) 0x211E- f:00020 d: 286 | A = OR[286] 0x0081 (0x000102) 0x290D- f:00024 d: 269 | OR[269] = A 0x0082 (0x000104) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x0083 (0x000106) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x0084 (0x000108) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1 0x0085 (0x00010A) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x0086 (0x00010C) 0x8409- f:00102 d: 9 | P = P + 9 (0x008F), A = 0 0x0087 (0x00010E) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x0088 (0x000110) 0x2923- f:00024 d: 291 | OR[291] = A 0x0089 (0x000112) 0x210D- f:00020 d: 269 | A = OR[269] 0x008A (0x000114) 0x2924- f:00024 d: 292 | OR[292] = A 0x008B (0x000116) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x008C (0x000118) 0x5800- f:00054 d: 0 | B = A 0x008D (0x00011A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x008E (0x00011C) 0x7C09- f:00076 d: 9 | R = OR[9] 0x008F (0x00011E) 0x2102- f:00020 d: 258 | A = OR[258] 0x0090 (0x000120) 0x142D- f:00012 d: 45 | A = A + 45 (0x002D) 0x0091 (0x000122) 0x2913- f:00024 d: 275 | OR[275] = A 0x0092 (0x000124) 0x2113- f:00020 d: 275 | A = OR[275] 0x0093 (0x000126) 0x290D- f:00024 d: 269 | OR[269] = A 0x0094 (0x000128) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x0095 (0x00012A) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x0096 (0x00012C) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1 0x0097 (0x00012E) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x0098 (0x000130) 0x840B- f:00102 d: 11 | P = P + 11 (0x00A3), A = 0 0x0099 (0x000132) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x009A (0x000134) 0x2923- f:00024 d: 291 | OR[291] = A 0x009B (0x000136) 0x210D- f:00020 d: 269 | A = OR[269] 0x009C (0x000138) 0x2924- f:00024 d: 292 | OR[292] = A 0x009D (0x00013A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x009E (0x00013C) 0x2925- f:00024 d: 293 | OR[293] = A 0x009F (0x00013E) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x00A0 (0x000140) 0x5800- f:00054 d: 0 | B = A 0x00A1 (0x000142) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00A2 (0x000144) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00A3 (0x000146) 0x102A- f:00010 d: 42 | A = 42 (0x002A) 0x00A4 (0x000148) 0x2923- f:00024 d: 291 | OR[291] = A 0x00A5 (0x00014A) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x00A6 (0x00014C) 0x5800- f:00054 d: 0 | B = A 0x00A7 (0x00014E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00A8 (0x000150) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00A9 (0x000152) 0x2100- f:00020 d: 256 | A = OR[256] 0x00AA (0x000154) 0x141D- f:00012 d: 29 | A = A + 29 (0x001D) 0x00AB (0x000156) 0x2913- f:00024 d: 275 | OR[275] = A 0x00AC (0x000158) 0x100F- f:00010 d: 15 | A = 15 (0x000F) 0x00AD (0x00015A) 0x1600- f:00013 d: 0 | A = A - 0 (0x0000) 0x00AE (0x00015C) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F) 0x00AF (0x00015E) 0x5800- f:00054 d: 0 | B = A 0x00B0 (0x000160) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00B1 (0x000162) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004) 0x00B2 (0x000164) 0x2513- f:00022 d: 275 | A = A + OR[275] 0x00B3 (0x000166) 0x290D- f:00024 d: 269 | OR[269] = A 0x00B4 (0x000168) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x00B5 (0x00016A) 0x4800- f:00044 d: 0 | A = A > B 0x00B6 (0x00016C) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x00B7 (0x00016E) 0x8402- f:00102 d: 2 | P = P + 2 (0x00B9), A = 0 0x00B8 (0x000170) 0x701A- f:00070 d: 26 | P = P + 26 (0x00D2) 0x00B9 (0x000172) 0x2118- f:00020 d: 280 | A = OR[280] 0x00BA (0x000174) 0x1E00-0x0000 f:00017 d: 0 | A = A - 0 (0x0000) 0x00BC (0x000178) 0x8602- f:00103 d: 2 | P = P + 2 (0x00BE), A # 0 0x00BD (0x00017A) 0x7014- f:00070 d: 20 | P = P + 20 (0x00D1) 0x00BE (0x00017C) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x00BF (0x00017E) 0x2923- f:00024 d: 291 | OR[291] = A 0x00C0 (0x000180) 0x1800-0x0137 f:00014 d: 0 | A = 311 (0x0137) 0x00C2 (0x000184) 0x2924- f:00024 d: 292 | OR[292] = A 0x00C3 (0x000186) 0x1800-0x0035 f:00014 d: 0 | A = 53 (0x0035) 0x00C5 (0x00018A) 0x2925- f:00024 d: 293 | OR[293] = A 0x00C6 (0x00018C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00C7 (0x00018E) 0x2926- f:00024 d: 294 | OR[294] = A 0x00C8 (0x000190) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00C9 (0x000192) 0x2927- f:00024 d: 295 | OR[295] = A 0x00CA (0x000194) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00CB (0x000196) 0x2928- f:00024 d: 296 | OR[296] = A 0x00CC (0x000198) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x00CD (0x00019A) 0x5800- f:00054 d: 0 | B = A 0x00CE (0x00019C) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x00D0 (0x0001A0) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00D1 (0x0001A2) 0x703A- f:00070 d: 58 | P = P + 58 (0x010B) 0x00D2 (0x0001A4) 0x100F- f:00010 d: 15 | A = 15 (0x000F) 0x00D3 (0x0001A6) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002) 0x00D4 (0x0001A8) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F) 0x00D5 (0x0001AA) 0x5800- f:00054 d: 0 | B = A 0x00D6 (0x0001AC) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x00D7 (0x0001AE) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004) 0x00D8 (0x0001B0) 0x2513- f:00022 d: 275 | A = A + OR[275] 0x00D9 (0x0001B2) 0x290D- f:00024 d: 269 | OR[269] = A 0x00DA (0x0001B4) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x00DB (0x0001B6) 0x4800- f:00044 d: 0 | A = A > B 0x00DC (0x0001B8) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x00DD (0x0001BA) 0xAE03-0x02AA f:00127 d: 3 | P = OR[3]+682 (0x02AA), A # 0 0x00DF (0x0001BE) 0x2100- f:00020 d: 256 | A = OR[256] 0x00E0 (0x0001C0) 0x143D- f:00012 d: 61 | A = A + 61 (0x003D) 0x00E1 (0x0001C2) 0x2908- f:00024 d: 264 | OR[264] = A 0x00E2 (0x0001C4) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x00E3 (0x0001C6) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x00E4 (0x0001C8) 0x2100- f:00020 d: 256 | A = OR[256] 0x00E5 (0x0001CA) 0x1440- f:00012 d: 64 | A = A + 64 (0x0040) 0x00E6 (0x0001CC) 0x2913- f:00024 d: 275 | OR[275] = A 0x00E7 (0x0001CE) 0x2113- f:00020 d: 275 | A = OR[275] 0x00E8 (0x0001D0) 0x290D- f:00024 d: 269 | OR[269] = A 0x00E9 (0x0001D2) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x00EA (0x0001D4) 0x390D- f:00034 d: 269 | (OR[269]) = A 0x00EB (0x0001D6) 0x2D0D- f:00026 d: 269 | OR[269] = OR[269] + 1 0x00EC (0x0001D8) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x00ED (0x0001DA) 0x840B- f:00102 d: 11 | P = P + 11 (0x00F8), A = 0 0x00EE (0x0001DC) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x00EF (0x0001DE) 0x2923- f:00024 d: 291 | OR[291] = A 0x00F0 (0x0001E0) 0x210D- f:00020 d: 269 | A = OR[269] 0x00F1 (0x0001E2) 0x2924- f:00024 d: 292 | OR[292] = A 0x00F2 (0x0001E4) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00F3 (0x0001E6) 0x2925- f:00024 d: 293 | OR[293] = A 0x00F4 (0x0001E8) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x00F5 (0x0001EA) 0x5800- f:00054 d: 0 | B = A 0x00F6 (0x0001EC) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x00F7 (0x0001EE) 0x7C09- f:00076 d: 9 | R = OR[9] 0x00F8 (0x0001F0) 0x2100- f:00020 d: 256 | A = OR[256] 0x00F9 (0x0001F2) 0x143D- f:00012 d: 61 | A = A + 61 (0x003D) 0x00FA (0x0001F4) 0x2913- f:00024 d: 275 | OR[275] = A 0x00FB (0x0001F6) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x00FC (0x0001F8) 0x2923- f:00024 d: 291 | OR[291] = A 0x00FD (0x0001FA) 0x2113- f:00020 d: 275 | A = OR[275] 0x00FE (0x0001FC) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x00FF (0x0001FE) 0x2924- f:00024 d: 292 | OR[292] = A 0x0100 (0x000200) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0101 (0x000202) 0x2925- f:00024 d: 293 | OR[293] = A 0x0102 (0x000204) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0103 (0x000206) 0x5800- f:00054 d: 0 | B = A 0x0104 (0x000208) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x0106 (0x00020C) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0107 (0x00020E) 0x2006- f:00020 d: 6 | A = OR[6] 0x0108 (0x000210) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B) 0x0109 (0x000212) 0x2908- f:00024 d: 264 | OR[264] = A 0x010A (0x000214) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x010B (0x000216) 0x0200- f:00001 d: 0 | EXIT 0x010C (0x000218) 0x1800-0x0022 f:00014 d: 0 | A = 34 (0x0022) 0x010E (0x00021C) 0x291F- f:00024 d: 287 | OR[287] = A 0x010F (0x00021E) 0x2100- f:00020 d: 256 | A = OR[256] 0x0110 (0x000220) 0x141D- f:00012 d: 29 | A = A + 29 (0x001D) 0x0111 (0x000222) 0x2913- f:00024 d: 275 | OR[275] = A 0x0112 (0x000224) 0x100F- f:00010 d: 15 | A = 15 (0x000F) 0x0113 (0x000226) 0x1600- f:00013 d: 0 | A = A - 0 (0x0000) 0x0114 (0x000228) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F) 0x0115 (0x00022A) 0x5800- f:00054 d: 0 | B = A 0x0116 (0x00022C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0117 (0x00022E) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004) 0x0118 (0x000230) 0x2513- f:00022 d: 275 | A = A + OR[275] 0x0119 (0x000232) 0x290D- f:00024 d: 269 | OR[269] = A 0x011A (0x000234) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x011B (0x000236) 0x4800- f:00044 d: 0 | A = A > B 0x011C (0x000238) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x011D (0x00023A) 0x8403- f:00102 d: 3 | P = P + 3 (0x0120), A = 0 0x011E (0x00023C) 0x7A03-0x029A f:00075 d: 3 | P = OR[3]+666 (0x029A) 0x0120 (0x000240) 0x2104- f:00020 d: 260 | A = OR[260] 0x0121 (0x000242) 0x290D- f:00024 d: 269 | OR[269] = A 0x0122 (0x000244) 0x2104- f:00020 d: 260 | A = OR[260] 0x0123 (0x000246) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x0124 (0x000248) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC) 0x0126 (0x00024C) 0x2904- f:00024 d: 260 | OR[260] = A 0x0127 (0x00024E) 0x2104- f:00020 d: 260 | A = OR[260] 0x0128 (0x000250) 0x2921- f:00024 d: 289 | OR[289] = A 0x0129 (0x000252) 0x1014- f:00010 d: 20 | A = 20 (0x0014) 0x012A (0x000254) 0x2B04- f:00025 d: 260 | OR[260] = A + OR[260] 0x012B (0x000256) 0x2104- f:00020 d: 260 | A = OR[260] 0x012C (0x000258) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x012D (0x00025A) 0xB234- f:00131 d: 52 | R = OR[52], C = 1 0x012E (0x00025C) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x012F (0x00025E) 0x210D- f:00020 d: 269 | A = OR[269] 0x0130 (0x000260) 0x3904- f:00034 d: 260 | (OR[260]) = A 0x0131 (0x000262) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1 0x0132 (0x000264) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0133 (0x000266) 0x2923- f:00024 d: 291 | OR[291] = A 0x0134 (0x000268) 0x1800-0x012A f:00014 d: 0 | A = 298 (0x012A) 0x0136 (0x00026C) 0x2924- f:00024 d: 292 | OR[292] = A 0x0137 (0x00026E) 0x2119- f:00020 d: 281 | A = OR[281] 0x0138 (0x000270) 0x2925- f:00024 d: 293 | OR[293] = A 0x0139 (0x000272) 0x211C- f:00020 d: 284 | A = OR[284] 0x013A (0x000274) 0x2926- f:00024 d: 294 | OR[294] = A 0x013B (0x000276) 0x211D- f:00020 d: 285 | A = OR[285] 0x013C (0x000278) 0x2927- f:00024 d: 295 | OR[295] = A 0x013D (0x00027A) 0x1800-0x0308 f:00014 d: 0 | A = 776 (0x0308) 0x013F (0x00027E) 0x2928- f:00024 d: 296 | OR[296] = A 0x0140 (0x000280) 0x2121- f:00020 d: 289 | A = OR[289] 0x0141 (0x000282) 0x2929- f:00024 d: 297 | OR[297] = A 0x0142 (0x000284) 0x1010- f:00010 d: 16 | A = 16 (0x0010) 0x0143 (0x000286) 0x292A- f:00024 d: 298 | OR[298] = A 0x0144 (0x000288) 0x1011- f:00010 d: 17 | A = 17 (0x0011) 0x0145 (0x00028A) 0x292B- f:00024 d: 299 | OR[299] = A 0x0146 (0x00028C) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0147 (0x00028E) 0x5800- f:00054 d: 0 | B = A 0x0148 (0x000290) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x014A (0x000294) 0x7C09- f:00076 d: 9 | R = OR[9] 0x014B (0x000296) 0x291F- f:00024 d: 287 | OR[287] = A 0x014C (0x000298) 0x8602- f:00103 d: 2 | P = P + 2 (0x014E), A # 0 0x014D (0x00029A) 0x7012- f:00070 d: 18 | P = P + 18 (0x015F) 0x014E (0x00029C) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1 0x014F (0x00029E) 0x3104- f:00030 d: 260 | A = (OR[260]) 0x0150 (0x0002A0) 0x2904- f:00024 d: 260 | OR[260] = A 0x0151 (0x0002A2) 0x2104- f:00020 d: 260 | A = OR[260] 0x0152 (0x0002A4) 0x2706- f:00023 d: 262 | A = A - OR[262] 0x0153 (0x0002A6) 0x8007- f:00100 d: 7 | P = P + 7 (0x015A), C = 0 0x0154 (0x0002A8) 0x2104- f:00020 d: 260 | A = OR[260] 0x0155 (0x0002AA) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x0156 (0x0002AC) 0x8003- f:00100 d: 3 | P = P + 3 (0x0159), C = 0 0x0157 (0x0002AE) 0x8402- f:00102 d: 2 | P = P + 2 (0x0159), A = 0 0x0158 (0x0002B0) 0x7002- f:00070 d: 2 | P = P + 2 (0x015A) 0x0159 (0x0002B2) 0x7003- f:00070 d: 3 | P = P + 3 (0x015C) 0x015A (0x0002B4) 0x7C34- f:00076 d: 52 | R = OR[52] 0x015B (0x0002B6) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x015C (0x0002B8) 0x7A03-0x02E1 f:00075 d: 3 | P = OR[3]+737 (0x02E1) 0x015E (0x0002BC) 0x7089- f:00070 d: 137 | P = P + 137 (0x01E7) 0x015F (0x0002BE) 0x2100- f:00020 d: 256 | A = OR[256] 0x0160 (0x0002C0) 0x1409- f:00012 d: 9 | A = A + 9 (0x0009) 0x0161 (0x0002C2) 0x2908- f:00024 d: 264 | OR[264] = A 0x0162 (0x0002C4) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0163 (0x0002C6) 0x2920- f:00024 d: 288 | OR[288] = A 0x0164 (0x0002C8) 0x3121- f:00030 d: 289 | A = (OR[289]) 0x0165 (0x0002CA) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x0166 (0x0002CC) 0x2913- f:00024 d: 275 | OR[275] = A 0x0167 (0x0002CE) 0x2113- f:00020 d: 275 | A = OR[275] 0x0168 (0x0002D0) 0x8402- f:00102 d: 2 | P = P + 2 (0x016A), A = 0 0x0169 (0x0002D2) 0x7006- f:00070 d: 6 | P = P + 6 (0x016F) 0x016A (0x0002D4) 0x2121- f:00020 d: 289 | A = OR[289] 0x016B (0x0002D6) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x016C (0x0002D8) 0x2908- f:00024 d: 264 | OR[264] = A 0x016D (0x0002DA) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x016E (0x0002DC) 0x2920- f:00024 d: 288 | OR[288] = A 0x016F (0x0002DE) 0x2100- f:00020 d: 256 | A = OR[256] 0x0170 (0x0002E0) 0x1404- f:00012 d: 4 | A = A + 4 (0x0004) 0x0171 (0x0002E2) 0x2908- f:00024 d: 264 | OR[264] = A 0x0172 (0x0002E4) 0x2120- f:00020 d: 288 | A = OR[288] 0x0173 (0x0002E6) 0x3908- f:00034 d: 264 | (OR[264]) = A 0x0174 (0x0002E8) 0x3121- f:00030 d: 289 | A = (OR[289]) 0x0175 (0x0002EA) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x0176 (0x0002EC) 0x2913- f:00024 d: 275 | OR[275] = A 0x0177 (0x0002EE) 0x2121- f:00020 d: 289 | A = OR[289] 0x0178 (0x0002F0) 0x2513- f:00022 d: 275 | A = A + OR[275] 0x0179 (0x0002F2) 0x2921- f:00024 d: 289 | OR[289] = A 0x017A (0x0002F4) 0x3121- f:00030 d: 289 | A = (OR[289]) 0x017B (0x0002F6) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x017C (0x0002F8) 0x2913- f:00024 d: 275 | OR[275] = A 0x017D (0x0002FA) 0x2100- f:00020 d: 256 | A = OR[256] 0x017E (0x0002FC) 0x1405- f:00012 d: 5 | A = A + 5 (0x0005) 0x017F (0x0002FE) 0x2916- f:00024 d: 278 | OR[278] = A 0x0180 (0x000300) 0x2113- f:00020 d: 275 | A = OR[275] 0x0181 (0x000302) 0x1604- f:00013 d: 4 | A = A - 4 (0x0004) 0x0182 (0x000304) 0x8402- f:00102 d: 2 | P = P + 2 (0x0184), A = 0 0x0183 (0x000306) 0x7019- f:00070 d: 25 | P = P + 25 (0x019C) 0x0184 (0x000308) 0x2119- f:00020 d: 281 | A = OR[281] 0x0185 (0x00030A) 0x2913- f:00024 d: 275 | OR[275] = A 0x0186 (0x00030C) 0x2121- f:00020 d: 289 | A = OR[289] 0x0187 (0x00030E) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0188 (0x000310) 0x2908- f:00024 d: 264 | OR[264] = A 0x0189 (0x000312) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x018A (0x000314) 0x2914- f:00024 d: 276 | OR[276] = A 0x018B (0x000316) 0x2121- f:00020 d: 289 | A = OR[289] 0x018C (0x000318) 0x1402- f:00012 d: 2 | A = A + 2 (0x0002) 0x018D (0x00031A) 0x2908- f:00024 d: 264 | OR[264] = A 0x018E (0x00031C) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x018F (0x00031E) 0x2915- f:00024 d: 277 | OR[277] = A 0x0190 (0x000320) 0x2116- f:00020 d: 278 | A = OR[278] 0x0191 (0x000322) 0x290E- f:00024 d: 270 | OR[270] = A 0x0192 (0x000324) 0x1004- f:00010 d: 4 | A = 4 (0x0004) 0x0193 (0x000326) 0x290D- f:00024 d: 269 | OR[269] = A 0x0194 (0x000328) 0x210D- f:00020 d: 269 | A = OR[269] 0x0195 (0x00032A) 0x8406- f:00102 d: 6 | P = P + 6 (0x019B), A = 0 0x0196 (0x00032C) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0197 (0x00032E) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x0198 (0x000330) 0x2F0D- f:00027 d: 269 | OR[269] = OR[269] - 1 0x0199 (0x000332) 0x2D0E- f:00026 d: 270 | OR[270] = OR[270] + 1 0x019A (0x000334) 0x7206- f:00071 d: 6 | P = P - 6 (0x0194) 0x019B (0x000336) 0x7008- f:00070 d: 8 | P = P + 8 (0x01A3) 0x019C (0x000338) 0x2100- f:00020 d: 256 | A = OR[256] 0x019D (0x00033A) 0x140A- f:00012 d: 10 | A = A + 10 (0x000A) 0x019E (0x00033C) 0x2913- f:00024 d: 275 | OR[275] = A 0x019F (0x00033E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x01A0 (0x000340) 0x2914- f:00024 d: 276 | OR[276] = A 0x01A1 (0x000342) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x01A2 (0x000344) 0x2915- f:00024 d: 277 | OR[277] = A 0x01A3 (0x000346) 0x2114- f:00020 d: 276 | A = OR[276] 0x01A4 (0x000348) 0x290F- f:00024 d: 271 | OR[271] = A 0x01A5 (0x00034A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x01A6 (0x00034C) 0x2910- f:00024 d: 272 | OR[272] = A 0x01A7 (0x00034E) 0x2115- f:00020 d: 277 | A = OR[277] 0x01A8 (0x000350) 0x2911- f:00024 d: 273 | OR[273] = A 0x01A9 (0x000352) 0x702E- f:00070 d: 46 | P = P + 46 (0x01D7) 0x01AA (0x000354) 0x210F- f:00020 d: 271 | A = OR[271] 0x01AB (0x000356) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x01AC (0x000358) 0x2513- f:00022 d: 275 | A = A + OR[275] 0x01AD (0x00035A) 0x290D- f:00024 d: 269 | OR[269] = A 0x01AE (0x00035C) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x01AF (0x00035E) 0x290D- f:00024 d: 269 | OR[269] = A 0x01B0 (0x000360) 0x210F- f:00020 d: 271 | A = OR[271] 0x01B1 (0x000362) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x01B2 (0x000364) 0x2908- f:00024 d: 264 | OR[264] = A 0x01B3 (0x000366) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x01B4 (0x000368) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x01B5 (0x00036A) 0x8604- f:00103 d: 4 | P = P + 4 (0x01B9), A # 0 0x01B6 (0x00036C) 0x210D- f:00020 d: 269 | A = OR[269] 0x01B7 (0x00036E) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x01B8 (0x000370) 0x290D- f:00024 d: 269 | OR[269] = A 0x01B9 (0x000372) 0x210D- f:00020 d: 269 | A = OR[269] 0x01BA (0x000374) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x01BB (0x000376) 0x2912- f:00024 d: 274 | OR[274] = A 0x01BC (0x000378) 0x2D0F- f:00026 d: 271 | OR[271] = OR[271] + 1 0x01BD (0x00037A) 0x2112- f:00020 d: 274 | A = OR[274] 0x01BE (0x00037C) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x01BF (0x00037E) 0x290D- f:00024 d: 269 | OR[269] = A 0x01C0 (0x000380) 0x2110- f:00020 d: 272 | A = OR[272] 0x01C1 (0x000382) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x01C2 (0x000384) 0x2516- f:00022 d: 278 | A = A + OR[278] 0x01C3 (0x000386) 0x290E- f:00024 d: 270 | OR[270] = A 0x01C4 (0x000388) 0x2110- f:00020 d: 272 | A = OR[272] 0x01C5 (0x00038A) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x01C6 (0x00038C) 0x2908- f:00024 d: 264 | OR[264] = A 0x01C7 (0x00038E) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x01C8 (0x000390) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x01C9 (0x000392) 0x8607- f:00103 d: 7 | P = P + 7 (0x01D0), A # 0 0x01CA (0x000394) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x01CB (0x000396) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009) 0x01CC (0x000398) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x01CD (0x00039A) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009) 0x01CE (0x00039C) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x01CF (0x00039E) 0x7006- f:00070 d: 6 | P = P + 6 (0x01D5) 0x01D0 (0x0003A0) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x01D1 (0x0003A2) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00) 0x01D3 (0x0003A6) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x01D4 (0x0003A8) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x01D5 (0x0003AA) 0x2D10- f:00026 d: 272 | OR[272] = OR[272] + 1 0x01D6 (0x0003AC) 0x2F11- f:00027 d: 273 | OR[273] = OR[273] - 1 0x01D7 (0x0003AE) 0x2111- f:00020 d: 273 | A = OR[273] 0x01D8 (0x0003B0) 0x8E2E- f:00107 d: 46 | P = P - 46 (0x01AA), A # 0 0x01D9 (0x0003B2) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1 0x01DA (0x0003B4) 0x3104- f:00030 d: 260 | A = (OR[260]) 0x01DB (0x0003B6) 0x2904- f:00024 d: 260 | OR[260] = A 0x01DC (0x0003B8) 0x2104- f:00020 d: 260 | A = OR[260] 0x01DD (0x0003BA) 0x2706- f:00023 d: 262 | A = A - OR[262] 0x01DE (0x0003BC) 0x8007- f:00100 d: 7 | P = P + 7 (0x01E5), C = 0 0x01DF (0x0003BE) 0x2104- f:00020 d: 260 | A = OR[260] 0x01E0 (0x0003C0) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x01E1 (0x0003C2) 0x8003- f:00100 d: 3 | P = P + 3 (0x01E4), C = 0 0x01E2 (0x0003C4) 0x8402- f:00102 d: 2 | P = P + 2 (0x01E4), A = 0 0x01E3 (0x0003C6) 0x7002- f:00070 d: 2 | P = P + 2 (0x01E5) 0x01E4 (0x0003C8) 0x7003- f:00070 d: 3 | P = P + 3 (0x01E7) 0x01E5 (0x0003CA) 0x7C34- f:00076 d: 52 | R = OR[52] 0x01E6 (0x0003CC) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x01E7 (0x0003CE) 0x2104- f:00020 d: 260 | A = OR[260] 0x01E8 (0x0003D0) 0x290D- f:00024 d: 269 | OR[269] = A 0x01E9 (0x0003D2) 0x2104- f:00020 d: 260 | A = OR[260] 0x01EA (0x0003D4) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x01EB (0x0003D6) 0x1A00-0xFFFC f:00015 d: 0 | A = A & 65532 (0xFFFC) 0x01ED (0x0003DA) 0x2904- f:00024 d: 260 | OR[260] = A 0x01EE (0x0003DC) 0x2104- f:00020 d: 260 | A = OR[260] 0x01EF (0x0003DE) 0x2922- f:00024 d: 290 | OR[290] = A 0x01F0 (0x0003E0) 0x1018- f:00010 d: 24 | A = 24 (0x0018) 0x01F1 (0x0003E2) 0x2B04- f:00025 d: 260 | OR[260] = A + OR[260] 0x01F2 (0x0003E4) 0x2104- f:00020 d: 260 | A = OR[260] 0x01F3 (0x0003E6) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x01F4 (0x0003E8) 0xB234- f:00131 d: 52 | R = OR[52], C = 1 0x01F5 (0x0003EA) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x01F6 (0x0003EC) 0x210D- f:00020 d: 269 | A = OR[269] 0x01F7 (0x0003EE) 0x3904- f:00034 d: 260 | (OR[260]) = A 0x01F8 (0x0003F0) 0x2D04- f:00026 d: 260 | OR[260] = OR[260] + 1 0x01F9 (0x0003F2) 0x102D- f:00010 d: 45 | A = 45 (0x002D) 0x01FA (0x0003F4) 0x2923- f:00024 d: 291 | OR[291] = A 0x01FB (0x0003F6) 0x1800-0x015B f:00014 d: 0 | A = 347 (0x015B) 0x01FD (0x0003FA) 0x2924- f:00024 d: 292 | OR[292] = A 0x01FE (0x0003FC) 0x1005- f:00010 d: 5 | A = 5 (0x0005) 0x01FF (0x0003FE) 0x2925- f:00024 d: 293 | OR[293] = A 0x0200 (0x000400) 0x1800-0xFFFF f:00014 d: 0 | A = 65535 (0xFFFF) 0x0202 (0x000404) 0x2926- f:00024 d: 294 | OR[294] = A 0x0203 (0x000406) 0x1800-0x0000 f:00014 d: 0 | A = 0 (0x0000) 0x0205 (0x00040A) 0x2927- f:00024 d: 295 | OR[295] = A 0x0206 (0x00040C) 0x2122- f:00020 d: 290 | A = OR[290] 0x0207 (0x00040E) 0x2928- f:00024 d: 296 | OR[296] = A 0x0208 (0x000410) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0209 (0x000412) 0x5800- f:00054 d: 0 | B = A 0x020A (0x000414) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x020B (0x000416) 0x7C09- f:00076 d: 9 | R = OR[9] 0x020C (0x000418) 0x291F- f:00024 d: 287 | OR[287] = A 0x020D (0x00041A) 0x8402- f:00102 d: 2 | P = P + 2 (0x020F), A = 0 0x020E (0x00041C) 0x7078- f:00070 d: 120 | P = P + 120 (0x0286) 0x020F (0x00041E) 0x2100- f:00020 d: 256 | A = OR[256] 0x0210 (0x000420) 0x143D- f:00012 d: 61 | A = A + 61 (0x003D) 0x0211 (0x000422) 0x2913- f:00024 d: 275 | OR[275] = A 0x0212 (0x000424) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0213 (0x000426) 0x3913- f:00034 d: 275 | (OR[275]) = A 0x0214 (0x000428) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x0215 (0x00042A) 0x2923- f:00024 d: 291 | OR[291] = A 0x0216 (0x00042C) 0x2113- f:00020 d: 275 | A = OR[275] 0x0217 (0x00042E) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x0218 (0x000430) 0x2924- f:00024 d: 292 | OR[292] = A 0x0219 (0x000432) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x021A (0x000434) 0x2925- f:00024 d: 293 | OR[293] = A 0x021B (0x000436) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x021C (0x000438) 0x5800- f:00054 d: 0 | B = A 0x021D (0x00043A) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x021F (0x00043E) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0220 (0x000440) 0x2006- f:00020 d: 6 | A = OR[6] 0x0221 (0x000442) 0x140B- f:00012 d: 11 | A = A + 11 (0x000B) 0x0222 (0x000444) 0x2908- f:00024 d: 264 | OR[264] = A 0x0223 (0x000446) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0224 (0x000448) 0x291F- f:00024 d: 287 | OR[287] = A 0x0225 (0x00044A) 0x8402- f:00102 d: 2 | P = P + 2 (0x0227), A = 0 0x0226 (0x00044C) 0x7060- f:00070 d: 96 | P = P + 96 (0x0286) 0x0227 (0x00044E) 0x1010- f:00010 d: 16 | A = 16 (0x0010) 0x0228 (0x000450) 0x2913- f:00024 d: 275 | OR[275] = A 0x0229 (0x000452) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x022A (0x000454) 0x2914- f:00024 d: 276 | OR[276] = A 0x022B (0x000456) 0x74B1- f:00072 d: 177 | R = P + 177 (0x02DC) 0x022C (0x000458) 0x2102- f:00020 d: 258 | A = OR[258] 0x022D (0x00045A) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x022E (0x00045C) 0x2908- f:00024 d: 264 | OR[264] = A 0x022F (0x00045E) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0230 (0x000460) 0x2913- f:00024 d: 275 | OR[275] = A 0x0231 (0x000462) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0232 (0x000464) 0x2923- f:00024 d: 291 | OR[291] = A 0x0233 (0x000466) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123) 0x0235 (0x00046A) 0x2924- f:00024 d: 292 | OR[292] = A 0x0236 (0x00046C) 0x1800-0x0005 f:00014 d: 0 | A = 5 (0x0005) 0x0238 (0x000470) 0x2925- f:00024 d: 293 | OR[293] = A 0x0239 (0x000472) 0x2113- f:00020 d: 275 | A = OR[275] 0x023A (0x000474) 0x2926- f:00024 d: 294 | OR[294] = A 0x023B (0x000476) 0x1001- f:00010 d: 1 | A = 1 (0x0001) 0x023C (0x000478) 0x2927- f:00024 d: 295 | OR[295] = A 0x023D (0x00047A) 0x2122- f:00020 d: 290 | A = OR[290] 0x023E (0x00047C) 0x2928- f:00024 d: 296 | OR[296] = A 0x023F (0x00047E) 0x1010- f:00010 d: 16 | A = 16 (0x0010) 0x0240 (0x000480) 0x2929- f:00024 d: 297 | OR[297] = A 0x0241 (0x000482) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x0242 (0x000484) 0x292A- f:00024 d: 298 | OR[298] = A 0x0243 (0x000486) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0244 (0x000488) 0x5800- f:00054 d: 0 | B = A 0x0245 (0x00048A) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x0247 (0x00048E) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0248 (0x000490) 0x1018- f:00010 d: 24 | A = 24 (0x0018) 0x0249 (0x000492) 0x2913- f:00024 d: 275 | OR[275] = A 0x024A (0x000494) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x024B (0x000496) 0x2914- f:00024 d: 276 | OR[276] = A 0x024C (0x000498) 0x7490- f:00072 d: 144 | R = P + 144 (0x02DC) 0x024D (0x00049A) 0x2102- f:00020 d: 258 | A = OR[258] 0x024E (0x00049C) 0x1403- f:00012 d: 3 | A = A + 3 (0x0003) 0x024F (0x00049E) 0x2908- f:00024 d: 264 | OR[264] = A 0x0250 (0x0004A0) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x0251 (0x0004A2) 0x2913- f:00024 d: 275 | OR[275] = A 0x0252 (0x0004A4) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x0253 (0x0004A6) 0x2923- f:00024 d: 291 | OR[291] = A 0x0254 (0x0004A8) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123) 0x0256 (0x0004AC) 0x2924- f:00024 d: 292 | OR[292] = A 0x0257 (0x0004AE) 0x1800-0x0005 f:00014 d: 0 | A = 5 (0x0005) 0x0259 (0x0004B2) 0x2925- f:00024 d: 293 | OR[293] = A 0x025A (0x0004B4) 0x2113- f:00020 d: 275 | A = OR[275] 0x025B (0x0004B6) 0x2926- f:00024 d: 294 | OR[294] = A 0x025C (0x0004B8) 0x1003- f:00010 d: 3 | A = 3 (0x0003) 0x025D (0x0004BA) 0x1408- f:00012 d: 8 | A = A + 8 (0x0008) 0x025E (0x0004BC) 0x2927- f:00024 d: 295 | OR[295] = A 0x025F (0x0004BE) 0x2122- f:00020 d: 290 | A = OR[290] 0x0260 (0x0004C0) 0x2928- f:00024 d: 296 | OR[296] = A 0x0261 (0x0004C2) 0x1018- f:00010 d: 24 | A = 24 (0x0018) 0x0262 (0x0004C4) 0x2929- f:00024 d: 297 | OR[297] = A 0x0263 (0x0004C6) 0x1008- f:00010 d: 8 | A = 8 (0x0008) 0x0264 (0x0004C8) 0x292A- f:00024 d: 298 | OR[298] = A 0x0265 (0x0004CA) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0266 (0x0004CC) 0x5800- f:00054 d: 0 | B = A 0x0267 (0x0004CE) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x0269 (0x0004D2) 0x7C09- f:00076 d: 9 | R = OR[9] 0x026A (0x0004D4) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x026B (0x0004D6) 0x2923- f:00024 d: 291 | OR[291] = A 0x026C (0x0004D8) 0x1800-0x0123 f:00014 d: 0 | A = 291 (0x0123) 0x026E (0x0004DC) 0x2924- f:00024 d: 292 | OR[292] = A 0x026F (0x0004DE) 0x1800-0x0002 f:00014 d: 0 | A = 2 (0x0002) 0x0271 (0x0004E2) 0x2925- f:00024 d: 293 | OR[293] = A 0x0272 (0x0004E4) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x0273 (0x0004E6) 0x5800- f:00054 d: 0 | B = A 0x0274 (0x0004E8) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x0276 (0x0004EC) 0x7C09- f:00076 d: 9 | R = OR[9] 0x0277 (0x0004EE) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1 0x0278 (0x0004F0) 0x3104- f:00030 d: 260 | A = (OR[260]) 0x0279 (0x0004F2) 0x2904- f:00024 d: 260 | OR[260] = A 0x027A (0x0004F4) 0x2104- f:00020 d: 260 | A = OR[260] 0x027B (0x0004F6) 0x2706- f:00023 d: 262 | A = A - OR[262] 0x027C (0x0004F8) 0x8007- f:00100 d: 7 | P = P + 7 (0x0283), C = 0 0x027D (0x0004FA) 0x2104- f:00020 d: 260 | A = OR[260] 0x027E (0x0004FC) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x027F (0x0004FE) 0x8003- f:00100 d: 3 | P = P + 3 (0x0282), C = 0 0x0280 (0x000500) 0x8402- f:00102 d: 2 | P = P + 2 (0x0282), A = 0 0x0281 (0x000502) 0x7002- f:00070 d: 2 | P = P + 2 (0x0283) 0x0282 (0x000504) 0x7003- f:00070 d: 3 | P = P + 3 (0x0285) 0x0283 (0x000506) 0x7C34- f:00076 d: 52 | R = OR[52] 0x0284 (0x000508) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x0285 (0x00050A) 0x7056- f:00070 d: 86 | P = P + 86 (0x02DB) 0x0286 (0x00050C) 0x2F04- f:00027 d: 260 | OR[260] = OR[260] - 1 0x0287 (0x00050E) 0x3104- f:00030 d: 260 | A = (OR[260]) 0x0288 (0x000510) 0x2904- f:00024 d: 260 | OR[260] = A 0x0289 (0x000512) 0x2104- f:00020 d: 260 | A = OR[260] 0x028A (0x000514) 0x2706- f:00023 d: 262 | A = A - OR[262] 0x028B (0x000516) 0x8007- f:00100 d: 7 | P = P + 7 (0x0292), C = 0 0x028C (0x000518) 0x2104- f:00020 d: 260 | A = OR[260] 0x028D (0x00051A) 0x2705- f:00023 d: 261 | A = A - OR[261] 0x028E (0x00051C) 0x8003- f:00100 d: 3 | P = P + 3 (0x0291), C = 0 0x028F (0x00051E) 0x8402- f:00102 d: 2 | P = P + 2 (0x0291), A = 0 0x0290 (0x000520) 0x7002- f:00070 d: 2 | P = P + 2 (0x0292) 0x0291 (0x000522) 0x7003- f:00070 d: 3 | P = P + 3 (0x0294) 0x0292 (0x000524) 0x7C34- f:00076 d: 52 | R = OR[52] 0x0293 (0x000526) 0x000B- f:00000 d: 11 | PASS | **** non-standard encoding with D:0x000B **** 0x0294 (0x000528) 0x2100- f:00020 d: 256 | A = OR[256] 0x0295 (0x00052A) 0x141D- f:00012 d: 29 | A = A + 29 (0x001D) 0x0296 (0x00052C) 0x2913- f:00024 d: 275 | OR[275] = A 0x0297 (0x00052E) 0x100F- f:00010 d: 15 | A = 15 (0x000F) 0x0298 (0x000530) 0x1602- f:00013 d: 2 | A = A - 2 (0x0002) 0x0299 (0x000532) 0x120F- f:00011 d: 15 | A = A & 15 (0x000F) 0x029A (0x000534) 0x5800- f:00054 d: 0 | B = A 0x029B (0x000536) 0x1002- f:00010 d: 2 | A = 2 (0x0002) 0x029C (0x000538) 0x0804- f:00004 d: 4 | A = A > 4 (0x0004) 0x029D (0x00053A) 0x2513- f:00022 d: 275 | A = A + OR[275] 0x029E (0x00053C) 0x290D- f:00024 d: 269 | OR[269] = A 0x029F (0x00053E) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x02A0 (0x000540) 0x4800- f:00044 d: 0 | A = A > B 0x02A1 (0x000542) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x02A2 (0x000544) 0x8602- f:00103 d: 2 | P = P + 2 (0x02A4), A # 0 0x02A3 (0x000546) 0x7026- f:00070 d: 38 | P = P + 38 (0x02C9) 0x02A4 (0x000548) 0x1800-0x0023 f:00014 d: 0 | A = 35 (0x0023) 0x02A6 (0x00054C) 0x291F- f:00024 d: 287 | OR[287] = A 0x02A7 (0x00054E) 0x2100- f:00020 d: 256 | A = OR[256] 0x02A8 (0x000550) 0x140E- f:00012 d: 14 | A = A + 14 (0x000E) 0x02A9 (0x000552) 0x2908- f:00024 d: 264 | OR[264] = A 0x02AA (0x000554) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x02AB (0x000556) 0x2914- f:00024 d: 276 | OR[276] = A 0x02AC (0x000558) 0x2100- f:00020 d: 256 | A = OR[256] 0x02AD (0x00055A) 0x140F- f:00012 d: 15 | A = A + 15 (0x000F) 0x02AE (0x00055C) 0x2908- f:00024 d: 264 | OR[264] = A 0x02AF (0x00055E) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x02B0 (0x000560) 0x2915- f:00024 d: 277 | OR[277] = A 0x02B1 (0x000562) 0x2115- f:00020 d: 277 | A = OR[277] 0x02B2 (0x000564) 0x2514- f:00022 d: 276 | A = A + OR[276] 0x02B3 (0x000566) 0x2915- f:00024 d: 277 | OR[277] = A 0x02B4 (0x000568) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x02B5 (0x00056A) 0x2916- f:00024 d: 278 | OR[278] = A 0x02B6 (0x00056C) 0x2101- f:00020 d: 257 | A = OR[257] 0x02B7 (0x00056E) 0x1492- f:00012 d: 146 | A = A + 146 (0x0092) 0x02B8 (0x000570) 0x2913- f:00024 d: 275 | OR[275] = A 0x02B9 (0x000572) 0x2115- f:00020 d: 277 | A = OR[277] 0x02BA (0x000574) 0x840A- f:00102 d: 10 | P = P + 10 (0x02C4), A = 0 0x02BB (0x000576) 0x2113- f:00020 d: 275 | A = OR[275] 0x02BC (0x000578) 0x1401- f:00012 d: 1 | A = A + 1 (0x0001) 0x02BD (0x00057A) 0x2908- f:00024 d: 264 | OR[264] = A 0x02BE (0x00057C) 0x3108- f:00030 d: 264 | A = (OR[264]) 0x02BF (0x00057E) 0x2916- f:00024 d: 278 | OR[278] = A 0x02C0 (0x000580) 0x1034- f:00010 d: 52 | A = 52 (0x0034) 0x02C1 (0x000582) 0x2B13- f:00025 d: 275 | OR[275] = A + OR[275] 0x02C2 (0x000584) 0x2F15- f:00027 d: 277 | OR[277] = OR[277] - 1 0x02C3 (0x000586) 0x720A- f:00071 d: 10 | P = P - 10 (0x02B9) 0x02C4 (0x000588) 0x2116- f:00020 d: 278 | A = OR[278] 0x02C5 (0x00058A) 0x8404- f:00102 d: 4 | P = P + 4 (0x02C9), A = 0 0x02C6 (0x00058C) 0x1800-0x0003 f:00014 d: 0 | A = 3 (0x0003) 0x02C8 (0x000590) 0x291F- f:00024 d: 287 | OR[287] = A 0x02C9 (0x000592) 0x1028- f:00010 d: 40 | A = 40 (0x0028) 0x02CA (0x000594) 0x2923- f:00024 d: 291 | OR[291] = A 0x02CB (0x000596) 0x1800-0x0137 f:00014 d: 0 | A = 311 (0x0137) 0x02CD (0x00059A) 0x2924- f:00024 d: 292 | OR[292] = A 0x02CE (0x00059C) 0x211F- f:00020 d: 287 | A = OR[287] 0x02CF (0x00059E) 0x2925- f:00024 d: 293 | OR[293] = A 0x02D0 (0x0005A0) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x02D1 (0x0005A2) 0x2926- f:00024 d: 294 | OR[294] = A 0x02D2 (0x0005A4) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x02D3 (0x0005A6) 0x2927- f:00024 d: 295 | OR[295] = A 0x02D4 (0x0005A8) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x02D5 (0x0005AA) 0x2928- f:00024 d: 296 | OR[296] = A 0x02D6 (0x0005AC) 0x1123- f:00010 d: 291 | A = 291 (0x0123) 0x02D7 (0x0005AE) 0x5800- f:00054 d: 0 | B = A 0x02D8 (0x0005B0) 0x1800-0x1718 f:00014 d: 0 | A = 5912 (0x1718) 0x02DA (0x0005B4) 0x7C09- f:00076 d: 9 | R = OR[9] 0x02DB (0x0005B6) 0x0200- f:00001 d: 0 | EXIT 0x02DC (0x0005B8) 0x2114- f:00020 d: 276 | A = OR[276] 0x02DD (0x0005BA) 0x8439- f:00102 d: 57 | P = P + 57 (0x0316), A = 0 0x02DE (0x0005BC) 0x2113- f:00020 d: 275 | A = OR[275] 0x02DF (0x0005BE) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x02E0 (0x0005C0) 0x2522- f:00022 d: 290 | A = A + OR[290] 0x02E1 (0x0005C2) 0x290D- f:00024 d: 269 | OR[269] = A 0x02E2 (0x0005C4) 0x310D- f:00030 d: 269 | A = (OR[269]) 0x02E3 (0x0005C6) 0x290D- f:00024 d: 269 | OR[269] = A 0x02E4 (0x0005C8) 0x2113- f:00020 d: 275 | A = OR[275] 0x02E5 (0x0005CA) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x02E6 (0x0005CC) 0x2908- f:00024 d: 264 | OR[264] = A 0x02E7 (0x0005CE) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x02E8 (0x0005D0) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x02E9 (0x0005D2) 0x8604- f:00103 d: 4 | P = P + 4 (0x02ED), A # 0 0x02EA (0x0005D4) 0x210D- f:00020 d: 269 | A = OR[269] 0x02EB (0x0005D6) 0x0808- f:00004 d: 8 | A = A > 8 (0x0008) 0x02EC (0x0005D8) 0x290D- f:00024 d: 269 | OR[269] = A 0x02ED (0x0005DA) 0x210D- f:00020 d: 269 | A = OR[269] 0x02EE (0x0005DC) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x02EF (0x0005DE) 0x2915- f:00024 d: 277 | OR[277] = A 0x02F0 (0x0005E0) 0x2115- f:00020 d: 277 | A = OR[277] 0x02F1 (0x0005E2) 0x1620- f:00013 d: 32 | A = A - 32 (0x0020) 0x02F2 (0x0005E4) 0x8203- f:00101 d: 3 | P = P + 3 (0x02F5), C = 1 0x02F3 (0x0005E6) 0x1020- f:00010 d: 32 | A = 32 (0x0020) 0x02F4 (0x0005E8) 0x2915- f:00024 d: 277 | OR[277] = A 0x02F5 (0x0005EA) 0x2115- f:00020 d: 277 | A = OR[277] 0x02F6 (0x0005EC) 0x167F- f:00013 d: 127 | A = A - 127 (0x007F) 0x02F7 (0x0005EE) 0x8004- f:00100 d: 4 | P = P + 4 (0x02FB), C = 0 0x02F8 (0x0005F0) 0x8403- f:00102 d: 3 | P = P + 3 (0x02FB), A = 0 0x02F9 (0x0005F2) 0x1020- f:00010 d: 32 | A = 32 (0x0020) 0x02FA (0x0005F4) 0x2915- f:00024 d: 277 | OR[277] = A 0x02FB (0x0005F6) 0x2115- f:00020 d: 277 | A = OR[277] 0x02FC (0x0005F8) 0x12FF- f:00011 d: 255 | A = A & 255 (0x00FF) 0x02FD (0x0005FA) 0x290D- f:00024 d: 269 | OR[269] = A 0x02FE (0x0005FC) 0x2113- f:00020 d: 275 | A = OR[275] 0x02FF (0x0005FE) 0x0801- f:00004 d: 1 | A = A > 1 (0x0001) 0x0300 (0x000600) 0x2522- f:00022 d: 290 | A = A + OR[290] 0x0301 (0x000602) 0x290E- f:00024 d: 270 | OR[270] = A 0x0302 (0x000604) 0x2113- f:00020 d: 275 | A = OR[275] 0x0303 (0x000606) 0x1201- f:00011 d: 1 | A = A & 1 (0x0001) 0x0304 (0x000608) 0x2908- f:00024 d: 264 | OR[264] = A 0x0305 (0x00060A) 0x1000- f:00010 d: 0 | A = 0 (0x0000) 0x0306 (0x00060C) 0x2708- f:00023 d: 264 | A = A - OR[264] 0x0307 (0x00060E) 0x8607- f:00103 d: 7 | P = P + 7 (0x030E), A # 0 0x0308 (0x000610) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x0309 (0x000612) 0x0A09- f:00005 d: 9 | A = A < 9 (0x0009) 0x030A (0x000614) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x030B (0x000616) 0x0C09- f:00006 d: 9 | A = A >> 9 (0x0009) 0x030C (0x000618) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x030D (0x00061A) 0x7006- f:00070 d: 6 | P = P + 6 (0x0313) 0x030E (0x00061C) 0x310E- f:00030 d: 270 | A = (OR[270]) 0x030F (0x00061E) 0x1A00-0xFF00 f:00015 d: 0 | A = A & 65280 (0xFF00) 0x0311 (0x000622) 0x250D- f:00022 d: 269 | A = A + OR[269] 0x0312 (0x000624) 0x390E- f:00034 d: 270 | (OR[270]) = A 0x0313 (0x000626) 0x2D13- f:00026 d: 275 | OR[275] = OR[275] + 1 0x0314 (0x000628) 0x2F14- f:00027 d: 276 | OR[276] = OR[276] - 1 0x0315 (0x00062A) 0x7239- f:00071 d: 57 | P = P - 57 (0x02DC) 0x0316 (0x00062C) 0x0200- f:00001 d: 0 | EXIT 0x0317 (0x00062E) 0x0000- f:00000 d: 0 | PASS 0x0318 (0x000630) 0x0000- f:00000 d: 0 | PASS 0x0319 (0x000632) 0x0000- f:00000 d: 0 | PASS 0x031A (0x000634) 0x0000- f:00000 d: 0 | PASS 0x031B (0x000636) 0x0000- f:00000 d: 0 | PASS
80.276228
127
0.462546
51a13a54022130952de661385aa76d4a3d4af9f3
5,717
asm
Assembly
src/tlb.asm
DigiDwrf/neon64v2-easybuild
94fa46fbc8ddb2af593cb42162df58f65a03ebc4
[ "0BSD" ]
36
2020-07-08T11:27:17.000Z
2022-03-15T08:38:52.000Z
src/tlb.asm
DigiDwrf/neon64v2-easybuild
94fa46fbc8ddb2af593cb42162df58f65a03ebc4
[ "0BSD" ]
19
2020-07-12T23:14:03.000Z
2021-12-14T07:57:40.000Z
src/tlb.asm
DigiDwrf/neon64v2-easybuild
94fa46fbc8ddb2af593cb42162df58f65a03ebc4
[ "0BSD" ]
6
2021-07-17T09:57:46.000Z
2022-03-13T07:50:25.000Z
scope TLB { Init: // Set TLB to known state // Initially set all pages invalid global, 512K from 0x40'0000 mtc0 r0, PageMask // 4K pages (in pairs) lli t0, 1 mtc0 t0, EntryLo0 mtc0 t0, EntryLo1 scope { constant hi_addr(t0) constant count(t1) constant index(t2) la hi_addr, 0x40'0000 lli count, 32 lli index, 0 -; mtc0 index, Index mtc0 hi_addr, EntryHi // tlbwi hazard with mtc0 EntryHi: 7-(5+1) = 1, one addi should be enough addi count, -1 addi index, 1 tlbwi bnez count,- addi hi_addr, 1<<13 // VPN2 += 8k } // TLB index 0 // Low page (0-8k) mtc0 r0, PageMask // 4K pages (in pairs) mtc0 r0, Index lli t0, low_page_base mtc0 t0, EntryHi // First page of pair // Cached (5-3), writeable (dirty, 2), valid (1), global (0) la t0, ((low_page_ram_base >> 12) << 6) | (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo0 // Second page of pair // Cached (5-3), writeable (dirty, 2), valid (1), global (0) la t0, (((low_page_ram_base + tlb_page_size) >> 12) << 6) | (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo1 nop // tlbwi hazard with mtc0 EntryLo1, 7-(5+1) = 1 tlbwi // TLB index 1 // Non-negative address space for all of RDRAM (8MB-16MB) la t0, (0x80'0000-1)&0x1ff'e000 // Mask is 24-13 mtc0 t0, PageMask lli t0, 1 mtc0 t0, Index // Starts at 8MB la t0, tlb_rdram mtc0 t0, EntryHi // First page of pair, 0, cached, writeable, valid, global la t0, (0 << 6) | (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo0 // Second page of pair, 4MB la t0, ((0x40'0000 >> 12) << 6) | (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo1 nop // tlbwi hazard with mtc0 EntryLo1 tlbwi // TLB index 2 // Non-negative, read-only address space for all of RDRAM (16MB-24MB) la t0, (0x80'0000-1)&0x1ff'e000 // Mask is 24-13 mtc0 t0, PageMask lli t0, 1 mtc0 t0, Index // Starts at 16MB la t0, tlb_ro_rdram mtc0 t0, EntryHi // First page of pair, 0, not dirty = not writeable, cached, valid, global la t0, (0 << 6) | (%011 << 3) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo0 // Second page of pair, 4MB la t0, ((0x40'0000 >> 12) << 6) | (%011 << 3) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo1 nop // tlbwi hazard with mtc0 EntryLo1 tlbwi // Allow for dynamic allocation later lli t0, 3 ls_gp(sw t0, next_tlb_index) la t0, tlb_free jr ra ls_gp(sw t0, next_tlb_vaddr) // Input: // a0: alignment // Output: // a0: Vaddr // a1: TLB entry index to use (pre-loaded into cop0 Index) // Align the virtual address, and leave that much space again for the next one. // Also reserves the TLB entry index, this is left in a1 and written to cop0 Index. AllocateVaddr: ls_gp(lwu a1, next_tlb_index) ls_gp(lwu t0, next_tlb_vaddr) mtc0 a1, Index addiu t1, a1, 1 ls_gp(sw t1, next_tlb_index) move t1, a0 // save alignment in t1 as we will reuse a0 addiu t2, t1, -1 // alignment-1, remainder mask addu a0, t0, t2 // vaddr+alignment-1 and t2, a0 // mask out remainder xor a0, t2 // round down for current address add t2, a0, t1 // round up for next addres jr ra ls_gp(sw t2, next_tlb_vaddr) // TODO should interrupts be masked while updating mappings so the cop0 regs don't get mussed? // All args will be preserved in TLBMap* // Maps one 4K page, only first half of pair is used // Index: TLB entry index // a0: virtual address (8K aligned) // a1: physical address (4K aligned) Map4K: mtc0 r0, PageMask // No bits are masked for 4K mtc0 a0, EntryHi // Low page of pair, cached, writeable, valid, global srl t0, a1, 12-6 ori t0, (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo0 // High page of pair, invalid global lli t0, (1 << 0) mtc0 t0, EntryLo1 jr ra // tlbwi hazard with mtc0 EntryLo1 tlbwi // Maps two 4K pages // Index: TLB entry index // a0: virtual address (8K aligned) // a1: physical address 0 (4K aligned) // a2: physical address 1 (for TLBMap4K_2, 4K aligned) Map8K: addi a2, a1, 0x1000 Map4K_2: mtc0 r0, PageMask // No bits are masked for 4K mtc0 a0, EntryHi // Low page of pair, cached, writeable, valid, global srl t0, a1, 12-6 ori t0, (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo0 // High page of pair,cached, writeable, valid, global srl t0, a2, 12-6 ori t0, (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo1 jr ra // tlbwi hazard with mtc0 EntryLo1 tlbwi // Maps one 16K page, only first half of pair is used // a0: virtual address (32K aligned) // a1: physical address (4K aligned?) // Index: TLB entry index Map16K: lli t0, (0x8000-1)&0x1ff'e000 // Mask is 24-13 mtc0 t0, PageMask mtc0 a0, EntryHi // Low page of pair, cached, writeable, valid, global srl t0, a1, 12-6 ori t0, (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo0 // High page of pair, invalid global lli t0, (1 << 0) mtc0 t0, EntryLo1 jr ra // tlbwi hazard with mtc0 EntryLo1 tlbwi // Map two 16K pages // a0: virtual address (32K aligned) // a1: physical address 0 (4K aligned?) // a2: physical address 1 (for TLBMap16K_2, 4K aligned?) // Index: TLB entry index Map32K: addi a2, a1, 0x4000 Map16K_2: lli t0, (0x8000-1)&0x1ff'e000 // Mask is 24-13 mtc0 t0, PageMask mtc0 a0, EntryHi // Low page of pair, cached, writeable, valid, global srl t0, a1, 12-6 ori t0, (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo0 // High page of pair, cached, writeable, valid, global srl t0, a2, 12-6 ori t0, (%011 << 3) | (1 << 2) | (1 << 1) | (1 << 0) mtc0 t0, EntryLo1 jr ra // tlbwi hazard with mtc0 EntryLo1 tlbwi } begin_bss() next_tlb_vaddr: dw 0 next_tlb_index: dw 0 end_bss()
28.442786
106
0.625153
9de49fc4d815996f9dde4e9e792056f9be9182e3
902
asm
Assembly
programs/oeis/022/A022361.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/022/A022361.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/022/A022361.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A022361: Fibonacci sequence beginning 0, 27. ; 0,27,27,54,81,135,216,351,567,918,1485,2403,3888,6291,10179,16470,26649,43119,69768,112887,182655,295542,478197,773739,1251936,2025675,3277611,5303286,8580897,13884183,22465080,36349263,58814343,95163606,153977949,249141555,403119504,652261059,1055380563,1707641622,2763022185,4470663807,7233685992,11704349799,18938035791,30642385590,49580421381,80222806971,129803228352,210026035323,339829263675,549855298998,889684562673,1439539861671,2329224424344,3768764286015,6097988710359,9866752996374,15964741706733,25831494703107,41796236409840,67627731112947,109423967522787,177051698635734,286475666158521,463527364794255,750003030952776,1213530395747031,1963533426699807,3177063822446838,5140597249146645,8317661071593483 mov $2,3 mov $3,3 lpb $0,1 sub $0,1 add $5,$2 mov $2,$3 add $2,6 mov $1,$2 mov $3,$5 mov $4,$2 lpe add $4,$1 add $1,$4
53.058824
720
0.827051
bbfda8951fcc4cf8d05b01e8271a6a09bd435ebb
341
asm
Assembly
programs/oeis/077/A077444.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/077/A077444.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/077/A077444.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A077444: Numbers k such that (k^2 + 4)/2 is a square. ; 2,14,82,478,2786,16238,94642,551614,3215042,18738638,109216786,636562078,3710155682,21624372014,126036076402,734592086398,4281516441986,24954506565518,145445522951122,847718631141214 mul $0,2 mov $1,2 mov $2,4 lpb $0,1 sub $0,1 mov $3,$2 mov $2,$1 add $1,$3 add $2,$1 lpe
24.357143
184
0.72434
0853986692ed2e66c6777b99ba66156fbae6a9f3
396
asm
Assembly
testsuite/ubivm/expected/def_var_4.asm
alexgarzao/UOP
12460841ff2b9991d2f7f461635b1f551413823f
[ "MIT" ]
null
null
null
testsuite/ubivm/expected/def_var_4.asm
alexgarzao/UOP
12460841ff2b9991d2f7f461635b1f551413823f
[ "MIT" ]
null
null
null
testsuite/ubivm/expected/def_var_4.asm
alexgarzao/UOP
12460841ff2b9991d2f7f461635b1f551413823f
[ "MIT" ]
null
null
null
Entity start Constants 0 S start 1 S var1 2 S var2 3 I 10 4 I 1 5 S writeln 6 I 20 End Def start Local variables 0 int var1 1 int var2 End ldconst 3 --> [10] stvar 0 --> [var1] ldvar 0 --> [var1] ldconst 4 --> [1] lcall 5 --> [writeln] ldconst 6 --> [20] stvar 1 --> [var2] ldvar 1 --> [var2] ldconst 4 --> [1] lcall 5 --> [writeln] stop End End
13.655172
23
0.54798
bbb52be2d20b3bd93c1d0e959fa2e7900f6a5718
424
asm
Assembly
programs/oeis/014/A014915.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/014/A014915.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/014/A014915.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A014915: a(1)=1, a(n) = n*3^(n-1) + a(n-1). ; 1,7,34,142,547,2005,7108,24604,83653,280483,930022,3055786,9964519,32285041,104029576,333612088,1065406345,3389929279,10750918570,33996147910,107218620331,337346390797,1059110761804,3318547053652,10379285465677,32408789311195,101039166676078,314555896255714,977982877449583,3036894198396073 mov $1,$0 mul $1,2 add $1,1 mov $2,3 pow $2,$0 mul $1,$2 div $1,4 mul $1,3 add $1,1
32.615385
292
0.766509
6a6bafb8bd6ef380fd32942e7feef14ce98b125e
1,752
asm
Assembly
programs/oeis/005/A005586.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/005/A005586.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/005/A005586.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A005586: a(n) = n(n+4)(n+5)/6. ; 0,5,14,28,48,75,110,154,208,273,350,440,544,663,798,950,1120,1309,1518,1748,2000,2275,2574,2898,3248,3625,4030,4464,4928,5423,5950,6510,7104,7733,8398,9100,9840,10619,11438,12298,13200,14145,15134,16168,17248,18375,19550,20774,22048,23373,24750,26180,27664,29203,30798,32450,34160,35929,37758,39648,41600,43615,45694,47838,50048,52325,54670,57084,59568,62123,64750,67450,70224,73073,75998,79000,82080,85239,88478,91798,95200,98685,102254,105908,109648,113475,117390,121394,125488,129673,133950,138320,142784,147343,151998,156750,161600,166549,171598,176748,182000,187355,192814,198378,204048,209825,215710,221704,227808,234023,240350,246790,253344,260013,266798,273700,280720,287859,295118,302498,310000,317625,325374,333248,341248,349375,357630,366014,374528,383173,391950,400860,409904,419083,428398,437850,447440,457169,467038,477048,487200,497495,507934,518518,529248,540125,551150,562324,573648,585123,596750,608530,620464,632553,644798,657200,669760,682479,695358,708398,721600,734965,748494,762188,776048,790075,804270,818634,833168,847873,862750,877800,893024,908423,923998,939750,955680,971789,988078,1004548,1021200,1038035,1055054,1072258,1089648,1107225,1124990,1142944,1161088,1179423,1197950,1216670,1235584,1254693,1273998,1293500,1313200,1333099,1353198,1373498,1394000,1414705,1435614,1456728,1478048,1499575,1521310,1543254,1565408,1587773,1610350,1633140,1656144,1679363,1702798,1726450,1750320,1774409,1798718,1823248,1848000,1872975,1898174,1923598,1949248,1975125,2001230,2027564,2054128,2080923,2107950,2135210,2162704,2190433,2218398,2246600,2275040,2303719,2332638,2361798,2391200,2420845,2450734,2480868,2511248,2541875,2572750,2603874,2635248,2666873 add $0,4 mov $1,$0 bin $1,3 sub $1,$0
219
1,679
0.835046
8f936e1388d5ee41c81bf08f7903135e3321cb5a
713
asm
Assembly
source/tools/InlinedFuncsOpt/inlined_funcs_intel64.asm
swanandM/pin
98ba97eb32fb9890ef3c4ee1074514f2787e720f
[ "Intel" ]
2
2018-05-08T15:03:38.000Z
2021-02-24T10:01:36.000Z
source/tools/InlinedFuncsOpt/inlined_funcs_intel64.asm
swanandM/pin
98ba97eb32fb9890ef3c4ee1074514f2787e720f
[ "Intel" ]
null
null
null
source/tools/InlinedFuncsOpt/inlined_funcs_intel64.asm
swanandM/pin
98ba97eb32fb9890ef3c4ee1074514f2787e720f
[ "Intel" ]
null
null
null
PUBLIC IfProc1 PUBLIC IfProc2 PUBLIC IfProc3 PUBLIC IfProc4 PUBLIC IfProc5 PUBLIC IfProc6 extern globVal:dword .code IfProc1 PROC mov r8, 1 xor eax, eax cmp r8, rcx setz al ret IfProc1 ENDP IfProc2 PROC mov r8, 1 xor eax, eax cmp r8d, ecx setz al ret IfProc2 ENDP IfProc3 PROC lea rdx, globVal mov r8d, dword ptr [rdx] xor eax, eax cmp r8d, ecx setz al ret IfProc3 ENDP IfProc4 PROC lea rax, globVal mov r8d, dword ptr [rax] xor eax, eax cmp ecx, r8d setz al ret IfProc4 ENDP IfProc5 PROC mov r8, r14 xor eax, eax cmp r8d, ecx setz al ret IfProc5 ENDP IfProc6 PROC mov rdx, rbx xor eax, eax cmp dl, cl setz al ret IfProc6 ENDP end
11.31746
26
0.677419
46edf05235b510e41db36dd530ee55caebed65fc
139
asm
Assembly
a/assembler_vax_ultrix.asm
ozcanyarimdunya/FuckYouGithub
8c37d0f6be3dbe37d8ff5d9bf22ad997527331dc
[ "Apache-2.0" ]
null
null
null
a/assembler_vax_ultrix.asm
ozcanyarimdunya/FuckYouGithub
8c37d0f6be3dbe37d8ff5d9bf22ad997527331dc
[ "Apache-2.0" ]
null
null
null
a/assembler_vax_ultrix.asm
ozcanyarimdunya/FuckYouGithub
8c37d0f6be3dbe37d8ff5d9bf22ad997527331dc
[ "Apache-2.0" ]
null
null
null
.data hw: .ascii "Fuck You Github!\12" .text .align 1 .globl _main _main: .word 0 pushl $13 pushab hw pushl $1 calls $3,_write ret
9.928571
29
0.661871
c655b2c36ed6ad24ceb4073b7f94c3eafd842863
599
asm
Assembly
oeis/038/A038156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/038/A038156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/038/A038156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A038156: a(n) = n! * Sum_{k=1..n-1} 1/k!. ; 0,0,2,9,40,205,1236,8659,69280,623529,6235300,68588311,823059744,10699776685,149796873604,2246953104075,35951249665216,611171244308689,11001082397556420,209020565553571999,4180411311071440000,87788637532500240021,1931350025715005280484,44421050591445121451155,1066105214194682914827744,26652630354867072870693625,692968389226543894638034276,18710146509116685155226925479,523884102255267184346353913440,15192638965402748346044263489789,455779168962082450381327904693700 mov $2,8 lpb $0 add $1,$2 mul $2,$0 sub $0,1 lpe sub $1,7 div $1,8 mov $0,$1
46.076923
470
0.834725
de19d2057511befff86b40b026c355d561fb69ed
195
asm
Assembly
examples/Preload Stadium Transformations/Core/SkipNormalDecision2.asm
rapito/VSCode-PowerPC-Syntax
2548a3146ae6119415ccd065080608e4c381913a
[ "MIT" ]
13
2021-02-10T00:39:56.000Z
2022-02-21T06:15:45.000Z
examples/Preload Stadium Transformations/Core/SkipNormalDecision2.asm
rapito/VSCode-PowerPC-Syntax
2548a3146ae6119415ccd065080608e4c381913a
[ "MIT" ]
1
2021-02-10T00:47:07.000Z
2021-02-10T00:47:07.000Z
examples/Preload Stadium Transformations/Core/SkipNormalDecision2.asm
rapito/VSCode-PowerPC-Syntax
2548a3146ae6119415ccd065080608e4c381913a
[ "MIT" ]
2
2021-02-10T00:39:58.000Z
2021-07-25T18:42:35.000Z
################################################################################ # Address: 0x801d4724 ################################################################################ b 0x3C
39
81
0.112821
87dcf438ed7777924f9ac55c92e7f750c0e2fedb
1,711
asm
Assembly
programs/oeis/027/A027782.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/027/A027782.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/027/A027782.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A027782: a(n) = 9*(n+1)*binomial(n+2,9)/2. ; 36,405,2475,10890,38610,117117,315315,772200,1750320,3719430,7482618,14360580,26453700,47006190,80901810,135326664,220641300,351511875,548358525,839188350,1261890630,1867083075,2721610125,3912807600,5553662400,7789011516,10802941380,14827566600,20153386440,27141438060,36237487572,47988523440,63061841700,82267038945,106581257055,137178053298,175460300730,223097556825,282068373015,354708054360,443762416944,552448130850,684520278750,844347804300,1036997570700,1268327798010,1545091698150,1875052179000,2267108543700,2731436168175,3279640199121,3924924376230,4682276146350,5568669303615,6603285458385,7807755709152,9206423965440,10826633446200,12699037957320,14857939633680,17341654915728,20192910617880,23459272036200,27193605135840,31454574954660,36307182458349,41823342184275,48082503116250,55172315340450,63189345143925,72239841331515,82440555654600,93919620366000,106817486039550,121287922920450,137499089203476,155634669770580,175895089057350,198498801859290,223683666033960,251708401203732,282854137716315,317426060276325,355755150821070,398200035377430,445148939804283,497021759496405,554272248301200,617390332079040,686904552521460,763384647029004,847444270642200,939743866215000,1040993689220100,1151956993779900,1273453386725520,1406362356699300,1551626985533625,1710257849360775,1883337117134850,2072022854477706,2277553540996305,2501252809458975,2744534415462840,3008907446474160,3295981779377562,3607473795929190,3945212365772700,4311145106945820,4707344934078930,5136016904765838,5599505374870680,6100301473823700,6641050911252615,7224562126595385,7853814793644534,8531968692282750 mov $1,$0 add $1,9 bin $1,$0 add $0,8 mul $1,$0 div $1,2 mul $1,9
155.545455
1,598
0.899474
f70b8e948e69a41f1f9bd6d7612a5579e665d37c
7,227
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_406.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_406.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_406.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r14 push %r8 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_A_ht+0xd35d, %rdi mfence movw $0x6162, (%rdi) nop nop nop sub %rcx, %rcx lea addresses_WC_ht+0x1d2fd, %r11 nop xor %rbp, %rbp vmovups (%r11), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $1, %xmm2, %r14 nop nop cmp %rax, %rax lea addresses_A_ht+0x1419d, %rax nop nop sub $24290, %r8 mov (%rax), %edi nop nop nop dec %rcx lea addresses_UC_ht+0x137cd, %r14 xor %rcx, %rcx movw $0x6162, (%r14) nop nop nop and $15321, %rdi lea addresses_normal_ht+0x159dd, %rsi lea addresses_WT_ht+0x975d, %rdi clflush (%rdi) nop nop add %r14, %r14 mov $0, %rcx rep movsb nop nop add %rsi, %rsi lea addresses_WT_ht+0x6d3d, %rbp nop nop nop and $5593, %rcx movb (%rbp), %r8b nop nop nop nop nop sub %rbp, %rbp lea addresses_normal_ht+0x1775d, %rbp nop nop nop nop sub %rcx, %rcx mov (%rbp), %rax nop nop nop nop add $63036, %rdi lea addresses_A_ht+0x79e9, %rsi lea addresses_A_ht+0x1711d, %rdi nop nop mfence mov $63, %rcx rep movsq nop nop nop nop nop and $64056, %r8 lea addresses_D_ht+0x11f5d, %rsi lea addresses_D_ht+0xd53d, %rdi add $52227, %rbp mov $118, %rcx rep movsl nop nop lfence lea addresses_WC_ht+0x98ab, %r11 nop nop nop nop nop cmp $4596, %rcx vmovups (%r11), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %rdi sub %r14, %r14 lea addresses_WC_ht+0x65c4, %rax nop nop nop add %r8, %r8 mov $0x6162636465666768, %rdi movq %rdi, (%rax) nop nop nop nop nop dec %r11 lea addresses_D_ht+0x106c9, %rsi lea addresses_normal_ht+0x19d9d, %rdi nop nop nop nop nop inc %r11 mov $45, %rcx rep movsl xor $47770, %r14 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %r9 push %rbp push %rcx push %rdi push %rsi // Store lea addresses_RW+0x19f53, %r15 nop nop inc %r9 mov $0x5152535455565758, %rcx movq %rcx, (%r15) nop nop nop nop add %rdi, %rdi // Faulty Load mov $0x624b2f000000075d, %r15 nop nop dec %rdi mov (%r15), %r9d lea oracles, %rsi and $0xff, %r9 shlq $12, %r9 mov (%rsi,%r9,1), %r9 pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_RW', 'AVXalign': False, 'size': 8}} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}} {'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2}} {'src': {'same': False, 'congruent': 4, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 11, 'type': 'addresses_WT_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'} {'src': {'NT': True, 'same': False, 'congruent': 10, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_A_ht'}} {'src': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8}} {'src': {'same': True, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 6, 'type': 'addresses_normal_ht'}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
34.578947
2,999
0.657673
675b007bff11487cc38031c7813f2872b6e048d2
186
asm
Assembly
data/pokemon/dex_entries/finneon.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/pokemon/dex_entries/finneon.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
data/pokemon/dex_entries/finneon.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
3
2021-01-15T18:45:40.000Z
2021-10-16T03:35:27.000Z
db "WING FISH@" ; species name db "While fluttering" next "its two tail fins," next "it resembles a" page "BEAUTIFLY. At" next "night,the patterns" next "on its fins shine.@"
18.6
31
0.672043
3a73c27b6defcb7b6c7f74d2b913dd856431f23b
476
asm
Assembly
programs/oeis/097/A097363.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/097/A097363.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/097/A097363.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A097363: Positive integers n such that 2n-13 is prime. ; 8,9,10,12,13,15,16,18,21,22,25,27,28,30,33,36,37,40,42,43,46,48,51,55,57,58,60,61,63,70,72,75,76,81,82,85,88,90,93,96,97,102,103,105,106,112,118,120,121,123,126,127,132,135,138,141,142,145,147,148,153,160,162,163,165,172,175,180,181,183,186,190,193,196,198,201,205,207,211,216,217,222,223,226,228,231,235,237,238,240,246,250,252,256,258,261,267,268,277,280 seq $0,98090 ; Numbers k such that 2k-3 is prime. add $0,5
79.333333
358
0.714286
acc6c59d6802dfec08fa331753d7d3a75bccf7b8
715
asm
Assembly
unordnung_auch_assembler/asm/attiny13/sleepIRQ/tinyProg.asm
no-go/Blink_atmega328p
a81e41906c4a6d843a7fb87962288a0894105bd7
[ "Unlicense" ]
null
null
null
unordnung_auch_assembler/asm/attiny13/sleepIRQ/tinyProg.asm
no-go/Blink_atmega328p
a81e41906c4a6d843a7fb87962288a0894105bd7
[ "Unlicense" ]
null
null
null
unordnung_auch_assembler/asm/attiny13/sleepIRQ/tinyProg.asm
no-go/Blink_atmega328p
a81e41906c4a6d843a7fb87962288a0894105bd7
[ "Unlicense" ]
null
null
null
.include "myTiny13.h" ; switch between 250 nA / 8 mA .equ LED,0 .equ TASTER,1 ;irq Vector .org 0x0000 rjmp Main rjmp EXT_INT0 ; IRQ0 Handler ; IRQ routine ----------------- .org 0x0010 EXT_INT0: ; toggleLED sbis PORTB,LED ; if LED = 1 then rjmp setLED cbi PORTB,LED ; LED := 0; return; reti setLED: ; else sbi PORTB,LED ; LED := 1; return; reti .org 0x0020 Main: sbi DDRB,LED ; output cbi DDRB,TASTER ; input ; 00x00000 Set Sleep enable ; 000xx000 configure Sleepmode to power-down mode: SM[1:0] = 10 ; 000000xx INTO IRQ on logical low-lewel ISC0[1:0] = 00 ldi A,0b00110000 out MCUCR,A ; Enable int0 IRQ ldi A,0b01000000 out GIMSK,A sei mainLoop: sleep rjmp mainLoop
17.02381
64
0.662937
9c9b99eac052f393666afb39c26ac33e478591de
298
asm
Assembly
mc-sema/validator/x86_64/tests/ST_PF64m.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
2
2021-08-07T16:21:29.000Z
2021-11-17T10:58:37.000Z
mc-sema/validator/x86_64/tests/ST_PF64m.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
mc-sema/validator/x86_64/tests/ST_PF64m.asm
randolphwong/mcsema
eb5b376736e7f57ff0a61f7e4e5a436bbb874720
[ "BSD-3-Clause" ]
null
null
null
BITS 64 ;TEST_FILE_META_BEGIN ;TEST_TYPE=TEST_F ;TEST_IGNOREFLAGS=FLAG_FPU_IE ;TEST_FILE_META_END FLD1 ;TEST_BEGIN_RECORDING lea rdi, [rsp-0xc] mov dword [rdi], 0 fstp qword [rdi] mov eax, dword [rdi+00] mov ebx, dword [rdi+04] mov edi, 0x0 ;TEST_END_RECORDING
18.625
29
0.687919
ffc4b85332dba7c839ae1a16560229a3d65421a3
3,742
asm
Assembly
Library/Net/net.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Net/net.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Net/net.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC/GEOS MODULE: Network Library FILE: net.asm REVISION HISTORY: Name Date Description ---- ---- ----------- Eric 2/92 Initial version DESCRIPTION: This library allows PC/GEOS applications to access the Network facilities such as messaging, semaphores, print queues, user account info, file info, etc. RCS STAMP: $Id: net.asm,v 1.1 97/04/05 01:25:06 newdeal Exp $ ------------------------------------------------------------------------------@ ;------------------------------------------------------------------------------ ; Common GEODE stuff ;------------------------------------------------------------------------------ _Library = 1 ;Standard include files include geos.def include geode.def include ec.def include geoworks.def include library.def ifdef FULL_EXECUTE_IN_PLACE include Internal/xip.def endif include resource.def include object.def include graphics.def include gstring.def include win.def include heap.def include lmem.def include timer.def include timedate.def include system.def include file.def include fileEnum.def include vm.def include chunkarr.def include hugearr.def include thread.def include initfile.def include Internal/geodeStr.def ;for GeodeForEach include Internal/log.def ;for LogWrite[Init]Entry ;------------------------------------------------------------------------------ ; Libraries used ;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------ ; Drivers used ;------------------------------------------------------------------------------ ;Include common definitions for all PC/GEOS Network Drivers UseDriver Internal/netDr.def ;------------------------------------------------------------------------------ ; Library we're defining ;------------------------------------------------------------------------------ DefLib net.def ;----------------------------------------------------------------------------- ; DEF FILES ;----------------------------------------------------------------------------- include netConstant.def include netVariable.def if FULL_EXECUTE_IN_PLACE global NetRegisterDomainXIP:far global NetUnregisterDomainXIP:far endif ;------------------------------------------------------------------------------ ; Code Modules ;------------------------------------------------------------------------------ include init.asm ;specialized method handlers for ;NetProcessClass, to handle initialization. include netUserInfo.asm ;workstation and user information if NL_TEXT_MESSAGES include alert.asm ;code to display alert messages from ;the system console. endif if NL_SEMAPHORES include semaphore.asm ;network-based semaphore facilities. endif if NL_SOCKETS include netSocket.asm ;code to open and close sockets include hecb.asm ;code relating to HugeECB structures include msg.asm ;NetObjMessage-related routines endif include netServer.asm include netC.asm ; C stubs for library include netPrint.asm ; network printing include netMessaging.asm ; messaging include netUtils.asm ; common utilities include netEnum.asm ; network resource enumeration utilities. include netObject.asm include netDir.asm ; network directory services. if ERROR_CHECK include netEC.asm ; error-checking code endif NetProcStrings segment resource NetProcStrings ends ;------------------------------------------------------------------------------
28.135338
80
0.510689
c9b8924202537c1f69d22f8b842807fabee7c117
952
asm
Assembly
session_08/00-sommaRicorsiva/somma_ricorsiva.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
1
2019-03-06T13:26:10.000Z
2019-03-06T13:26:10.000Z
Miei-sorgenti/new/Sesta lezione/Somma ricorsiva degli elementi in un array/Basilico/somma_ricorsiva.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
null
null
null
Miei-sorgenti/new/Sesta lezione/Somma ricorsiva degli elementi in un array/Basilico/somma_ricorsiva.asm
DigiOhhh/LabArchitettura2-2017-2018
da34b9a75ab2945ac70d5cbf69395d0db5172f6f
[ "MIT" ]
1
2019-03-06T13:25:28.000Z
2019-03-06T13:25:28.000Z
.text .globl S S: addi $sp, $sp, -8 # Salvo sullo stack $ra e dim-1 addi $t0, $a1, -1 sw $t0, 0($sp) sw $ra, 4($sp) bne $a1, $zero, CHIAMATA_RICORSIVA # branch ! ( size == 0 ) ### CASO_BASE ### li $v0, 0 # Caso base: se array vuoto ritorna 0 addi $sp, $sp, 8 # dealloco stack frame jr $ra ################# ### CHIAMATA_RICORSIVA ### CHIAMATA_RICORSIVA: move $a1, $t0 # aggiorno secondo argomento (il primo è il base addr. dell’array) jal S ########################### # Ora in $v0 ho S(arr, dim-1) lw $t0, 0($sp) # ripristino dim-1 mul $t1, $t0, 4 # lo moltiplico per 4 e lo metto in $t1 add $t1, $t1, $a0 # indirizzo di arr[dim-1] lw $t2, 0($t1) # t2 = arr[dim-1] add $v0, $v0, $t2 # $v0 = S(arr, dim-1) + arr[dim-1] lw $ra, 4($sp) # ripristino $ra addi $sp, $sp, 8 # dealloco stack frame jr $ra
27.2
92
0.491597
57577ed7a5b7a23574d35858fe749372f6a05b01
553
asm
Assembly
external/source/shellcode/windows/speech/w32-speaking-shellcode-hash-list.asm
OsmanDere/metasploit-framework
b7a014a5d22d3b57157e301d4af57e3a31ad03a9
[ "BSD-2-Clause", "BSD-3-Clause" ]
26,932
2015-01-01T00:04:51.000Z
2022-03-31T22:51:38.000Z
external/source/shellcode/windows/speech/w32-speaking-shellcode-hash-list.asm
Kilo-411/metasploit-framework
aaf27d7fa51390895dea63c58cb3b76e959d36f8
[ "BSD-2-Clause", "BSD-3-Clause" ]
11,048
2015-01-01T00:05:44.000Z
2022-03-31T21:49:52.000Z
external/source/shellcode/windows/speech/w32-speaking-shellcode-hash-list.asm
Kilo-411/metasploit-framework
aaf27d7fa51390895dea63c58cb3b76e959d36f8
[ "BSD-2-Clause", "BSD-3-Clause" ]
12,593
2015-01-01T01:01:20.000Z
2022-03-31T22:13:32.000Z
;-- Hash function configuration -------------------------------------------- hash_ror_value equ 0x01 ;-- Function hashes -------------------------------------------------------- hash_kernel32_LoadLibraryA equ 0x1AAA hash_ole32_CoInitialize equ 0xF0DA hash_ole32_CoInitializeEx equ 0x1C20 hash_ole32_CoCreateInstance equ 0x2769 hash_ole32_CoCreateInstanceEx equ 0xE9CC ;-- Warnings ---------------------------------------------------------------
55.3
78
0.439421
a4e8ab0dbb1a67630ad1a52eaf18ed8e365d7bd6
821
asm
Assembly
libsrc/_DEVELOPMENT/arch/ts2068/display/z80/asm_tshr_cxy2saddr.asm
RC2014Z80/z88dk
e5b9447b970e5fae26544b6d8aa5957c98ba0e6a
[ "ClArtistic" ]
8
2017-01-18T12:02:17.000Z
2021-06-12T09:40:28.000Z
libsrc/_DEVELOPMENT/arch/ts2068/display/z80/asm_tshr_cxy2saddr.asm
RC2014Z80/z88dk
e5b9447b970e5fae26544b6d8aa5957c98ba0e6a
[ "ClArtistic" ]
1
2017-03-06T07:41:56.000Z
2017-03-06T07:41:56.000Z
libsrc/_DEVELOPMENT/arch/ts2068/display/z80/asm_tshr_cxy2saddr.asm
RC2014Z80/z88dk
e5b9447b970e5fae26544b6d8aa5957c98ba0e6a
[ "ClArtistic" ]
3
2017-03-07T03:19:40.000Z
2021-09-15T17:59:19.000Z
; =============================================================== ; May 2017 ; =============================================================== ; ; void *tshr_cxy2saddr(uchar x, uchar y) ; ; Screen address of top pixel row of character square at x,y. ; ; =============================================================== SECTION code_clib SECTION code_arch PUBLIC asm_tshr_cxy2saddr EXTERN asm_zx_cxy2saddr asm_tshr_cxy2saddr: ; enter : h = valid character y coordinate ; l = valid character x coordinate ; ; exit : hl = screen address corresponding to the top ; pixel row of the character square ; ; uses : af, hl srl l jp nc, asm_zx_cxy2saddr ld a,h rrca rrca rrca and $e0 or l ld l,a ld a,h and $18 or $60 ld h,a ret
18.244444
65
0.46894
4dbe39c6a014f513103e8ad5706cd3f99b7acb83
6,683
asm
Assembly
Transynther/x86/_processed/NONE/_st_/i7-8650U_0xd2.log_6196_1644.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_st_/i7-8650U_0xd2.log_6196_1644.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_st_/i7-8650U_0xd2.log_6196_1644.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r15 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0xacea, %rdx nop add $50866, %rdi movb (%rdx), %r15b nop nop nop xor %rsi, %rsi lea addresses_D_ht+0x5c3a, %rsi lea addresses_D_ht+0x108da, %rdi nop nop nop nop and %rax, %rax mov $65, %rcx rep movsw nop nop and %rax, %rax lea addresses_D_ht+0x403a, %rax clflush (%rax) nop nop nop cmp $14016, %rcx mov $0x6162636465666768, %rsi movq %rsi, %xmm4 vmovups %ymm4, (%rax) and %rcx, %rcx lea addresses_normal_ht+0x303a, %rdi nop inc %rdx mov (%rdi), %cx nop nop nop nop cmp $20355, %rdi lea addresses_WC_ht+0x7ea, %r15 nop nop nop nop sub $13236, %r11 mov $0x6162636465666768, %rdx movq %rdx, %xmm4 vmovups %ymm4, (%r15) inc %rdx lea addresses_D_ht+0x3096, %rsi nop nop nop cmp $52075, %rdx movw $0x6162, (%rsi) nop nop sub $29337, %r15 lea addresses_A_ht+0x5598, %rdx sub %rdi, %rdi and $0xffffffffffffffc0, %rdx movntdqa (%rdx), %xmm5 vpextrq $1, %xmm5, %rsi nop nop nop nop nop inc %rdi lea addresses_UC_ht+0x20ce, %rdi nop xor %rax, %rax movl $0x61626364, (%rdi) nop nop nop dec %rcx lea addresses_D_ht+0x1583a, %rdi nop nop nop nop nop and $9738, %r11 mov $0x6162636465666768, %rsi movq %rsi, %xmm6 movups %xmm6, (%rdi) sub $177, %r15 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r15 push %r8 push %rax push %rbp push %rbx push %rdx // Store mov $0x62, %rbx nop nop nop nop sub %r11, %r11 mov $0x5152535455565758, %rdx movq %rdx, (%rbx) nop nop cmp $47484, %rbx // Store lea addresses_WC+0x1443a, %r8 nop nop nop sub %rax, %rax mov $0x5152535455565758, %rdx movq %rdx, %xmm0 vmovups %ymm0, (%r8) nop nop add %r8, %r8 // Faulty Load lea addresses_WC+0x1643a, %rdx clflush (%rdx) cmp %r11, %r11 mov (%rdx), %eax lea oracles, %r15 and $0xff, %rax shlq $12, %rax mov (%r15,%rax,1), %rax pop %rdx pop %rbx pop %rbp pop %rax pop %r8 pop %r15 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} {'58': 6196} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
36.71978
2,999
0.655843
296aa4e2cd1e7ef236cce93d4a73b22f45e92d99
654
asm
Assembly
oeis/165/A165665.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/165/A165665.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/165/A165665.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A165665: a(n) = (3*2^n - 2) * 2^n. ; Submitted by Jamie Morken(s1) ; 1,8,40,176,736,3008,12160,48896,196096,785408,3143680,12578816,50323456,201310208,805273600,3221159936,12884770816,51539345408,206157905920,824632672256,3298532786176,13194135339008,52776549744640,211106215755776,844424896577536,3377699653419008,13510798747893760,54043195260010496,216172781576912896,864691127381393408,3458764511673057280,13835058050987196416,55340232212538720256,221360928867334750208,885443715503698739200,3541774862083514433536,14167099448471496687616,56668397794160864657408 mov $1,2 pow $1,$0 mul $1,6 sub $1,2 pow $1,2 mov $0,$1 sub $0,16 div $0,12 add $0,1
46.714286
498
0.833333
76dc3cf8281564c3191ef22b16ef1ec1bbe91bb3
406
asm
Assembly
oeis/332/A332027.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/332/A332027.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/332/A332027.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A332027: Savannah problem: number of distinct possible populations after n weeks, allowing populations after the empty set. ; Submitted by Jon Maiga ; 3,7,10,15,19,23,29,34,39,44,51,57,63,69,75,83,90,97,104,111,118,127,135,143,151,159,167,175,185,194,203,212,221,230,239,248,259,269,279,289,299,309,319,329,339,351,362,373,384 add $0,1 mov $1,$0 lpb $1 add $0,1 add $0,$1 add $2,1 trn $1,$2 lpe
31.230769
177
0.704433
afa2e6ab85b3d52e81f069453cb4d4af33a4e262
259
asm
Assembly
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_GetSprClrAddr.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_GetSprClrAddr.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_GetSprClrAddr.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; void sp1_GetSprClrAddr(struct sp1_ss *s, uchar **sprdest) SECTION code_temp_sp1 PUBLIC _sp1_GetSprClrAddr _sp1_GetSprClrAddr: pop af pop hl pop de push de push hl push af INCLUDE "temp/sp1/zx/sprites/asm_sp1_GetSprClrAddr.asm"
14.388889
59
0.725869
b66c1120643916665b9925edfb5c59c603f13792
292
asm
Assembly
programs/oeis/166/A166926.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/166/A166926.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/166/A166926.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A166926: A000004 preceded by 1, 2, 4. ; 1,2,4,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,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,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,0,0,0,0 mov $8,2 clr $6,$0 pow $8,$0 mov $1,$8 mov $0,$1
32.444444
201
0.520548
cca3c9c86c275e55c21c9930c2388d343966f6e7
7,166
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1398.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1398.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1398.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r15 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1dd5e, %r12 nop nop nop nop sub $29722, %rbp mov (%r12), %edi cmp %r8, %r8 lea addresses_UC_ht+0x8706, %rsi lea addresses_D_ht+0x1acd2, %rdi nop nop nop add $20824, %r9 mov $68, %rcx rep movsl nop xor $18616, %r9 lea addresses_WC_ht+0x6a7e, %rbp clflush (%rbp) nop nop nop nop cmp $27240, %r9 movw $0x6162, (%rbp) nop nop nop sub $62830, %rcx lea addresses_WC_ht+0x1ccce, %rsi lea addresses_UC_ht+0xce7e, %rdi sub $59925, %rbp mov $97, %rcx rep movsw nop nop nop nop nop inc %r8 lea addresses_UC_ht+0x707e, %rsi sub %r8, %r8 mov (%rsi), %rdi nop nop nop and %rbp, %rbp lea addresses_A_ht+0xadfc, %rcx nop nop nop nop xor %r8, %r8 mov $0x6162636465666768, %r9 movq %r9, %xmm5 movups %xmm5, (%rcx) nop inc %r12 lea addresses_UC_ht+0x321e, %rsi lea addresses_WT_ht+0x6c76, %rdi clflush (%rsi) nop nop nop nop nop add $43843, %r15 mov $56, %rcx rep movsb and $12647, %rcx lea addresses_WT_ht+0x1167e, %rbp clflush (%rbp) dec %r15 mov (%rbp), %r12d sub $11157, %r15 lea addresses_A_ht+0xd2af, %rdi cmp $9994, %r12 mov (%rdi), %r8d cmp $453, %rcx lea addresses_normal_ht+0x16bee, %r9 nop nop nop nop xor $3321, %r15 movups (%r9), %xmm3 vpextrq $0, %xmm3, %rcx nop nop nop nop nop and $20428, %r12 lea addresses_UC_ht+0x18ede, %r12 clflush (%r12) nop nop cmp $38338, %rcx mov (%r12), %r9w nop nop nop nop nop cmp %rbp, %rbp lea addresses_D_ht+0x9a0f, %rsi lea addresses_WT_ht+0x154aa, %rdi sub $21862, %r12 mov $71, %rcx rep movsw nop add %rdi, %rdi lea addresses_A_ht+0xeb7e, %rbp nop cmp %rsi, %rsi movb (%rbp), %cl nop xor $36653, %rbp pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r15 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %rax push %rbx push %rcx // Faulty Load lea addresses_RW+0x1a7e, %rcx clflush (%rcx) nop mfence vmovups (%rcx), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $0, %xmm7, %r12 lea oracles, %rbx and $0xff, %r12 shlq $12, %r12 mov (%rbx,%r12,1), %r12 pop %rcx pop %rbx pop %rax pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 11}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': True, 'congruent': 0, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 8}} {'32': 21829} 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 */
37.715789
2,999
0.655596
a0ce44181b5d5244e925964b0b677e11325f88f6
39,646
asm
Assembly
halt.asm
marissa-masangcay/xv6
0a6b6405818057abe4771ce054faafd3d88b311b
[ "MIT-0" ]
null
null
null
halt.asm
marissa-masangcay/xv6
0a6b6405818057abe4771ce054faafd3d88b311b
[ "MIT-0" ]
null
null
null
halt.asm
marissa-masangcay/xv6
0a6b6405818057abe4771ce054faafd3d88b311b
[ "MIT-0" ]
null
null
null
_halt: file format elf32-i386 Disassembly of section .text: 00000000 <main>: #include "types.h" #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 halt(); 6: e8 01 03 00 00 call 30c <halt> exit(); b: e8 54 02 00 00 call 264 <exit> 00000010 <stosb>: "cc"); } static inline void stosb(void *addr, int data, int cnt) { 10: 55 push %ebp 11: 89 e5 mov %esp,%ebp 13: 57 push %edi 14: 53 push %ebx asm volatile("cld; rep stosb" : 15: 8b 4d 08 mov 0x8(%ebp),%ecx 18: 8b 55 10 mov 0x10(%ebp),%edx 1b: 8b 45 0c mov 0xc(%ebp),%eax 1e: 89 cb mov %ecx,%ebx 20: 89 df mov %ebx,%edi 22: 89 d1 mov %edx,%ecx 24: fc cld 25: f3 aa rep stos %al,%es:(%edi) 27: 89 ca mov %ecx,%edx 29: 89 fb mov %edi,%ebx 2b: 89 5d 08 mov %ebx,0x8(%ebp) 2e: 89 55 10 mov %edx,0x10(%ebp) "=D" (addr), "=c" (cnt) : "0" (addr), "1" (cnt), "a" (data) : "memory", "cc"); } 31: 5b pop %ebx 32: 5f pop %edi 33: 5d pop %ebp 34: c3 ret 00000035 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { 35: 55 push %ebp 36: 89 e5 mov %esp,%ebp 38: 83 ec 10 sub $0x10,%esp char *os; os = s; 3b: 8b 45 08 mov 0x8(%ebp),%eax 3e: 89 45 fc mov %eax,-0x4(%ebp) while((*s++ = *t++) != 0) 41: 90 nop 42: 8b 45 08 mov 0x8(%ebp),%eax 45: 8d 50 01 lea 0x1(%eax),%edx 48: 89 55 08 mov %edx,0x8(%ebp) 4b: 8b 55 0c mov 0xc(%ebp),%edx 4e: 8d 4a 01 lea 0x1(%edx),%ecx 51: 89 4d 0c mov %ecx,0xc(%ebp) 54: 8a 12 mov (%edx),%dl 56: 88 10 mov %dl,(%eax) 58: 8a 00 mov (%eax),%al 5a: 84 c0 test %al,%al 5c: 75 e4 jne 42 <strcpy+0xd> ; return os; 5e: 8b 45 fc mov -0x4(%ebp),%eax } 61: c9 leave 62: c3 ret 00000063 <strcmp>: int strcmp(const char *p, const char *q) { 63: 55 push %ebp 64: 89 e5 mov %esp,%ebp while(*p && *p == *q) 66: eb 06 jmp 6e <strcmp+0xb> p++, q++; 68: ff 45 08 incl 0x8(%ebp) 6b: ff 45 0c incl 0xc(%ebp) } int strcmp(const char *p, const char *q) { while(*p && *p == *q) 6e: 8b 45 08 mov 0x8(%ebp),%eax 71: 8a 00 mov (%eax),%al 73: 84 c0 test %al,%al 75: 74 0e je 85 <strcmp+0x22> 77: 8b 45 08 mov 0x8(%ebp),%eax 7a: 8a 10 mov (%eax),%dl 7c: 8b 45 0c mov 0xc(%ebp),%eax 7f: 8a 00 mov (%eax),%al 81: 38 c2 cmp %al,%dl 83: 74 e3 je 68 <strcmp+0x5> p++, q++; return (uchar)*p - (uchar)*q; 85: 8b 45 08 mov 0x8(%ebp),%eax 88: 8a 00 mov (%eax),%al 8a: 0f b6 d0 movzbl %al,%edx 8d: 8b 45 0c mov 0xc(%ebp),%eax 90: 8a 00 mov (%eax),%al 92: 0f b6 c0 movzbl %al,%eax 95: 29 c2 sub %eax,%edx 97: 89 d0 mov %edx,%eax } 99: 5d pop %ebp 9a: c3 ret 0000009b <strlen>: uint strlen(char *s) { 9b: 55 push %ebp 9c: 89 e5 mov %esp,%ebp 9e: 83 ec 10 sub $0x10,%esp int n; for(n = 0; s[n]; n++) a1: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) a8: eb 03 jmp ad <strlen+0x12> aa: ff 45 fc incl -0x4(%ebp) ad: 8b 55 fc mov -0x4(%ebp),%edx b0: 8b 45 08 mov 0x8(%ebp),%eax b3: 01 d0 add %edx,%eax b5: 8a 00 mov (%eax),%al b7: 84 c0 test %al,%al b9: 75 ef jne aa <strlen+0xf> ; return n; bb: 8b 45 fc mov -0x4(%ebp),%eax } be: c9 leave bf: c3 ret 000000c0 <memset>: void* memset(void *dst, int c, uint n) { c0: 55 push %ebp c1: 89 e5 mov %esp,%ebp c3: 83 ec 0c sub $0xc,%esp stosb(dst, c, n); c6: 8b 45 10 mov 0x10(%ebp),%eax c9: 89 44 24 08 mov %eax,0x8(%esp) cd: 8b 45 0c mov 0xc(%ebp),%eax d0: 89 44 24 04 mov %eax,0x4(%esp) d4: 8b 45 08 mov 0x8(%ebp),%eax d7: 89 04 24 mov %eax,(%esp) da: e8 31 ff ff ff call 10 <stosb> return dst; df: 8b 45 08 mov 0x8(%ebp),%eax } e2: c9 leave e3: c3 ret 000000e4 <strchr>: char* strchr(const char *s, char c) { e4: 55 push %ebp e5: 89 e5 mov %esp,%ebp e7: 83 ec 04 sub $0x4,%esp ea: 8b 45 0c mov 0xc(%ebp),%eax ed: 88 45 fc mov %al,-0x4(%ebp) for(; *s; s++) f0: eb 12 jmp 104 <strchr+0x20> if(*s == c) f2: 8b 45 08 mov 0x8(%ebp),%eax f5: 8a 00 mov (%eax),%al f7: 3a 45 fc cmp -0x4(%ebp),%al fa: 75 05 jne 101 <strchr+0x1d> return (char*)s; fc: 8b 45 08 mov 0x8(%ebp),%eax ff: eb 11 jmp 112 <strchr+0x2e> } char* strchr(const char *s, char c) { for(; *s; s++) 101: ff 45 08 incl 0x8(%ebp) 104: 8b 45 08 mov 0x8(%ebp),%eax 107: 8a 00 mov (%eax),%al 109: 84 c0 test %al,%al 10b: 75 e5 jne f2 <strchr+0xe> if(*s == c) return (char*)s; return 0; 10d: b8 00 00 00 00 mov $0x0,%eax } 112: c9 leave 113: c3 ret 00000114 <gets>: char* gets(char *buf, int max) { 114: 55 push %ebp 115: 89 e5 mov %esp,%ebp 117: 83 ec 28 sub $0x28,%esp int i, cc; char c; for(i=0; i+1 < max; ){ 11a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) 121: eb 49 jmp 16c <gets+0x58> cc = read(0, &c, 1); 123: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 12a: 00 12b: 8d 45 ef lea -0x11(%ebp),%eax 12e: 89 44 24 04 mov %eax,0x4(%esp) 132: c7 04 24 00 00 00 00 movl $0x0,(%esp) 139: e8 3e 01 00 00 call 27c <read> 13e: 89 45 f0 mov %eax,-0x10(%ebp) if(cc < 1) 141: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 145: 7f 02 jg 149 <gets+0x35> break; 147: eb 2c jmp 175 <gets+0x61> buf[i++] = c; 149: 8b 45 f4 mov -0xc(%ebp),%eax 14c: 8d 50 01 lea 0x1(%eax),%edx 14f: 89 55 f4 mov %edx,-0xc(%ebp) 152: 89 c2 mov %eax,%edx 154: 8b 45 08 mov 0x8(%ebp),%eax 157: 01 c2 add %eax,%edx 159: 8a 45 ef mov -0x11(%ebp),%al 15c: 88 02 mov %al,(%edx) if(c == '\n' || c == '\r') 15e: 8a 45 ef mov -0x11(%ebp),%al 161: 3c 0a cmp $0xa,%al 163: 74 10 je 175 <gets+0x61> 165: 8a 45 ef mov -0x11(%ebp),%al 168: 3c 0d cmp $0xd,%al 16a: 74 09 je 175 <gets+0x61> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 16c: 8b 45 f4 mov -0xc(%ebp),%eax 16f: 40 inc %eax 170: 3b 45 0c cmp 0xc(%ebp),%eax 173: 7c ae jl 123 <gets+0xf> break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 175: 8b 55 f4 mov -0xc(%ebp),%edx 178: 8b 45 08 mov 0x8(%ebp),%eax 17b: 01 d0 add %edx,%eax 17d: c6 00 00 movb $0x0,(%eax) return buf; 180: 8b 45 08 mov 0x8(%ebp),%eax } 183: c9 leave 184: c3 ret 00000185 <stat>: int stat(char *n, struct stat *st) { 185: 55 push %ebp 186: 89 e5 mov %esp,%ebp 188: 83 ec 28 sub $0x28,%esp int fd; int r; fd = open(n, O_RDONLY); 18b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 192: 00 193: 8b 45 08 mov 0x8(%ebp),%eax 196: 89 04 24 mov %eax,(%esp) 199: e8 06 01 00 00 call 2a4 <open> 19e: 89 45 f4 mov %eax,-0xc(%ebp) if(fd < 0) 1a1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 1a5: 79 07 jns 1ae <stat+0x29> return -1; 1a7: b8 ff ff ff ff mov $0xffffffff,%eax 1ac: eb 23 jmp 1d1 <stat+0x4c> r = fstat(fd, st); 1ae: 8b 45 0c mov 0xc(%ebp),%eax 1b1: 89 44 24 04 mov %eax,0x4(%esp) 1b5: 8b 45 f4 mov -0xc(%ebp),%eax 1b8: 89 04 24 mov %eax,(%esp) 1bb: e8 fc 00 00 00 call 2bc <fstat> 1c0: 89 45 f0 mov %eax,-0x10(%ebp) close(fd); 1c3: 8b 45 f4 mov -0xc(%ebp),%eax 1c6: 89 04 24 mov %eax,(%esp) 1c9: e8 be 00 00 00 call 28c <close> return r; 1ce: 8b 45 f0 mov -0x10(%ebp),%eax } 1d1: c9 leave 1d2: c3 ret 000001d3 <atoi>: int atoi(const char *s) { 1d3: 55 push %ebp 1d4: 89 e5 mov %esp,%ebp 1d6: 83 ec 10 sub $0x10,%esp int n; n = 0; 1d9: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp) while('0' <= *s && *s <= '9') 1e0: eb 24 jmp 206 <atoi+0x33> n = n*10 + *s++ - '0'; 1e2: 8b 55 fc mov -0x4(%ebp),%edx 1e5: 89 d0 mov %edx,%eax 1e7: c1 e0 02 shl $0x2,%eax 1ea: 01 d0 add %edx,%eax 1ec: 01 c0 add %eax,%eax 1ee: 89 c1 mov %eax,%ecx 1f0: 8b 45 08 mov 0x8(%ebp),%eax 1f3: 8d 50 01 lea 0x1(%eax),%edx 1f6: 89 55 08 mov %edx,0x8(%ebp) 1f9: 8a 00 mov (%eax),%al 1fb: 0f be c0 movsbl %al,%eax 1fe: 01 c8 add %ecx,%eax 200: 83 e8 30 sub $0x30,%eax 203: 89 45 fc mov %eax,-0x4(%ebp) atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') 206: 8b 45 08 mov 0x8(%ebp),%eax 209: 8a 00 mov (%eax),%al 20b: 3c 2f cmp $0x2f,%al 20d: 7e 09 jle 218 <atoi+0x45> 20f: 8b 45 08 mov 0x8(%ebp),%eax 212: 8a 00 mov (%eax),%al 214: 3c 39 cmp $0x39,%al 216: 7e ca jle 1e2 <atoi+0xf> n = n*10 + *s++ - '0'; return n; 218: 8b 45 fc mov -0x4(%ebp),%eax } 21b: c9 leave 21c: c3 ret 0000021d <memmove>: void* memmove(void *vdst, void *vsrc, int n) { 21d: 55 push %ebp 21e: 89 e5 mov %esp,%ebp 220: 83 ec 10 sub $0x10,%esp char *dst, *src; dst = vdst; 223: 8b 45 08 mov 0x8(%ebp),%eax 226: 89 45 fc mov %eax,-0x4(%ebp) src = vsrc; 229: 8b 45 0c mov 0xc(%ebp),%eax 22c: 89 45 f8 mov %eax,-0x8(%ebp) while(n-- > 0) 22f: eb 16 jmp 247 <memmove+0x2a> *dst++ = *src++; 231: 8b 45 fc mov -0x4(%ebp),%eax 234: 8d 50 01 lea 0x1(%eax),%edx 237: 89 55 fc mov %edx,-0x4(%ebp) 23a: 8b 55 f8 mov -0x8(%ebp),%edx 23d: 8d 4a 01 lea 0x1(%edx),%ecx 240: 89 4d f8 mov %ecx,-0x8(%ebp) 243: 8a 12 mov (%edx),%dl 245: 88 10 mov %dl,(%eax) { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) 247: 8b 45 10 mov 0x10(%ebp),%eax 24a: 8d 50 ff lea -0x1(%eax),%edx 24d: 89 55 10 mov %edx,0x10(%ebp) 250: 85 c0 test %eax,%eax 252: 7f dd jg 231 <memmove+0x14> *dst++ = *src++; return vdst; 254: 8b 45 08 mov 0x8(%ebp),%eax } 257: c9 leave 258: c3 ret 259: 90 nop 25a: 90 nop 25b: 90 nop 0000025c <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 25c: b8 01 00 00 00 mov $0x1,%eax 261: cd 40 int $0x40 263: c3 ret 00000264 <exit>: SYSCALL(exit) 264: b8 02 00 00 00 mov $0x2,%eax 269: cd 40 int $0x40 26b: c3 ret 0000026c <wait>: SYSCALL(wait) 26c: b8 03 00 00 00 mov $0x3,%eax 271: cd 40 int $0x40 273: c3 ret 00000274 <pipe>: SYSCALL(pipe) 274: b8 04 00 00 00 mov $0x4,%eax 279: cd 40 int $0x40 27b: c3 ret 0000027c <read>: SYSCALL(read) 27c: b8 05 00 00 00 mov $0x5,%eax 281: cd 40 int $0x40 283: c3 ret 00000284 <write>: SYSCALL(write) 284: b8 10 00 00 00 mov $0x10,%eax 289: cd 40 int $0x40 28b: c3 ret 0000028c <close>: SYSCALL(close) 28c: b8 15 00 00 00 mov $0x15,%eax 291: cd 40 int $0x40 293: c3 ret 00000294 <kill>: SYSCALL(kill) 294: b8 06 00 00 00 mov $0x6,%eax 299: cd 40 int $0x40 29b: c3 ret 0000029c <exec>: SYSCALL(exec) 29c: b8 07 00 00 00 mov $0x7,%eax 2a1: cd 40 int $0x40 2a3: c3 ret 000002a4 <open>: SYSCALL(open) 2a4: b8 0f 00 00 00 mov $0xf,%eax 2a9: cd 40 int $0x40 2ab: c3 ret 000002ac <mknod>: SYSCALL(mknod) 2ac: b8 11 00 00 00 mov $0x11,%eax 2b1: cd 40 int $0x40 2b3: c3 ret 000002b4 <unlink>: SYSCALL(unlink) 2b4: b8 12 00 00 00 mov $0x12,%eax 2b9: cd 40 int $0x40 2bb: c3 ret 000002bc <fstat>: SYSCALL(fstat) 2bc: b8 08 00 00 00 mov $0x8,%eax 2c1: cd 40 int $0x40 2c3: c3 ret 000002c4 <link>: SYSCALL(link) 2c4: b8 13 00 00 00 mov $0x13,%eax 2c9: cd 40 int $0x40 2cb: c3 ret 000002cc <mkdir>: SYSCALL(mkdir) 2cc: b8 14 00 00 00 mov $0x14,%eax 2d1: cd 40 int $0x40 2d3: c3 ret 000002d4 <chdir>: SYSCALL(chdir) 2d4: b8 09 00 00 00 mov $0x9,%eax 2d9: cd 40 int $0x40 2db: c3 ret 000002dc <dup>: SYSCALL(dup) 2dc: b8 0a 00 00 00 mov $0xa,%eax 2e1: cd 40 int $0x40 2e3: c3 ret 000002e4 <getpid>: SYSCALL(getpid) 2e4: b8 0b 00 00 00 mov $0xb,%eax 2e9: cd 40 int $0x40 2eb: c3 ret 000002ec <sbrk>: SYSCALL(sbrk) 2ec: b8 0c 00 00 00 mov $0xc,%eax 2f1: cd 40 int $0x40 2f3: c3 ret 000002f4 <sleep>: SYSCALL(sleep) 2f4: b8 0d 00 00 00 mov $0xd,%eax 2f9: cd 40 int $0x40 2fb: c3 ret 000002fc <uptime>: SYSCALL(uptime) 2fc: b8 0e 00 00 00 mov $0xe,%eax 301: cd 40 int $0x40 303: c3 ret 00000304 <mygetpid>: SYSCALL(mygetpid) 304: b8 16 00 00 00 mov $0x16,%eax 309: cd 40 int $0x40 30b: c3 ret 0000030c <halt>: SYSCALL(halt) 30c: b8 17 00 00 00 mov $0x17,%eax 311: cd 40 int $0x40 313: c3 ret 00000314 <pipe_count>: SYSCALL(pipe_count) 314: b8 18 00 00 00 mov $0x18,%eax 319: cd 40 int $0x40 31b: c3 ret 0000031c <putc>: #include "stat.h" #include "user.h" static void putc(int fd, char c) { 31c: 55 push %ebp 31d: 89 e5 mov %esp,%ebp 31f: 83 ec 18 sub $0x18,%esp 322: 8b 45 0c mov 0xc(%ebp),%eax 325: 88 45 f4 mov %al,-0xc(%ebp) write(fd, &c, 1); 328: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 32f: 00 330: 8d 45 f4 lea -0xc(%ebp),%eax 333: 89 44 24 04 mov %eax,0x4(%esp) 337: 8b 45 08 mov 0x8(%ebp),%eax 33a: 89 04 24 mov %eax,(%esp) 33d: e8 42 ff ff ff call 284 <write> } 342: c9 leave 343: c3 ret 00000344 <printint>: static void printint(int fd, int xx, int base, int sgn) { 344: 55 push %ebp 345: 89 e5 mov %esp,%ebp 347: 56 push %esi 348: 53 push %ebx 349: 83 ec 30 sub $0x30,%esp static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 34c: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) if(sgn && xx < 0){ 353: 83 7d 14 00 cmpl $0x0,0x14(%ebp) 357: 74 17 je 370 <printint+0x2c> 359: 83 7d 0c 00 cmpl $0x0,0xc(%ebp) 35d: 79 11 jns 370 <printint+0x2c> neg = 1; 35f: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp) x = -xx; 366: 8b 45 0c mov 0xc(%ebp),%eax 369: f7 d8 neg %eax 36b: 89 45 ec mov %eax,-0x14(%ebp) 36e: eb 06 jmp 376 <printint+0x32> } else { x = xx; 370: 8b 45 0c mov 0xc(%ebp),%eax 373: 89 45 ec mov %eax,-0x14(%ebp) } i = 0; 376: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) do{ buf[i++] = digits[x % base]; 37d: 8b 4d f4 mov -0xc(%ebp),%ecx 380: 8d 41 01 lea 0x1(%ecx),%eax 383: 89 45 f4 mov %eax,-0xc(%ebp) 386: 8b 5d 10 mov 0x10(%ebp),%ebx 389: 8b 45 ec mov -0x14(%ebp),%eax 38c: ba 00 00 00 00 mov $0x0,%edx 391: f7 f3 div %ebx 393: 89 d0 mov %edx,%eax 395: 8a 80 0c 0a 00 00 mov 0xa0c(%eax),%al 39b: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1) }while((x /= base) != 0); 39f: 8b 75 10 mov 0x10(%ebp),%esi 3a2: 8b 45 ec mov -0x14(%ebp),%eax 3a5: ba 00 00 00 00 mov $0x0,%edx 3aa: f7 f6 div %esi 3ac: 89 45 ec mov %eax,-0x14(%ebp) 3af: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 3b3: 75 c8 jne 37d <printint+0x39> if(neg) 3b5: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 3b9: 74 10 je 3cb <printint+0x87> buf[i++] = '-'; 3bb: 8b 45 f4 mov -0xc(%ebp),%eax 3be: 8d 50 01 lea 0x1(%eax),%edx 3c1: 89 55 f4 mov %edx,-0xc(%ebp) 3c4: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1) while(--i >= 0) 3c9: eb 1e jmp 3e9 <printint+0xa5> 3cb: eb 1c jmp 3e9 <printint+0xa5> putc(fd, buf[i]); 3cd: 8d 55 dc lea -0x24(%ebp),%edx 3d0: 8b 45 f4 mov -0xc(%ebp),%eax 3d3: 01 d0 add %edx,%eax 3d5: 8a 00 mov (%eax),%al 3d7: 0f be c0 movsbl %al,%eax 3da: 89 44 24 04 mov %eax,0x4(%esp) 3de: 8b 45 08 mov 0x8(%ebp),%eax 3e1: 89 04 24 mov %eax,(%esp) 3e4: e8 33 ff ff ff call 31c <putc> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) 3e9: ff 4d f4 decl -0xc(%ebp) 3ec: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 3f0: 79 db jns 3cd <printint+0x89> putc(fd, buf[i]); } 3f2: 83 c4 30 add $0x30,%esp 3f5: 5b pop %ebx 3f6: 5e pop %esi 3f7: 5d pop %ebp 3f8: c3 ret 000003f9 <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 3f9: 55 push %ebp 3fa: 89 e5 mov %esp,%ebp 3fc: 83 ec 38 sub $0x38,%esp char *s; int c, i, state; uint *ap; state = 0; 3ff: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp) ap = (uint*)(void*)&fmt + 1; 406: 8d 45 0c lea 0xc(%ebp),%eax 409: 83 c0 04 add $0x4,%eax 40c: 89 45 e8 mov %eax,-0x18(%ebp) for(i = 0; fmt[i]; i++){ 40f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) 416: e9 77 01 00 00 jmp 592 <printf+0x199> c = fmt[i] & 0xff; 41b: 8b 55 0c mov 0xc(%ebp),%edx 41e: 8b 45 f0 mov -0x10(%ebp),%eax 421: 01 d0 add %edx,%eax 423: 8a 00 mov (%eax),%al 425: 0f be c0 movsbl %al,%eax 428: 25 ff 00 00 00 and $0xff,%eax 42d: 89 45 e4 mov %eax,-0x1c(%ebp) if(state == 0){ 430: 83 7d ec 00 cmpl $0x0,-0x14(%ebp) 434: 75 2c jne 462 <printf+0x69> if(c == '%'){ 436: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 43a: 75 0c jne 448 <printf+0x4f> state = '%'; 43c: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp) 443: e9 47 01 00 00 jmp 58f <printf+0x196> } else { putc(fd, c); 448: 8b 45 e4 mov -0x1c(%ebp),%eax 44b: 0f be c0 movsbl %al,%eax 44e: 89 44 24 04 mov %eax,0x4(%esp) 452: 8b 45 08 mov 0x8(%ebp),%eax 455: 89 04 24 mov %eax,(%esp) 458: e8 bf fe ff ff call 31c <putc> 45d: e9 2d 01 00 00 jmp 58f <printf+0x196> } } else if(state == '%'){ 462: 83 7d ec 25 cmpl $0x25,-0x14(%ebp) 466: 0f 85 23 01 00 00 jne 58f <printf+0x196> if(c == 'd'){ 46c: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp) 470: 75 2d jne 49f <printf+0xa6> printint(fd, *ap, 10, 1); 472: 8b 45 e8 mov -0x18(%ebp),%eax 475: 8b 00 mov (%eax),%eax 477: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp) 47e: 00 47f: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp) 486: 00 487: 89 44 24 04 mov %eax,0x4(%esp) 48b: 8b 45 08 mov 0x8(%ebp),%eax 48e: 89 04 24 mov %eax,(%esp) 491: e8 ae fe ff ff call 344 <printint> ap++; 496: 83 45 e8 04 addl $0x4,-0x18(%ebp) 49a: e9 e9 00 00 00 jmp 588 <printf+0x18f> } else if(c == 'x' || c == 'p'){ 49f: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp) 4a3: 74 06 je 4ab <printf+0xb2> 4a5: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp) 4a9: 75 2d jne 4d8 <printf+0xdf> printint(fd, *ap, 16, 0); 4ab: 8b 45 e8 mov -0x18(%ebp),%eax 4ae: 8b 00 mov (%eax),%eax 4b0: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 4b7: 00 4b8: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp) 4bf: 00 4c0: 89 44 24 04 mov %eax,0x4(%esp) 4c4: 8b 45 08 mov 0x8(%ebp),%eax 4c7: 89 04 24 mov %eax,(%esp) 4ca: e8 75 fe ff ff call 344 <printint> ap++; 4cf: 83 45 e8 04 addl $0x4,-0x18(%ebp) 4d3: e9 b0 00 00 00 jmp 588 <printf+0x18f> } else if(c == 's'){ 4d8: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp) 4dc: 75 42 jne 520 <printf+0x127> s = (char*)*ap; 4de: 8b 45 e8 mov -0x18(%ebp),%eax 4e1: 8b 00 mov (%eax),%eax 4e3: 89 45 f4 mov %eax,-0xc(%ebp) ap++; 4e6: 83 45 e8 04 addl $0x4,-0x18(%ebp) if(s == 0) 4ea: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 4ee: 75 09 jne 4f9 <printf+0x100> s = "(null)"; 4f0: c7 45 f4 bf 07 00 00 movl $0x7bf,-0xc(%ebp) while(*s != 0){ 4f7: eb 1c jmp 515 <printf+0x11c> 4f9: eb 1a jmp 515 <printf+0x11c> putc(fd, *s); 4fb: 8b 45 f4 mov -0xc(%ebp),%eax 4fe: 8a 00 mov (%eax),%al 500: 0f be c0 movsbl %al,%eax 503: 89 44 24 04 mov %eax,0x4(%esp) 507: 8b 45 08 mov 0x8(%ebp),%eax 50a: 89 04 24 mov %eax,(%esp) 50d: e8 0a fe ff ff call 31c <putc> s++; 512: ff 45 f4 incl -0xc(%ebp) } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 515: 8b 45 f4 mov -0xc(%ebp),%eax 518: 8a 00 mov (%eax),%al 51a: 84 c0 test %al,%al 51c: 75 dd jne 4fb <printf+0x102> 51e: eb 68 jmp 588 <printf+0x18f> putc(fd, *s); s++; } } else if(c == 'c'){ 520: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp) 524: 75 1d jne 543 <printf+0x14a> putc(fd, *ap); 526: 8b 45 e8 mov -0x18(%ebp),%eax 529: 8b 00 mov (%eax),%eax 52b: 0f be c0 movsbl %al,%eax 52e: 89 44 24 04 mov %eax,0x4(%esp) 532: 8b 45 08 mov 0x8(%ebp),%eax 535: 89 04 24 mov %eax,(%esp) 538: e8 df fd ff ff call 31c <putc> ap++; 53d: 83 45 e8 04 addl $0x4,-0x18(%ebp) 541: eb 45 jmp 588 <printf+0x18f> } else if(c == '%'){ 543: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp) 547: 75 17 jne 560 <printf+0x167> putc(fd, c); 549: 8b 45 e4 mov -0x1c(%ebp),%eax 54c: 0f be c0 movsbl %al,%eax 54f: 89 44 24 04 mov %eax,0x4(%esp) 553: 8b 45 08 mov 0x8(%ebp),%eax 556: 89 04 24 mov %eax,(%esp) 559: e8 be fd ff ff call 31c <putc> 55e: eb 28 jmp 588 <printf+0x18f> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); 560: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp) 567: 00 568: 8b 45 08 mov 0x8(%ebp),%eax 56b: 89 04 24 mov %eax,(%esp) 56e: e8 a9 fd ff ff call 31c <putc> putc(fd, c); 573: 8b 45 e4 mov -0x1c(%ebp),%eax 576: 0f be c0 movsbl %al,%eax 579: 89 44 24 04 mov %eax,0x4(%esp) 57d: 8b 45 08 mov 0x8(%ebp),%eax 580: 89 04 24 mov %eax,(%esp) 583: e8 94 fd ff ff call 31c <putc> } state = 0; 588: 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++){ 58f: ff 45 f0 incl -0x10(%ebp) 592: 8b 55 0c mov 0xc(%ebp),%edx 595: 8b 45 f0 mov -0x10(%ebp),%eax 598: 01 d0 add %edx,%eax 59a: 8a 00 mov (%eax),%al 59c: 84 c0 test %al,%al 59e: 0f 85 77 fe ff ff jne 41b <printf+0x22> putc(fd, c); } state = 0; } } } 5a4: c9 leave 5a5: c3 ret 5a6: 90 nop 5a7: 90 nop 000005a8 <free>: static Header base; static Header *freep; void free(void *ap) { 5a8: 55 push %ebp 5a9: 89 e5 mov %esp,%ebp 5ab: 83 ec 10 sub $0x10,%esp Header *bp, *p; bp = (Header*)ap - 1; 5ae: 8b 45 08 mov 0x8(%ebp),%eax 5b1: 83 e8 08 sub $0x8,%eax 5b4: 89 45 f8 mov %eax,-0x8(%ebp) for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 5b7: a1 28 0a 00 00 mov 0xa28,%eax 5bc: 89 45 fc mov %eax,-0x4(%ebp) 5bf: eb 24 jmp 5e5 <free+0x3d> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 5c1: 8b 45 fc mov -0x4(%ebp),%eax 5c4: 8b 00 mov (%eax),%eax 5c6: 3b 45 fc cmp -0x4(%ebp),%eax 5c9: 77 12 ja 5dd <free+0x35> 5cb: 8b 45 f8 mov -0x8(%ebp),%eax 5ce: 3b 45 fc cmp -0x4(%ebp),%eax 5d1: 77 24 ja 5f7 <free+0x4f> 5d3: 8b 45 fc mov -0x4(%ebp),%eax 5d6: 8b 00 mov (%eax),%eax 5d8: 3b 45 f8 cmp -0x8(%ebp),%eax 5db: 77 1a ja 5f7 <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) 5dd: 8b 45 fc mov -0x4(%ebp),%eax 5e0: 8b 00 mov (%eax),%eax 5e2: 89 45 fc mov %eax,-0x4(%ebp) 5e5: 8b 45 f8 mov -0x8(%ebp),%eax 5e8: 3b 45 fc cmp -0x4(%ebp),%eax 5eb: 76 d4 jbe 5c1 <free+0x19> 5ed: 8b 45 fc mov -0x4(%ebp),%eax 5f0: 8b 00 mov (%eax),%eax 5f2: 3b 45 f8 cmp -0x8(%ebp),%eax 5f5: 76 ca jbe 5c1 <free+0x19> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 5f7: 8b 45 f8 mov -0x8(%ebp),%eax 5fa: 8b 40 04 mov 0x4(%eax),%eax 5fd: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 604: 8b 45 f8 mov -0x8(%ebp),%eax 607: 01 c2 add %eax,%edx 609: 8b 45 fc mov -0x4(%ebp),%eax 60c: 8b 00 mov (%eax),%eax 60e: 39 c2 cmp %eax,%edx 610: 75 24 jne 636 <free+0x8e> bp->s.size += p->s.ptr->s.size; 612: 8b 45 f8 mov -0x8(%ebp),%eax 615: 8b 50 04 mov 0x4(%eax),%edx 618: 8b 45 fc mov -0x4(%ebp),%eax 61b: 8b 00 mov (%eax),%eax 61d: 8b 40 04 mov 0x4(%eax),%eax 620: 01 c2 add %eax,%edx 622: 8b 45 f8 mov -0x8(%ebp),%eax 625: 89 50 04 mov %edx,0x4(%eax) bp->s.ptr = p->s.ptr->s.ptr; 628: 8b 45 fc mov -0x4(%ebp),%eax 62b: 8b 00 mov (%eax),%eax 62d: 8b 10 mov (%eax),%edx 62f: 8b 45 f8 mov -0x8(%ebp),%eax 632: 89 10 mov %edx,(%eax) 634: eb 0a jmp 640 <free+0x98> } else bp->s.ptr = p->s.ptr; 636: 8b 45 fc mov -0x4(%ebp),%eax 639: 8b 10 mov (%eax),%edx 63b: 8b 45 f8 mov -0x8(%ebp),%eax 63e: 89 10 mov %edx,(%eax) if(p + p->s.size == bp){ 640: 8b 45 fc mov -0x4(%ebp),%eax 643: 8b 40 04 mov 0x4(%eax),%eax 646: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx 64d: 8b 45 fc mov -0x4(%ebp),%eax 650: 01 d0 add %edx,%eax 652: 3b 45 f8 cmp -0x8(%ebp),%eax 655: 75 20 jne 677 <free+0xcf> p->s.size += bp->s.size; 657: 8b 45 fc mov -0x4(%ebp),%eax 65a: 8b 50 04 mov 0x4(%eax),%edx 65d: 8b 45 f8 mov -0x8(%ebp),%eax 660: 8b 40 04 mov 0x4(%eax),%eax 663: 01 c2 add %eax,%edx 665: 8b 45 fc mov -0x4(%ebp),%eax 668: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 66b: 8b 45 f8 mov -0x8(%ebp),%eax 66e: 8b 10 mov (%eax),%edx 670: 8b 45 fc mov -0x4(%ebp),%eax 673: 89 10 mov %edx,(%eax) 675: eb 08 jmp 67f <free+0xd7> } else p->s.ptr = bp; 677: 8b 45 fc mov -0x4(%ebp),%eax 67a: 8b 55 f8 mov -0x8(%ebp),%edx 67d: 89 10 mov %edx,(%eax) freep = p; 67f: 8b 45 fc mov -0x4(%ebp),%eax 682: a3 28 0a 00 00 mov %eax,0xa28 } 687: c9 leave 688: c3 ret 00000689 <morecore>: static Header* morecore(uint nu) { 689: 55 push %ebp 68a: 89 e5 mov %esp,%ebp 68c: 83 ec 28 sub $0x28,%esp char *p; Header *hp; if(nu < 4096) 68f: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp) 696: 77 07 ja 69f <morecore+0x16> nu = 4096; 698: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp) p = sbrk(nu * sizeof(Header)); 69f: 8b 45 08 mov 0x8(%ebp),%eax 6a2: c1 e0 03 shl $0x3,%eax 6a5: 89 04 24 mov %eax,(%esp) 6a8: e8 3f fc ff ff call 2ec <sbrk> 6ad: 89 45 f4 mov %eax,-0xc(%ebp) if(p == (char*)-1) 6b0: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp) 6b4: 75 07 jne 6bd <morecore+0x34> return 0; 6b6: b8 00 00 00 00 mov $0x0,%eax 6bb: eb 22 jmp 6df <morecore+0x56> hp = (Header*)p; 6bd: 8b 45 f4 mov -0xc(%ebp),%eax 6c0: 89 45 f0 mov %eax,-0x10(%ebp) hp->s.size = nu; 6c3: 8b 45 f0 mov -0x10(%ebp),%eax 6c6: 8b 55 08 mov 0x8(%ebp),%edx 6c9: 89 50 04 mov %edx,0x4(%eax) free((void*)(hp + 1)); 6cc: 8b 45 f0 mov -0x10(%ebp),%eax 6cf: 83 c0 08 add $0x8,%eax 6d2: 89 04 24 mov %eax,(%esp) 6d5: e8 ce fe ff ff call 5a8 <free> return freep; 6da: a1 28 0a 00 00 mov 0xa28,%eax } 6df: c9 leave 6e0: c3 ret 000006e1 <malloc>: void* malloc(uint nbytes) { 6e1: 55 push %ebp 6e2: 89 e5 mov %esp,%ebp 6e4: 83 ec 28 sub $0x28,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 6e7: 8b 45 08 mov 0x8(%ebp),%eax 6ea: 83 c0 07 add $0x7,%eax 6ed: c1 e8 03 shr $0x3,%eax 6f0: 40 inc %eax 6f1: 89 45 ec mov %eax,-0x14(%ebp) if((prevp = freep) == 0){ 6f4: a1 28 0a 00 00 mov 0xa28,%eax 6f9: 89 45 f0 mov %eax,-0x10(%ebp) 6fc: 83 7d f0 00 cmpl $0x0,-0x10(%ebp) 700: 75 23 jne 725 <malloc+0x44> base.s.ptr = freep = prevp = &base; 702: c7 45 f0 20 0a 00 00 movl $0xa20,-0x10(%ebp) 709: 8b 45 f0 mov -0x10(%ebp),%eax 70c: a3 28 0a 00 00 mov %eax,0xa28 711: a1 28 0a 00 00 mov 0xa28,%eax 716: a3 20 0a 00 00 mov %eax,0xa20 base.s.size = 0; 71b: c7 05 24 0a 00 00 00 movl $0x0,0xa24 722: 00 00 00 } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 725: 8b 45 f0 mov -0x10(%ebp),%eax 728: 8b 00 mov (%eax),%eax 72a: 89 45 f4 mov %eax,-0xc(%ebp) if(p->s.size >= nunits){ 72d: 8b 45 f4 mov -0xc(%ebp),%eax 730: 8b 40 04 mov 0x4(%eax),%eax 733: 3b 45 ec cmp -0x14(%ebp),%eax 736: 72 4d jb 785 <malloc+0xa4> if(p->s.size == nunits) 738: 8b 45 f4 mov -0xc(%ebp),%eax 73b: 8b 40 04 mov 0x4(%eax),%eax 73e: 3b 45 ec cmp -0x14(%ebp),%eax 741: 75 0c jne 74f <malloc+0x6e> prevp->s.ptr = p->s.ptr; 743: 8b 45 f4 mov -0xc(%ebp),%eax 746: 8b 10 mov (%eax),%edx 748: 8b 45 f0 mov -0x10(%ebp),%eax 74b: 89 10 mov %edx,(%eax) 74d: eb 26 jmp 775 <malloc+0x94> else { p->s.size -= nunits; 74f: 8b 45 f4 mov -0xc(%ebp),%eax 752: 8b 40 04 mov 0x4(%eax),%eax 755: 2b 45 ec sub -0x14(%ebp),%eax 758: 89 c2 mov %eax,%edx 75a: 8b 45 f4 mov -0xc(%ebp),%eax 75d: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 760: 8b 45 f4 mov -0xc(%ebp),%eax 763: 8b 40 04 mov 0x4(%eax),%eax 766: c1 e0 03 shl $0x3,%eax 769: 01 45 f4 add %eax,-0xc(%ebp) p->s.size = nunits; 76c: 8b 45 f4 mov -0xc(%ebp),%eax 76f: 8b 55 ec mov -0x14(%ebp),%edx 772: 89 50 04 mov %edx,0x4(%eax) } freep = prevp; 775: 8b 45 f0 mov -0x10(%ebp),%eax 778: a3 28 0a 00 00 mov %eax,0xa28 return (void*)(p + 1); 77d: 8b 45 f4 mov -0xc(%ebp),%eax 780: 83 c0 08 add $0x8,%eax 783: eb 38 jmp 7bd <malloc+0xdc> } if(p == freep) 785: a1 28 0a 00 00 mov 0xa28,%eax 78a: 39 45 f4 cmp %eax,-0xc(%ebp) 78d: 75 1b jne 7aa <malloc+0xc9> if((p = morecore(nunits)) == 0) 78f: 8b 45 ec mov -0x14(%ebp),%eax 792: 89 04 24 mov %eax,(%esp) 795: e8 ef fe ff ff call 689 <morecore> 79a: 89 45 f4 mov %eax,-0xc(%ebp) 79d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp) 7a1: 75 07 jne 7aa <malloc+0xc9> return 0; 7a3: b8 00 00 00 00 mov $0x0,%eax 7a8: eb 13 jmp 7bd <malloc+0xdc> nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 7aa: 8b 45 f4 mov -0xc(%ebp),%eax 7ad: 89 45 f0 mov %eax,-0x10(%ebp) 7b0: 8b 45 f4 mov -0xc(%ebp),%eax 7b3: 8b 00 mov (%eax),%eax 7b5: 89 45 f4 mov %eax,-0xc(%ebp) return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 7b8: e9 70 ff ff ff jmp 72d <malloc+0x4c> } 7bd: c9 leave 7be: c3 ret
33.943493
60
0.420345
e8669754575fc4d238c0314c76d2bcc82fff1e7e
2,615
asm
Assembly
tutorials/part9/src/database.asm
Threetwosevensixseven/ZalaXa
190cfbc481ff7d3be5500c29c2c027b249a15cca
[ "MIT" ]
5
2018-01-06T21:05:36.000Z
2019-10-25T09:18:23.000Z
tutorials/part9/src/database.asm
Threetwosevensixseven/ZalaXa
190cfbc481ff7d3be5500c29c2c027b249a15cca
[ "MIT" ]
null
null
null
tutorials/part9/src/database.asm
Threetwosevensixseven/ZalaXa
190cfbc481ff7d3be5500c29c2c027b249a15cca
[ "MIT" ]
2
2019-04-30T06:11:48.000Z
2020-05-15T07:37:04.000Z
; database.asm WTile proc ::WIDE_IMAGES: ; BTile Best ; FileName Indices Viewed As Notes Ship equ ($-WTile)/Sprites.WTileLen import_bin "..\tiles\ship.wtile" ; 000-016 4 x 2 Ship Blank equ ($-WTile)/Sprites.WTileLen import_bin "..\tiles\blank.wtile" ; 008-008 1 x 1 Blank pend Font proc Namco: import_bin "..\fonts\Namco.fzx" pend MenuText proc ; Named procedure to keep our print data tidy db At, 7, 13 ; These codes are the same as you would use db Paper, Black, PrBright, 1 ; with Sinclair BASIC's PRINT command db Ink, Red, " " ; Set the attributes here, with spaces, db Ink, Yellow, " " ; because FZX only prints pixels db Ink, Cyan, " " db Ink, Magenta, " " db Ink, White, " " db Ink, Green, " " db At, 21, 6 db Ink, Yellow, " " db Ink, White, " " db Ink, Yellow, " " Length equ $-MenuText ; Let Zeus do the work of calculating the length ; ($ means the current address Zeus is assembling to) FZX: db At, 56, 104 ; FXX coordinates are (Y, X) in pixels db "ZA%AXA" db At, 168, 55 db "PRESS SPACE TO START" db 255 ; Terminator byte pend GameText proc ; FXX coordinates are (Y, X) in pixels db At, 0, 0, "&UP" db At, 0, 94, "HIGH SCORE" db At, 9, 0, "0" db At, 9, 112, "20000" db 255 ; Terminator byte pend ClsNirvanaGame proc db 128, BrightWhiteBlackP ; One row of white rept 11 db 255, BrightYellowBlackP ; and the remainder yellow endm db 11, BrightYellowBlackP db 0 pend
39.621212
109
0.371319
89eacbd93ea117dd31e29945eab88e18ee9c756b
64,358
asm
Assembly
Library/Pref/TweakUI/tweakui.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Pref/TweakUI/tweakui.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Pref/TweakUI/tweakui.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) New Deal 1998 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: tweakui.asm AUTHOR: Gene Anderson ROUTINES: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Gene 4/20/98 Initial revision DESCRIPTION: Code for tweak UI module of Preferences $Id: tweakui.asm,v 1.4 98/05/15 17:43:43 gene Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;------------------------------------------------------------------------------ ; Common GEODE stuff ;------------------------------------------------------------------------------ include geos.def include heap.def include geode.def include resource.def include ec.def include library.def include object.def include graphics.def include gstring.def include win.def include char.def include initfile.def include Internal/specUI.def ;----------------------------------------------------------------------------- ; Libraries used ;----------------------------------------------------------------------------- UseLib ui.def UseLib config.def UseLib Objects/vTextC.def UseLib Objects/colorC.def ;----------------------------------------------------------------------------- ; DEF FILES ;----------------------------------------------------------------------------- include tweakui.def include tweakui.rdef ;----------------------------------------------------------------------------- ; VARIABLES ;----------------------------------------------------------------------------- idata segment idata ends ;----------------------------------------------------------------------------- ; CODE ;----------------------------------------------------------------------------- ;take this out for now ;include tweakuiProgList.asm include prefMinuteValue.asm TweakUICode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakGetPrefUITree %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the root of the UI tree for "Preferences" CALLED BY: PrefMgr PASS: none RETURN: dx:ax - OD of root of tree DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 8/25/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIGetPrefUITree proc far mov dx, handle TweakUIRoot mov ax, offset TweakUIRoot ret TweakUIGetPrefUITree endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIGetModuleInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Fill in the PrefModuleInfo buffer so that PrefMgr can decide whether to show this button CALLED BY: PrefMgr PASS: ds:si - PrefModuleInfo structure to be filled in RETURN: ds:si - buffer filled in DESTROYED: ax,bx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECSnd/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- chrisb 10/26/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIGetModuleInfo proc far .enter clr ax mov ds:[si].PMI_requiredFeatures, mask PMF_SYSTEM mov ds:[si].PMI_prohibitedFeatures, ax mov ds:[si].PMI_minLevel, 1 mov ds:[si].PMI_maxLevel, UIInterfaceLevel-1 mov ds:[si].PMI_monikerList.handle, handle TweakUIMonikerList mov ds:[si].PMI_monikerList.offset, offset TweakUIMonikerList mov {word} ds:[si].PMI_monikerToken, 'P' or ('F' shl 8) mov {word} ds:[si].PMI_monikerToken+2, 'T' or ('w' shl 8) mov {word} ds:[si].PMI_monikerToken+4, MANUFACTURER_ID_APP_LOCAL .leave ret TweakUIGetModuleInfo endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIDialogInitiate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The dialog has opened CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/20/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIDialogInitiate method dynamic TweakUIDialogClass, MSG_GEN_INTERACTION_INITIATE .enter ; ed 10/15/00 - first check what ui we're using, and configure the ; UI for it. Do it first, as we have to read different ini keys for ; different UI's. call DisableSpecificUIItems ; ; Do the normal superclass stuff, including loading our ; initial state from the .INI file. ; mov di, offset TweakUIDialogClass call ObjCallSuperNoLock ; ; Manually load the not usable stuff from the .INI file -- ; it doesn't happen automatically since it is not usable. ; mov si, offset ExpressSettings call loadOptions mov si, offset InterfaceSettings call loadOptions mov si, offset AdvancedSettings call loadOptions mov si, offset DriveSettings call loadOptions mov si, offset AppearanceSettings call loadOptions mov si, offset AppSettings call loadOptions ; ; set up the font area ; mov si, offset FontSizeArea mov ax, MSG_GEN_ITEM_GROUP_SEND_STATUS_MSG call ObjCallInstanceNoLock .leave ret loadOptions: mov ax, MSG_META_LOAD_OPTIONS call ObjCallInstanceNoLock retn TweakUIDialogInitiate endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RunningNewUI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: See if we're running NewUI or not CALLED BY: PrefMgr PASS: ds - seg addr of TweakUIUI RETURN: z flag - set (jz) if running NewUI DESTROYED: es PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/7/01 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ RunningNewUI proc near uses ax, bx, cx, dx, bp, di, si, ds, es spuiBuf local FileLongName .enter ; ; See which UI we're running ; push bp segmov ds, cs, cx mov si, offset uiCategory mov dx, offset specificKey segmov es, ss lea di, ss:spuiBuf mov bp, InitFileReadFlags <IFCC_INTACT, 0, 0, (size spuiBuf)> call InitFileReadString pop bp clr cx ;cx <- NULL-terminated mov bx, handle NewUIName call MemLock mov ds, ax mov si, offset NewUIName mov si, ds:[si] ;ds:si <- NewUI name call LocalCmpStrings call MemUnlock je yesNewUI ;check long filename push ds segmov ds, cs mov si, offset NewUIGeode ;check DOS filename call LocalCmpStringsNoCase pop ds yesNewUI: .leave ret RunningNewUI endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DisableSpecificUIItems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Disable UI not applicable to the current specific UI CALLED BY: PrefMgr PASS: ds - object block RETURN: ds - fixed up DESTROYED: bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/21/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ specificKey char "specific",0 newUIDisableList lptr \ EOGotoNewManager, EORunningApps, EOExitToDOS, EOWorldApps, EOWorldSubdirs, EOControlPanel, EOUtilities, ESORunningApps, ESOWorldAppsSubmenu, ESOOtherSubmenu, AOLConfirmShutdown, UIO1WinMenu, ScrollbarSizeGroup, UIO3Blinky, EODocumentsList motifDisableList lptr \ EO2SmallIcons, UIO3AutohideTaskbar, UIO3RightClickHelp, StartupRoomGroup EC < LocalDefNLString NewUIGeode <"newuiec.geo", 0> NEC < LocalDefNLString NewUIGeode <"newui.geo", 0> DisableSpecificUIItems proc near uses es isNewUI local byte .enter pusha mov ss:isNewUI, FALSE mov cx, length motifDisableList mov bx, offset motifDisableList call RunningNewUI jnz notNewUI ;branch if not NewUI mov ss:isNewUI, TRUE mov cx, length newUIDisableList mov bx, offset newUIDisableList notNewUI: ; ; Disable the items ; push bp clr di disableLoop: push cx mov si, cs:[bx][di] mov ax, MSG_GEN_SET_NOT_ENABLED mov dl, VUM_DELAYED_VIA_APP_QUEUE call ObjCallInstanceNoLock pop cx add di, (size lptr) loop disableLoop pop bp done:: ; ed 10/15/00 - now set the ini category for objects that need to ; store their settings in different sections for different UI's mov ax, MSG_PREF_SET_INIT_FILE_CATEGORY mov cx, cs mov dx, offset uiAdvFeaturesCat tst ss:isNewUI jnz uiFeaturesNewUI mov dx, offset uiFeaturesCat uiFeaturesNewUI: mov si, offset UIOptionsLists call ObjCallInstanceNoLock mov si, offset ExpressOptions call ObjCallInstanceNoLock mov si, offset AppOptions1 call ObjCallInstanceNoLock popa .leave ret DisableSpecificUIItems endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIDialogApply %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Apply has been pressed CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/21/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIDialogApply method dynamic TweakUIDialogClass, MSG_GEN_APPLY uses si .enter ; ; See if the UI has changed ; mov ax, MSG_GEN_ITEM_GROUP_IS_MODIFIED mov si, offset UIList call ObjCallInstanceNoLock jnc checkReset2 ;branch if no mod. ; ; set the various options for the UI combo ; mov si, offset UIList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock jc noUISelected call SetUIOptions noUISelected: jmp doReset ; ; See if the file manager options have changed, and force a ; reboot if so ; checkReset2: mov ax, MSG_GEN_BOOLEAN_GROUP_GET_MODIFIED_BOOLEANS mov si, offset FileMgrOptions call ObjCallInstanceNoLock tst ax ;any changes? jnz doReset ;branch if mod. ; ; See if the startup room has changed, and force a reboot ; mov ax, MSG_GEN_ITEM_GROUP_IS_MODIFIED mov si, offset UIStartupRoom call ObjCallInstanceNoLock jnc noReset ;branch if not mod. ; ; If so, force the state files to be deleted when we restart so ; that the correct launcher will be launched. ; doReset: push ds segmov ds, cs, cx mov si, offset uiCategory ;ds:si <- category mov dx, offset forceResetKey ;cx:dx <- key mov ax, TRUE ;ax <- set to TRUE call InitFileWriteBoolean pop ds noReset: ; ; Manually apply to each section. It doesn't happen automatically ; since some of them are not usable. ; mov si, offset AppSettings call saveOptions mov si, offset ExpressSettings call saveOptions mov si, offset InterfaceSettings call saveOptions mov si, offset AdvancedSettings call saveOptions mov si, offset DriveSettings call saveOptions mov si, offset AppearanceSettings call saveOptions ; ; Handle keyboard accelerator mode -- it has two flags, one ; to turn it on/off, and another to show/hide the accelerators ; mov si, offset UIOptions1 mov ax, MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS call ObjCallInstanceNoLock xornf ax, mask UIWO_KBD_NAVIGATION shl 8 andnf ax, mask UIWO_KBD_NAVIGATION shl 8 push ds segmov ds, cs, cx mov si, offset uiCategory mov dx, offset kbdAccModeKey call InitFileWriteBoolean pop ds ; ; Handle automatically reset after crash -- it has two flags, ; one to bypass the 'bad shutdown' message, and one to reset. ; mov si, offset AdvancedOptionsList mov ax, MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS call ObjCallInstanceNoLock andnf ax, mask TUIA_AUTO_RESET push ds segmov ds, cs, cx mov si, offset uiCategory mov dx, offset resetKey call InitFileWriteBoolean pop ds ; Handle docControlOptions. The object will write it to uiFeatures, ; but we also need it in uiFeatures - advanced. mov si, offset AppOptions1 mov ax, MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS call ObjCallInstanceNoLock push ds segmov ds, cs, cx mov si, offset uiAdvFeaturesCat mov dx, offset docOptionsKey call InitFileWriteBoolean pop ds ; ; Do the superclass thing last ; .leave mov di, offset TweakUIDialogClass mov ax, MSG_GEN_APPLY GOTO ObjCallSuperNoLock saveOptions: mov ax, MSG_GEN_APPLY call ObjCallInstanceNoLock retn TweakUIDialogApply endm uiCategory char "ui",0 kbdAccModeKey char "kbdAcceleratorMode",0 resetKey char "deleteStateFilesAfterCrash",0 forceResetKey char "forceDeleteStateFilesOnceOnly",0 docOptionsKey char "docControlOptions",0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUISectionChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The section list changed CALLED BY: PrefMgr PASS: cx - current selection (TweakUISection) RETURN: none DESTROYED: bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/20/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUISectionChanged method dynamic TweakUIDialogClass, MSG_TUID_SECTION_CHANGED .enter mov dx, cx ;dx <- current clr di, cx sectionLoop: mov si, cs:sectionInteractions[di] ; ; If the current section, set usable otherwise not usable ; mov ax, MSG_GEN_SET_NOT_USABLE cmp cx, dx jne gotMsg mov ax, MSG_GEN_SET_USABLE gotMsg: push cx, dx mov dl, VUM_DELAYED_VIA_APP_QUEUE call ObjCallInstanceNoLock pop cx, dx add di, (size lptr) inc cx cmp cx, length sectionInteractions jb sectionLoop .leave ret TweakUISectionChanged endm sectionInteractions lptr \ AppSettings, ExpressSettings, InterfaceSettings, AdvancedSettings, DriveSettings, AppearanceSettings CheckHack <length sectionInteractions eq TweakUISection> COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIHideDriveSaveOptions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Save options for a hide drive boolean CALLED BY: MSG_SAVE_OPTIONS PASS: RETURN: none DESTROYED: bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/29/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if 0 systemCat char "system",0 TweakUIHideDriveSaveOptions method dynamic TweakUIHideDriveBooleanClass, MSG_META_SAVE_OPTIONS driveKey local 8 dup (char) .enter ForceRef driveKey ; ; Construct the drive key ; call BuildDriveKey ; ; Get the selected booleans to see if that includes us ; push bp mov ax, MSG_GEN_BOOLEAN_GROUP_GET_SELECTED_BOOLEANS call GenCallParent mov di, ds:[si] add di, ds:[di].GenBoolean_offset pop bp ; ; See what we want: hidden or not hidden ; test ax, ds:[di].GBI_identifier jnz hideDrive ;branch if hidden ; ; We want to show the drive -- remove the key ; showDrive:: call DrivePrepForINI call InitFileDeleteEntry jmp done ; ; We want to hide the drive -- write a zero for the capacity ; hideDrive: call DrivePrepForINI push bp clr bp ;bp <- value call InitFileWriteInteger pop bp done: .leave ret TweakUIHideDriveSaveOptions endm driveName char "drive ",0 DRIVE_LETTER_OFFSET equ (length driveName)-1 BuildDriveKey proc near class TweakUIHideDriveBooleanClass .enter inherit TweakUIHideDriveSaveOptions push ds, si, di mov si, offset driveName segmov ds, cs, cx lea di, ss:driveKey segmov es, ss, cx mov cx, (size driveName) rep movsb pop ds, si, di ; ; Store drive letter + NULL ; clr ax mov al, ds:[di].TUIHDB_drive mov {word}ss:driveKey[DRIVE_LETTER_OFFSET], ax .leave ret BuildDriveKey endp DrivePrepForINI proc near .enter inherit TweakUIHideDriveSaveOptions mov si, offset systemCat segmov ds, cs, cx ;ds:si <- category lea dx, ss:driveKey mov cx, ss ;cx:dx <- key .leave ret DrivePrepForINI endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIHideDriveLoadOptions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Load options for a hide drive boolean CALLED BY: MSG_LOAD_OPTIONS PASS: RETURN: none DESTROYED: bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/29/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIHideDriveLoadOptions method dynamic TweakUIHideDriveBooleanClass, MSG_META_LOAD_OPTIONS driveKey local 8 dup (char) .enter ForceRef driveKey ; ; Construct the drive key ; call BuildDriveKey ; ; See if there is a key and if it is zero ; push ds, si call DrivePrepForINI call InitFileReadInteger pop ds, si jc done ;branch if no key cmp ax, 0 jne done ;branch if not zero ; ; Select ourselves ; push bp mov di, ds:[si] add di, ds:[di].GenBoolean_offset mov cx, ds:[di].GBI_identifier ;cx <- our ID mov dx, -1 ;dx <- selected mov ax, MSG_GEN_BOOLEAN_GROUP_SET_BOOLEAN_STATE call GenCallParent pop bp done: .leave ret TweakUIHideDriveLoadOptions endm endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIDialogPostApply %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle an apply for the dialog box CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/24/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICDialogPostApply method dynamic TweakUIDialogClass, MSG_GEN_POST_APPLY ; ; Write out any of the colors that have changed ; push ds mov si, offset motifOptsCategory ;ds:si <- category mov cx, length colorKeys ;cx <- # entries clr di ;di <- offset colorLoop: segmov ds, idata, ax ;ds <- idata cmp ds:titleBarColor[di], C_UNUSED_0 je notChanged ; ; Get the color from the .INI file or the default, and see ; if the user value has actually changed anything. ; call GetINIColor cmp ds:titleBarColor[di], al ;unchanged? je notChanged ;branch if not changed ; ; The value has changed -- write it out to the .INI file ; clr ax mov al, ds:titleBarColor[di] ;ax <- Color push cx, di segmov ds, cs, cx ;ds:si <- category mov cx, cs shl di, 1 mov dx, cs:colorKeys[di] ;cx:dx <- key mov bp, ax ;bp <- value call InitFileWriteInteger pop cx, di notChanged: inc di loop colorLoop ;loop while more pop ds ; ; Call our superclass last ; mov ax, MSG_GEN_POST_APPLY mov si, offset TweakUIRoot mov di, offset TweakUIDialogClass GOTO ObjCallSuperNoLock PrefUICDialogPostApply endm colorKeys nptr \ titleBarKey, titleBar2Key, darkColorKey, lightColorKey, fileMgrKey, helpbgKey, selectKey CheckHack <length colorKeys eq PrefUIColor> defaultMotifColors Color \ C_DARK_GRAY, ;title bar C_DARK_GRAY, ;title bar gradient C_DARK_GRAY, ;dark color C_LIGHT_GRAY, ;light color C_WHITE, ;file folder C_WHITE, ;help BG color C_DARK_GRAY ;selection CheckHack <length defaultMotifColors eq PrefUIColor> motifOptsCategory char "motif options",0 titleBarKey char "activeTitleBarColor",0 titleBar2Key char "titleBarGradient", 0 darkColorKey char "darkColor",0 lightColorKey char "lightColor",0 fileMgrKey char "fileMgrColor",0 helpbgKey char "helpbgColor", 0 selectKey char "selectColor", 0 COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICDialogAreaChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Update the color list to reflect the selected area CALLED BY: PrefMgr PASS: cx - current selection (PrefUIColor) RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/24/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICDialogAreaChanged method dynamic TweakUIDialogClass, MSG_TUID_AREA_CHANGED .enter mov di, cx ;di <- selection call GetCurrentColor ;al <- current color call UpdateColor .leave ret PrefUICDialogAreaChanged endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICSetDefaultColor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Reset the colors to the defaults CALLED BY: PrefMgr PASS: cx - PrefUIDefaultColorScheme RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/14/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ defaultColorLists nptr \ defaultMotifColors, defaultNewUIColors, defaultCyanColors, defaultEarthColors, defaultMerlotColors, defaultCorporateColors, defaultForestColors, defaultSedonaColors, defaultStainlessColors, defaultContrastColors, defaultOceanColors, defaultBlueSkyColors, defaultEmeraldColors, defaultTealColors, defSwimmingPoolColors, defGreySkyColors, defCuppaJoeColors, defGreyAndRedColors, defGreyAndGreenColors CheckHack <length defaultColorLists eq PrefUIDefaultColorScheme> defaultNewUIColors Color \ C_BLUE, ;title bar C_BLUE, ;title bar gradient C_DARK_GRAY, ;dark color C_LIGHT_GRAY, ;light color C_WHITE, ;file folder C_LIGHT_GRAY, ;help BG color C_BLUE ;selection defaultCyanColors Color \ C_BLACK, ;title bar C_BLACK, ;title bar gradient C_BLACK, ;dark color C_CYAN, ;light color C_WHITE, ;file folder C_WHITE, ;help BG color C_DARK_GRAY ;selection defaultEarthColors Color \ C_R2_G3_B2, ;title bar C_R2_G3_B2, ;title bar gradient C_DARK_GRAY, ;dark color C_LIGHT_GRAY, ;light color C_R2_G3_B3, ;file folder C_R5_G5_B4, ;help BG color C_DARK_GRAY ;selection defaultMerlotColors Color \ 113, ;title bar 194, ;title bar gradient 114, ;dark color 163, ;light color 162, ;file folder 248, ;help BG color 114 ;selection defaultCorporateColors Color \ 43, ;title bar 41, ;title bar gradient 8, ;dark color 27, ;light color 15, ;file folder 253, ;help BG color 43 ;selection defaultForestColors Color \ 46, ;title bar 95, ;title bar gradient 47, ;dark color 132, ;light color 30, ;file folder 254, ;help BG color 47 ;selection defaultSedonaColors Color \ 191, ;title bar 112, ;title bar gradient 154, ;dark color 247, ;light color 240, ;file folder 254, ;help BG color 154 ;selection defaultStainlessColors Color \ 24, ;title bar 20, ;title bar gradient 19, ;dark color 27, ;light color 7, ;file folder 25, ;help BG color 20 ;selection defaultContrastColors Color \ 0, ;title bar 0, ;title bar gradient 0, ;dark color 30, ;light color 15, ;file folder 15, ;help BG color 0 ;selection defaultOceanColors Color \ 48, ;title bar 41, ;title bar gradient 46, ;dark color 140, ;light color 183, ;file folder 146, ;help BG color 78 ;selection defaultBlueSkyColors Color \ 9, ;title bar 11, ;title bar gradient 8, ;dark color 69, ;light color 177, ;file folder 146, ;help BG color 87 ;selection defaultEmeraldColors Color \ 0, ;title bar 2, ;title bar gradient 8, ;dark color 60, ;light color 133, ;file folder 254, ;help BG color 24 ;selection defaultTealColors Color \ 3, ;title bar 10, ;title bar gradient 8, ;dark color 61, ;light color 133, ;file folder 254, ;help BG color 25 ;selection defSwimmingPoolColors Color \ 0, ;title bar 99, ;title bar gradient 8, ;dark color 62, ;light color 134, ;file folder 254, ;help BG color 51 ;selection defGreySkyColors Color \ 48, ;title bar 15, ;title bar gradient 19, ;dark color 28, ;light color 27, ;file folder 7, ;help BG color 99 ;selection defCuppaJoeColors Color \ 160, ;title bar 211, ;title bar gradient 24, ;dark color 211, ;light color 203, ;file folder 254, ;help BG color 155 ;selection defGreyAndRedColors Color \ 185, ;title bar 7, ;title bar gradient 24, ;dark color 27, ;light color 205, ;file folder 254, ;help BG color 192 ;selection defGreyAndGreenColors Color \ 67, ;title bar 8, ;title bar gradient 8, ;dark color 25, ;light color 27, ;file folder 254, ;help BG color 60 ;selection PrefUICSetDefaultColor method dynamic TweakUIDialogClass, MSG_TUID_SET_DEFAULT_COLORS cmp cx, GIGS_NONE je done ; ; Get the default list to use ; mov di, cx shl di mov bx, cs:defaultColorLists[di] ; ; Set the variables to the defaults ; clr di mov cx, PrefUIColor colorLoop: mov al, cs:[bx][di] mov es:titleBarColor[di], al inc di loop colorLoop ; ; Update the UI ; push si mov si, offset AreaList clr cx, dx ;cx <- 1st, dx <- det. mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION call ObjCallInstanceNoLock pop si clr cx ;cx <- 1st list mov ax, MSG_TUID_AREA_CHANGED call ObjCallInstanceNoLock done: ret PrefUICSetDefaultColor endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICDialogInit %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize the dialog CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: bx, cx, dx, di, bp PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/15/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICDialogInit method dynamic TweakUIDialogClass, MSG_PREF_INIT uses ax, si .enter ; ; See if the is B&W -- if so, we'll remove the Color section ; call UserGetDisplayType and ah, mask DT_DISP_CLASS cmp ah, DC_GRAY_1 shl (offset DT_DISP_CLASS) ja notBW ;branch if not B&W ; ; Set the Color stuff not usable ; mov si, offset ColorGroup mov ax, MSG_GEN_SET_NOT_USABLE mov dl, VUM_NOW call ObjCallInstanceNoLock notBW: ; ; see if a large screen -- if not, disable 18 point ; mov cx, GUQT_FIELD mov ax, MSG_GEN_GUP_QUERY call UserCallApplication mov di, bp call WinGetWinScreenBounds sub dx, bx inc dx cmp dx, 600 jae sizeOK mov si, offset FSL18 mov ax, MSG_GEN_SET_NOT_ENABLED mov dl, VUM_DELAYED_VIA_APP_QUEUE call ObjCallInstanceNoLock sizeOK: .leave mov ax, MSG_PREF_INIT mov di, offset TweakUIDialogClass GOTO ObjCallSuperNoLock PrefUICDialogInit endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DeleteCUILink %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Delete the CUI link ("NewDeal Desktop") CALLED BY: SetUIOptions PASS: none RETURN: none DESTROYED: ax, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/4/00 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalDefNLString deskDir <"DESKTOP",0> prodNameKey char "productName", 0 DeleteCUILink proc near uses ds, es, di, si productName local FileLongName .enter ; ; lock the strings block ; mov bx, handle Strings call MemLock ; ; get the product name ; push bp segmov ds, cs, cx mov si, offset uiCategory ;ds:si <- category mov dx, offset prodNameKey ;cx:dx <- key segmov es, ss lea di, ss:productName ;es:di <- buffer mov bp, InitFileReadFlags <0, 0, 0, (size FileLongName)> call InitFileReadString pop bp pushf DBCS < shl cx, 1 ;> add di, cx ;es:di <- offset popf jnc gotProd ; ; no product name, use the default ; mov bx, handle Strings call MemDerefDS mov si, offset cuiDefProdName mov si, ds:[si] ;ds:si <- product name ChunkSizePtr ds, si, cx ;cx <- size DBCS < shr cx, 1 ;cx <- length> dec cx ;cx <- don't copy NULL LocalCopyNString ; ; append " Desktop" ; gotProd: mov bx, handle Strings call MemDerefDS mov si, offset cuiDesktopString mov si, ds:[si] ;ds:si <- " Desktop" ChunkSizePtr ds, si, cx ;cx <- size DBCS < shr cx, 1 ;cx <- length > LocalCopyNString ; ; done with the strings block ; mov bx, handle Strings call MemUnlock ; ; delete the "NewDeal Desktop" (i.e., CUI) link ; call FilePushDir mov bx, SP_TOP ;bx <- StandardPath segmov ds, cs, cx mov dx, offset deskDir ;ds:dx <- path call FileSetCurrentPath segmov ds, ss lea dx, ss:productName ;ds:dx <- filename call FileDelete call FilePopDir .leave ret DeleteCUILink endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetUIOptions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the options for our CUI combo CALLED BY: PrefUICDialogApply PASS: ax - PrefUICombo RETURN: none DESTROYED: ax, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/4/00 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ UICombo struct UIC_environment BooleanByte UIC_specific nptr.TCHAR UIC_launcher nptr.TCHAR UIC_advLauncher nptr.TCHAR UICombo ends uicombos UICombo < BB_FALSE, offset MotifStr, offset NewManagerStr, 0 >,< BB_FALSE, offset NewUIStr, offset NewDeskStr, 0 >,< BB_TRUE, offset NewUIStr, offset WelcomeStr, offset NewDeskStr > haveEnvAppKey char "haveEnvironmentApp", 0 defaultLauncherKey char "defaultLauncher", 0 uiFeaturesCat char "uiFeatures", 0 uiAdvFeaturesCat char "uiFeatures - advanced", 0 if ERROR_CHECK LocalDefNLString MotifStr <"motifec.geo", 0> LocalDefNLString NewUIStr <"newuiec.geo", 0> LocalDefNLString NewManagerStr <"managere.geo", 0> LocalDefNLString NewDeskStr <"newdeske.geo", 0> LocalDefNLString WelcomeStr <"welcomee.geo", 0> else LocalDefNLString MotifStr <"motif.geo", 0> LocalDefNLString NewUIStr <"newui.geo", 0> LocalDefNLString NewManagerStr <"File Manager", 0> LocalDefNLString NewDeskStr <"newdesk.geo", 0> LocalDefNLString WelcomeStr <"welcome.geo", 0> endif SetUIOptions proc near uses ds, si, es .enter ; ; get the table entry ; mov di, (size UICombo) mul di mov di, ax ;di <- offset segmov ds, cs, cx mov es, cx ; ; handle haveEnvironmentApp key ; mov si, offset uiCategory mov dx, offset haveEnvAppKey mov al, cs:uicombos[di].UIC_environment clr ah call InitFileWriteBoolean tst ax jnz keepLink call DeleteCUILink keepLink: ; ; handle [ui] specific = key ; push di mov dx, offset specificKey mov di, cs:uicombos[di].UIC_specific call InitFileWriteString pop di ; ; handle [uiFeatures] defaultLauncher = key ; push di mov si, offset uiFeaturesCat mov dx, offset defaultLauncherKey mov di, cs:uicombos[di].UIC_launcher call InitFileWriteString pop di ; ; handle [uiFeatures - advanced] defaultLauncher = key ; push di mov si, offset uiAdvFeaturesCat mov di, cs:uicombos[di].UIC_advLauncher tst di jz noAdvLauncher call InitFileWriteString noAdvLauncher: pop di .leave ret SetUIOptions endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetINIColor %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the color value set in the .INI file or the default CALLED BY: PrefMgr PASS: di - PrefUIColor for which color to get RETURN: al - Color DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/24/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetINIColor proc near uses ds, si, di, dx, cx .enter ; ; Get the current setting, using the default if necessary ; mov al, cs:defaultMotifColors[di] ;ax <- default color shl di, 1 ;di <- table index segmov ds, cs, cx mov dx, cs:colorKeys[di] ;cx:dx <- key mov si, offset motifOptsCategory ;ds:si <- category call InitFileReadInteger .leave ret GetINIColor endp GetCurrentColor proc near uses ds .enter ; ; See if the user has set anything already ; segmov ds, idata, ax clr ax mov al, ds:titleBarColor[di] ;al <- Color cmp al, C_UNUSED_0 ;color set? jne gotColor ;branch if color set ; ; If not, get the .INI value or default ; call GetINIColor ;al <- Color gotColor: clr ah CheckHack <CF_INDEX eq 0> .leave ret GetCurrentColor endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefColorSelectorHasStateChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return whether the color list has changed CALLED BY: PrefMgr PASS: none RETURN: carry - set if the state has changed DESTROYED: di, ax PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/24/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICColorSelectorHasStateChanged method dynamic PrefUICColorSelectorClass, MSG_PREF_HAS_STATE_CHANGED uses cx .enter segmov ds, idata, ax clr di ;di <- PrefUIColor mov cx, PrefUIColor colorLoop: call GetINIColor cmp ds:titleBarColor[di], C_UNUSED_0 je colorNotChanged ;branch if not changed cmp ds:titleBarColor[di], al jne colorChanged ;exit if changed colorNotChanged: inc di loop colorLoop ;loop while more clc ;carry <- no change jmp done colorChanged: stc ;carry <- state changed done: .leave ret PrefUICColorSelectorHasStateChanged endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefColorSelectorReset %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a reset CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/24/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICColorSelectorReset method dynamic PrefUICColorSelectorClass, MSG_GEN_RESET ; ; Reset the user colors to indicate no change ; push ax, ds clr di mov cx, PrefUIColor segmov ds, idata, ax mov al, C_UNUSED_0 colorLoop: mov ds:titleBarColor[di], al inc di loop colorLoop pop ax, ds ; ; Call our superclass to do the work ; mov di, offset PrefUICColorSelectorClass call ObjCallSuperNoLock ; ; Reset our color to match what it should be ; call GetSelectedArea jc noneSelected mov di, cx ;di <- PrefUIColor call GetINIColor call UpdateColor noneSelected: ret PrefUICColorSelectorReset endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICColorChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Make a note of the color list being changed CALLED BY: PrefMgr PASS: dxcx - ColorQuad (dx = high, cx = low) bp - non-zero if indeterminate RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 3/24/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICColorChanged method dynamic PrefUICColorSelectorClass, MSG_COLOR_SELECTOR_SET_COLOR ; ; Call our superclass first to update the UI ; mov di, offset PrefUICColorSelectorClass call ObjCallSuperNoLock ; ; See if it is something we can't handle ; tst bp ;indeterminate? jnz resetScheme ;branch if so cmp ch, CF_INDEX ;indexed color? jne resetScheme ;branch if not ; ; See which area is selected ; call GetSelectedArea jc done ;branch if none ; ; Save the new color for that area ; push ds mov di, ax ;di <- PrefUIColor segmov ds, idata, ax mov ds:titleBarColor[di], cl ;save color pop ds ; ; Update the sample ; push cx mov si, offset ColorSample mov ax, MSG_VIS_REDRAW_ENTIRE_OBJECT call ObjCallInstanceNoLock ; ; See if the color has really changed ; mov si, offset SchemesList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock pop cx jc done ;branch if no scheme mov di, ax ;di <- scheme shl di, 1 mov di, cs:defaultColorLists[di] ;cs:di <- ptr to colors call GetSelectedArea jc done ;branch if none add di, ax ;adjust offset cmp cl, {Color}cs:[di] jne resetScheme ;branch if changed done: ret ; ; Deselect the scheme list if not the default ; resetScheme: mov si, offset SchemesList mov ax, MSG_GEN_ITEM_GROUP_SET_NONE_SELECTED mov dx, 1 ;dx <- indeterminate call ObjCallInstanceNoLock jmp done PrefUICColorChanged endm GetSelectedArea proc near uses cx, si, bp .enter mov si, offset AreaList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock .leave ret GetSelectedArea endp UpdateColor proc near uses si .enter CheckHack <CF_INDEX eq 0> clr ah ;ax <- Color mov cx, ax clr dx, bp ;dx:cx <- ColorQuad mov bx, handle ColorList mov si, offset ColorList mov ax, MSG_COLOR_SELECTOR_UPDATE_COLOR call ObjCallInstanceNoLock .leave ret UpdateColor endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefColorsSampleDraw %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw the color sample CALLED BY: MSG_VIS_DRAW PASS: bp - GState RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/15/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TITLE_BAR_POINTSIZE equ 9 TITLE_BAR_INSET equ 2 TITLE_BAR_HEIGHT equ 16 TITLE_BAR_TEXT_Y_OFFSET equ TITLE_BAR_INSET+2 TITLE_BAR_RIGHT_INSET equ 0 BUTTON_WIDTH equ 10 BUTTON_HEIGHT equ 10 BUTTON_INSET equ 3 WINDOW_TOP equ TITLE_BAR_HEIGHT+TITLE_BAR_INSET+2 WINDOW_INSET equ 3 HELP_TOP equ 12 HELP_WIDTH equ 50 HELP_RIGHT equ BUTTON_WIDTH+BUTTON_INSET+5 SELECTION_INSET equ WINDOW_INSET+5 SELECTION_HEIGHT equ TITLE_BAR_HEIGHT SELECTION_ADDED_WIDTH equ 6 CurAndStep struct CAS_cur WBFixed CAS_step WBFixed CurAndStep ends PrefColorsSampleDraw method dynamic PrefColorsSampleClass, MSG_VIS_DRAW bounds local Rectangle red local CurAndStep green local CurAndStep blue local CurAndStep curX local word ForceRef red ForceRef green ForceRef blue ForceRef curX mov di, bp .enter call GrSaveState call VisGetBounds mov ss:bounds.R_left, ax mov ss:bounds.R_top, bx mov ss:bounds.R_right, cx mov ss:bounds.R_bottom, dx ; ; Fill with the light color to start ; mov si, PUIC_LIGHT_ITEMS call getColor call GrSetAreaColor call getBounds call GrFillRect ; ; Draw the title bar ; mov si, PUIC_TITLE_BARS call getColor call GrSetAreaColor mov_tr dh, al ;dh <- title bar 1 mov si, PUIC_TITLE_BAR_GRADIENT call getColor ;al <- title bar 2 cmp al, dh ;same color? LONG jne drawGradientTitle ;branch if diff. colors call getBounds add ax, TITLE_BAR_INSET add bx, TITLE_BAR_INSET sub cx, TITLE_BAR_RIGHT_INSET mov dx, bx add dx, TITLE_BAR_HEIGHT call GrFillRect finishTitleBar: mov ax, C_WHITE call GrSetTextColor clr cx ;cx <- no ID clr ah mov dx, TITLE_BAR_POINTSIZE ;dx.ah <- pointsize call GrSetFont mov si, offset SampleText mov si, ds:[si] clr cx call GrTextWidth push dx call getBounds pop dx ; ; if running NewUI, put the text on the left else center it ; add ax, TITLE_BAR_INSET*2 call RunningNewUI jz notCentered sub cx, ax ;cx <- width sub cx, BUTTON_WIDTH sub cx, dx ;cx <- diff. shr cx, 1 ;cx <- center me add ax, cx notCentered: add bx, TITLE_BAR_TEXT_Y_OFFSET call GrDrawText ; ; Draw a partial bevel, and a button, too. ; mov ax, C_WHITE call GrSetLineColor call getBounds call GrDrawHLine call GrDrawVLine ;draw white bevel mov ax, C_LIGHT_GRAY call GrSetAreaColor call getBounds sub cx, BUTTON_INSET mov ax, cx sub ax, BUTTON_WIDTH add bx, BUTTON_INSET mov dx, bx add dx, BUTTON_HEIGHT call GrFillRect ;draw button background call GrDrawHLine call GrDrawVLine ;draw white button push ax mov si, PUIC_DARK_ITEMS call getColor call GrSetLineColor pop ax xchg ax, cx call GrDrawVLine xchg ax, cx mov bx, dx call GrDrawHLine ;draw dark button call getBounds mov ax, cx call GrDrawVLine ;draw dark bevel ; ; Draw a window view ; mov si, PUIC_FILE_MGR call getColor call GrSetAreaColor call getBounds add bx, WINDOW_TOP add ax, WINDOW_INSET sub cx, WINDOW_INSET call GrFillRect ; ; draw a mini help window ; mov si, PUIC_LIGHT_ITEMS call getColor call GrSetLineColor mov si, PUIC_HELP_BG call getColor call GrSetAreaColor call getBounds sub cx, HELP_RIGHT mov ax, cx sub ax, HELP_WIDTH add bx, HELP_TOP call GrFillRect call GrDrawRect ; ; draw a selection sample ; mov si, PUIC_SELECTIONS call getColor call GrSetAreaColor call getBounds clr cx ;cx <- NULL terminated mov si, offset SelectionSampleText mov si, ds:[si] ;ds:si <- text call GrTextWidth add dx, SELECTION_ADDED_WIDTH mov cx, dx ;cx <- width add bx, WINDOW_TOP+4 mov dx, bx add dx, SELECTION_HEIGHT ;dx <- bottom add ax, SELECTION_INSET ;ax <- left add cx, ax ;cx <- right call GrFillRect add ax, SELECTION_ADDED_WIDTH/2 add bx, 2 clr cx call GrDrawText call GrRestoreState .leave ret getColor: push di mov di, si ;di <- PrefUIColor call GetCurrentColor pop di retn getBounds: mov ax, ss:bounds.R_left mov bx, ss:bounds.R_top mov cx, ss:bounds.R_right mov dx, ss:bounds.R_bottom retn drawGradientTitle: xchg al, dh call DrawGradient jmp finishTitleBar PrefColorsSampleDraw endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DrawGradient %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw a gradient filled rectangle CALLED BY: PrefColorsSampleDraw PASS: ss:bp - inherited locals di - GState al - start color dh - end color RETURN: none none DESTROYED: ax, bx, cx, dx, si PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/28/01 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawGradient proc near .enter inherit PrefColorsSampleDraw mov ah, al ;ah <- start index call GrMapColorIndex push ax push bx mov ah, dh ;ah <- end index call GrMapColorIndex pop cx ;cl <- stG, ch <- stB pop dx ; ; start color: dl=R, cl=G, ch=B ; end color: al=R, bl=G, bh=B ; mov dh, al ;dh <- end R lea si, ss:red call CalcStep mov dl, cl ;dl <- start G mov dh, bl ;dh <- end G lea si, ss:green call CalcStep mov dl, ch ;dl <- start B mov dh, bh ;dh <- end B lea si, ss:blue call CalcStep ; ; set up the starting X pos ; mov ax, ss:bounds.R_left add ax, TITLE_BAR_INSET mov ss:curX, ax drawLoop: mov al, ss:red.CAS_cur.WBF_int.low mov bl, ss:green.CAS_cur.WBF_int.low mov bh, ss:blue.CAS_cur.WBF_int.low mov ah, CF_RGB call GrSetAreaColor mov ax, ss:curX mov cx, ax add cx, 2 mov bx, ss:bounds.R_top mov dx, ss:bounds.R_bottom add bx, TITLE_BAR_INSET mov dx, bx add dx, TITLE_BAR_HEIGHT call GrFillRect ; ; advance to next color and position ; inc ss:curX addwbf ss:red.CAS_cur, ss:red.CAS_step, ax addwbf ss:green.CAS_cur, ss:green.CAS_step, ax addwbf ss:blue.CAS_cur, ss:blue.CAS_step, ax ; ; reached right edge? ; mov cx, ss:bounds.R_right sub cx, TITLE_BAR_RIGHT_INSET cmp ss:curX, cx jbe drawLoop .leave ret DrawGradient endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CalcStep %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Draw a gradient filled rectangle CALLED BY: DrawGradient PASS: ss:bp - inherited locals dl - start color value (R,G or B) dh - end color value (R, G, or B) RETURN: none none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 2/28/01 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ CalcStep proc near uses ax, bx, cx, dx .enter inherit DrawGradient clr bx, ax mov ss:[si].CAS_cur.WBF_frac, al mov ss:[si].CAS_cur.WBF_int, ax mov ss:[si].CAS_cur.WBF_int.low, dl ;store start color mov al, dh ;al <- end color clr ah ;ax <- end color clr dh ;dx <- start color sub ax, dx ;ax <- color 'width' jz zeroStep ;branch if no step mov_tr dx, ax clr ax, cx ;dx.cx <- color width mov bx, ss:bounds.R_right sub bx, ss:bounds.R_left ;bx.ax <- rect. width call GrSDivWWFixed jnc gotValue zeroStep: clr dx, cx gotValue: rndwwbf dxcx ;round to dx.ch mov ss:[si].CAS_step.WBF_frac, ch mov ss:[si].CAS_step.WBF_int, dx .leave ret CalcStep endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefColorsSampleRecalcSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Resize the color sample CALLED BY: MSG_VIS_RECALC_SIZE PASS: none RETURN: cx - width dx - height DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/15/98 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefColorsSampleRecalcSize method dynamic PrefColorsSampleClass, MSG_VIS_RECALC_SIZE mov cx, PREF_COLORS_SAMPLE_WIDTH mov dx, PREF_COLORS_SAMPLE_HEIGHT ret PrefColorsSampleRecalcSize endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIDialogFontAreaChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The font area has been changed CALLED BY: MSG_TUID_FONT_AREA_CHANGED PASS: none RETURN: cx - TweakUIFontArea DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/17/00 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FontArea struct FA_category nptr.char FA_key nptr.char FA_default word FA_font FontID FontArea ends editableTextKey char "editableTextFontsize", 0 fontSizeKey char "fontsize", 0 fileMgrCategory char "file manager", 0 fontAreas FontArea \ <uiCategory, fontSizeKey, 10, 0>, <uiCategory, editableTextKey, 10, 0>, <fileMgrCategory, fontSizeKey, 9, FID_UNIVERSITY> TweakUIFontAreaFontAreaChanged method dynamic TweakUIFontAreaClass, MSG_TUIFA_FONT_AREA_CHANGED ; ; get the font size ; mov di, cx shl di, 1 push ds segmov ds, idata, ax ;ds <- idata mov ax, ds:menuFont[di] pop ds tst ax jnz gotFontSize call GetINIFontSize gotFontSize: ; ; set our size list to match ; push ax, cx mov_tr cx, ax clr dx mov ax, MSG_GEN_ITEM_GROUP_SET_SINGLE_SELECTION mov si, offset FontSizeList call ObjCallInstanceNoLock pop ax, cx ; ; set the font to what it should be ; call GetFontAreaEntry ;di <- FontArea mov cx, cs:fontAreas[di].FA_font tst cx jnz gotFont call UserGetDefaultMonikerFont gotFont: push ax mov dx, (size VisTextSetFontIDParams) sub sp, dx mov bp, sp mov ss:[bp].VTSFIDP_fontID, cx mov ax, MSG_VIS_TEXT_SET_FONT_ID mov si, offset FontSample call ObjCallInstanceNoLock add sp, (size VisTextSetFontIDParams) pop ax ; ; set the pointsize of the sample to match ; call UpdateSample ret TweakUIFontAreaFontAreaChanged endm UpdateSample proc near mov dx, (size VisTextSetPointSizeParams) sub sp, dx mov bp, sp mov ss:[bp].VTSPSP_pointSize.WWF_frac, 0 mov ss:[bp].VTSPSP_pointSize.WWF_int, ax mov ax, MSG_VIS_TEXT_SET_POINT_SIZE mov si, offset FontSample call ObjCallInstanceNoLock add sp, (size VisTextSetPointSizeParams) ret UpdateSample endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIFontAreaFontSizeChanged %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The font area has been changed CALLED BY: MSG_TUID_FONT_SIZE_CHANGED PASS: none RETURN: cx - fontsize DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/17/00 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIFontAreaFontSizeChanged method dynamic TweakUIFontAreaClass, MSG_TUIFA_FONT_SIZE_CHANGED ; ; save the font size in the appropriate slot ; mov di, ds:[si] add di, ds:[di].GenItemGroup_offset mov di, ds:[di].GIGI_selection shl di, 1 push ds segmov ds, idata, ax ;ds <- idata mov_tr ax, cx ;ax <- font size mov ds:menuFont[di], ax pop ds ; ; update the sample ; call UpdateSample ret TweakUIFontAreaFontSizeChanged endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GetINIFontSize %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the specified font size from the INI file CALLED BY: utility PASS: none RETURN: cx - TweakUIFontArea DESTROYED: ax - font size di - offset of FontArea entry PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/17/00 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ GetFontAreaEntry proc near uses ax, cx .enter mov ax, (size FontArea) mul cx mov_tr di, ax .leave ret GetFontAreaEntry endp GetINIFontSize proc near uses cx, dx, ds, si .enter call GetFontAreaEntry ; ; get the value for the category and key ; push ds segmov ds, cs, cx mov si, cs:fontAreas[di].FA_category mov dx, cs:fontAreas[di].FA_key mov ax, cs:fontAreas[di].FA_default call InitFileReadInteger pop ds .leave ret GetINIFontSize endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIFontAreaReset %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle a reset CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/18/00 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIFontAreaReset method dynamic TweakUIFontAreaClass, MSG_GEN_RESET ; ; call our superclass to do most of the work ; mov di, offset TweakUIFontAreaClass call ObjCallSuperNoLock ; ; reset the font sizes ; push ds segmov ds, idata, ax clr ax mov ds:menuFont, ax mov ds:editableFont, ax mov ds:folderFont, ax pop ds mov ax, MSG_GEN_ITEM_GROUP_SEND_STATUS_MSG GOTO ObjCallInstanceNoLock TweakUIFontAreaReset endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIFontAreaApply %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Handle an apply CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/18/00 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIFontAreaApply method dynamic TweakUIFontAreaClass, MSG_GEN_APPLY ; ; call our superclass to do most of the work ; mov di, offset TweakUIFontAreaClass call ObjCallSuperNoLock ; ; save the font sizes ; segmov ds, idata, ax clr di call saveSize call saveSize call saveSize ret saveSize: mov cx, di push di, ds, bp shl di, 1 mov bp, ds:menuFont[di] ;bp <- font size tst bp ;any size set? jz noWrite ;branch if not call GetFontAreaEntry ;di <- FontArea entry segmov ds, cs, cx mov si, cs:fontAreas[di].FA_category mov dx, cs:fontAreas[di].FA_key call InitFileWriteInteger noWrite: pop di, ds, bp inc di retn TweakUIFontAreaApply endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% TweakUIFontAreaGetRebootInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check if reboot needed CALLED BY: PrefMgr PASS: none RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- eca 4/18/00 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ TweakUIFontAreaGetRebootInfo method dynamic TweakUIFontAreaClass, MSG_PREF_GET_REBOOT_INFO ; ; if any changes, signal reboot ; segmov ds, idata, ax mov cx, ds:menuFont ornf cx, ds:editableFont ornf cx, ds:folderFont jcxz done ;branch if no changes mov cx, handle PrefUIFontRebootString mov dx, offset PrefUIFontRebootString done: ret TweakUIFontAreaGetRebootInfo endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICInitSchemeList %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize our dynamic list CALLED BY: MSG_PREF_DYNAMIC_LIST_BUILD_ARRAY PASS: none RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/7/01 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICInitSchemeList method dynamic PrefUICSchemeListClass, MSG_PREF_DYNAMIC_LIST_BUILD_ARRAY ; ; don't include 256 color schemes if on 16 color system ; mov cx, PrefUIDefaultColorScheme call UserGetDisplayType and ah, mask DT_DISP_CLASS cmp ah, DC_COLOR_4 shl (offset DT_DISP_CLASS) ja gotNumItems mov cx, 3 ;cx <- gotNumItems: mov ax, MSG_GEN_DYNAMIC_LIST_INITIALIZE GOTO ObjCallInstanceNoLock PrefUICInitSchemeList endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICFindSchemeItem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find our entry in the dynamic list CALLED BY: MSG_PREF_DYNAMIC_LIST_FIND_ITEM PASS: cx:dx - ptr to NULL terminated string bp - non-zero to find best fit, else exact RETURN: if found: carry - clear ax - item # else: carry - set ax - item after requested item DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/7/01 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICFindSchemeItem method dynamic PrefUICSchemeListClass, MSG_PREF_DYNAMIC_LIST_FIND_ITEM movdw esdi, cxdx ;es:di <- match clr dx ;dx <- assume exact tst bp ;best fit? jz gotStrLen ;branch if not call LocalStringLength mov dx, cx ;dx <- length to match gotStrLen: mov bx, handle SchemeStrings call MemLock mov ds, ax mov bx, offset SLDI1 ;*ds:bx <- 1st string clr ax findLoop: push cx mov si, ds:[bx] ;ds:si <- string mov cx, dx ;cx <- length call LocalCmpStringsNoCase pop cx clc ;carry <- in case match je foundString ;branch if match add bx, (size lptr) ;*ds:bx <- next string inc ax ;ax <- next item # loop findLoop clr ax ;ax <- no match stc ;carry <- no match foundString: mov bx, handle SchemeStrings GOTO MemUnlock PrefUICFindSchemeItem endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICGetSchemeMoniker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the requested moniker for our scheme list CALLED BY: MSG_PREF_ITEM_GROUP_GET_ITEM_MONIKER PASS: ss:bp - GetItemMonikerParams RETURN: bp - # of characters in moniker DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/7/01 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ForceRef SLDI2 ForceRef SLDI3 ForceRef SLDI4 ForceRef SLDI5 ForceRef SLDI6 ForceRef SLDI7 ForceRef SLDI8 ForceRef SLDI9 ForceRef SLDI10 ForceRef SLDI11 ForceRef SLDI12 ForceRef SLDI13 ForceRef SLDI14 ForceRef SLDI15 ForceRef SLDI16 ForceRef SLDI17 ForceRef SLDI18 ForceRef SLDI19 PrefUICGetSchemeMoniker method dynamic PrefUICSchemeListClass, MSG_PREF_ITEM_GROUP_GET_ITEM_MONIKER mov bx, handle SchemeStrings call MemLock mov ds, ax mov si, ss:[bp].GIMP_identifier ;si <- identififer shl si, 1 ;si <- offset add si, offset SLDI1 ;si <- handle mov si, ds:[si] ;ds:si <- string ChunkSizePtr ds, si, cx ;cx <- # bytes movdw esdi, ss:[bp].GIMP_buffer ;es:di <- dest mov bp, cx DBCS < shr cx, 1 ;> LocalCopyNString GOTO MemUnlock PrefUICGetSchemeMoniker endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefUICSchemeListSave %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Save a color scheme CALLED BY: MSG_PUIC_SCHEME_LIST_SAVE PASS: none RETURN: none DESTROYED: none PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/8/01 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefUICSchemeListSave method dynamic PrefUICSchemeListClass, MSG_PUIC_SCHEME_LIST_SAVE nameBuf local COLOR_SCHEME_MAX_NAME_LENGTH dup (TCHAR) .enter ; ; get the name for the scheme ; push bp mov si, offset STSADName mov dx, ss lea bp, ss:nameBuf mov ax, MSG_VIS_TEXT_GET_ALL_PTR call ObjCallInstanceNoLock pop bp jcxz noText ; ; get the schemes file ; call OpenCreateSchemesFile ; ; close the schemes file ; call CloseSchemesFile noText: .leave ret PrefUICSchemeListSave endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% OpenCreateSchemesFile, CloseSchemesFile %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Open the schemes file, creating if necessary CALLED BY: PrefUICSchemeListSave() PASS: none RETURN: carry - set if error bx - handle of schemes file *ds:si - name array DESTROYED: ax, dx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/8/01 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalDefNLString schemeFileName, <"Color Schemes", 0> OpenCreateSchemesFile proc near uses bp .enter ; ; go to PRIVDATA ; call FilePushDir mov ax, SP_PRIVATE_DATA call FileSetStandardPath ; ; try to open the file ; mov ah, VMO_CREATE ;ah <- VMOpenType mov al, mask VMAF_FORCE_READ_WRITE ;al <- VMAccessFlags clr cx ;cx <- default compr. segmov ds, cs mov dx, offset schemeFileName ;ds:dx <- filename call VMOpen cmp ax, VM_CREATE_OK ;created? je initFile ;branch if so ; ; lock the map block ; call VMGetMapBlock call VMLock mov ds, ax ;ds <- seg addr of blk mov si, (size LMemBlockHeader) done: call FilePopDir .leave ret initFile: ; ; create a name array block ; push bx mov ax, LMEM_TYPE_GENERAL ;ax <- LMemType clr cx ;cx <- default header call MemAllocLMem push bx call MemLock mov ds, ax ;ds <- block mov bx, (size ColorSchemeStruct) ;bx <- element size clr ax, cx, si ;cx <- default header ;al <- ObjChunkFlags ;si <- alloc chunk call NameArrayCreate pop cx ;cx <- mem block pop bx ;bx <- VM file handle ; ; attach it to the VM file ; clr ax ;ax <- alloc VM block call VMAttach ; ; make it the map block ; call VMSetMapBlock clc ;carry <- no error jmp done OpenCreateSchemesFile endp CloseSchemesFile proc near uses bp .enter ; ; unlock the name array ; mov bp, ds:[LMBH_handle] call VMUnlock ; ; close the file ; clr al call VMClose .leave ret CloseSchemesFile endp TweakUICode ends
22.276912
80
0.595886
c6839118f1ab525ec305c1c4868d1f36bcd7b792
617
asm
Assembly
oeis/084/A084948.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/084/A084948.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/084/A084948.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A084948: a(n) = Product_{i=0..n-1} (8*i+2). ; 1,2,20,360,9360,318240,13366080,668304000,38761632000,2558267712000,189311810688000,15523568476416000,1397121162877440000,136917873961989120000,14513294639970846720000,1654515588956676526080000,201850901852714536181760000,26240617240852889703628800000,3621205179237698779100774400000,528695956168704021748713062400000,81419177249980419349301811609600000,13189906714496827934586893480755200000,2242284141464460748879771891728384000000,399126577180674013300599396727652352000000 mul $0,4 add $0,1 mov $2,3 lpb $0 sub $0,4 mul $2,2 mul $2,$0 lpe mov $0,$2 div $0,3
44.071429
478
0.849271
8717c27e1d962faa747e17f80eaf7c2097d42c40
1,564
asm
Assembly
programs/oeis/329/A329723.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/329/A329723.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/329/A329723.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A329723: Coefficients of expansion of (1-2x^3)/(1-x-x^2) in powers of x. ; 1,1,2,1,3,4,7,11,18,29,47,76,123,199,322,521,843,1364,2207,3571,5778,9349,15127,24476,39603,64079,103682,167761,271443,439204,710647,1149851,1860498,3010349,4870847,7881196,12752043,20633239,33385282,54018521,87403803,141422324,228826127,370248451,599074578,969323029,1568397607,2537720636,4106118243,6643838879,10749957122,17393796001,28143753123,45537549124,73681302247,119218851371,192900153618,312119004989,505019158607,817138163596,1322157322203,2139295485799,3461452808002,5600748293801,9062201101803,14662949395604,23725150497407,38388099893011,62113250390418,100501350283429,162614600673847,263115950957276,425730551631123,688846502588399,1114577054219522,1803423556807921,2918000611027443,4721424167835364,7639424778862807,12360848946698171,20000273725560978,32361122672259149,52361396397820127,84722519070079276,137083915467899403,221806434537978679,358890350005878082,580696784543856761,939587134549734843,1520283919093591604,2459871053643326447,3980154972736918051,6440026026380244498,10420180999117162549,16860207025497407047,27280388024614569596,44140595050111976643,71420983074726546239,115561578124838522882,186982561199565069121 mov $4,2 mov $8,$0 lpb $4 mov $0,$8 mov $3,0 sub $4,1 add $0,$4 sub $0,1 mov $5,1 mov $6,2 lpb $0 sub $0,1 mov $3,$5 add $5,$6 mov $6,$3 mul $3,2 lpe mov $2,$4 add $3,1 mov $7,$3 lpb $2 mov $1,$7 sub $2,1 lpe lpe lpb $8 sub $1,$7 mov $8,0 lpe sub $1,2 div $1,2 add $1,1 mov $0,$1
42.27027
1,147
0.799233
35b17143d1bf7b1f4040a0607ac04d875f2b76eb
4,376
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_748.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_748.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_748.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r15 push %rbx push %rdi push %rdx lea addresses_normal_ht+0x2797, %rdx nop nop nop dec %r15 vmovups (%rdx), %ymm4 vextracti128 $0, %ymm4, %xmm4 vpextrq $0, %xmm4, %rbx nop nop nop add $18747, %rdi pop %rdx pop %rdi pop %rbx pop %r15 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r15 push %r8 push %r9 push %rax push %rcx // Store lea addresses_WT+0x1256f, %rcx nop nop nop add $42836, %r9 mov $0x5152535455565758, %r14 movq %r14, %xmm2 movups %xmm2, (%rcx) nop nop nop nop sub $17494, %rcx // Faulty Load lea addresses_normal+0x1ba47, %r15 nop and %r8, %r8 movb (%r15), %r14b lea oracles, %rcx and $0xff, %r14 shlq $12, %r14 mov (%rcx,%r14,1), %r14 pop %rcx pop %rax pop %r9 pop %r8 pop %r15 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3}} {'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 */
54.7
2,999
0.663163
2f69092acbbb21bdccac1d1b309bdc97b6c64118
24,266
asm
Assembly
non_regression/other_x86_linux_11.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
1
2021-02-28T21:31:18.000Z
2021-02-28T21:31:18.000Z
non_regression/other_x86_linux_11.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
non_regression/other_x86_linux_11.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
.file "gzlib.c" .section .rodata.str1.1,"aMS",@progbits,1 .LC1: .string "<fd:%d>" .LC2: .byte 0 .LC3: .string "out of memory" .LC4: .string ": " .LC5: .string "%s%s%s" .LC0: .string "%s" # ---------------------- .section .rodata .align 4 .LC00000000: .long .L263@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L19@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L18@GOTOFF .long .L8@GOTOFF .long .L20@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L12@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L16@GOTOFF .long .L8@GOTOFF .long .L17@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L10@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L8@GOTOFF .long .L11@GOTOFF .long .L15@GOTOFF # ---------------------- .text .globl gzopen .type gzopen, @function gzopen: pushl %ebp movl %esp, %ebp subl $12, %esp pushl 12(%ebp) pushl $-1 pushl 8(%ebp) call gz_open .L00000013: leave ret .size gzopen, .-gzopen # ---------------------- .L00000015: .p2align 3 # ---------------------- .globl gzopen64 .type gzopen64, @function gzopen64: pushl %ebp movl %esp, %ebp subl $12, %esp pushl 12(%ebp) pushl $-1 pushl 8(%ebp) call gz_open .L0000002B: leave ret .size gzopen64, .-gzopen64 # ---------------------- .L0000002D: .p2align 3 # ---------------------- .globl gzdopen .type gzdopen, @function gzdopen: pushl %ebp movl %esp, %ebp pushl %edi pushl %esi pushl %ebx subl $12, %esp movl 8(%ebp), %esi call .L00000041 .L00000041: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx cmpl $-1, %esi je .L00000094 .L0000004D: subl $12, %esp pushl $19 call malloc@PLT .L00000057: addl $16, %esp testl %eax, %eax movl %eax, %edi je .L00000094 .L00000060: pushl %esi leal .LC1@GOTOFF(%ebx), %edx pushl %edx pushl $19 pushl %eax call snprintf@PLT .L00000070: addl $12, %esp pushl 12(%ebp) pushl %esi pushl %edi call gz_open .L0000007D: movl %eax, %esi movl %edi, (%esp) call free@PLT .L00000087: movl %esi, %eax .L00000089: leal -12(%ebp), %esp popl %ebx popl %esi popl %edi leave ret .L00000091: .p2align 2 .L00000094: xorl %eax, %eax jmp .L00000089 .size gzdopen, .-gzdopen # ---------------------- .globl gzbuffer .type gzbuffer, @function gzbuffer: pushl %ebp movl %esp, %ebp movl 8(%ebp), %ecx testl %ecx, %ecx pushl %esi movl 12(%ebp), %eax movl $-1, %esi je .L000000C3 .L000000AB: movl 16(%ecx), %edx cmpl $7247, %edx je .L000000CC .L000000B6: cmpl $31153, %edx movl $-1, %esi je .L000000CC .L000000C3: movl %esi, %eax movl (%esp), %esi leave ret .L000000CA: .p2align 2 .L000000CC: movl 28(%ecx), %esi testl %esi, %esi je .L000000DC .L000000D3: movl $-1, %esi jmp .L000000C3 .L000000DA: .p2align 2 .L000000DC: cmpl $1, %eax ja .L000000E6 .L000000E1: movl $2, %eax .L000000E6: movl %eax, 32(%ecx) xorl %esi, %esi jmp .L000000C3 .size gzbuffer, .-gzbuffer # ---------------------- .L000000ED: .p2align 3 # ---------------------- .globl gzrewind .type gzrewind, @function gzrewind: pushl %ebp movl %esp, %ebp pushl %esi movl 8(%ebp), %esi pushl %ebx call .L000000FD .L000000FD: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx testl %esi, %esi movl $-1, %edx je .L0000011B .L0000010D: cmpl $7247, 16(%esi) je .L00000124 .L00000116: movl $-1, %edx .L0000011B: leal -8(%ebp), %esp popl %ebx movl %edx, %eax popl %esi leave ret .L00000124: movl 88(%esi), %eax testl %eax, %eax je .L00000130 .L0000012B: cmpl $-5, %eax jne .L00000116 .L00000130: pushl $0 pushl 56(%esi) pushl 52(%esi) pushl 20(%esi) call lseek64@PLT .L00000140: andl %edx, %eax addl $16, %esp incl %eax movl $-1, %edx je .L0000011B .L0000014D: cmpl $7247, 16(%esi) movl $0, (%esi) je .L0000018A .L0000015C: movl $0, 84(%esi) pushl %ecx pushl $0 pushl $0 pushl %esi call gz_error .L0000016E: addl $16, %esp movl $0, 8(%esi) movl $0, 12(%esi) movl $0, 100(%esi) xorl %edx, %edx jmp .L0000011B .L0000018A: movl $0, 60(%esi) movl $0, 64(%esi) movl $0, 48(%esi) jmp .L0000015C .size gzrewind, .-gzrewind # ---------------------- .L000001A1: .p2align 2 # ---------------------- .globl gzseek64 .type gzseek64, @function gzseek64: pushl %ebp movl %esp, %ebp pushl %edi pushl %esi pushl %ebx subl $44, %esp movl 8(%ebp), %edx call .L000001B5 .L000001B5: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx testl %edx, %edx movl 12(%ebp), %esi movl 16(%ebp), %edi movl 20(%ebp), %ecx movl $-1, -24(%ebp) movl $-1, -20(%ebp) je .L000001F9 .L000001D7: movl 8(%ebp), %edx movl 16(%edx), %eax cmpl $7247, %eax je .L00000208 .L000001E4: cmpl $31153, %eax movl $-1, -24(%ebp) movl $-1, -20(%ebp) je .L00000208 .L000001F9: movl -24(%ebp), %eax movl -20(%ebp), %edx leal -12(%ebp), %esp popl %ebx popl %esi popl %edi leave ret .L00000207: .p2align 3 .L00000208: movl 8(%ebp), %edx movl 88(%edx), %eax testl %eax, %eax je .L00000225 .L00000212: cmpl $-5, %eax movl $-1, -24(%ebp) movl $-1, -20(%ebp) jne .L000001F9 .L00000225: cmpl $1, %ecx movl $-1, -24(%ebp) movl $-1, -20(%ebp) ja .L000001F9 .L00000238: testl %ecx, %ecx jne .L000003E8 .L00000240: movl 8(%ebp), %eax subl 8(%eax), %esi sbbl 12(%eax), %edi .L00000249: movl 8(%ebp), %ecx movl 16(%ecx), %edx cmpl $7247, %edx movl $0, 84(%ecx) movl %edx, -44(%ebp) movl %edx, -28(%ebp) je .L00000344 .L00000268: testl %edi, %edi js .L000002D8 .L0000026C: cmpl $7247, -44(%ebp) je .L0000029F .L00000275: movl %edi, %edx orl %esi, %edx je .L0000028B .L0000027B: movl 8(%ebp), %eax movl $1, 84(%eax) movl %esi, 76(%eax) movl %edi, 80(%eax) .L0000028B: movl 8(%ebp), %edx addl 8(%edx), %esi adcl 12(%edx), %edi movl %esi, -24(%ebp) movl %edi, -20(%ebp) jmp .L000001F9 .L0000029F: xorl %ecx, %ecx movl 8(%ebp), %edx cmpl %edi, %ecx movl (%edx), %eax jl .L000002CF .L000002AA: jg .L000002B0 .L000002AC: cmpl %esi, %eax jbe .L000002CF .L000002B0: movl 8(%ebp), %ecx movl %esi, %eax movl (%ecx), %edx .L000002B7: movl 8(%ebp), %ecx subl %eax, %edx movl %edx, (%ecx) addl %eax, 4(%ecx) xorl %edx, %edx addl %eax, 8(%ecx) adcl %edx, 12(%ecx) subl %eax, %esi sbbl %edx, %edi jmp .L00000275 .L000002CF: movl 8(%ebp), %ecx movl (%ecx), %eax movl %eax, %edx jmp .L000002B7 .L000002D8: cmpl $7247, -28(%ebp) movl $-1, -24(%ebp) movl $-1, -20(%ebp) jne .L000001F9 .L000002F3: movl 8(%ebp), %edx addl 8(%edx), %esi adcl 12(%edx), %edi testl %edi, %edi movl $-1, -24(%ebp) movl $-1, -20(%ebp) js .L000001F9 .L00000312: subl $12, %esp pushl 8(%ebp) call gzrewind@PLT .L0000031D: addl $16, %esp incl %eax movl $-1, -24(%ebp) movl $-1, -20(%ebp) je .L000001F9 .L00000335: movl 8(%ebp), %ecx movl 16(%ecx), %eax movl %eax, -44(%ebp) jmp .L0000026C .L00000343: .p2align 2 .L00000344: cmpl $1, 48(%ecx) jne .L00000268 .L0000034E: movl 8(%ecx), %eax addl %esi, %eax movl 12(%ecx), %edx adcl %edi, %edx testl %edx, %edx js .L00000268 .L00000360: pushl $1 movl (%ecx), %eax xorl %edx, %edx movl %eax, -40(%ebp) movl %esi, %eax subl -40(%ebp), %eax movl %edx, -36(%ebp) movl %edi, %edx sbbl -36(%ebp), %edx pushl %edx pushl %eax pushl 20(%ecx) call lseek64@PLT .L00000380: andl %edx, %eax addl $16, %esp incl %eax movl $-1, -24(%ebp) movl $-1, -20(%ebp) je .L000001F9 .L0000039A: movl 8(%ebp), %ecx movl $0, (%ecx) movl $0, 60(%ecx) movl $0, 64(%ecx) movl $0, 84(%ecx) pushl %eax pushl $0 pushl $0 pushl %ecx call gz_error .L000003C3: movl 8(%ebp), %ecx movl 8(%ecx), %eax addl %esi, %eax movl 12(%ecx), %edx adcl %edi, %edx movl $0, 100(%ecx) movl %eax, 8(%ecx) movl %edx, 12(%ecx) movl %eax, -24(%ebp) movl %edx, -20(%ebp) jmp .L000001F9 .L000003E8: movl 8(%ebp), %eax movl 84(%eax), %ecx testl %ecx, %ecx je .L00000249 .L000003F6: addl 76(%eax), %esi adcl 80(%eax), %edi jmp .L00000249 .size gzseek64, .-gzseek64 # ---------------------- .L00000401: .p2align 2 # ---------------------- .globl gzseek .type gzseek, @function gzseek: pushl %ebp movl %esp, %ebp pushl %edi pushl %esi pushl %ebx subl $12, %esp movl 12(%ebp), %eax pushl 16(%ebp) cltd pushl %edx pushl %eax call .L0000041B .L0000041B: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx pushl 8(%ebp) call gzseek64@PLT .L0000042A: movl %edx, %edi movl %eax, %esi cltd movl %edi, %ecx xorl %esi, %eax xorl %edx, %ecx addl $16, %esp orl %eax, %ecx sete %dl movzbl %dl, %eax leal -12(%ebp), %esp popl %ebx decl %eax orl %esi, %eax popl %esi popl %edi leave ret .size gzseek, .-gzseek # ---------------------- .L0000044B: .p2align 2 # ---------------------- .globl gztell64 .type gztell64, @function gztell64: pushl %ebp movl %esp, %ebp pushl %esi movl 8(%ebp), %esi testl %esi, %esi movl $-1, %eax movl $-1, %edx je .L0000047E .L00000461: movl 16(%esi), %ecx cmpl $7247, %ecx je .L00000484 .L0000046C: cmpl $31153, %ecx movl $-1, %eax movl $-1, %edx je .L00000484 .L0000047E: movl (%esp), %esi leave ret .L00000483: .p2align 2 .L00000484: movl 84(%esi), %ecx testl %ecx, %ecx movl 8(%esi), %eax movl 12(%esi), %edx je .L0000047E .L00000491: addl 76(%esi), %eax adcl 80(%esi), %edx jmp .L0000047E .size gztell64, .-gztell64 # ---------------------- .L00000499: .p2align 2 # ---------------------- .globl gztell .type gztell, @function gztell: pushl %ebp movl %esp, %ebp pushl %edi pushl %esi pushl %ebx subl $24, %esp call .L000004AA .L000004AA: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx pushl 8(%ebp) call gztell64@PLT .L000004B9: movl %edx, %edi movl %eax, %esi cltd movl %edi, %ecx xorl %esi, %eax xorl %edx, %ecx addl $16, %esp orl %eax, %ecx sete %dl movzbl %dl, %eax leal -12(%ebp), %esp popl %ebx decl %eax orl %esi, %eax popl %esi popl %edi leave ret .size gztell, .-gztell # ---------------------- .L000004DA: .p2align 2 # ---------------------- .globl gzoffset64 .type gzoffset64, @function gzoffset64: pushl %ebp movl %esp, %ebp pushl %edi pushl %esi pushl %ebx subl $12, %esp movl 8(%ebp), %eax call .L000004ED .L000004ED: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx testl %eax, %eax movl $-1, %edx movl $-1, %ecx je .L00000520 .L00000502: movl 8(%ebp), %ecx movl 16(%ecx), %eax cmpl $7247, %eax je .L0000052C .L0000050F: cmpl $31153, %eax movl $-1, %edx movl $-1, %ecx je .L0000052C .L00000520: leal -12(%ebp), %esp popl %ebx popl %esi movl %edx, %eax popl %edi movl %ecx, %edx leave ret .L0000052C: pushl $1 pushl $0 pushl $0 movl 8(%ebp), %eax pushl 20(%eax) call lseek64@PLT .L0000053D: movl %eax, %esi andl %edx, %eax addl $16, %esp incl %eax movl %edx, %edi movl $-1, %ecx movl $-1, %edx je .L00000520 .L00000553: movl 8(%ebp), %eax cmpl $7247, 16(%eax) je .L00000565 .L0000055F: movl %esi, %edx movl %edi, %ecx jmp .L00000520 .L00000565: movl 100(%eax), %edx xorl %ecx, %ecx subl %edx, %esi sbbl %ecx, %edi jmp .L0000055F .size gzoffset64, .-gzoffset64 # ---------------------- .globl gzoffset .type gzoffset, @function gzoffset: pushl %ebp movl %esp, %ebp pushl %edi pushl %esi pushl %ebx subl $24, %esp call .L0000057E .L0000057E: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx pushl 8(%ebp) call gzoffset64@PLT .L0000058D: movl %edx, %edi movl %eax, %esi cltd movl %edi, %ecx xorl %esi, %eax xorl %edx, %ecx addl $16, %esp orl %eax, %ecx sete %dl movzbl %dl, %eax leal -12(%ebp), %esp popl %ebx decl %eax orl %esi, %eax popl %esi popl %edi leave ret .size gzoffset, .-gzoffset # ---------------------- .L000005AE: .p2align 3 # ---------------------- .globl gzeof .type gzeof, @function gzeof: pushl %ebp movl %esp, %ebp movl 8(%ebp), %ecx xorl %eax, %eax testl %ecx, %ecx je .L000005D1 .L000005BC: movl 16(%ecx), %edx cmpl $7247, %edx je .L000005D4 .L000005C7: xorl %eax, %eax cmpl $31153, %edx je .L000005D4 .L000005D1: leave ret .L000005D3: .p2align 2 .L000005D4: cmpl $7247, 16(%ecx) je .L000005E4 .L000005DD: xorl %eax, %eax jmp .L000005D1 .L000005E1: .p2align 2 .L000005E4: movl 64(%ecx), %eax jmp .L000005D1 .size gzeof, .-gzeof # ---------------------- .L000005E9: .p2align 2 # ---------------------- .globl gzerror .type gzerror, @function gzerror: pushl %ebp movl %esp, %ebp movl 8(%ebp), %ecx pushl %esi pushl %ebx xorl %eax, %eax call .L000005FB .L000005FB: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx testl %ecx, %ecx movl 12(%ebp), %esi je .L0000061E .L00000609: movl 16(%ecx), %edx cmpl $7247, %edx je .L00000624 .L00000614: xorl %eax, %eax cmpl $31153, %edx je .L00000624 .L0000061E: popl %ebx popl %esi leave ret .L00000622: .p2align 2 .L00000624: testl %esi, %esi je .L0000062D .L00000628: movl 88(%ecx), %edx movl %edx, (%esi) .L0000062D: cmpl $-4, 88(%ecx) je .L00000644 .L00000633: movl 92(%ecx), %eax testl %eax, %eax jne .L0000061E .L0000063A: leal .LC2@GOTOFF(%ebx), %eax jmp .L0000061E .L00000642: .p2align 2 .L00000644: leal .LC3@GOTOFF(%ebx), %eax jmp .L0000061E .size gzerror, .-gzerror # ---------------------- .globl gzclearerr .type gzclearerr, @function gzclearerr: pushl %ebp movl %esp, %ebp subl $8, %esp movl 8(%ebp), %edx testl %edx, %edx je .L0000066A .L00000659: movl 16(%edx), %eax cmpl $7247, %eax je .L0000067C .L00000663: cmpl $31153, %eax je .L0000066C .L0000066A: leave ret .L0000066C: pushl %eax pushl $0 pushl $0 pushl %edx call gz_error .L00000677: jmp .L0000066A .L00000679: .p2align 2 .L0000067C: movl $0, 60(%edx) movl $0, 64(%edx) jmp .L0000066C .size gzclearerr, .-gzclearerr # ---------------------- .hidden gz_error .globl gz_error .type gz_error, @function gz_error: pushl %ebp movl %esp, %ebp pushl %edi pushl %esi pushl %ebx subl $12, %esp movl 8(%ebp), %esi movl 92(%esi), %eax call .L000006A0 .L000006A0: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx testl %eax, %eax movl 12(%ebp), %edi je .L000006C7 .L000006AE: cmpl $-4, 88(%esi) je .L000006C0 .L000006B4: subl $12, %esp pushl %eax call free@PLT .L000006BD: addl $16, %esp .L000006C0: movl $0, 92(%esi) .L000006C7: testl %edi, %edi je .L000006D6 .L000006CB: cmpl $-5, %edi je .L000006D6 .L000006D0: movl $0, (%esi) .L000006D6: movl 16(%ebp), %edx testl %edx, %edx movl %edi, 88(%esi) je .L00000752 .L000006E0: cmpl $-4, %edi je .L00000752 .L000006E5: movl 24(%esi), %edi xorl %eax, %eax cld movl $-1, %ecx repnz scasb movl %ecx, %edx movl 16(%ebp), %edi movl $-1, %ecx repnz scasb notl %ecx subl $12, %esp subl %edx, %ecx pushl %ecx call malloc@PLT .L0000070B: addl $16, %esp testl %eax, %eax movl %eax, %edx movl %eax, 92(%esi) je .L0000075C .L00000717: subl $8, %esp pushl 16(%ebp) leal .LC4@GOTOFF(%ebx), %edi pushl %edi pushl 24(%esi) leal .LC5@GOTOFF(%ebx), %ecx pushl %ecx movl 24(%esi), %edi cld xorl %eax, %eax movl $-1, %ecx repnz scasb movl %ecx, %esi movl 16(%ebp), %edi movl $-1, %ecx repnz scasb notl %ecx subl %esi, %ecx pushl %ecx pushl %edx call snprintf@PLT .L00000752: leal -12(%ebp), %esp popl %ebx popl %esi popl %edi leave ret .L0000075A: .p2align 2 .L0000075C: movl $-4, 88(%esi) jmp .L00000752 .size gz_error, .-gz_error # ---------------------- .L00000765: .p2align 3 # ---------------------- .local gz_open .type gz_open, @function gz_open: pushl %ebp movl %esp, %ebp pushl %edi pushl %esi pushl %ebx subl $12, %esp movl 8(%ebp), %edx call .L00000779 .L00000779: popl %ebx addl $_GLOBAL_OFFSET_TABLE_+1, %ebx xorl %eax, %eax testl %edx, %edx movl 16(%ebp), %edi movl $0, -16(%ebp) je .L000008F3 .L00000794: subl $12, %esp pushl $152 call malloc@PLT .L000007A1: movl %eax, %esi addl $16, %esp xorl %eax, %eax testl %esi, %esi je .L000008F3 .L000007B0: movl $0, 28(%esi) movl $8192, 32(%esi) movl $0, 92(%esi) movl $0, 16(%esi) movl $-1, 68(%esi) movl $0, 72(%esi) movl $0, 44(%esi) movb (%edi), %dl testb %dl, %dl je .L00000806 .L000007E7: .p2align 3 .L000007E8: leal -48(%edx), %ecx cmpb $9, %cl ja .L000009B4 .L000007F4: movsbl %dl, %ecx subl $48, %ecx movl %ecx, 68(%esi) .L8: incl %edi movb (%edi), %cl testb %cl, %cl movb %cl, %dl jne .L000007E8 .L00000806: movl 16(%esi), %eax testl %eax, %eax je .L263 .L00000811: cmpl $7247, %eax je .L000009A1 .L0000081C: xorl %eax, %eax movl 8(%ebp), %edi cld movl $-1, %ecx repnz scasb movl %ecx, -20(%ebp) subl $12, %esp notl -20(%ebp) pushl -20(%ebp) call malloc@PLT .L0000083A: addl $16, %esp testl %eax, %eax movl %eax, 24(%esi) je .L263 .L00000848: pushl 8(%ebp) leal .LC0@GOTOFF(%ebx), %edi pushl %edi pushl -20(%ebp) pushl %eax call snprintf@PLT .L0000085B: movl 16(%esi), %edx addl $16, %esp cmpl $7247, %edx je .L0000098F .L0000086D: xorl %eax, %eax cmpl $0, -16(%ebp) setne %al decl %eax andl $-128, %eax addl $193, %eax cmpl $31153, %edx je .L00000985 .L0000088B: orl $33792, %eax .L00000890: cmpl $-1, 12(%ebp) jle .L0000096E .L0000089A: movl 12(%ebp), %eax .L0000089D: movl %eax, 20(%esi) incl %eax je .L00000955 .L000008A7: movl 16(%esi), %eax cmpl $1, %eax je .L00000944 .L000008B3: cmpl $7247, %eax je .L00000912 .L000008BA: cmpl $7247, %eax movl $0, (%esi) je .L000008FB .L000008C7: pushl %eax pushl $0 pushl $0 pushl %esi movl $0, 84(%esi) call gz_error .L000008D9: addl $16, %esp movl $0, 8(%esi) movl $0, 12(%esi) movl $0, 100(%esi) movl %esi, %eax .L000008F3: leal -12(%ebp), %esp popl %ebx popl %esi popl %edi leave ret .L000008FB: movl $0, 60(%esi) movl $0, 64(%esi) movl $0, 48(%esi) jmp .L000008C7 .L00000912: pushl $1 pushl $0 pushl $0 pushl 20(%esi) call lseek64@PLT .L00000920: movl %eax, 52(%esi) andl %edx, %eax addl $16, %esp incl %eax movl %edx, 56(%esi) jne .L0000093C .L0000092E: movl $0, 52(%esi) movl $0, 56(%esi) .L0000093C: movl 16(%esi), %eax jmp .L000008BA .L00000944: movl $31153, 16(%esi) movl $31153, %eax jmp .L000008B3 .L00000955: subl $12, %esp pushl 24(%esi) call free@PLT .L00000960: popl %eax .p2align 2 .L00000964: pushl %esi call free@PLT .L0000096A: xorl %eax, %eax jmp .L000008F3 .L0000096E: pushl %edx pushl $438 pushl %eax pushl 8(%ebp) call open@PLT .L0000097D: addl $16, %esp jmp .L0000089D .L00000985: orl $33280, %eax jmp .L00000890 .L0000098F: movl $32768, %eax jmp .L00000890 .L00000999: .p2align 2 .L263: subl $12, %esp jmp .L00000964 .L000009A1: movl 44(%esi), %eax testl %eax, %eax jne .L263 .L000009A8: movl $1, 44(%esi) jmp .L0000081C .L000009B4: movsbl %dl, %eax subl $43, %eax cmpl $77, %eax ja .L8 .L000009C3: movl .LC00000000@GOTOFF(%ebx,%eax,4), %edx addl %ebx, %edx jmp *%edx .L10: movl $7247, 16(%esi) jmp .L8 .L19: movl $4, 72(%esi) jmp .L8 .L18: movl $3, 72(%esi) jmp .L8 .L20: movl $1, 44(%esi) jmp .L8 .L12: movl $1, 16(%esi) jmp .L8 .L16: movl $1, 72(%esi) jmp .L8 .L17: movl $2, 72(%esi) jmp .L8 .L11: movl $31153, 16(%esi) jmp .L8 .L15: movl $1, -16(%ebp) jmp .L8 .size gz_open, .-gz_open # ---------------------- .ident "GCC: (GNU) 3.2.3 20030502 (Red Hat Linux 3.2.3-59)" .section .note.GNU-stack,"",@progbits
19.350877
60
0.51055
3b6fcb3a98a7826481fd5bf587b3133609ba86e1
5,781
asm
Assembly
tasks/punk_easy.asm
Masrt200/asm-disasm
3a55eb86103a45d7bcf5aee69f9ffcf7dac23474
[ "MIT" ]
null
null
null
tasks/punk_easy.asm
Masrt200/asm-disasm
3a55eb86103a45d7bcf5aee69f9ffcf7dac23474
[ "MIT" ]
null
null
null
tasks/punk_easy.asm
Masrt200/asm-disasm
3a55eb86103a45d7bcf5aee69f9ffcf7dac23474
[ "MIT" ]
null
null
null
1 ;; password lock checkers 2 ;; what 4 digit code passed as parameters will unlock the code 3 extern print_str 4 5 section .data 6 NULL equ 0 7 SYS_exit equ 60 8 EXIT_success equ 0 9 LF equ 10 10 11 00000000 0A00 newline db LF,NULL 12 00000002 486572652773203520- victory db "Here's 5 diamonds!",LF,NULL 12 0000000B 6469616D6F6E647321- 12 00000014 0A00 13 14 section .bss 15 00000000 <res 00000004> PIN resb 4 16 17 section .text 18 global reader 19 reader: 20 00000000 BA01000000 mov rdx,1 21 22 args: 23 00000005 4839FA cmp rdx,rdi 24 00000008 7D17 jge end 25 0000000A B800000000 mov rax,0 26 0000000F 4C8B14D6 mov r10, qword [rsi+8*rdx] 27 00000013 418A02 mov al, byte [r10] 28 00000016 2C30 sub al,48 29 00000018 884411FF mov byte [rcx+rdx-1],al 30 0000001C 48FFC2 inc rdx 31 0000001F EBE4 jmp args 32 end: 33 34 00000021 C3 ret 35 global lsb 36 lsb: 37 00000022 4883E601 and rsi,1 38 00000026 4883FE01 cmp rsi,1 39 0000002A 7504 jne fin 40 0000002C 4883C708 add rdi,0x8 41 42 fin: 43 00000030 4889F8 mov rax,rdi 44 00000033 C3 ret 45 46 global main 47 main: 48 00000034 48B9- mov rcx, PIN 48 00000036 [0000000000000000] 49 0000003E E8BDFFFFFF call reader 50 51 00000043 B800000000 mov rax,0 52 00000048 020425[00000000] add al,byte [PIN] 53 0000004F 3C00 cmp al,0 54 00000051 0F8480000000 je last 55 56 00000057 C1E002 shl eax,2 57 0000005A 83E01F and eax,0x1f 58 0000005D 83F800 cmp eax,0 59 00000060 7575 jne last 60 61 00000062 020425[03000000] add al, byte [PIN+0x3] 62 00000069 020425[00000000] add al, byte [PIN] 63 64 00000070 4889C6 mov rsi,rax 65 00000073 D0C8 ror al,1 66 00000075 247F and al,0x7f 67 68 00000077 4889C7 mov rdi,rax 69 0000007A E8A3FFFFFF call lsb 70 71 72 0000007F 020425[02000000] add al,byte [PIN+0x2] 73 00000086 83F814 cmp eax,0x14 74 00000089 754C jne last 75 76 0000008B B800000000 mov rax,0 77 00000090 BA00000000 mov rdx,0 78 00000095 BB00000000 mov rbx,0 79 80 0000009A 8A0425[01000000] mov al, byte [PIN+0x1] 81 000000A1 8A1C25[03000000] mov bl, byte [PIN+0x3] 82 83 000000A8 66F7E3 mul bx 84 000000AB 66BA0000 mov dx,0 85 000000AF 8A1C25[02000000] mov bl, byte [PIN+0x2] 86 000000B6 66F7F3 div bx 87 88 000000B9 8A1C25[00000000] mov bl, byte [PIN] 89 000000C0 66D1EB shr bx,1 90 000000C3 6639D3 cmp bx,dx 91 000000C6 750F jne last 92 93 000000C8 48BE- mov rsi,victory 93 000000CA [0200000000000000] 94 000000D2 E8(00000000) call print_str 95 96 last: 97 000000D7 B83C000000 mov rax,SYS_exit 98 000000DC BF00000000 mov rdi,EXIT_success 99 000000E1 0F05 syscall 100
55.057143
102
0.34129
0c521b529942f649095a4d7245c583b57c70fbd1
650
asm
Assembly
asm/game.asm
Vashy777/metroid2
a892576930f3d931c636665d7bd643c766b50a2a
[ "MIT" ]
3
2021-11-10T05:01:19.000Z
2021-12-10T16:21:20.000Z
asm/game.asm
Vashy777/metroid2
a892576930f3d931c636665d7bd643c766b50a2a
[ "MIT" ]
null
null
null
asm/game.asm
Vashy777/metroid2
a892576930f3d931c636665d7bd643c766b50a2a
[ "MIT" ]
1
2021-11-11T08:38:11.000Z
2021-11-11T08:38:11.000Z
; Disassembly of "metroid2.gb" ld_long: MACRO IF STRLWR("\1") == "a" ; ld a, [$ff40] db $FA dw \2 ELSE IF STRLWR("\2") == "a" ; ld [$ff40], a db $EA dw \1 ENDC ENDC ENDM INCLUDE "hardware.inc" INCLUDE "bank_000.asm" INCLUDE "bank_001.asm" INCLUDE "bank_002.asm" INCLUDE "bank_003.asm" INCLUDE "bank_004.asm" INCLUDE "bank_005.asm" INCLUDE "bank_006.asm" INCLUDE "bank_007.asm" INCLUDE "bank_008.asm" INCLUDE "bank_009.asm" INCLUDE "bank_00a.asm" INCLUDE "bank_00b.asm" INCLUDE "bank_00c.asm" INCLUDE "bank_00d.asm" INCLUDE "bank_00e.asm" INCLUDE "bank_00f.asm"
19.69697
30
0.623077
5be0c7c9a816741eceb05d3a0273194a96b73964
1,261
asm
Assembly
source/footer/99end.asm
paulscottrobson/6502-basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
3
2021-09-30T19:34:11.000Z
2021-10-31T06:55:50.000Z
source/footer/99end.asm
paulscottrobson/6502-Basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
null
null
null
source/footer/99end.asm
paulscottrobson/6502-Basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
1
2021-12-07T21:58:44.000Z
2021-12-07T21:58:44.000Z
; ************************************************************************************************ ; ************************************************************************************************ ; ; Name: 99end.asm ; Purpose: Start up code. ; Created: 11th March 2021 ; Reviewed: 6th April 2021 ; Author: Paul Robson (paul@robsons.org.uk) ; ; ************************************************************************************************ ; ************************************************************************************************ ; ; These are so we can see how much storage and zero page memory are used. ; .section zeropage endZeroPage: .send zeropage .section storage endStorage: .send storage ; ; Force to 1/4 boundary. ; .section code .align 256 programMemory: * = programMemory-1 .byte $FF .send code ; ************************************************************************************************ ; ; Changes and Updates ; ; ************************************************************************************************ ; ; Date Notes ; ==== ===== ; 07-Mar-21 Pre code read v0.01 ; ; ************************************************************************************************
27.413043
98
0.282316
b3431493b21fa5167794d7c9cdb480e8452a4653
5,534
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_469.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.log_21829_469.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.log_21829_469.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 %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x7c68, %rsi lea addresses_normal_ht+0x19be8, %rdi clflush (%rsi) add $19505, %rdx mov $79, %rcx rep movsb nop nop nop nop cmp %rbp, %rbp lea addresses_D_ht+0xf8c8, %rsi lea addresses_A_ht+0x13de8, %rdi nop nop nop nop and %r13, %r13 mov $94, %rcx rep movsq nop nop nop nop nop and %rcx, %rcx lea addresses_A_ht+0x74a8, %rsi lea addresses_normal_ht+0x19028, %rdi sub $42634, %r14 mov $76, %rcx rep movsb cmp $47863, %rcx lea addresses_A_ht+0x18de8, %rbp nop nop nop nop nop add %rsi, %rsi mov $0x6162636465666768, %rdx movq %rdx, (%rbp) nop nop nop nop nop cmp $11525, %rcx lea addresses_normal_ht+0x1b3e8, %rbp nop nop nop nop inc %r14 movw $0x6162, (%rbp) nop cmp $55563, %r13 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %r9 push %rax push %rbx // Store lea addresses_A+0x1b3e8, %rbx nop nop xor $31680, %r11 mov $0x5152535455565758, %r9 movq %r9, %xmm0 movups %xmm0, (%rbx) nop nop nop nop nop and $51067, %rax // Faulty Load lea addresses_D+0x15be8, %r12 nop nop nop cmp %r15, %r15 movb (%r12), %r8b lea oracles, %r15 and $0xff, %r8 shlq $12, %r8 mov (%r15,%r8,1), %r8 pop %rbx pop %rax pop %r9 pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 4, 'NT': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A'}} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}} {'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_A_ht'}} {'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_normal_ht'}} {'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 */
40.691176
2,999
0.662631
b3908a3bb808f736c6dbee77dba12fbecf0697e9
1,693
asm
Assembly
libsrc/input/sc3000/in_LookupKey.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/input/sc3000/in_LookupKey.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/input/sc3000/in_LookupKey.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; uint in_LookupKey(uchar c) SECTION code_clib PUBLIC in_LookupKey PUBLIC _in_LookupKey EXTERN in_keytranstbl ; Given the ascii code of a character, returns the scan row and mask ; corresponding to the key that needs to be pressed to generate the ; character. ; ; The scan row returned will have bit 7 set and bit 6 set to ; indicate if CAPS, SYM SHIFTS also have to be pressed to generate the ; ascii code, respectively. ; enter: L = ascii character code ; exit : L = scan row ; H = mask ; else: L = scan row, H = mask ; bit 7 of L set if SHIFT needs to be pressed ; bit 6 of L set if FUNC needs to be pressed ; bit 5 of L set if port $dd else $dc ; uses : AF,BC,HL ; The 16-bit value returned is a scan code understood by ; in_KeyPressed. .in_LookupKey ._in_LookupKey ld a,l ld hl,in_keytranstbl ld bc,84 * 3 cpir jr nz,notfound ld a,+(84 * 3) - 1 sub c ;A = position in table ld hl,0 cp 84 * 2 jr c,not_function_table sub 84 * 2 set 6,l jr shift notfound: ld hl,0 scf ret not_function_table: cp 84 jr c,not_shift sub 84 set 7,l not_shift: ; Now we must divide by 12 to find out the row number ld c,0 ;row number shift: cp 12 jr c, got_it inc c sub 12 jr shift got_it: ; a = Key number (0-11) ; c = line number ; l = Shift/control flags ld h,@10000000 cp 4 jr nc, for_port_dc set 5,l ; We need to use port $dc ld h,@00001000 add 4 ; We're going to take it off in a bit for_port_dc: sub 4 ;So normalised 0 - 3 or 0 - 7 ; Now calculate mask calc_mask: and a jr z,got_mask rr h dec a jr calc_mask got_mask: ; h = mask ; c = line number ; l = flags ld a,l or c ld l,a ret
17.453608
70
0.665092
873113d3e49ad9bae187cffd013552c8d79217b9
200
asm
Assembly
Working Disassembly/General/Ending/Map - Knuckles Ending Island Mask.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
5
2021-07-09T08:17:56.000Z
2022-02-27T19:57:47.000Z
Working Disassembly/General/Ending/Map - Knuckles Ending Island Mask.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
null
null
null
Working Disassembly/General/Ending/Map - Knuckles Ending Island Mask.asm
TeamASM-Blur/Sonic-3-Blue-Balls-Edition
7e8a2c5df02271615ff4cae529521e6b1560d6b1
[ "Apache-2.0" ]
null
null
null
Map_59270: dc.w word_59272-Map_59270 word_59272: dc.w 4 dc.b 0, $F, $67, $F0, 0, 0 dc.b 0, $F, $67, $F0, 0, $20 dc.b $20, $F, $67, $F0, 0, 0 dc.b $20, $F, $67, $F0, 0, $20
28.571429
37
0.465
bd6db6ff81a9f6a761a7d20869b75b5e3c47e70e
319
asm
Assembly
programs/oeis/166/A166727.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/166/A166727.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/166/A166727.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A166727: Positive integers with English names ending in "r". ; 4,24,34,44,54,64,74,84,94,104,124,134,144,154,164,174,184,194,204,224,234,244,254,264,274,284,294,304,324,334,344,354,364,374,384,394,404,424,434,444,454,464,474,484,494,504,524,534,544,554,564,574,584,594 mul $0,10 add $0,8 div $0,9 mul $0,10 add $0,4
35.444444
207
0.711599
bbc26921eeea82acb0fa47a23657cfdb809a7348
1,578
asm
Assembly
Library/SpecUI/CommonUI/CGadget/copenRangeSection.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/SpecUI/CommonUI/CGadget/copenRangeSection.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/SpecUI/CommonUI/CGadget/copenRangeSection.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @----------------------------------------------------------------------- Copyright (c) Geoworks 1991. All rights reserved. PROJECT: PC GEOS MODULE: OpenLook/Gadget FILE: openRangeSection.asm ROUTINES: Name Description ---- ----------- GLB OLRangeSectionClass Open look range Section REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 2/91 Started V2.0 DESCRIPTION: This file implements the Open Look range Section object. $Id: copenRangeSection.asm,v 1.1 97/04/07 10:54:19 newdeal Exp $ -------------------------------------------------------------------------------@ COMMENT @CLASS DESCRIPTION----------------------------------------------------- OLRangeSectionClass: Synopsis -------- NOTE: The section between "Declaration" and "Methods declared" is copied into ollib.def by "pmake def" Declaration ----------- OLRangeSectionClass class OLRangeClass uses GenRangeSectionClass ;----------------------------------------------------------------------- ; Instance data ;----------------------------------------------------------------------- OLRangeSectionClass endc Methods declared ---------------- Methods inherited ----------------- Additional documentation ------------------------ ------------------------------------------------------------------------------@ CommonUIClassStructures segment resource OLRangeSectionClass mask CLASSF_DISCARD_ON_SAVE or \ mask CLASSF_NEVER_SAVED CommonUIClassStructures ends
21.916667
81
0.474018
c5a2128777cf2c259eb6f43e6f14717010c731eb
117
asm
Assembly
libsrc/_DEVELOPMENT/font/fzx/fonts/dkud3/Times/_ff_dkud3_Times1.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/font/fzx/fonts/dkud3/Times/_ff_dkud3_Times1.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/_DEVELOPMENT/font/fzx/fonts/dkud3/Times/_ff_dkud3_Times1.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
SECTION rodata_font_fzx PUBLIC _ff_dkud3_Times1 _ff_dkud3_Times1: BINARY "font/fzx/fonts/dkud3/Times/TIMES1.fzx"
13
46
0.82906
4a38b7914dad23a7311c68d6462a8a3f977edd25
456
asm
Assembly
oeis/201/A201967.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/201/A201967.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/201/A201967.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A201967: Expansion of 1/(1-2*x-3*x^2+x^4) in powers of x. ; Submitted by Simon Strandgaard ; 1,2,7,20,60,178,529,1572,4671,13880,41244,122556,364173,1082134,3215543,9554932,28392320,84367302,250696021,744939016,2213573775,6577597296,19545219896,58078292664,172578671241,512814623178 lpb $0 sub $0,1 div $2,2 add $3,1 add $4,$1 add $1,$3 mov $5,$4 mov $4,$2 mov $2,$3 mul $2,2 add $4,$1 add $5,$4 mov $3,$5 lpe mov $0,$3 add $0,1
21.714286
191
0.671053