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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2a0135901e57f5a727ad8f2991839cfded47a4dd
| 480
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/target/rc2014/device/lut/c/sccz80/lut_read.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/target/rc2014/device/lut/c/sccz80/lut_read.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/target/rc2014/device/lut/c/sccz80/lut_read.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_driver
PUBLIC lut_read
EXTERN asm_lut_read
;------------------------------------------------------------------------------
; Routines that talk to the LUT Module
;
; uint16_t __LIB__ lut_read(uint16_t location) __smallc __z88dk_fastcall;
;
;------------------------------------------------------------------------------
;
; entry : hl = 16-bit linear address or 8-bit x 8-bit table address
; exit : hl = 16-bit result
;
; uses : bc
defc lut_read = asm_lut_read
| 24
| 79
| 0.495833
|
9fb4a95980482164c78085f548e6b798a06aca28
| 1,352
|
asm
|
Assembly
|
programs/oeis/302/A302757.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/302/A302757.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/302/A302757.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A302757: a(n) is the smallest number whose greedy representation as a sum of terms of A126684 uses n terms.
; 1,3,13,55,225,907,3637,14559,58249,233011,932061,3728263,14913073,59652315,238609285,954437167,3817748697,15270994819,61083979309,244335917271,977343669121,3909374676523,15637498706133,62549994824575,250199979298345,1000799917193427,4003199668773757,16012798675095079,64051194700380369,256204778801521531,1024819115206086181,4099276460824344783,16397105843297379193,65588423373189516835,262353693492758067405,1049414773971032269687,4197659095884129078817,16790636383536516315339,67162545534146065261429,268650182136584261045791,1074600728546337044183241,4298402914185348176733043,17193611656741392706932253,68774446626965570827729095,275097786507862283310916465,1100391146031449133243665947,4401564584125796532974663877,17606258336503186131898655599,70425033346012744527594622489,281700133384050978110378490051,1126800533536203912441513960301,4507202134144815649766055841303,18028808536579262599064223365313,72115234146317050396256893461355,288460936585268201585027573845525,1153843746341072806340110295382207,4615374985364291225360441181528937,18461499941457164901441764726115859,73845999765828659605767058904463549,295383999063314638423068235617854311
mov $1,4
pow $1,$0
sub $0,$1
mul $0,3
sub $1,$0
div $1,9
mul $1,2
add $1,1
mov $0,$1
| 104
| 1,155
| 0.905325
|
817163b6a5165f491cea82f3054b9188d325609e
| 6,703
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_830.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_830.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_830.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0xa2b0, %rdx
nop
and %r10, %r10
vmovups (%rdx), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %rcx
nop
nop
nop
nop
nop
add %r13, %r13
lea addresses_D_ht+0x11c30, %rsi
lea addresses_D_ht+0x6b90, %rdi
add %r15, %r15
mov $65, %rcx
rep movsw
nop
nop
nop
nop
nop
xor %rsi, %rsi
lea addresses_normal_ht+0xc890, %rcx
clflush (%rcx)
nop
nop
nop
nop
cmp %rsi, %rsi
mov $0x6162636465666768, %rdx
movq %rdx, %xmm5
vmovups %ymm5, (%rcx)
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_D_ht+0xd9b0, %rdi
nop
nop
nop
nop
inc %r13
movb (%rdi), %r10b
nop
xor %rcx, %rcx
lea addresses_UC_ht+0x1deb0, %r13
nop
nop
nop
nop
xor %rsi, %rsi
mov (%r13), %r15
xor $49805, %r15
lea addresses_D_ht+0x11fb0, %rsi
nop
cmp $28245, %rcx
movb $0x61, (%rsi)
nop
nop
nop
cmp %r10, %r10
lea addresses_normal_ht+0x4eb0, %r15
nop
nop
nop
and $15462, %r13
vmovups (%r15), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $0, %xmm6, %rdx
nop
nop
nop
nop
nop
inc %rcx
lea addresses_normal_ht+0x6988, %r10
and %r13, %r13
mov (%r10), %edi
nop
nop
nop
nop
nop
cmp %rdx, %rdx
lea addresses_normal_ht+0x1e8f0, %r13
cmp %rsi, %rsi
mov (%r13), %edi
nop
nop
nop
nop
nop
dec %rdi
lea addresses_WC_ht+0x16690, %rcx
nop
nop
dec %rdi
mov $0x6162636465666768, %r13
movq %r13, %xmm5
vmovups %ymm5, (%rcx)
nop
xor %r13, %r13
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r8
push %r9
push %rbp
push %rbx
push %rcx
push %rdx
// Store
lea addresses_normal+0x172b0, %r8
nop
nop
nop
cmp %rbx, %rbx
mov $0x5152535455565758, %rcx
movq %rcx, (%r8)
nop
nop
nop
nop
nop
add %r8, %r8
// Faulty Load
lea addresses_normal+0x10ab0, %r9
xor %r12, %r12
movb (%r9), %cl
lea oracles, %r8
and $0xff, %rcx
shlq $12, %rcx
mov (%r8,%rcx,1), %rcx
pop %rdx
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r8
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 11, 'size': 32, 'same': True, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': True, 'congruent': 3, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 6, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 35.84492
| 2,999
| 0.657318
|
60eceae53fc22e50bc248bb68007884bf285b92d
| 525
|
asm
|
Assembly
|
oeis/192/A192347.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/192/A192347.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/192/A192347.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A192347: Coefficient of x in the reduction (by x^2->x+1) of polynomial p(n,x) identified in Comments.
; Submitted by Christian Krause
; 0,1,2,11,32,125,418,1511,5248,18601,65250,230099,809248,2849989,10030018,35311375,124293632,437545489,1540200002,5421774299,19085364000,67183428301,236495292002,832498651511,2930516834432,10315851565625
mov $1,1
mov $4,-1
lpb $0
sub $0,1
add $2,$1
add $4,$3
add $3,$4
add $1,$3
add $4,$2
add $3,$4
sub $4,$3
sub $2,$4
add $3,$4
add $3,$2
add $3,$4
lpe
mov $0,$3
| 23.863636
| 204
| 0.687619
|
a90849e4852046bc83e42bdb163ed4e2326fd021
| 57,735
|
asm
|
Assembly
|
echo.asm
|
phung001/xv6_lab2_mark
|
3ba15e5880a3facdb709c3708d8366ade948cba2
|
[
"MIT-0"
] | null | null | null |
echo.asm
|
phung001/xv6_lab2_mark
|
3ba15e5880a3facdb709c3708d8366ade948cba2
|
[
"MIT-0"
] | null | null | null |
echo.asm
|
phung001/xv6_lab2_mark
|
3ba15e5880a3facdb709c3708d8366ade948cba2
|
[
"MIT-0"
] | null | null | null |
_echo: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 e4 f0 and $0xfffffff0,%esp
6: 83 ec 20 sub $0x20,%esp
int i;
for(i = 1; i < argc; i++)
9: c7 44 24 1c 01 00 00 movl $0x1,0x1c(%esp)
10: 00
11: eb 45 jmp 58 <main+0x58>
printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n");
13: 8b 44 24 1c mov 0x1c(%esp),%eax
17: 83 c0 01 add $0x1,%eax
1a: 3b 45 08 cmp 0x8(%ebp),%eax
1d: 7d 07 jge 26 <main+0x26>
1f: b8 6e 0b 00 00 mov $0xb6e,%eax
24: eb 05 jmp 2b <main+0x2b>
26: b8 70 0b 00 00 mov $0xb70,%eax
2b: 8b 54 24 1c mov 0x1c(%esp),%edx
2f: c1 e2 02 shl $0x2,%edx
32: 03 55 0c add 0xc(%ebp),%edx
35: 8b 12 mov (%edx),%edx
37: 89 44 24 0c mov %eax,0xc(%esp)
3b: 89 54 24 08 mov %edx,0x8(%esp)
3f: c7 44 24 04 72 0b 00 movl $0xb72,0x4(%esp)
46: 00
47: c7 04 24 01 00 00 00 movl $0x1,(%esp)
4e: e8 1a 04 00 00 call 46d <printf>
int
main(int argc, char *argv[])
{
int i;
for(i = 1; i < argc; i++)
53: 83 44 24 1c 01 addl $0x1,0x1c(%esp)
58: 8b 44 24 1c mov 0x1c(%esp),%eax
5c: 3b 45 08 cmp 0x8(%ebp),%eax
5f: 7c b2 jl 13 <main+0x13>
printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n");
exit();
61: e8 66 02 00 00 call 2cc <exit>
66: 90 nop
67: 90 nop
00000068 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
68: 55 push %ebp
69: 89 e5 mov %esp,%ebp
6b: 57 push %edi
6c: 53 push %ebx
asm volatile("cld; rep stosb" :
6d: 8b 4d 08 mov 0x8(%ebp),%ecx
70: 8b 55 10 mov 0x10(%ebp),%edx
73: 8b 45 0c mov 0xc(%ebp),%eax
76: 89 cb mov %ecx,%ebx
78: 89 df mov %ebx,%edi
7a: 89 d1 mov %edx,%ecx
7c: fc cld
7d: f3 aa rep stos %al,%es:(%edi)
7f: 89 ca mov %ecx,%edx
81: 89 fb mov %edi,%ebx
83: 89 5d 08 mov %ebx,0x8(%ebp)
86: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
89: 5b pop %ebx
8a: 5f pop %edi
8b: 5d pop %ebp
8c: c3 ret
0000008d <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
8d: 55 push %ebp
8e: 89 e5 mov %esp,%ebp
90: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
93: 8b 45 08 mov 0x8(%ebp),%eax
96: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
99: 8b 45 0c mov 0xc(%ebp),%eax
9c: 0f b6 10 movzbl (%eax),%edx
9f: 8b 45 08 mov 0x8(%ebp),%eax
a2: 88 10 mov %dl,(%eax)
a4: 8b 45 08 mov 0x8(%ebp),%eax
a7: 0f b6 00 movzbl (%eax),%eax
aa: 84 c0 test %al,%al
ac: 0f 95 c0 setne %al
af: 83 45 08 01 addl $0x1,0x8(%ebp)
b3: 83 45 0c 01 addl $0x1,0xc(%ebp)
b7: 84 c0 test %al,%al
b9: 75 de jne 99 <strcpy+0xc>
;
return os;
bb: 8b 45 fc mov -0x4(%ebp),%eax
}
be: c9 leave
bf: c3 ret
000000c0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
c0: 55 push %ebp
c1: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
c3: eb 08 jmp cd <strcmp+0xd>
p++, q++;
c5: 83 45 08 01 addl $0x1,0x8(%ebp)
c9: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
cd: 8b 45 08 mov 0x8(%ebp),%eax
d0: 0f b6 00 movzbl (%eax),%eax
d3: 84 c0 test %al,%al
d5: 74 10 je e7 <strcmp+0x27>
d7: 8b 45 08 mov 0x8(%ebp),%eax
da: 0f b6 10 movzbl (%eax),%edx
dd: 8b 45 0c mov 0xc(%ebp),%eax
e0: 0f b6 00 movzbl (%eax),%eax
e3: 38 c2 cmp %al,%dl
e5: 74 de je c5 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
e7: 8b 45 08 mov 0x8(%ebp),%eax
ea: 0f b6 00 movzbl (%eax),%eax
ed: 0f b6 d0 movzbl %al,%edx
f0: 8b 45 0c mov 0xc(%ebp),%eax
f3: 0f b6 00 movzbl (%eax),%eax
f6: 0f b6 c0 movzbl %al,%eax
f9: 89 d1 mov %edx,%ecx
fb: 29 c1 sub %eax,%ecx
fd: 89 c8 mov %ecx,%eax
}
ff: 5d pop %ebp
100: c3 ret
00000101 <strlen>:
uint
strlen(char *s)
{
101: 55 push %ebp
102: 89 e5 mov %esp,%ebp
104: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
107: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
10e: eb 04 jmp 114 <strlen+0x13>
110: 83 45 fc 01 addl $0x1,-0x4(%ebp)
114: 8b 45 fc mov -0x4(%ebp),%eax
117: 03 45 08 add 0x8(%ebp),%eax
11a: 0f b6 00 movzbl (%eax),%eax
11d: 84 c0 test %al,%al
11f: 75 ef jne 110 <strlen+0xf>
;
return n;
121: 8b 45 fc mov -0x4(%ebp),%eax
}
124: c9 leave
125: c3 ret
00000126 <memset>:
void*
memset(void *dst, int c, uint n)
{
126: 55 push %ebp
127: 89 e5 mov %esp,%ebp
129: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
12c: 8b 45 10 mov 0x10(%ebp),%eax
12f: 89 44 24 08 mov %eax,0x8(%esp)
133: 8b 45 0c mov 0xc(%ebp),%eax
136: 89 44 24 04 mov %eax,0x4(%esp)
13a: 8b 45 08 mov 0x8(%ebp),%eax
13d: 89 04 24 mov %eax,(%esp)
140: e8 23 ff ff ff call 68 <stosb>
return dst;
145: 8b 45 08 mov 0x8(%ebp),%eax
}
148: c9 leave
149: c3 ret
0000014a <strchr>:
char*
strchr(const char *s, char c)
{
14a: 55 push %ebp
14b: 89 e5 mov %esp,%ebp
14d: 83 ec 04 sub $0x4,%esp
150: 8b 45 0c mov 0xc(%ebp),%eax
153: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
156: eb 14 jmp 16c <strchr+0x22>
if(*s == c)
158: 8b 45 08 mov 0x8(%ebp),%eax
15b: 0f b6 00 movzbl (%eax),%eax
15e: 3a 45 fc cmp -0x4(%ebp),%al
161: 75 05 jne 168 <strchr+0x1e>
return (char*)s;
163: 8b 45 08 mov 0x8(%ebp),%eax
166: eb 13 jmp 17b <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
168: 83 45 08 01 addl $0x1,0x8(%ebp)
16c: 8b 45 08 mov 0x8(%ebp),%eax
16f: 0f b6 00 movzbl (%eax),%eax
172: 84 c0 test %al,%al
174: 75 e2 jne 158 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
176: b8 00 00 00 00 mov $0x0,%eax
}
17b: c9 leave
17c: c3 ret
0000017d <gets>:
char*
gets(char *buf, int max)
{
17d: 55 push %ebp
17e: 89 e5 mov %esp,%ebp
180: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
183: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
18a: eb 44 jmp 1d0 <gets+0x53>
cc = read(0, &c, 1);
18c: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
193: 00
194: 8d 45 ef lea -0x11(%ebp),%eax
197: 89 44 24 04 mov %eax,0x4(%esp)
19b: c7 04 24 00 00 00 00 movl $0x0,(%esp)
1a2: e8 3d 01 00 00 call 2e4 <read>
1a7: 89 45 f4 mov %eax,-0xc(%ebp)
if(cc < 1)
1aa: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1ae: 7e 2d jle 1dd <gets+0x60>
break;
buf[i++] = c;
1b0: 8b 45 f0 mov -0x10(%ebp),%eax
1b3: 03 45 08 add 0x8(%ebp),%eax
1b6: 0f b6 55 ef movzbl -0x11(%ebp),%edx
1ba: 88 10 mov %dl,(%eax)
1bc: 83 45 f0 01 addl $0x1,-0x10(%ebp)
if(c == '\n' || c == '\r')
1c0: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1c4: 3c 0a cmp $0xa,%al
1c6: 74 16 je 1de <gets+0x61>
1c8: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1cc: 3c 0d cmp $0xd,%al
1ce: 74 0e je 1de <gets+0x61>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1d0: 8b 45 f0 mov -0x10(%ebp),%eax
1d3: 83 c0 01 add $0x1,%eax
1d6: 3b 45 0c cmp 0xc(%ebp),%eax
1d9: 7c b1 jl 18c <gets+0xf>
1db: eb 01 jmp 1de <gets+0x61>
cc = read(0, &c, 1);
if(cc < 1)
break;
1dd: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1de: 8b 45 f0 mov -0x10(%ebp),%eax
1e1: 03 45 08 add 0x8(%ebp),%eax
1e4: c6 00 00 movb $0x0,(%eax)
return buf;
1e7: 8b 45 08 mov 0x8(%ebp),%eax
}
1ea: c9 leave
1eb: c3 ret
000001ec <stat>:
int
stat(char *n, struct stat *st)
{
1ec: 55 push %ebp
1ed: 89 e5 mov %esp,%ebp
1ef: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1f2: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1f9: 00
1fa: 8b 45 08 mov 0x8(%ebp),%eax
1fd: 89 04 24 mov %eax,(%esp)
200: e8 07 01 00 00 call 30c <open>
205: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd < 0)
208: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
20c: 79 07 jns 215 <stat+0x29>
return -1;
20e: b8 ff ff ff ff mov $0xffffffff,%eax
213: eb 23 jmp 238 <stat+0x4c>
r = fstat(fd, st);
215: 8b 45 0c mov 0xc(%ebp),%eax
218: 89 44 24 04 mov %eax,0x4(%esp)
21c: 8b 45 f0 mov -0x10(%ebp),%eax
21f: 89 04 24 mov %eax,(%esp)
222: e8 fd 00 00 00 call 324 <fstat>
227: 89 45 f4 mov %eax,-0xc(%ebp)
close(fd);
22a: 8b 45 f0 mov -0x10(%ebp),%eax
22d: 89 04 24 mov %eax,(%esp)
230: e8 bf 00 00 00 call 2f4 <close>
return r;
235: 8b 45 f4 mov -0xc(%ebp),%eax
}
238: c9 leave
239: c3 ret
0000023a <atoi>:
int
atoi(const char *s)
{
23a: 55 push %ebp
23b: 89 e5 mov %esp,%ebp
23d: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
240: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
247: eb 24 jmp 26d <atoi+0x33>
n = n*10 + *s++ - '0';
249: 8b 55 fc mov -0x4(%ebp),%edx
24c: 89 d0 mov %edx,%eax
24e: c1 e0 02 shl $0x2,%eax
251: 01 d0 add %edx,%eax
253: 01 c0 add %eax,%eax
255: 89 c2 mov %eax,%edx
257: 8b 45 08 mov 0x8(%ebp),%eax
25a: 0f b6 00 movzbl (%eax),%eax
25d: 0f be c0 movsbl %al,%eax
260: 8d 04 02 lea (%edx,%eax,1),%eax
263: 83 e8 30 sub $0x30,%eax
266: 89 45 fc mov %eax,-0x4(%ebp)
269: 83 45 08 01 addl $0x1,0x8(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
26d: 8b 45 08 mov 0x8(%ebp),%eax
270: 0f b6 00 movzbl (%eax),%eax
273: 3c 2f cmp $0x2f,%al
275: 7e 0a jle 281 <atoi+0x47>
277: 8b 45 08 mov 0x8(%ebp),%eax
27a: 0f b6 00 movzbl (%eax),%eax
27d: 3c 39 cmp $0x39,%al
27f: 7e c8 jle 249 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
281: 8b 45 fc mov -0x4(%ebp),%eax
}
284: c9 leave
285: c3 ret
00000286 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
286: 55 push %ebp
287: 89 e5 mov %esp,%ebp
289: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
28c: 8b 45 08 mov 0x8(%ebp),%eax
28f: 89 45 f8 mov %eax,-0x8(%ebp)
src = vsrc;
292: 8b 45 0c mov 0xc(%ebp),%eax
295: 89 45 fc mov %eax,-0x4(%ebp)
while(n-- > 0)
298: eb 13 jmp 2ad <memmove+0x27>
*dst++ = *src++;
29a: 8b 45 fc mov -0x4(%ebp),%eax
29d: 0f b6 10 movzbl (%eax),%edx
2a0: 8b 45 f8 mov -0x8(%ebp),%eax
2a3: 88 10 mov %dl,(%eax)
2a5: 83 45 f8 01 addl $0x1,-0x8(%ebp)
2a9: 83 45 fc 01 addl $0x1,-0x4(%ebp)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2ad: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
2b1: 0f 9f c0 setg %al
2b4: 83 6d 10 01 subl $0x1,0x10(%ebp)
2b8: 84 c0 test %al,%al
2ba: 75 de jne 29a <memmove+0x14>
*dst++ = *src++;
return vdst;
2bc: 8b 45 08 mov 0x8(%ebp),%eax
}
2bf: c9 leave
2c0: c3 ret
2c1: 90 nop
2c2: 90 nop
2c3: 90 nop
000002c4 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2c4: b8 01 00 00 00 mov $0x1,%eax
2c9: cd 40 int $0x40
2cb: c3 ret
000002cc <exit>:
SYSCALL(exit)
2cc: b8 02 00 00 00 mov $0x2,%eax
2d1: cd 40 int $0x40
2d3: c3 ret
000002d4 <wait>:
SYSCALL(wait)
2d4: b8 03 00 00 00 mov $0x3,%eax
2d9: cd 40 int $0x40
2db: c3 ret
000002dc <pipe>:
SYSCALL(pipe)
2dc: b8 04 00 00 00 mov $0x4,%eax
2e1: cd 40 int $0x40
2e3: c3 ret
000002e4 <read>:
SYSCALL(read)
2e4: b8 05 00 00 00 mov $0x5,%eax
2e9: cd 40 int $0x40
2eb: c3 ret
000002ec <write>:
SYSCALL(write)
2ec: b8 10 00 00 00 mov $0x10,%eax
2f1: cd 40 int $0x40
2f3: c3 ret
000002f4 <close>:
SYSCALL(close)
2f4: b8 15 00 00 00 mov $0x15,%eax
2f9: cd 40 int $0x40
2fb: c3 ret
000002fc <kill>:
SYSCALL(kill)
2fc: b8 06 00 00 00 mov $0x6,%eax
301: cd 40 int $0x40
303: c3 ret
00000304 <exec>:
SYSCALL(exec)
304: b8 07 00 00 00 mov $0x7,%eax
309: cd 40 int $0x40
30b: c3 ret
0000030c <open>:
SYSCALL(open)
30c: b8 0f 00 00 00 mov $0xf,%eax
311: cd 40 int $0x40
313: c3 ret
00000314 <mknod>:
SYSCALL(mknod)
314: b8 11 00 00 00 mov $0x11,%eax
319: cd 40 int $0x40
31b: c3 ret
0000031c <unlink>:
SYSCALL(unlink)
31c: b8 12 00 00 00 mov $0x12,%eax
321: cd 40 int $0x40
323: c3 ret
00000324 <fstat>:
SYSCALL(fstat)
324: b8 08 00 00 00 mov $0x8,%eax
329: cd 40 int $0x40
32b: c3 ret
0000032c <link>:
SYSCALL(link)
32c: b8 13 00 00 00 mov $0x13,%eax
331: cd 40 int $0x40
333: c3 ret
00000334 <mkdir>:
SYSCALL(mkdir)
334: b8 14 00 00 00 mov $0x14,%eax
339: cd 40 int $0x40
33b: c3 ret
0000033c <chdir>:
SYSCALL(chdir)
33c: b8 09 00 00 00 mov $0x9,%eax
341: cd 40 int $0x40
343: c3 ret
00000344 <dup>:
SYSCALL(dup)
344: b8 0a 00 00 00 mov $0xa,%eax
349: cd 40 int $0x40
34b: c3 ret
0000034c <getpid>:
SYSCALL(getpid)
34c: b8 0b 00 00 00 mov $0xb,%eax
351: cd 40 int $0x40
353: c3 ret
00000354 <sbrk>:
SYSCALL(sbrk)
354: b8 0c 00 00 00 mov $0xc,%eax
359: cd 40 int $0x40
35b: c3 ret
0000035c <sleep>:
SYSCALL(sleep)
35c: b8 0d 00 00 00 mov $0xd,%eax
361: cd 40 int $0x40
363: c3 ret
00000364 <uptime>:
SYSCALL(uptime)
364: b8 0e 00 00 00 mov $0xe,%eax
369: cd 40 int $0x40
36b: c3 ret
0000036c <clone>:
SYSCALL(clone)
36c: b8 16 00 00 00 mov $0x16,%eax
371: cd 40 int $0x40
373: c3 ret
00000374 <texit>:
SYSCALL(texit)
374: b8 17 00 00 00 mov $0x17,%eax
379: cd 40 int $0x40
37b: c3 ret
0000037c <tsleep>:
SYSCALL(tsleep)
37c: b8 18 00 00 00 mov $0x18,%eax
381: cd 40 int $0x40
383: c3 ret
00000384 <twakeup>:
SYSCALL(twakeup)
384: b8 19 00 00 00 mov $0x19,%eax
389: cd 40 int $0x40
38b: c3 ret
0000038c <thread_yield>:
SYSCALL(thread_yield)
38c: b8 1a 00 00 00 mov $0x1a,%eax
391: cd 40 int $0x40
393: c3 ret
00000394 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
394: 55 push %ebp
395: 89 e5 mov %esp,%ebp
397: 83 ec 28 sub $0x28,%esp
39a: 8b 45 0c mov 0xc(%ebp),%eax
39d: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
3a0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3a7: 00
3a8: 8d 45 f4 lea -0xc(%ebp),%eax
3ab: 89 44 24 04 mov %eax,0x4(%esp)
3af: 8b 45 08 mov 0x8(%ebp),%eax
3b2: 89 04 24 mov %eax,(%esp)
3b5: e8 32 ff ff ff call 2ec <write>
}
3ba: c9 leave
3bb: c3 ret
000003bc <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3bc: 55 push %ebp
3bd: 89 e5 mov %esp,%ebp
3bf: 53 push %ebx
3c0: 83 ec 44 sub $0x44,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
3c3: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
3ca: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
3ce: 74 17 je 3e7 <printint+0x2b>
3d0: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
3d4: 79 11 jns 3e7 <printint+0x2b>
neg = 1;
3d6: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
3dd: 8b 45 0c mov 0xc(%ebp),%eax
3e0: f7 d8 neg %eax
3e2: 89 45 f4 mov %eax,-0xc(%ebp)
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
3e5: eb 06 jmp 3ed <printint+0x31>
neg = 1;
x = -xx;
} else {
x = xx;
3e7: 8b 45 0c mov 0xc(%ebp),%eax
3ea: 89 45 f4 mov %eax,-0xc(%ebp)
}
i = 0;
3ed: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
do{
buf[i++] = digits[x % base];
3f4: 8b 4d ec mov -0x14(%ebp),%ecx
3f7: 8b 5d 10 mov 0x10(%ebp),%ebx
3fa: 8b 45 f4 mov -0xc(%ebp),%eax
3fd: ba 00 00 00 00 mov $0x0,%edx
402: f7 f3 div %ebx
404: 89 d0 mov %edx,%eax
406: 0f b6 80 c4 0b 00 00 movzbl 0xbc4(%eax),%eax
40d: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
411: 83 45 ec 01 addl $0x1,-0x14(%ebp)
}while((x /= base) != 0);
415: 8b 45 10 mov 0x10(%ebp),%eax
418: 89 45 d4 mov %eax,-0x2c(%ebp)
41b: 8b 45 f4 mov -0xc(%ebp),%eax
41e: ba 00 00 00 00 mov $0x0,%edx
423: f7 75 d4 divl -0x2c(%ebp)
426: 89 45 f4 mov %eax,-0xc(%ebp)
429: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
42d: 75 c5 jne 3f4 <printint+0x38>
if(neg)
42f: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
433: 74 28 je 45d <printint+0xa1>
buf[i++] = '-';
435: 8b 45 ec mov -0x14(%ebp),%eax
438: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
43d: 83 45 ec 01 addl $0x1,-0x14(%ebp)
while(--i >= 0)
441: eb 1a jmp 45d <printint+0xa1>
putc(fd, buf[i]);
443: 8b 45 ec mov -0x14(%ebp),%eax
446: 0f b6 44 05 dc movzbl -0x24(%ebp,%eax,1),%eax
44b: 0f be c0 movsbl %al,%eax
44e: 89 44 24 04 mov %eax,0x4(%esp)
452: 8b 45 08 mov 0x8(%ebp),%eax
455: 89 04 24 mov %eax,(%esp)
458: e8 37 ff ff ff call 394 <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
45d: 83 6d ec 01 subl $0x1,-0x14(%ebp)
461: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
465: 79 dc jns 443 <printint+0x87>
putc(fd, buf[i]);
}
467: 83 c4 44 add $0x44,%esp
46a: 5b pop %ebx
46b: 5d pop %ebp
46c: c3 ret
0000046d <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
46d: 55 push %ebp
46e: 89 e5 mov %esp,%ebp
470: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
473: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
ap = (uint*)(void*)&fmt + 1;
47a: 8d 45 0c lea 0xc(%ebp),%eax
47d: 83 c0 04 add $0x4,%eax
480: 89 45 f4 mov %eax,-0xc(%ebp)
for(i = 0; fmt[i]; i++){
483: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
48a: e9 7e 01 00 00 jmp 60d <printf+0x1a0>
c = fmt[i] & 0xff;
48f: 8b 55 0c mov 0xc(%ebp),%edx
492: 8b 45 ec mov -0x14(%ebp),%eax
495: 8d 04 02 lea (%edx,%eax,1),%eax
498: 0f b6 00 movzbl (%eax),%eax
49b: 0f be c0 movsbl %al,%eax
49e: 25 ff 00 00 00 and $0xff,%eax
4a3: 89 45 e8 mov %eax,-0x18(%ebp)
if(state == 0){
4a6: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
4aa: 75 2c jne 4d8 <printf+0x6b>
if(c == '%'){
4ac: 83 7d e8 25 cmpl $0x25,-0x18(%ebp)
4b0: 75 0c jne 4be <printf+0x51>
state = '%';
4b2: c7 45 f0 25 00 00 00 movl $0x25,-0x10(%ebp)
4b9: e9 4b 01 00 00 jmp 609 <printf+0x19c>
} else {
putc(fd, c);
4be: 8b 45 e8 mov -0x18(%ebp),%eax
4c1: 0f be c0 movsbl %al,%eax
4c4: 89 44 24 04 mov %eax,0x4(%esp)
4c8: 8b 45 08 mov 0x8(%ebp),%eax
4cb: 89 04 24 mov %eax,(%esp)
4ce: e8 c1 fe ff ff call 394 <putc>
4d3: e9 31 01 00 00 jmp 609 <printf+0x19c>
}
} else if(state == '%'){
4d8: 83 7d f0 25 cmpl $0x25,-0x10(%ebp)
4dc: 0f 85 27 01 00 00 jne 609 <printf+0x19c>
if(c == 'd'){
4e2: 83 7d e8 64 cmpl $0x64,-0x18(%ebp)
4e6: 75 2d jne 515 <printf+0xa8>
printint(fd, *ap, 10, 1);
4e8: 8b 45 f4 mov -0xc(%ebp),%eax
4eb: 8b 00 mov (%eax),%eax
4ed: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
4f4: 00
4f5: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
4fc: 00
4fd: 89 44 24 04 mov %eax,0x4(%esp)
501: 8b 45 08 mov 0x8(%ebp),%eax
504: 89 04 24 mov %eax,(%esp)
507: e8 b0 fe ff ff call 3bc <printint>
ap++;
50c: 83 45 f4 04 addl $0x4,-0xc(%ebp)
510: e9 ed 00 00 00 jmp 602 <printf+0x195>
} else if(c == 'x' || c == 'p'){
515: 83 7d e8 78 cmpl $0x78,-0x18(%ebp)
519: 74 06 je 521 <printf+0xb4>
51b: 83 7d e8 70 cmpl $0x70,-0x18(%ebp)
51f: 75 2d jne 54e <printf+0xe1>
printint(fd, *ap, 16, 0);
521: 8b 45 f4 mov -0xc(%ebp),%eax
524: 8b 00 mov (%eax),%eax
526: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
52d: 00
52e: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
535: 00
536: 89 44 24 04 mov %eax,0x4(%esp)
53a: 8b 45 08 mov 0x8(%ebp),%eax
53d: 89 04 24 mov %eax,(%esp)
540: e8 77 fe ff ff call 3bc <printint>
ap++;
545: 83 45 f4 04 addl $0x4,-0xc(%ebp)
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
549: e9 b4 00 00 00 jmp 602 <printf+0x195>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
54e: 83 7d e8 73 cmpl $0x73,-0x18(%ebp)
552: 75 46 jne 59a <printf+0x12d>
s = (char*)*ap;
554: 8b 45 f4 mov -0xc(%ebp),%eax
557: 8b 00 mov (%eax),%eax
559: 89 45 e4 mov %eax,-0x1c(%ebp)
ap++;
55c: 83 45 f4 04 addl $0x4,-0xc(%ebp)
if(s == 0)
560: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
564: 75 27 jne 58d <printf+0x120>
s = "(null)";
566: c7 45 e4 77 0b 00 00 movl $0xb77,-0x1c(%ebp)
while(*s != 0){
56d: eb 1f jmp 58e <printf+0x121>
putc(fd, *s);
56f: 8b 45 e4 mov -0x1c(%ebp),%eax
572: 0f b6 00 movzbl (%eax),%eax
575: 0f be c0 movsbl %al,%eax
578: 89 44 24 04 mov %eax,0x4(%esp)
57c: 8b 45 08 mov 0x8(%ebp),%eax
57f: 89 04 24 mov %eax,(%esp)
582: e8 0d fe ff ff call 394 <putc>
s++;
587: 83 45 e4 01 addl $0x1,-0x1c(%ebp)
58b: eb 01 jmp 58e <printf+0x121>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
58d: 90 nop
58e: 8b 45 e4 mov -0x1c(%ebp),%eax
591: 0f b6 00 movzbl (%eax),%eax
594: 84 c0 test %al,%al
596: 75 d7 jne 56f <printf+0x102>
598: eb 68 jmp 602 <printf+0x195>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
59a: 83 7d e8 63 cmpl $0x63,-0x18(%ebp)
59e: 75 1d jne 5bd <printf+0x150>
putc(fd, *ap);
5a0: 8b 45 f4 mov -0xc(%ebp),%eax
5a3: 8b 00 mov (%eax),%eax
5a5: 0f be c0 movsbl %al,%eax
5a8: 89 44 24 04 mov %eax,0x4(%esp)
5ac: 8b 45 08 mov 0x8(%ebp),%eax
5af: 89 04 24 mov %eax,(%esp)
5b2: e8 dd fd ff ff call 394 <putc>
ap++;
5b7: 83 45 f4 04 addl $0x4,-0xc(%ebp)
5bb: eb 45 jmp 602 <printf+0x195>
} else if(c == '%'){
5bd: 83 7d e8 25 cmpl $0x25,-0x18(%ebp)
5c1: 75 17 jne 5da <printf+0x16d>
putc(fd, c);
5c3: 8b 45 e8 mov -0x18(%ebp),%eax
5c6: 0f be c0 movsbl %al,%eax
5c9: 89 44 24 04 mov %eax,0x4(%esp)
5cd: 8b 45 08 mov 0x8(%ebp),%eax
5d0: 89 04 24 mov %eax,(%esp)
5d3: e8 bc fd ff ff call 394 <putc>
5d8: eb 28 jmp 602 <printf+0x195>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
5da: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
5e1: 00
5e2: 8b 45 08 mov 0x8(%ebp),%eax
5e5: 89 04 24 mov %eax,(%esp)
5e8: e8 a7 fd ff ff call 394 <putc>
putc(fd, c);
5ed: 8b 45 e8 mov -0x18(%ebp),%eax
5f0: 0f be c0 movsbl %al,%eax
5f3: 89 44 24 04 mov %eax,0x4(%esp)
5f7: 8b 45 08 mov 0x8(%ebp),%eax
5fa: 89 04 24 mov %eax,(%esp)
5fd: e8 92 fd ff ff call 394 <putc>
}
state = 0;
602: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
609: 83 45 ec 01 addl $0x1,-0x14(%ebp)
60d: 8b 55 0c mov 0xc(%ebp),%edx
610: 8b 45 ec mov -0x14(%ebp),%eax
613: 8d 04 02 lea (%edx,%eax,1),%eax
616: 0f b6 00 movzbl (%eax),%eax
619: 84 c0 test %al,%al
61b: 0f 85 6e fe ff ff jne 48f <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
621: c9 leave
622: c3 ret
623: 90 nop
00000624 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
624: 55 push %ebp
625: 89 e5 mov %esp,%ebp
627: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
62a: 8b 45 08 mov 0x8(%ebp),%eax
62d: 83 e8 08 sub $0x8,%eax
630: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
633: a1 e0 0b 00 00 mov 0xbe0,%eax
638: 89 45 fc mov %eax,-0x4(%ebp)
63b: eb 24 jmp 661 <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
63d: 8b 45 fc mov -0x4(%ebp),%eax
640: 8b 00 mov (%eax),%eax
642: 3b 45 fc cmp -0x4(%ebp),%eax
645: 77 12 ja 659 <free+0x35>
647: 8b 45 f8 mov -0x8(%ebp),%eax
64a: 3b 45 fc cmp -0x4(%ebp),%eax
64d: 77 24 ja 673 <free+0x4f>
64f: 8b 45 fc mov -0x4(%ebp),%eax
652: 8b 00 mov (%eax),%eax
654: 3b 45 f8 cmp -0x8(%ebp),%eax
657: 77 1a ja 673 <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
659: 8b 45 fc mov -0x4(%ebp),%eax
65c: 8b 00 mov (%eax),%eax
65e: 89 45 fc mov %eax,-0x4(%ebp)
661: 8b 45 f8 mov -0x8(%ebp),%eax
664: 3b 45 fc cmp -0x4(%ebp),%eax
667: 76 d4 jbe 63d <free+0x19>
669: 8b 45 fc mov -0x4(%ebp),%eax
66c: 8b 00 mov (%eax),%eax
66e: 3b 45 f8 cmp -0x8(%ebp),%eax
671: 76 ca jbe 63d <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
673: 8b 45 f8 mov -0x8(%ebp),%eax
676: 8b 40 04 mov 0x4(%eax),%eax
679: c1 e0 03 shl $0x3,%eax
67c: 89 c2 mov %eax,%edx
67e: 03 55 f8 add -0x8(%ebp),%edx
681: 8b 45 fc mov -0x4(%ebp),%eax
684: 8b 00 mov (%eax),%eax
686: 39 c2 cmp %eax,%edx
688: 75 24 jne 6ae <free+0x8a>
bp->s.size += p->s.ptr->s.size;
68a: 8b 45 f8 mov -0x8(%ebp),%eax
68d: 8b 50 04 mov 0x4(%eax),%edx
690: 8b 45 fc mov -0x4(%ebp),%eax
693: 8b 00 mov (%eax),%eax
695: 8b 40 04 mov 0x4(%eax),%eax
698: 01 c2 add %eax,%edx
69a: 8b 45 f8 mov -0x8(%ebp),%eax
69d: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
6a0: 8b 45 fc mov -0x4(%ebp),%eax
6a3: 8b 00 mov (%eax),%eax
6a5: 8b 10 mov (%eax),%edx
6a7: 8b 45 f8 mov -0x8(%ebp),%eax
6aa: 89 10 mov %edx,(%eax)
6ac: eb 0a jmp 6b8 <free+0x94>
} else
bp->s.ptr = p->s.ptr;
6ae: 8b 45 fc mov -0x4(%ebp),%eax
6b1: 8b 10 mov (%eax),%edx
6b3: 8b 45 f8 mov -0x8(%ebp),%eax
6b6: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
6b8: 8b 45 fc mov -0x4(%ebp),%eax
6bb: 8b 40 04 mov 0x4(%eax),%eax
6be: c1 e0 03 shl $0x3,%eax
6c1: 03 45 fc add -0x4(%ebp),%eax
6c4: 3b 45 f8 cmp -0x8(%ebp),%eax
6c7: 75 20 jne 6e9 <free+0xc5>
p->s.size += bp->s.size;
6c9: 8b 45 fc mov -0x4(%ebp),%eax
6cc: 8b 50 04 mov 0x4(%eax),%edx
6cf: 8b 45 f8 mov -0x8(%ebp),%eax
6d2: 8b 40 04 mov 0x4(%eax),%eax
6d5: 01 c2 add %eax,%edx
6d7: 8b 45 fc mov -0x4(%ebp),%eax
6da: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
6dd: 8b 45 f8 mov -0x8(%ebp),%eax
6e0: 8b 10 mov (%eax),%edx
6e2: 8b 45 fc mov -0x4(%ebp),%eax
6e5: 89 10 mov %edx,(%eax)
6e7: eb 08 jmp 6f1 <free+0xcd>
} else
p->s.ptr = bp;
6e9: 8b 45 fc mov -0x4(%ebp),%eax
6ec: 8b 55 f8 mov -0x8(%ebp),%edx
6ef: 89 10 mov %edx,(%eax)
freep = p;
6f1: 8b 45 fc mov -0x4(%ebp),%eax
6f4: a3 e0 0b 00 00 mov %eax,0xbe0
}
6f9: c9 leave
6fa: c3 ret
000006fb <morecore>:
static Header*
morecore(uint nu)
{
6fb: 55 push %ebp
6fc: 89 e5 mov %esp,%ebp
6fe: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
701: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
708: 77 07 ja 711 <morecore+0x16>
nu = 4096;
70a: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
711: 8b 45 08 mov 0x8(%ebp),%eax
714: c1 e0 03 shl $0x3,%eax
717: 89 04 24 mov %eax,(%esp)
71a: e8 35 fc ff ff call 354 <sbrk>
71f: 89 45 f0 mov %eax,-0x10(%ebp)
if(p == (char*)-1)
722: 83 7d f0 ff cmpl $0xffffffff,-0x10(%ebp)
726: 75 07 jne 72f <morecore+0x34>
return 0;
728: b8 00 00 00 00 mov $0x0,%eax
72d: eb 22 jmp 751 <morecore+0x56>
hp = (Header*)p;
72f: 8b 45 f0 mov -0x10(%ebp),%eax
732: 89 45 f4 mov %eax,-0xc(%ebp)
hp->s.size = nu;
735: 8b 45 f4 mov -0xc(%ebp),%eax
738: 8b 55 08 mov 0x8(%ebp),%edx
73b: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
73e: 8b 45 f4 mov -0xc(%ebp),%eax
741: 83 c0 08 add $0x8,%eax
744: 89 04 24 mov %eax,(%esp)
747: e8 d8 fe ff ff call 624 <free>
return freep;
74c: a1 e0 0b 00 00 mov 0xbe0,%eax
}
751: c9 leave
752: c3 ret
00000753 <malloc>:
void*
malloc(uint nbytes)
{
753: 55 push %ebp
754: 89 e5 mov %esp,%ebp
756: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
759: 8b 45 08 mov 0x8(%ebp),%eax
75c: 83 c0 07 add $0x7,%eax
75f: c1 e8 03 shr $0x3,%eax
762: 83 c0 01 add $0x1,%eax
765: 89 45 f4 mov %eax,-0xc(%ebp)
if((prevp = freep) == 0){
768: a1 e0 0b 00 00 mov 0xbe0,%eax
76d: 89 45 f0 mov %eax,-0x10(%ebp)
770: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
774: 75 23 jne 799 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
776: c7 45 f0 d8 0b 00 00 movl $0xbd8,-0x10(%ebp)
77d: 8b 45 f0 mov -0x10(%ebp),%eax
780: a3 e0 0b 00 00 mov %eax,0xbe0
785: a1 e0 0b 00 00 mov 0xbe0,%eax
78a: a3 d8 0b 00 00 mov %eax,0xbd8
base.s.size = 0;
78f: c7 05 dc 0b 00 00 00 movl $0x0,0xbdc
796: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
799: 8b 45 f0 mov -0x10(%ebp),%eax
79c: 8b 00 mov (%eax),%eax
79e: 89 45 ec mov %eax,-0x14(%ebp)
if(p->s.size >= nunits){
7a1: 8b 45 ec mov -0x14(%ebp),%eax
7a4: 8b 40 04 mov 0x4(%eax),%eax
7a7: 3b 45 f4 cmp -0xc(%ebp),%eax
7aa: 72 4d jb 7f9 <malloc+0xa6>
if(p->s.size == nunits)
7ac: 8b 45 ec mov -0x14(%ebp),%eax
7af: 8b 40 04 mov 0x4(%eax),%eax
7b2: 3b 45 f4 cmp -0xc(%ebp),%eax
7b5: 75 0c jne 7c3 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
7b7: 8b 45 ec mov -0x14(%ebp),%eax
7ba: 8b 10 mov (%eax),%edx
7bc: 8b 45 f0 mov -0x10(%ebp),%eax
7bf: 89 10 mov %edx,(%eax)
7c1: eb 26 jmp 7e9 <malloc+0x96>
else {
p->s.size -= nunits;
7c3: 8b 45 ec mov -0x14(%ebp),%eax
7c6: 8b 40 04 mov 0x4(%eax),%eax
7c9: 89 c2 mov %eax,%edx
7cb: 2b 55 f4 sub -0xc(%ebp),%edx
7ce: 8b 45 ec mov -0x14(%ebp),%eax
7d1: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
7d4: 8b 45 ec mov -0x14(%ebp),%eax
7d7: 8b 40 04 mov 0x4(%eax),%eax
7da: c1 e0 03 shl $0x3,%eax
7dd: 01 45 ec add %eax,-0x14(%ebp)
p->s.size = nunits;
7e0: 8b 45 ec mov -0x14(%ebp),%eax
7e3: 8b 55 f4 mov -0xc(%ebp),%edx
7e6: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
7e9: 8b 45 f0 mov -0x10(%ebp),%eax
7ec: a3 e0 0b 00 00 mov %eax,0xbe0
return (void*)(p + 1);
7f1: 8b 45 ec mov -0x14(%ebp),%eax
7f4: 83 c0 08 add $0x8,%eax
7f7: eb 38 jmp 831 <malloc+0xde>
}
if(p == freep)
7f9: a1 e0 0b 00 00 mov 0xbe0,%eax
7fe: 39 45 ec cmp %eax,-0x14(%ebp)
801: 75 1b jne 81e <malloc+0xcb>
if((p = morecore(nunits)) == 0)
803: 8b 45 f4 mov -0xc(%ebp),%eax
806: 89 04 24 mov %eax,(%esp)
809: e8 ed fe ff ff call 6fb <morecore>
80e: 89 45 ec mov %eax,-0x14(%ebp)
811: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
815: 75 07 jne 81e <malloc+0xcb>
return 0;
817: b8 00 00 00 00 mov $0x0,%eax
81c: eb 13 jmp 831 <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
81e: 8b 45 ec mov -0x14(%ebp),%eax
821: 89 45 f0 mov %eax,-0x10(%ebp)
824: 8b 45 ec mov -0x14(%ebp),%eax
827: 8b 00 mov (%eax),%eax
829: 89 45 ec mov %eax,-0x14(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
82c: e9 70 ff ff ff jmp 7a1 <malloc+0x4e>
}
831: c9 leave
832: c3 ret
833: 90 nop
00000834 <xchg>:
asm volatile("sti");
}
static inline uint
xchg(volatile uint *addr, uint newval)
{
834: 55 push %ebp
835: 89 e5 mov %esp,%ebp
837: 83 ec 10 sub $0x10,%esp
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
83a: 8b 55 08 mov 0x8(%ebp),%edx
83d: 8b 45 0c mov 0xc(%ebp),%eax
840: 8b 4d 08 mov 0x8(%ebp),%ecx
843: f0 87 02 lock xchg %eax,(%edx)
846: 89 45 fc mov %eax,-0x4(%ebp)
"+m" (*addr), "=a" (result) :
"1" (newval) :
"cc");
return result;
849: 8b 45 fc mov -0x4(%ebp),%eax
}
84c: c9 leave
84d: c3 ret
0000084e <lock_init>:
#include "x86.h"
#include "proc.h"
void lock_init(lock_t *lock){
84e: 55 push %ebp
84f: 89 e5 mov %esp,%ebp
lock->locked = 0;
851: 8b 45 08 mov 0x8(%ebp),%eax
854: c7 00 00 00 00 00 movl $0x0,(%eax)
}
85a: 5d pop %ebp
85b: c3 ret
0000085c <lock_acquire>:
void lock_acquire(lock_t *lock){
85c: 55 push %ebp
85d: 89 e5 mov %esp,%ebp
85f: 83 ec 08 sub $0x8,%esp
while(xchg(&lock->locked,1) != 0);
862: 8b 45 08 mov 0x8(%ebp),%eax
865: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
86c: 00
86d: 89 04 24 mov %eax,(%esp)
870: e8 bf ff ff ff call 834 <xchg>
875: 85 c0 test %eax,%eax
877: 75 e9 jne 862 <lock_acquire+0x6>
}
879: c9 leave
87a: c3 ret
0000087b <lock_release>:
void lock_release(lock_t *lock){
87b: 55 push %ebp
87c: 89 e5 mov %esp,%ebp
87e: 83 ec 08 sub $0x8,%esp
xchg(&lock->locked,0);
881: 8b 45 08 mov 0x8(%ebp),%eax
884: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
88b: 00
88c: 89 04 24 mov %eax,(%esp)
88f: e8 a0 ff ff ff call 834 <xchg>
}
894: c9 leave
895: c3 ret
00000896 <thread_create>:
void *thread_create(void(*start_routine)(void*), void *arg){
896: 55 push %ebp
897: 89 e5 mov %esp,%ebp
899: 83 ec 28 sub $0x28,%esp
int tid;
void * stack = malloc(2 * 4096);
89c: c7 04 24 00 20 00 00 movl $0x2000,(%esp)
8a3: e8 ab fe ff ff call 753 <malloc>
8a8: 89 45 f0 mov %eax,-0x10(%ebp)
void *garbage_stack = stack;
8ab: 8b 45 f0 mov -0x10(%ebp),%eax
8ae: 89 45 f4 mov %eax,-0xc(%ebp)
// printf(1,"start routine addr : %d\n",(uint)start_routine);
if((uint)stack % 4096){
8b1: 8b 45 f0 mov -0x10(%ebp),%eax
8b4: 25 ff 0f 00 00 and $0xfff,%eax
8b9: 85 c0 test %eax,%eax
8bb: 74 15 je 8d2 <thread_create+0x3c>
stack = stack + (4096 - (uint)stack % 4096);
8bd: 8b 45 f0 mov -0x10(%ebp),%eax
8c0: 89 c2 mov %eax,%edx
8c2: 81 e2 ff 0f 00 00 and $0xfff,%edx
8c8: b8 00 10 00 00 mov $0x1000,%eax
8cd: 29 d0 sub %edx,%eax
8cf: 01 45 f0 add %eax,-0x10(%ebp)
}
if (stack == 0){
8d2: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8d6: 75 1b jne 8f3 <thread_create+0x5d>
printf(1,"malloc fail \n");
8d8: c7 44 24 04 7e 0b 00 movl $0xb7e,0x4(%esp)
8df: 00
8e0: c7 04 24 01 00 00 00 movl $0x1,(%esp)
8e7: e8 81 fb ff ff call 46d <printf>
return 0;
8ec: b8 00 00 00 00 mov $0x0,%eax
8f1: eb 6f jmp 962 <thread_create+0xcc>
}
tid = clone((uint)stack,PSIZE,(uint)start_routine,(int)arg);
8f3: 8b 4d 0c mov 0xc(%ebp),%ecx
8f6: 8b 55 08 mov 0x8(%ebp),%edx
8f9: 8b 45 f0 mov -0x10(%ebp),%eax
8fc: 89 4c 24 0c mov %ecx,0xc(%esp)
900: 89 54 24 08 mov %edx,0x8(%esp)
904: c7 44 24 04 00 10 00 movl $0x1000,0x4(%esp)
90b: 00
90c: 89 04 24 mov %eax,(%esp)
90f: e8 58 fa ff ff call 36c <clone>
914: 89 45 ec mov %eax,-0x14(%ebp)
if(tid < 0){
917: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
91b: 79 1b jns 938 <thread_create+0xa2>
printf(1,"clone fails\n");
91d: c7 44 24 04 8c 0b 00 movl $0xb8c,0x4(%esp)
924: 00
925: c7 04 24 01 00 00 00 movl $0x1,(%esp)
92c: e8 3c fb ff ff call 46d <printf>
return 0;
931: b8 00 00 00 00 mov $0x0,%eax
936: eb 2a jmp 962 <thread_create+0xcc>
}
if(tid > 0){
938: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
93c: 7e 05 jle 943 <thread_create+0xad>
//store threads on thread table
return garbage_stack;
93e: 8b 45 f4 mov -0xc(%ebp),%eax
941: eb 1f jmp 962 <thread_create+0xcc>
}
if(tid == 0){
943: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
947: 75 14 jne 95d <thread_create+0xc7>
printf(1,"tid = 0 return \n");
949: c7 44 24 04 99 0b 00 movl $0xb99,0x4(%esp)
950: 00
951: c7 04 24 01 00 00 00 movl $0x1,(%esp)
958: e8 10 fb ff ff call 46d <printf>
}
// wait();
// free(garbage_stack);
return 0;
95d: b8 00 00 00 00 mov $0x0,%eax
}
962: c9 leave
963: c3 ret
00000964 <init_q>:
#include "queue.h"
#include "types.h"
#include "user.h"
void init_q(struct queue *q){
964: 55 push %ebp
965: 89 e5 mov %esp,%ebp
q->size = 0;
967: 8b 45 08 mov 0x8(%ebp),%eax
96a: c7 00 00 00 00 00 movl $0x0,(%eax)
q->head = 0;
970: 8b 45 08 mov 0x8(%ebp),%eax
973: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
q->tail = 0;
97a: 8b 45 08 mov 0x8(%ebp),%eax
97d: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
984: 5d pop %ebp
985: c3 ret
00000986 <add_q>:
void add_q(struct queue *q, int v){
986: 55 push %ebp
987: 89 e5 mov %esp,%ebp
989: 83 ec 28 sub $0x28,%esp
//printf(1, "here \n");
struct node * n = malloc(sizeof(struct node));
98c: c7 04 24 08 00 00 00 movl $0x8,(%esp)
993: e8 bb fd ff ff call 753 <malloc>
998: 89 45 f4 mov %eax,-0xc(%ebp)
n->next = 0;
99b: 8b 45 f4 mov -0xc(%ebp),%eax
99e: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
n->value = v;
9a5: 8b 45 f4 mov -0xc(%ebp),%eax
9a8: 8b 55 0c mov 0xc(%ebp),%edx
9ab: 89 10 mov %edx,(%eax)
if(q->head == 0){
9ad: 8b 45 08 mov 0x8(%ebp),%eax
9b0: 8b 40 04 mov 0x4(%eax),%eax
9b3: 85 c0 test %eax,%eax
9b5: 75 0b jne 9c2 <add_q+0x3c>
q->head = n;
9b7: 8b 45 08 mov 0x8(%ebp),%eax
9ba: 8b 55 f4 mov -0xc(%ebp),%edx
9bd: 89 50 04 mov %edx,0x4(%eax)
9c0: eb 0c jmp 9ce <add_q+0x48>
}else{
q->tail->next = n;
9c2: 8b 45 08 mov 0x8(%ebp),%eax
9c5: 8b 40 08 mov 0x8(%eax),%eax
9c8: 8b 55 f4 mov -0xc(%ebp),%edx
9cb: 89 50 04 mov %edx,0x4(%eax)
}
q->tail = n;
9ce: 8b 45 08 mov 0x8(%ebp),%eax
9d1: 8b 55 f4 mov -0xc(%ebp),%edx
9d4: 89 50 08 mov %edx,0x8(%eax)
q->size++;
9d7: 8b 45 08 mov 0x8(%ebp),%eax
9da: 8b 00 mov (%eax),%eax
9dc: 8d 50 01 lea 0x1(%eax),%edx
9df: 8b 45 08 mov 0x8(%ebp),%eax
9e2: 89 10 mov %edx,(%eax)
}
9e4: c9 leave
9e5: c3 ret
000009e6 <empty_q>:
int empty_q(struct queue *q){
9e6: 55 push %ebp
9e7: 89 e5 mov %esp,%ebp
if(q->size == 0)
9e9: 8b 45 08 mov 0x8(%ebp),%eax
9ec: 8b 00 mov (%eax),%eax
9ee: 85 c0 test %eax,%eax
9f0: 75 07 jne 9f9 <empty_q+0x13>
return 1;
9f2: b8 01 00 00 00 mov $0x1,%eax
9f7: eb 05 jmp 9fe <empty_q+0x18>
else
return 0;
9f9: b8 00 00 00 00 mov $0x0,%eax
}
9fe: 5d pop %ebp
9ff: c3 ret
00000a00 <pop_q>:
int pop_q(struct queue *q){
a00: 55 push %ebp
a01: 89 e5 mov %esp,%ebp
a03: 83 ec 28 sub $0x28,%esp
int val;
struct node *destroy;
if(!empty_q(q)){
a06: 8b 45 08 mov 0x8(%ebp),%eax
a09: 89 04 24 mov %eax,(%esp)
a0c: e8 d5 ff ff ff call 9e6 <empty_q>
a11: 85 c0 test %eax,%eax
a13: 75 5d jne a72 <pop_q+0x72>
val = q->head->value;
a15: 8b 45 08 mov 0x8(%ebp),%eax
a18: 8b 40 04 mov 0x4(%eax),%eax
a1b: 8b 00 mov (%eax),%eax
a1d: 89 45 f0 mov %eax,-0x10(%ebp)
destroy = q->head;
a20: 8b 45 08 mov 0x8(%ebp),%eax
a23: 8b 40 04 mov 0x4(%eax),%eax
a26: 89 45 f4 mov %eax,-0xc(%ebp)
q->head = q->head->next;
a29: 8b 45 08 mov 0x8(%ebp),%eax
a2c: 8b 40 04 mov 0x4(%eax),%eax
a2f: 8b 50 04 mov 0x4(%eax),%edx
a32: 8b 45 08 mov 0x8(%ebp),%eax
a35: 89 50 04 mov %edx,0x4(%eax)
free(destroy);
a38: 8b 45 f4 mov -0xc(%ebp),%eax
a3b: 89 04 24 mov %eax,(%esp)
a3e: e8 e1 fb ff ff call 624 <free>
q->size--;
a43: 8b 45 08 mov 0x8(%ebp),%eax
a46: 8b 00 mov (%eax),%eax
a48: 8d 50 ff lea -0x1(%eax),%edx
a4b: 8b 45 08 mov 0x8(%ebp),%eax
a4e: 89 10 mov %edx,(%eax)
if(q->size == 0){
a50: 8b 45 08 mov 0x8(%ebp),%eax
a53: 8b 00 mov (%eax),%eax
a55: 85 c0 test %eax,%eax
a57: 75 14 jne a6d <pop_q+0x6d>
q->head = 0;
a59: 8b 45 08 mov 0x8(%ebp),%eax
a5c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
q->tail = 0;
a63: 8b 45 08 mov 0x8(%ebp),%eax
a66: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
return val;
a6d: 8b 45 f0 mov -0x10(%ebp),%eax
a70: eb 05 jmp a77 <pop_q+0x77>
}
return -1;
a72: b8 ff ff ff ff mov $0xffffffff,%eax
}
a77: c9 leave
a78: c3 ret
a79: 90 nop
a7a: 90 nop
a7b: 90 nop
00000a7c <init_semaphore>:
#include "semaphore.h"
#include "user.h"
//lab 2
//Semaphore
void init_semaphore(struct Semaphore *s, int count_num) {
a7c: 55 push %ebp
a7d: 89 e5 mov %esp,%ebp
a7f: 83 ec 18 sub $0x18,%esp
s->count = count_num;
a82: 8b 45 08 mov 0x8(%ebp),%eax
a85: 8b 55 0c mov 0xc(%ebp),%edx
a88: 89 10 mov %edx,(%eax)
init_q(&s->threads);
a8a: 8b 45 08 mov 0x8(%ebp),%eax
a8d: 83 c0 04 add $0x4,%eax
a90: 89 04 24 mov %eax,(%esp)
a93: e8 cc fe ff ff call 964 <init_q>
lock_init(&s->lock);
a98: 8b 45 08 mov 0x8(%ebp),%eax
a9b: 83 c0 10 add $0x10,%eax
a9e: 89 04 24 mov %eax,(%esp)
aa1: e8 a8 fd ff ff call 84e <lock_init>
}
aa6: c9 leave
aa7: c3 ret
00000aa8 <sem_acquire>:
void sem_acquire(struct Semaphore *s) {
aa8: 55 push %ebp
aa9: 89 e5 mov %esp,%ebp
aab: 83 ec 18 sub $0x18,%esp
while(1) {
if (s->count > 0) { //if there are available resources
aae: 8b 45 08 mov 0x8(%ebp),%eax
ab1: 8b 00 mov (%eax),%eax
ab3: 85 c0 test %eax,%eax
ab5: 7e 2c jle ae3 <sem_acquire+0x3b>
//printf(1, "COUNT IS = %d\n", s->count);
//printf(1, "acquiring lock\n");
lock_acquire(&s->lock); //acquire count lock
ab7: 8b 45 08 mov 0x8(%ebp),%eax
aba: 83 c0 10 add $0x10,%eax
abd: 89 04 24 mov %eax,(%esp)
ac0: e8 97 fd ff ff call 85c <lock_acquire>
//printf(1, "acquired lock\n");
s->count = s->count - 1; //decrement resource by one
ac5: 8b 45 08 mov 0x8(%ebp),%eax
ac8: 8b 00 mov (%eax),%eax
aca: 8d 50 ff lea -0x1(%eax),%edx
acd: 8b 45 08 mov 0x8(%ebp),%eax
ad0: 89 10 mov %edx,(%eax)
//printf(1, "DECREMENT! COUNT IS = %d\n", s->count);
lock_release(&s->lock); //release count lock
ad2: 8b 45 08 mov 0x8(%ebp),%eax
ad5: 83 c0 10 add $0x10,%eax
ad8: 89 04 24 mov %eax,(%esp)
adb: e8 9b fd ff ff call 87b <lock_release>
break;
ae0: 90 nop
add_q(&s->threads, getpid()); //add thread to sleep queueu
//printf(1, "asleep \n");
tsleep();
}
}
}
ae1: c9 leave
ae2: c3 ret
//printf(1, "DECREMENT! COUNT IS = %d\n", s->count);
lock_release(&s->lock); //release count lock
break;
}
else { //if there are no available resources
printf(1, "Waiting for semaphore\n");
ae3: c7 44 24 04 aa 0b 00 movl $0xbaa,0x4(%esp)
aea: 00
aeb: c7 04 24 01 00 00 00 movl $0x1,(%esp)
af2: e8 76 f9 ff ff call 46d <printf>
//printf(1, "%d", getpid());
add_q(&s->threads, getpid()); //add thread to sleep queueu
af7: e8 50 f8 ff ff call 34c <getpid>
afc: 8b 55 08 mov 0x8(%ebp),%edx
aff: 83 c2 04 add $0x4,%edx
b02: 89 44 24 04 mov %eax,0x4(%esp)
b06: 89 14 24 mov %edx,(%esp)
b09: e8 78 fe ff ff call 986 <add_q>
//printf(1, "asleep \n");
tsleep();
b0e: e8 69 f8 ff ff call 37c <tsleep>
}
}
b13: eb 99 jmp aae <sem_acquire+0x6>
00000b15 <sem_signal>:
}
void sem_signal(struct Semaphore *s) {
b15: 55 push %ebp
b16: 89 e5 mov %esp,%ebp
b18: 83 ec 18 sub $0x18,%esp
lock_acquire(&s->lock);
b1b: 8b 45 08 mov 0x8(%ebp),%eax
b1e: 83 c0 10 add $0x10,%eax
b21: 89 04 24 mov %eax,(%esp)
b24: e8 33 fd ff ff call 85c <lock_acquire>
s->count++;
b29: 8b 45 08 mov 0x8(%ebp),%eax
b2c: 8b 00 mov (%eax),%eax
b2e: 8d 50 01 lea 0x1(%eax),%edx
b31: 8b 45 08 mov 0x8(%ebp),%eax
b34: 89 10 mov %edx,(%eax)
lock_release(&s->lock);
b36: 8b 45 08 mov 0x8(%ebp),%eax
b39: 83 c0 10 add $0x10,%eax
b3c: 89 04 24 mov %eax,(%esp)
b3f: e8 37 fd ff ff call 87b <lock_release>
if (!empty_q(&s->threads)) {
b44: 8b 45 08 mov 0x8(%ebp),%eax
b47: 83 c0 04 add $0x4,%eax
b4a: 89 04 24 mov %eax,(%esp)
b4d: e8 94 fe ff ff call 9e6 <empty_q>
b52: 85 c0 test %eax,%eax
b54: 75 16 jne b6c <sem_signal+0x57>
twakeup(pop_q(&s->threads)); //remove thread from queue and wake up
b56: 8b 45 08 mov 0x8(%ebp),%eax
b59: 83 c0 04 add $0x4,%eax
b5c: 89 04 24 mov %eax,(%esp)
b5f: e8 9c fe ff ff call a00 <pop_q>
b64: 89 04 24 mov %eax,(%esp)
b67: e8 18 f8 ff ff call 384 <twakeup>
}
}
b6c: c9 leave
b6d: c3 ret
| 34.345628
| 75
| 0.434208
|
ae0cc771f7276394aecd7f096f2e709ebdb00135
| 142
|
asm
|
Assembly
|
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Pole.asm
|
prismotizm/gigaleak
|
d082854866186a05fec4e2fdf1def0199e7f3098
|
[
"MIT"
] | null | null | null |
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Pole.asm
|
prismotizm/gigaleak
|
d082854866186a05fec4e2fdf1def0199e7f3098
|
[
"MIT"
] | null | null | null |
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Pole.asm
|
prismotizm/gigaleak
|
d082854866186a05fec4e2fdf1def0199e7f3098
|
[
"MIT"
] | null | null | null |
Name: Pole.asm
Type: file
Size: 34206
Last-Modified: '1992-07-01T15:00:00Z'
SHA-1: 7184D5E6B73A3332DA928715B19559CB69939D31
Description: null
| 20.285714
| 47
| 0.809859
|
80549fa2cd821b9d3c5d66ca60c24bcc3fae6358
| 24,015
|
asm
|
Assembly
|
Palmtree.Math.Core.Implements/vs_build/x64_Debug/debug.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
Palmtree.Math.Core.Implements/vs_build/x64_Debug/debug.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
Palmtree.Math.Core.Implements/vs_build/x64_Debug/debug.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
PUBLIC test_total_count
PUBLIC test_ok_count
PUBLIC __DEBUG_LOG
_BSS SEGMENT
test_total_count DD 01H DUP (?)
test_ok_count DD 01H DUP (?)
__DEBUG_LOG DQ 01H DUP (?)
_BSS ENDS
msvcjmc SEGMENT
__7B7A869E_ctype@h DB 01H
__457DD326_basetsd@h DB 01H
__4384A2D9_corecrt_memcpy_s@h DB 01H
__4E51A221_corecrt_wstring@h DB 01H
__2140C079_string@h DB 01H
__1887E595_winnt@h DB 01H
__9FC7C64B_processthreadsapi@h DB 01H
__FA470AEC_memoryapi@h DB 01H
__F37DAFF1_winerror@h DB 01H
__7A450CCC_winbase@h DB 01H
__B4B40122_winioctl@h DB 01H
__86261D59_stralign@h DB 01H
__1C66ECB2_pmc_debug@h DB 01H
__24F5AC6E_debug@c DB 01H
msvcjmc ENDS
PUBLIC TEST_Assert
PUBLIC FormatTestLabel
PUBLIC FormatTestMesssage
PUBLIC DoDebug
PUBLIC DumpBinary_UNIT
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_1O@FHBPNOC@?$PP?F?$PP?$LJ?$PP?H?$PP?$IL?$PP?K?$AA?6@ ; `string'
PUBLIC ??_C@_1GM@EPACJBNM@?$PP?F?$PP?$LJ?$PP?H?$PP?$IM?$PP?$IG?$AA?$AC?$AA?$AF?$PP?n?$AAp?$AA?$DN?$AA?$CF?$AAd?$AA?0?$AA?5?$AAO@ ; `string'
PUBLIC ??_C@_1CM@KHHPGPNK@?$AAP?$AAM?$AAC?$AA_?$AAI?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AA?5@ ; `string'
PUBLIC ??_C@_17EIACCBPF@?$AAx?$AA6?$AA4@ ; `string'
PUBLIC ??_C@_17CLPOHKCA@?$AAM?$AAS?$AAC@ ; `string'
PUBLIC ??_C@_1BM@IMGEAKDJ@?$AAP?$AAL?$AAA?$AAT?$AAF?$AAO?$AAR?$AAM?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?6@ ; `string'
PUBLIC ??_C@_1BM@DNPJODOF@?$AAC?$AAO?$AAM?$AAP?$AAI?$AAL?$AAE?$AAR?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?6@ ; `string'
PUBLIC ??_C@_1GO@EJNKEMEB@?$AAC?$AAP?$AAU?$AA?9?$AAI?$AAN?$AAF?$AAO?$AA?3?$AA?5?$AAP?$AAO?$AAP?$AAC?$AAN@ ; `string'
PUBLIC ??_C@_08EHONFECB@?$CK?$CK?$CKNG?$CK?$CK?$CK@ ; `string'
PUBLIC ??_C@_1DE@HJPKPLII@?$PP?F?$PP?$LJ?$PP?H?$AA?5?$AAN?$AAo?$AA?4?$AA?$CF?$AAd?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?5?$AA?$DN@ ; `string'
PUBLIC ??_C@_15JOGBDECP@?$AA?0?$AA?5@ ; `string'
PUBLIC ??_C@_1O@GMFEIALK@?$AA0?$AAx?$AA?$CF?$AA0?$AA2?$AAx@ ; `string'
EXTRN __imp_wsprintfW:PROC
EXTRN PMC_Initialize:PROC
EXTRN TEST_autogenerated:PROC
EXTRN _RTC_CheckStackVars:PROC
EXTRN _RTC_InitBase:PROC
EXTRN _RTC_Shutdown:PROC
EXTRN __CheckForDebuggerJustMyCode:PROC
_BSS SEGMENT
?buffer@?1??FormatTestLabel@@9@9 DW 0100H DUP (?) ; `FormatTestLabel'::`2'::buffer
?buffer@?1??FormatTestMesssage@@9@9 DW 0100H DUP (?) ; `FormatTestMesssage'::`2'::buffer
_BSS ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_Assert DD imagerel $LN5
DD imagerel $LN5+170
DD imagerel $unwind$TEST_Assert
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$FormatTestLabel DD imagerel $LN3
DD imagerel $LN3+114
DD imagerel $unwind$FormatTestLabel
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$FormatTestMesssage DD imagerel $LN3
DD imagerel $LN3+102
DD imagerel $unwind$FormatTestMesssage
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_Start DD imagerel TEST_Start
DD imagerel TEST_Start+100
DD imagerel $unwind$TEST_Start
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_End DD imagerel TEST_End
DD imagerel TEST_End+174
DD imagerel $unwind$TEST_End
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$DoTest DD imagerel DoTest
DD imagerel DoTest+140
DD imagerel $unwind$DoTest
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$DoDebug DD imagerel $LN4
DD imagerel $LN4+311
DD imagerel $unwind$DoDebug
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$DumpBinary_UNIT DD imagerel $LN10
DD imagerel $LN10+282
DD imagerel $unwind$DumpBinary_UNIT
pdata ENDS
; COMDAT rtc$TMZ
rtc$TMZ SEGMENT
_RTC_Shutdown.rtc$TMZ DQ FLAT:_RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
_RTC_InitBase.rtc$IMZ DQ FLAT:_RTC_InitBase
rtc$IMZ ENDS
; COMDAT ??_C@_1O@GMFEIALK@?$AA0?$AAx?$AA?$CF?$AA0?$AA2?$AAx@
CONST SEGMENT
??_C@_1O@GMFEIALK@?$AA0?$AAx?$AA?$CF?$AA0?$AA2?$AAx@ DB '0', 00H, 'x', 00H
DB '%', 00H, '0', 00H, '2', 00H, 'x', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_15JOGBDECP@?$AA?0?$AA?5@
CONST SEGMENT
??_C@_15JOGBDECP@?$AA?0?$AA?5@ DB ',', 00H, ' ', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1DE@HJPKPLII@?$PP?F?$PP?$LJ?$PP?H?$AA?5?$AAN?$AAo?$AA?4?$AA?$CF?$AAd?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?5?$AA?$DN@
CONST SEGMENT
??_C@_1DE@HJPKPLII@?$PP?F?$PP?$LJ?$PP?H?$AA?5?$AAN?$AAo?$AA?4?$AA?$CF?$AAd?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?5?$AA?$DN@ DB 0c6H
DB '0', 0b9H, '0', 0c8H, '0 ', 00H, 'N', 00H, 'o', 00H, '.', 00H, '%'
DB 00H, 'd', 00H, ':', 00H, ' ', 00H, '%', 00H, 's', 00H, ' ', 00H
DB '=', 00H, '>', 00H, ' ', 00H, '%', 00H, 's', 00H, ' ', 00H, '('
DB 00H, '%', 00H, 's', 00H, ')', 00H, 0aH, 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08EHONFECB@?$CK?$CK?$CKNG?$CK?$CK?$CK@
CONST SEGMENT
??_C@_08EHONFECB@?$CK?$CK?$CKNG?$CK?$CK?$CK@ DB '***NG***', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1GO@EJNKEMEB@?$AAC?$AAP?$AAU?$AA?9?$AAI?$AAN?$AAF?$AAO?$AA?3?$AA?5?$AAP?$AAO?$AAP?$AAC?$AAN@
CONST SEGMENT
??_C@_1GO@EJNKEMEB@?$AAC?$AAP?$AAU?$AA?9?$AAI?$AAN?$AAF?$AAO?$AA?3?$AA?5?$AAP?$AAO?$AAP?$AAC?$AAN@ DB 'C'
DB 00H, 'P', 00H, 'U', 00H, '-', 00H, 'I', 00H, 'N', 00H, 'F', 00H
DB 'O', 00H, ':', 00H, ' ', 00H, 'P', 00H, 'O', 00H, 'P', 00H, 'C'
DB 00H, 'N', 00H, 'T', 00H, '=', 00H, '%', 00H, 'd', 00H, ',', 00H
DB ' ', 00H, 'A', 00H, 'D', 00H, 'X', 00H, '=', 00H, '%', 00H, 'd'
DB 00H, ',', 00H, ' ', 00H, 'B', 00H, 'M', 00H, 'I', 00H, '1', 00H
DB '=', 00H, '%', 00H, 'd', 00H, ',', 00H, ' ', 00H, 'B', 00H, 'M'
DB 00H, 'I', 00H, '2', 00H, '=', 00H, '%', 00H, 'd', 00H, ',', 00H
DB ' ', 00H, 'A', 00H, 'B', 00H, 'M', 00H, '=', 00H, '%', 00H, 'd'
DB 00H, 0aH, 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1BM@DNPJODOF@?$AAC?$AAO?$AAM?$AAP?$AAI?$AAL?$AAE?$AAR?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?6@
CONST SEGMENT
??_C@_1BM@DNPJODOF@?$AAC?$AAO?$AAM?$AAP?$AAI?$AAL?$AAE?$AAR?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?6@ DB 'C'
DB 00H, 'O', 00H, 'M', 00H, 'P', 00H, 'I', 00H, 'L', 00H, 'E', 00H
DB 'R', 00H, ':', 00H, ' ', 00H, '%', 00H, 's', 00H, 0aH, 00H, 00H
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1BM@IMGEAKDJ@?$AAP?$AAL?$AAA?$AAT?$AAF?$AAO?$AAR?$AAM?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?6@
CONST SEGMENT
??_C@_1BM@IMGEAKDJ@?$AAP?$AAL?$AAA?$AAT?$AAF?$AAO?$AAR?$AAM?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?6@ DB 'P'
DB 00H, 'L', 00H, 'A', 00H, 'T', 00H, 'F', 00H, 'O', 00H, 'R', 00H
DB 'M', 00H, ':', 00H, ' ', 00H, '%', 00H, 's', 00H, 0aH, 00H, 00H
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_17CLPOHKCA@?$AAM?$AAS?$AAC@
CONST SEGMENT
??_C@_17CLPOHKCA@?$AAM?$AAS?$AAC@ DB 'M', 00H, 'S', 00H, 'C', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_17EIACCBPF@?$AAx?$AA6?$AA4@
CONST SEGMENT
??_C@_17EIACCBPF@?$AAx?$AA6?$AA4@ DB 'x', 00H, '6', 00H, '4', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1CM@KHHPGPNK@?$AAP?$AAM?$AAC?$AA_?$AAI?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AA?5@
CONST SEGMENT
??_C@_1CM@KHHPGPNK@?$AAP?$AAM?$AAC?$AA_?$AAI?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AA?5@ DB 'P'
DB 00H, 'M', 00H, 'C', 00H, '_', 00H, 'I', 00H, 'n', 00H, 'i', 00H
DB 't', 00H, 'i', 00H, 'a', 00H, 'l', 00H, 'i', 00H, 'z', 00H, 'e'
DB 00H, ' ', 00H, 'f', 00H, 'a', 00H, 'i', 00H, 'l', 00H, 'e', 00H
DB 'd', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1GM@EPACJBNM@?$PP?F?$PP?$LJ?$PP?H?$PP?$IM?$PP?$IG?$AA?$AC?$AA?$AF?$PP?n?$AAp?$AA?$DN?$AA?$CF?$AAd?$AA?0?$AA?5?$AAO@
CONST SEGMENT
??_C@_1GM@EPACJBNM@?$PP?F?$PP?$LJ?$PP?H?$PP?$IM?$PP?$IG?$AA?$AC?$AA?$AF?$PP?n?$AAp?$AA?$DN?$AA?$CF?$AAd?$AA?0?$AA?5?$AAO@ DB 0c6H
DB '0', 0b9H, '0', 0c8H, '0', 08cH, '[', 086H, 'N', 02H, '0', 05H
DB 098H, 0eeH, 'vpe=', 00H, '%', 00H, 'd', 00H, ',', 00H, ' ', 00H
DB 'O', 00H, 'K', 00H, 05H, 098H, 0eeH, 'vpe=', 00H, '%', 00H, 'd'
DB 00H, ',', 00H, ' ', 00H, 'N', 00H, 'G', 00H, 05H, 098H, 0eeH, 'v'
DB 'pe=', 00H, '%', 00H, 'd', 00H, ',', 00H, ' ', 00H, 'O', 00H, 'K'
DB 00H, 087H, 's=', 00H, '%', 00H, 'd', 00H, '%', 00H, '%', 00H, ','
DB 00H, ' ', 00H, 'N', 00H, 'G', 00H, 087H, 's=', 00H, '%', 00H, 'd'
DB 00H, '%', 00H, '%', 00H, 0aH, 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1O@FHBPNOC@?$PP?F?$PP?$LJ?$PP?H?$PP?$IL?$PP?K?$AA?6@
CONST SEGMENT
??_C@_1O@FHBPNOC@?$PP?F?$PP?$LJ?$PP?H?$PP?$IL?$PP?K?$AA?6@ DB 0c6H, '0', 0b9H
DB '0', 0c8H, '0', 08bH, 095H, 0cbH, 'Y', 0aH, 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$DumpBinary_UNIT DD 025052f01H
DD 01132318H
DD 0700c0025H
DD 0500bH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$DoDebug DD 035052a01H
DD 010e3313H
DD 07007002fH
DD 05006H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
DoDebug$rtcName$0 DB 063H
DB 06fH
DB 06eH
DB 066H
DB 00H
ORG $+11
DoDebug$rtcVarDesc DD 034H
DD 04H
DQ FLAT:DoDebug$rtcName$0
ORG $+48
DoDebug$rtcFrameData DD 01H
DD 00H
DQ FLAT:DoDebug$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$DoTest DD 025052f01H
DD 01132318H
DD 0700c001dH
DD 0500bH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_End DD 035052a01H
DD 010e3313H
DD 070070021H
DD 05006H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_Start DD 025052a01H
DD 010e2313H
DD 07007001dH
DD 05006H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$FormatTestMesssage DD 025052e01H
DD 01122317H
DD 0700b001dH
DD 0500aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$FormatTestLabel DD 025053301H
DD 0117231cH
DD 07010001dH
DD 0500fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_Assert DD 035053901H
DD 011d3322H
DD 07016001fH
DD 05015H
xdata ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\debug.c
; COMDAT DumpBinary_UNIT
_TEXT SEGMENT
p$1 = 8
is_first$2 = 36
buf$ = 288
count$ = 296
DumpBinary_UNIT PROC ; COMDAT
; 142 : {
$LN10:
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 296 ; 00000128H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 74 ; 0000004aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+328]
lea rcx, OFFSET FLAT:__24F5AC6E_debug@c
call __CheckForDebuggerJustMyCode
; 143 : if (__DEBUG_LOG != NULL)
cmp QWORD PTR __DEBUG_LOG, 0
je $LN6@DumpBinary
; 144 : {
; 145 : unsigned char* p = (unsigned char*)buf;
mov rax, QWORD PTR buf$[rbp]
mov QWORD PTR p$1[rbp], rax
; 146 : count *= sizeof(__UNIT_TYPE);
mov rax, QWORD PTR count$[rbp]
shl rax, 3
mov QWORD PTR count$[rbp], rax
$LN2@DumpBinary:
; 147 : while (count > 0 && p[count - 1] == 0)
cmp QWORD PTR count$[rbp], 0
jbe SHORT $LN3@DumpBinary
mov rax, QWORD PTR count$[rbp]
mov rcx, QWORD PTR p$1[rbp]
add rcx, rax
mov rax, rcx
movzx eax, BYTE PTR [rax-1]
test eax, eax
jne SHORT $LN3@DumpBinary
; 148 : --count;
mov rax, QWORD PTR count$[rbp]
dec rax
mov QWORD PTR count$[rbp], rax
jmp SHORT $LN2@DumpBinary
$LN3@DumpBinary:
; 149 : if (count <= 0)
cmp QWORD PTR count$[rbp], 0
ja SHORT $LN7@DumpBinary
; 150 : count = 1;
mov QWORD PTR count$[rbp], 1
$LN7@DumpBinary:
; 151 : int is_first = 1;
mov DWORD PTR is_first$2[rbp], 1
$LN4@DumpBinary:
; 152 : while (count > 0)
cmp QWORD PTR count$[rbp], 0
jbe SHORT $LN5@DumpBinary
; 153 : {
; 154 : if (!is_first)
cmp DWORD PTR is_first$2[rbp], 0
jne SHORT $LN8@DumpBinary
; 155 : (*__DEBUG_LOG)(L", ");
lea rcx, OFFSET FLAT:??_C@_15JOGBDECP@?$AA?0?$AA?5@
call QWORD PTR __DEBUG_LOG
$LN8@DumpBinary:
; 156 : (*__DEBUG_LOG)(L"0x%02x", *p);
mov rax, QWORD PTR p$1[rbp]
movzx eax, BYTE PTR [rax]
mov edx, eax
lea rcx, OFFSET FLAT:??_C@_1O@GMFEIALK@?$AA0?$AAx?$AA?$CF?$AA0?$AA2?$AAx@
call QWORD PTR __DEBUG_LOG
; 157 : ++p;
mov rax, QWORD PTR p$1[rbp]
inc rax
mov QWORD PTR p$1[rbp], rax
; 158 : --count;
mov rax, QWORD PTR count$[rbp]
dec rax
mov QWORD PTR count$[rbp], rax
; 159 : is_first = 0;
mov DWORD PTR is_first$2[rbp], 0
; 160 : }
jmp SHORT $LN4@DumpBinary
$LN5@DumpBinary:
$LN6@DumpBinary:
; 161 : }
; 162 : }
lea rsp, QWORD PTR [rbp+264]
pop rdi
pop rbp
ret 0
DumpBinary_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\debug.c
; COMDAT DoDebug
_TEXT SEGMENT
conf$ = 4
ep$ = 40
platform$ = 72
compiler$ = 104
tv95 = 308
env$ = 352
DoDebug PROC ; COMDAT
; 73 : {
$LN4:
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 376 ; 00000178H
lea rbp, QWORD PTR [rsp+48]
mov rdi, rsp
mov ecx, 94 ; 0000005eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+408]
lea rcx, OFFSET FLAT:__24F5AC6E_debug@c
call __CheckForDebuggerJustMyCode
; 74 : #ifdef _DEBUG
; 75 : PMC_CONFIGURATION_INFO conf;
; 76 : conf.MEMORY_VERIFICATION_ENABLED = FALSE;
mov eax, DWORD PTR conf$[rbp]
and eax, -2 ; fffffffeH
mov DWORD PTR conf$[rbp], eax
; 77 : PMC_UINT_ENTRY_POINTS* ep = PMC_Initialize(&conf);
lea rcx, QWORD PTR conf$[rbp]
call PMC_Initialize
mov QWORD PTR ep$[rbp], rax
; 78 : if (ep == NULL)
cmp QWORD PTR ep$[rbp], 0
jne SHORT $LN2@DoDebug
; 79 : {
; 80 : env->log(L"PMC_Initialize failed");
lea rcx, OFFSET FLAT:??_C@_1CM@KHHPGPNK@?$AAP?$AAM?$AAC?$AA_?$AAI?$AAn?$AAi?$AAt?$AAi?$AAa?$AAl?$AAi?$AAz?$AAe?$AA?5@
mov rax, QWORD PTR env$[rbp]
call QWORD PTR [rax]
; 81 : return;
jmp $LN1@DoDebug
$LN2@DoDebug:
; 82 : }
; 83 : #ifdef _M_IX86
; 84 : wchar_t* platform = L"x86";
; 85 : #elif defined(_M_IX64)
; 86 : wchar_t* platform = L"x64";
lea rax, OFFSET FLAT:??_C@_17EIACCBPF@?$AAx?$AA6?$AA4@
mov QWORD PTR platform$[rbp], rax
; 87 : #else
; 88 : #error unknown platform
; 89 : #endif
; 90 : #ifdef _MSC_VER
; 91 : wchar_t* compiler = L"MSC";
lea rax, OFFSET FLAT:??_C@_17CLPOHKCA@?$AAM?$AAS?$AAC@
mov QWORD PTR compiler$[rbp], rax
; 92 : #elif defined(__GNUC__)
; 93 : wchar_t* compiler = L"GNUC";
; 94 : #else
; 95 : #error unknown platform
; 96 : #endif
; 97 :
; 98 : env->log(L"PLATFORM: %s\n", platform);
mov rdx, QWORD PTR platform$[rbp]
lea rcx, OFFSET FLAT:??_C@_1BM@IMGEAKDJ@?$AAP?$AAL?$AAA?$AAT?$AAF?$AAO?$AAR?$AAM?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?6@
mov rax, QWORD PTR env$[rbp]
call QWORD PTR [rax]
; 99 : env->log(L"COMPILER: %s\n", compiler);
mov rdx, QWORD PTR compiler$[rbp]
lea rcx, OFFSET FLAT:??_C@_1BM@DNPJODOF@?$AAC?$AAO?$AAM?$AAP?$AAI?$AAL?$AAE?$AAR?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?6@
mov rax, QWORD PTR env$[rbp]
call QWORD PTR [rax]
; 100 : env->log(L"CPU-INFO: POPCNT=%d, ADX=%d, BMI1=%d, BMI2=%d, ABM=%d\n",
mov rax, QWORD PTR ep$[rbp]
mov eax, DWORD PTR [rax]
shr eax, 4
and eax, 1
mov rcx, QWORD PTR ep$[rbp]
mov ecx, DWORD PTR [rcx]
shr ecx, 3
and ecx, 1
mov rdx, QWORD PTR ep$[rbp]
mov edx, DWORD PTR [rdx]
shr edx, 2
and edx, 1
mov r8, QWORD PTR ep$[rbp]
mov r8d, DWORD PTR [r8]
shr r8d, 1
and r8d, 1
mov r9, QWORD PTR ep$[rbp]
mov r9d, DWORD PTR [r9]
and r9d, 1
mov DWORD PTR tv95[rbp], r9d
mov DWORD PTR [rsp+40], eax
mov DWORD PTR [rsp+32], ecx
mov r9d, edx
mov eax, DWORD PTR tv95[rbp]
mov edx, eax
lea rcx, OFFSET FLAT:??_C@_1GO@EJNKEMEB@?$AAC?$AAP?$AAU?$AA?9?$AAI?$AAN?$AAF?$AAO?$AA?3?$AA?5?$AAP?$AAO?$AAP?$AAC?$AAN@
mov rax, QWORD PTR env$[rbp]
call QWORD PTR [rax]
; 101 : ep->PROCESSOR_FEATURE_POPCNT,
; 102 : ep->PROCESSOR_FEATURE_ADX,
; 103 : ep->PROCESSOR_FEATURE_BMI1,
; 104 : ep->PROCESSOR_FEATURE_BMI2,
; 105 : ep->PROCESSOR_FEATURE_ABM);
; 106 :
; 107 : //CalculateCriticalDataOfDivision(env);
; 108 : DoTest(env, ep);
mov rdx, QWORD PTR ep$[rbp]
mov rcx, QWORD PTR env$[rbp]
call DoTest
$LN1@DoDebug:
; 109 : #endif
; 110 : }
lea rcx, QWORD PTR [rbp-48]
lea rdx, OFFSET FLAT:DoDebug$rtcFrameData
call _RTC_CheckStackVars
lea rsp, QWORD PTR [rbp+328]
pop rdi
pop rbp
ret 0
DoDebug ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\debug.c
; COMDAT DoTest
_TEXT SEGMENT
env$ = 224
ep$ = 232
DoTest PROC ; COMDAT
; 63 : {
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__24F5AC6E_debug@c
call __CheckForDebuggerJustMyCode
; 64 : __DEBUG_LOG = env->log;
mov rax, QWORD PTR env$[rbp]
mov rax, QWORD PTR [rax]
mov QWORD PTR __DEBUG_LOG, rax
; 65 : TEST_Start(env);
mov rcx, QWORD PTR env$[rbp]
call TEST_Start
; 66 : TEST_autogenerated(env, ep);
mov rdx, QWORD PTR ep$[rbp]
mov rcx, QWORD PTR env$[rbp]
call TEST_autogenerated
; 67 : TEST_End(env);
mov rcx, QWORD PTR env$[rbp]
call TEST_End
; 68 : __DEBUG_LOG = NULL;
mov QWORD PTR __DEBUG_LOG, 0
; 69 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
DoTest ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\debug.c
; COMDAT TEST_End
_TEXT SEGMENT
tv68 = 192
env$ = 240
TEST_End PROC ; COMDAT
; 53 : {
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 264 ; 00000108H
lea rbp, QWORD PTR [rsp+48]
mov rdi, rsp
mov ecx, 66 ; 00000042H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+296]
lea rcx, OFFSET FLAT:__24F5AC6E_debug@c
call __CheckForDebuggerJustMyCode
; 54 : env->log(L"テスト完了。項目数=%d, OK項目数=%d, NG項目数=%d, OK率=%d%%, NG率=%d%%\n",
mov eax, DWORD PTR test_ok_count
mov ecx, DWORD PTR test_total_count
sub ecx, eax
mov eax, ecx
imul eax, eax, 100 ; 00000064H
cdq
idiv DWORD PTR test_total_count
mov DWORD PTR tv68[rbp], eax
imul ecx, DWORD PTR test_ok_count, 100 ; 00000064H
mov eax, ecx
cdq
idiv DWORD PTR test_total_count
mov ecx, DWORD PTR test_ok_count
mov edx, DWORD PTR test_total_count
sub edx, ecx
mov ecx, edx
mov edx, DWORD PTR tv68[rbp]
mov DWORD PTR [rsp+40], edx
mov DWORD PTR [rsp+32], eax
mov r9d, ecx
mov r8d, DWORD PTR test_ok_count
mov edx, DWORD PTR test_total_count
lea rcx, OFFSET FLAT:??_C@_1GM@EPACJBNM@?$PP?F?$PP?$LJ?$PP?H?$PP?$IM?$PP?$IG?$AA?$AC?$AA?$AF?$PP?n?$AAp?$AA?$DN?$AA?$CF?$AAd?$AA?0?$AA?5?$AAO@
mov rax, QWORD PTR env$[rbp]
call QWORD PTR [rax]
; 55 : test_total_count,
; 56 : test_ok_count,
; 57 : test_total_count - test_ok_count,
; 58 : test_ok_count * 100 / test_total_count,
; 59 : (test_total_count - test_ok_count) * 100 / test_total_count);
; 60 : }
lea rsp, QWORD PTR [rbp+216]
pop rdi
pop rbp
ret 0
TEST_End ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\debug.c
; COMDAT TEST_Start
_TEXT SEGMENT
env$ = 224
TEST_Start PROC ; COMDAT
; 46 : {
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__24F5AC6E_debug@c
call __CheckForDebuggerJustMyCode
; 47 : test_total_count = 0;
mov DWORD PTR test_total_count, 0
; 48 : test_ok_count = 0;
mov DWORD PTR test_ok_count, 0
; 49 : env->log(L"テスト開始\n");
lea rcx, OFFSET FLAT:??_C@_1O@FHBPNOC@?$PP?F?$PP?$LJ?$PP?H?$PP?$IL?$PP?K?$AA?6@
mov rax, QWORD PTR env$[rbp]
call QWORD PTR [rax]
; 50 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
TEST_Start ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\debug.c
; COMDAT FormatTestMesssage
_TEXT SEGMENT
format$ = 224
return_value$ = 232
FormatTestMesssage PROC ; COMDAT
; 135 : {
$LN3:
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__24F5AC6E_debug@c
call __CheckForDebuggerJustMyCode
; 136 : static wchar_t buffer[256];
; 137 : wsprintfW(buffer, format, return_value);
mov r8d, DWORD PTR return_value$[rbp]
mov rdx, QWORD PTR format$[rbp]
lea rcx, OFFSET FLAT:?buffer@?1??FormatTestMesssage@@9@9
call QWORD PTR __imp_wsprintfW
; 138 : return buffer;
lea rax, OFFSET FLAT:?buffer@?1??FormatTestMesssage@@9@9
; 139 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
FormatTestMesssage ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\debug.c
; COMDAT FormatTestLabel
_TEXT SEGMENT
format$ = 224
n1$ = 232
n2$ = 240
FormatTestLabel PROC ; COMDAT
; 128 : {
$LN3:
mov DWORD PTR [rsp+24], r8d
mov DWORD PTR [rsp+16], edx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 232 ; 000000e8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 58 ; 0000003aH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+264]
lea rcx, OFFSET FLAT:__24F5AC6E_debug@c
call __CheckForDebuggerJustMyCode
; 129 : static wchar_t buffer[256];
; 130 : wsprintfW(buffer, format, n1, n2);
mov r9d, DWORD PTR n2$[rbp]
mov r8d, DWORD PTR n1$[rbp]
mov rdx, QWORD PTR format$[rbp]
lea rcx, OFFSET FLAT:?buffer@?1??FormatTestLabel@@9@9
call QWORD PTR __imp_wsprintfW
; 131 : return buffer;
lea rax, OFFSET FLAT:?buffer@?1??FormatTestLabel@@9@9
; 132 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
FormatTestLabel ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\debug.c
; COMDAT TEST_Assert
_TEXT SEGMENT
env$ = 224
test_name$ = 232
condition$ = 240
reason$ = 248
TEST_Assert PROC ; COMDAT
; 114 : {
$LN5:
mov QWORD PTR [rsp+32], r9
mov DWORD PTR [rsp+24], r8d
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 248 ; 000000f8H
lea rbp, QWORD PTR [rsp+48]
mov rdi, rsp
mov ecx, 62 ; 0000003eH
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+280]
lea rcx, OFFSET FLAT:__24F5AC6E_debug@c
call __CheckForDebuggerJustMyCode
; 115 : if (condition)
cmp DWORD PTR condition$[rbp], 0
je SHORT $LN2@TEST_Asser
; 116 : {
; 117 : //env->log(L"テスト No.%d: %s => %s\n", test_total_count + 1, test_name, "Ok");
; 118 : ++test_ok_count;
mov eax, DWORD PTR test_ok_count
inc eax
mov DWORD PTR test_ok_count, eax
; 119 : }
jmp SHORT $LN3@TEST_Asser
$LN2@TEST_Asser:
; 120 : else
; 121 : {
; 122 : env->log(L"テスト No.%d: %s => %s (%s)\n", test_total_count + 1, test_name, "***NG***", reason);
mov eax, DWORD PTR test_total_count
inc eax
mov rcx, QWORD PTR reason$[rbp]
mov QWORD PTR [rsp+32], rcx
lea r9, OFFSET FLAT:??_C@_08EHONFECB@?$CK?$CK?$CKNG?$CK?$CK?$CK@
mov r8, QWORD PTR test_name$[rbp]
mov edx, eax
lea rcx, OFFSET FLAT:??_C@_1DE@HJPKPLII@?$PP?F?$PP?$LJ?$PP?H?$AA?5?$AAN?$AAo?$AA?4?$AA?$CF?$AAd?$AA?3?$AA?5?$AA?$CF?$AAs?$AA?5?$AA?$DN@
mov rax, QWORD PTR env$[rbp]
call QWORD PTR [rax]
$LN3@TEST_Asser:
; 123 : }
; 124 : ++test_total_count;
mov eax, DWORD PTR test_total_count
inc eax
mov DWORD PTR test_total_count, eax
; 125 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
TEST_Assert ENDP
_TEXT ENDS
END
| 26.535912
| 143
| 0.648511
|
cbb0ded6c4c3b3c9f8ae352b620b7187d5c23ca9
| 3,945
|
asm
|
Assembly
|
src/test/ref/struct-48.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | 2
|
2022-03-01T02:21:14.000Z
|
2022-03-01T04:33:35.000Z
|
src/test/ref/struct-48.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
src/test/ref/struct-48.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
// https://gitlab.com/camelot/kickc/-/issues/590
// This version with +256 bytes struct
// Commodore 64 PRG executable file
.file [name="struct-48.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
.const SIZEOF_STRUCT_DEVICESLOT = $102
.const SIZEOF_STRUCT_DEVICESLOTSA = $204
.const OFFSET_STRUCT_DEVICESLOT_MODE = 1
.label OUT = $8000
.segment Code
main: {
.label slotsA = ssA
.label __0 = 6
.label __4 = 2
.label i = 4
.label __13 = 2
.label __14 = 2
.label __15 = 2
// deviceslot_t s1 = {'A', 'R', "f1"}
lda #<@__0
sta.z $fc
lda #>@__0
sta.z $fd
lda #<s1
sta.z $fe
lda #>s1
sta.z $ff
ldy #0
ldx #0
!n:
lda ($fc),y
sta ($fe),y
iny
cpy #$ff
bne !+
inc.z $fd
inc.z $ff
inx
!:
cpy #<SIZEOF_STRUCT_DEVICESLOT
bne !n-
cpx #>SIZEOF_STRUCT_DEVICESLOT
bne !n-
// deviceslot_t s2 = {'B', 'W', "f2"}
lda #<__1
sta.z $fc
lda #>__1
sta.z $fd
lda #<s2
sta.z $fe
lda #>s2
sta.z $ff
ldy #0
ldx #0
!n:
lda ($fc),y
sta ($fe),y
iny
cpy #$ff
bne !+
inc.z $fd
inc.z $ff
inx
!:
cpy #<SIZEOF_STRUCT_DEVICESLOT
bne !n-
cpx #>SIZEOF_STRUCT_DEVICESLOT
bne !n-
// DeviceSlotsA ssA
lda #<ssA
sta.z $fe
lda #>ssA
sta.z $ff
lda #0
tay
tax
!n:
sta ($fe),y
iny
cpy #$ff
bne !+
inc.z $ff
inx
!:
cpy #<SIZEOF_STRUCT_DEVICESLOTSA
bne !n-
cpx #>SIZEOF_STRUCT_DEVICESLOTSA
bne !n-
// slotsA->slot[0] = s1
lda #<s1
sta.z $fc
lda #>s1
sta.z $fd
lda #<slotsA
sta.z $fe
lda #>slotsA
sta.z $ff
ldy #0
ldx #0
!n:
lda ($fc),y
sta ($fe),y
iny
cpy #$ff
bne !+
inc.z $fd
inc.z $ff
inx
!:
cpy #<SIZEOF_STRUCT_DEVICESLOT
bne !n-
cpx #>SIZEOF_STRUCT_DEVICESLOT
bne !n-
// slotsA->slot[1] = s2
lda #<s2
sta.z $fc
lda #>s2
sta.z $fd
lda #<slotsA+1*SIZEOF_STRUCT_DEVICESLOT
sta.z $fe
lda #>slotsA+1*SIZEOF_STRUCT_DEVICESLOT
sta.z $ff
ldy #0
ldx #0
!n:
lda ($fc),y
sta ($fe),y
iny
cpy #$ff
bne !+
inc.z $fd
inc.z $ff
inx
!:
cpy #<SIZEOF_STRUCT_DEVICESLOT
bne !n-
cpx #>SIZEOF_STRUCT_DEVICESLOT
bne !n-
lda #<0
sta.z i
sta.z i+1
__b1:
// deviceslot_t ds = slotsA->slot[i]
lda.z i+1
lsr
lda.z i
ror
sta.z __14+1
lda #0
ror
sta.z __14
clc
lda.z __15
adc.z i
sta.z __15
lda.z __15+1
adc.z i+1
sta.z __15+1
asl.z __4
rol.z __4+1
lda.z __13
clc
adc #<slotsA
sta.z __13
lda.z __13+1
adc #>slotsA
sta.z __13+1
lda.z __13
sta.z $fc
lda.z __13+1
sta.z $fd
lda #<ds
sta.z $fe
lda #>ds
sta.z $ff
ldy #0
ldx #0
!n:
lda ($fc),y
sta ($fe),y
iny
cpy #$ff
bne !+
inc.z $fd
inc.z $ff
inx
!:
cpy #<SIZEOF_STRUCT_DEVICESLOT
bne !n-
cpx #>SIZEOF_STRUCT_DEVICESLOT
bne !n-
// OUT + i
lda.z i
clc
adc #<OUT
sta.z __0
lda.z i+1
adc #>OUT
sta.z __0+1
// *(OUT + i) = ds.mode
lda ds+OFFSET_STRUCT_DEVICESLOT_MODE
ldy #0
sta (__0),y
// for(unsigned int i: 0..1)
inc.z i
bne !+
inc.z i+1
!:
lda.z i+1
bne __b1
lda.z i
cmp #2
bne __b1
// }
rts
.segment Data
s1: .fill SIZEOF_STRUCT_DEVICESLOT, 0
s2: .fill SIZEOF_STRUCT_DEVICESLOT, 0
ssA: .fill SIZEOF_STRUCT_DEVICESLOTSA, 0
ds: .fill SIZEOF_STRUCT_DEVICESLOT, 0
}
__0: .byte 'A', 'R'
.text "f1"
.byte 0
.fill $fd, 0
__1: .byte 'B', 'W'
.text "f2"
.byte 0
.fill $fd, 0
| 16.787234
| 60
| 0.525729
|
101f5fd3505c3e9c8a3a2cd276e6e64425b95ae0
| 801
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/p_forward_list/z80/asm_p_forward_list_push_front.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/adt/p_forward_list/z80/asm_p_forward_list_push_front.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/adt/p_forward_list/z80/asm_p_forward_list_push_front.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; ===============================================================
; Dec 2013
; ===============================================================
;
; void p_forward_list_push_front(p_forward_list_t *list, void *item)
;
; The address of the item's forward pointer is passed as param.
;
; Add item to the front of the list.
;
; ===============================================================
SECTION code_adt_p_forward_list
PUBLIC asm_p_forward_list_push_front
EXTERN asm_p_forward_list_insert_after
defc asm_p_forward_list_push_front = asm_p_forward_list_insert_after
; enter : hl = p_forward_list_t *list
; de = void *item
;
; exit : hl = void *item
; de = p_forward_list_t *list
; z flag set if item is the only one in list
;
; uses : af, de, hl
| 26.7
| 68
| 0.524345
|
10a02933de79a1c43c887b8422bef39a4b2fac75
| 697
|
asm
|
Assembly
|
binaryToDecimal.asm
|
darrenyip/MipsCode
|
dfc10818ce94028a4af053112775e5847684915a
|
[
"MIT"
] | null | null | null |
binaryToDecimal.asm
|
darrenyip/MipsCode
|
dfc10818ce94028a4af053112775e5847684915a
|
[
"MIT"
] | null | null | null |
binaryToDecimal.asm
|
darrenyip/MipsCode
|
dfc10818ce94028a4af053112775e5847684915a
|
[
"MIT"
] | null | null | null |
li $v0, 5 #get user input
syscall
move $t0, $v0
li $t1, 2147483648 # mask 1000.....000000
li $t2, 31 # counter for all 16 digits binary numbers
li $t4, 1 #just an integer nummber 1
Loop:
and $t3, $t1, $t0 # save the number into t3
beq $t3, $zero, print #if t3 == zero print 0
addi $a0, $t4, 0 # else print number 1
li $v0, 1
syscall
srl $t1, $t1,1 #shift right 1
sub $t2, $t2, 1 #counter -1
j Loop
print:
sub $t2, $t2, 1 #counter -1
blt $t2, -1, exit # if counter is less than 01 then exit the program
srl $t1, $t1,1 #shift left 1
li $v0, 4 #print number 0
la $a0, print0
syscall
j Loop
exit:
li $v0, 10
syscall
.data
print1: .ascii "1"
print0: .ascii "0"
| 16.595238
| 68
| 0.624103
|
60be9ea5dd36b0357862679f9fd77f98cda8e5c0
| 12,069
|
asm
|
Assembly
|
chatf.asm
|
MohammedAlsayedOmar/Multiplayer-Snake
|
a45cc033500cb7af2226fb2e6e1d9d6eb55d2392
|
[
"MIT"
] | null | null | null |
chatf.asm
|
MohammedAlsayedOmar/Multiplayer-Snake
|
a45cc033500cb7af2226fb2e6e1d9d6eb55d2392
|
[
"MIT"
] | null | null | null |
chatf.asm
|
MohammedAlsayedOmar/Multiplayer-Snake
|
a45cc033500cb7af2226fb2e6e1d9d6eb55d2392
|
[
"MIT"
] | null | null | null |
assume CS:Code_segment_name,DS:Data_segment_name
Main1 proc far
mov [sendDOffset],0
mov [sendDnum],0 ;start from 0
mov [rowRec],0
mov [colRec],0
call far ptr clearscreen
call far ptr linee
call far ptr initialization
again:
call far ptr setCurser
call far ptr getKeyPressed
call far ptr Recieve
cmp esqq,1
je exit
jmp again
exit:
mov [esqq],0
retf
Main1 endp
clearscreen proc far
mov ah,6
mov al,0
mov bh,7
mov ch,0
mov cl,0
mov dh,24
mov dl,79
int 10h
retf
clearscreen endp
linee proc far
mov cx,80
mov ax,0b800h
mov es,ax
mov di,20*160
drawLine:
lea si,split
movsw
loop drawLine
retf
linee endp
setCurser proc far ;Typing Cursor
mov AH, 02h
mov bh,0
mov DH,[rowType] ;y
mov DL,[colType] ;x
int 10h
retf
setCurser endp
moveCurserType proc far
inc [colType]
cmp [colType],80 ;if column reach more than 79 we inc row
je cmpRowT
jmp retfFromMoveCurserT
incRowT:
mov [colType],0
inc [rowType]
jmp retfFromMoveCurserT
cmpRowT:
cmp [rowType],24
jne incRowT
mov [rowType],24
mov [colType],0
call far ptr scrollUpTyping
retfFromMoveCurserT:
retf
moveCurserType endp
moveCurserTypeBack proc far ;Move typing cursor
cmp [colType],0 ;if column is not zero we dec col and retfurn
je cmpRowTB ;else we continue
dec [colType]
jmp retfFromMoveCurserTB
decRowTB:
mov [colType],79
dec [rowType]
jmp retfFromMoveCurserTB
cmpRowTB:
cmp [rowType],21 ;if we are on the first line we do nothing
jne decRowTB ;else we dec the row
mov [rowType],21
mov [colType],0
retfFromMoveCurserTB:
retf
moveCurserTypeBack endp
setCurserRec proc far ;Recieving Cursor
mov AH, 02h
mov bh,0
mov DH,[rowRec] ;y
mov DL,[colRec] ;x
int 10h
retf
setCurserRec endp
moveCurserRecieve proc far
inc [colRec]
cmp [colRec],80 ;if column reach more than 79 we inc row
je cmpRowR
jmp retfFromMoveCurserR
incRowR:
mov [colRec],0
inc [rowRec]
jmp retfFromMoveCurserR
cmpRowR:
cmp [rowRec],19
jne incRowR
mov [rowRec],19
mov [colRec],0
call far ptr scrollRecHalf
retfFromMoveCurserR:
retf
moveCurserRecieve endp
movCurRecNextLine proc far
cmp [rowRec],19
jne incRowRN ;increment row recieve new line
mov [rowRec], 19
mov [colRec], 0
call far ptr scrollRecHalf
jmp retfFromMovCurNL
incRowRN:
inc [rowRec]
mov [colRec],0
retfFromMovCurNL:
retf
movCurRecNextLine endp
print proc far
mov bh,0
mov bl,07h
mov cx,1
mov ah,9
int 10h
retf
print endp
clearAllData proc far
mov [sendDOffset],0 ;reset offset and SendNum
mov [sendDnum],0
mov ax,Data_segment_name ;clear the SD's
mov es,ax
lea di,sendD1
mov ax,0 ; stosw .. ax -> es:di
mov cx, 60*5 ;(120/2)*5 (Word not byte)
rep stosw
retf
clearAllData endp
clearTypingAreaAndRestingCusror proc far
mov ah,6 ;clear Typing Area
mov al,0
mov bh,7
mov ch,21
mov cl,0
mov dh,24
mov dl,79
int 10h
mov [rowType],21 ;setting cursor to start from beginning
mov [colType],0
retf
clearTypingAreaAndRestingCusror endp
printYou proc far
lea dx,chatMe
mov ah,09
int 21h
;Printing you doesn't move the cursor
add [colRec],5
retf
printYou endp
getKeyPressed proc far
mov ah,1
int 16h
jz retfFromKeyPress
mov ah,0 ;read input
int 16h ;char in al
cmp al,1bh ;escape key to terminate
je EscapeKey
cmp al,08 ;backspace key
je BackSpace
cmp al,13 ;EnterKey
jne continuePrintingChars
cmp [sendDnum],0
je ok
ok:
cmp [sendDOffset],0
je leav
call far ptr Send
call movCurRecNextLine
call far ptr clearTypingAreaAndRestingCusror
leav:
jmp retfFromKeyPress
EscapeKey: ;Send Escape terminates the program so no need to jump to retfurn after it
call far ptr SendEscape
mov [esqq],1
ret
continuePrintingChars: ;else (enter not pressed we continue)
cmp [sendDnum],5
je retfFromKeyPress
cmp [sendDOffset],120 ;if offset not 120 we check we are in which seg and continue
jne checkWhichSeg
mov [sendDOffset],0 ;else (we are 120) we set offset to zero and increment the segNum
inc [sendDnum]
cmp [sendDnum],5 ;if num is 5 we are out of range so we take no more input
je retfFromKeyPress
checkWhichSeg:
cmp [sendDnum],0
je fill1
cmp [sendDnum],1
je fill2
cmp [sendDnum],2
je fill3
cmp [sendDnum],3
je fill4Out
cmp [sendDnum],4
je fill5Out
jmp continueCode ;because out of range issue
retfFromKeyPress:
jmp retfFromKeyPress2
BackSpace:
mov al,' '
cmp [sendDOffset],0 ;check the offset
jne checkWhichSegB ;if offset is not zero (We check which seg to remove from)
cmp [sendDnum],0 ;else .. we check the seg if it is zero w retf
jz retfFromKeyPress2
dec[sendDnum] ;else we dec sendDnum and make offset 119
mov [sendDOffset],120
checkWhichSegB:
cmp [sendDnum],0
je remove1Out
cmp [sendDnum],1
je remove2Out
cmp [sendDnum],2
je remove3Out
cmp [sendDnum],3
je remove4Out
cmp [sendDnum],4
je remove5Out
fill4Out:
jmp fill4
fill5Out:
jmp fill5
continueCode:
fill1:
mov bh,0
mov bl,[sendDOffset]
mov sendD1[bx],al
inc [sendDOffset]
jmp printAndMoveForward
fill2:
mov bh,0
mov bl,[sendDOffset]
mov sendD2[bx],al
inc [sendDOffset]
jmp printAndMoveForward
fill3:
mov bh,0
mov bl,[sendDOffset]
mov sendD3[bx],al
inc [sendDOffset]
jmp printAndMoveForward
fill4:
mov bh,0
mov bl,[sendDOffset]
mov sendD4[bx],al
inc [sendDOffset]
jmp printAndMoveForward
jmp continueCode2 ;because out of range issue AGAIN
retfFromKeyPress2:
jmp retfFromKeyPress3
remove1Out:
jmp remove1
remove2Out:
jmp remove2
remove3Out:
jmp remove3
remove4Out:
jmp remove4
remove5Out:
jmp remove5
fill5:
mov bh,0
mov bl,[sendDOffset]
mov sendD5[bx],al
inc [sendDOffset]
jmp printAndMoveForward
continueCode2:
remove1:
mov bh,0
mov bl,[sendDOffset]
mov sendD1[bx],al
dec [sendDOffset]
jmp printAndMoveBackward
remove2:
mov bh,0
mov bl,[sendDOffset]
mov sendD2[bx],al
dec [sendDOffset]
jmp printAndMoveBackward
remove3:
mov bh,0
mov bl,[sendDOffset]
mov sendD3[bx],al
dec [sendDOffset]
jmp printAndMoveBackward
remove4:
mov bh,0
mov bl,[sendDOffset]
mov sendD4[bx],al
dec [sendDOffset]
jmp printAndMoveBackward
remove5:
mov bh,0
mov bl,[sendDOffset]
mov sendD5[bx],al
dec [sendDOffset]
jmp printAndMoveBackward
jmp continueCode3 ;because out of range issue even AGAIN
retfFromKeyPress3:
jmp retfFromGetKeyPressed
continueCode3:
printAndMoveForward:
call print
call moveCurserType
jmp retfFromGetKeyPressed
printAndMoveBackward:
call moveCurserTypeBack
call setCurser
call print
retfFromGetKeyPressed:
retf
getKeyPressed endp
scrollRecHalf proc far ;scroll Chat(Recieving) Half
mov ah,6 ; function 6
mov al,1 ; scroll by 1 line
mov bh,7 ; normal video attribute
mov ch,0 ; upper left Y
mov cl,0 ; upper left X
mov dh,19 ; lower right Y
mov dl,79 ; lower right X
int 10h
retf
scrollRecHalf endp
scrollUpTyping proc far ;Scroll the half where you type
mov ah,6 ; function 6
mov al,1 ; scroll by 1 line
mov bh,7 ; normal video attribute
mov ch,21 ; upper left Y
mov cl,0 ; upper left X
mov dh,24 ; lower right Y
mov dl,79 ; lower right X
int 10h
retf
scrollUpTyping endp
scrollDownTyping proc far ;Scroll the half where you type
mov ah,7 ; function 7
mov al,1 ; scroll by 1 line
mov bh,7 ; normal video attribute
mov ch,21 ; upper left Y
mov cl,0 ; upper left X
mov dh,24 ; lower right Y
mov dl,79 ; lower right X
int 10h
retf
scrollDownTyping endp
;Serial Procs
initialization proc far
mov dx,3fbh
mov al,80h
out dx,al
mov al,0ch
mov dx,3f8h
out dx,al
mov al,0h
mov dx,3f9h
out dx,al
mov dx,3fbh
mov al,00011011b ;???
out dx,al
retf
initialization endp
Send proc far
;Algorithm
;count total number of char that will be sent (loop count)
;check if we can send THRE [Transmit hold register empty]
;send the n-characters only -- (while sending print them on my screen)
;clear the sendD(s)
call setCurserRec
call printYou
;Before calculating or sending all data we send "Other Player: " message
mov ch,0
mov cl,HostName[1] ;14 for "Other Player: "
mov bx,2
SendOtherPlayer:
CheckSent:
mov dx,3FDh ;Read the line status register`
In al,dx
test al,20h ;test the THRE [Transmit hold register empty]
jz CheckSent ; if THRE=0 then loop until it = 1 [until the old data is sent]
mov dx,3F8h
mov al,HostName[bx]
Out dx,al
inc bx
loop SendOtherPlayer
;Send ': '
mov cx,2
mov bx,0
SendOther:
CheckSentS:
mov dx,3FDh ;Read the line status register`
In al,dx
test al,20h ;test the THRE [Transmit hold register empty]
jz CheckSentS ; if THRE=0 then loop until it = 1 [until the old data is sent]
mov dx,3F8h
mov al,chatOther[bx]
Out dx,al
inc bx
loop SendOther
mov bh,0
mov bl,120 ;calculate the loop count ... SendDnum * 120 + offset
mov ah,0
mov al,[sendDnum]
mul bl
mov bl,[sendDOffset]
add ax,bx
mov cx,ax
mov [sendDOffsetSend],0 ;index (similar to the offset)
mov [sendDnumSend],0 ;similar to sendDnum
;push dx
SendAllData:
CheckSend:
mov dx,3FDh ;Read the line status register`
In al,dx
test al,20h ;test the THRE [Transmit hold register empty]
jz CheckSend ; if THRE=0 then loop until it = 1 [until the old data is sent]
mov dx,3F8h
;pop dx
cmp [sendDOffsetSend],120 ;if offset is 120 then reset it
jne checkWhichDX ;if it is not equal 120 we check which seg we take from
mov [sendDOffsetSend],0
inc [sendDnumSend]
checkWhichDX:
mov bh,0
mov bl,[sendDOffsetSend]
cmp [sendDnumSend],0
je takeFrom1
cmp [sendDnumSend],1
je takeFrom2
cmp [sendDnumSend],2
je takeFrom3
cmp [sendDnumSend],3
je takeFrom4
cmp [sendDnumSend],4
je takeFrom5
takeFrom1:
mov al,sendD1[bx] ;move the data read from the user to THR
jmp WriteToPort
takeFrom2:
mov al,sendD2[bx]
jmp WriteToPort
takeFrom3:
mov al,sendD3[bx]
jmp WriteToPort
takeFrom4:
mov al,sendD4[bx]
jmp WriteToPort
takeFrom5:
mov al,sendD5[bx]
WriteToPort:
Out dx,al
inc [sendDOffsetSend]
push ax
push bx
push cx
call print
call moveCurserRecieve
call setCurserRec
pop cx
pop bx
pop ax
loop SendAllData
;pop dx
;after the loop end .. we send enter key (ascii is 13)
SendEnter:
mov dx,3FDh ;Read the line status register`
In al,dx
test al,20h ;test the THRE [Transmit hold register empty]
jz SendEnter ; if THRE=0 then loop until it = 1 [until the old data is sent]
mov dx,3F8h
mov al,13
Out dx,al
call clearAllData
retf
Send endp
SendEscape proc far
CheckEscSend:
mov dx,3FDh ;Read the line status register`
In al,dx
test al,20h ;test the THRE [Transmit hold register empty] ;5th bit
jz CheckEscSend ; if THRE=0 then loop until it = 1 [until the old data is sent]
mov dx,3F8h
mov al,1bh ;send Escape Key
Out dx,al
retf
SendEscape endp
Recieve proc far
;Algorithm
;check if there is something to recieve
;take it and print it on the screen
mov dx,3FDh ;Line status register
In al,dx
test al,00000001b ; Test if DR=1
jz retfFromRecieve ;Jump if zero [DR=0] No data is ready to be picked up
mov dx,3F8h ;Read data from Recieve buffer [3F8] into AL
In al,dx
cmp al,1bh ;escape key
jne cont
mov [esqq],1
ret
cont:
call setCurserRec
cmp al,13 ;Enter Key
jne newLine
call movCurRecNextLine
jmp retfFromRecieve
newLine:
call print
call moveCurserRecieve
retfFromRecieve:
retf
Recieve endp
| 20.014925
| 87
| 0.684978
|
98ed0f64a41fa55291756fa009552bc20d06626c
| 45,714
|
asm
|
Assembly
|
alarmtest.asm
|
willtran98/MIT_xv6
|
ed247e2bc0a0315bb7c3ac25a55eec599d02fe89
|
[
"MIT-0"
] | null | null | null |
alarmtest.asm
|
willtran98/MIT_xv6
|
ed247e2bc0a0315bb7c3ac25a55eec599d02fe89
|
[
"MIT-0"
] | null | null | null |
alarmtest.asm
|
willtran98/MIT_xv6
|
ed247e2bc0a0315bb7c3ac25a55eec599d02fe89
|
[
"MIT-0"
] | null | null | null |
_alarmtest: file format elf32-i386
Disassembly of section .text:
00000000 <periodic>:
exit();
}
void
periodic()
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 18 sub $0x18,%esp
printf(1, "alarm!\n");
6: c7 44 24 04 c6 07 00 movl $0x7c6,0x4(%esp)
d: 00
e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
15: e8 36 04 00 00 call 450 <printf>
}
1a: c9 leave
1b: c3 ret
1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000020 <main>:
void periodic();
int
main(int argc, char *argv[])
{
20: 55 push %ebp
21: 89 e5 mov %esp,%ebp
23: 83 e4 f0 and $0xfffffff0,%esp
26: 53 push %ebx
27: 83 ec 2c sub $0x2c,%esp
volatile int i;
printf(1, "alarmtest starting\n");
2a: c7 44 24 04 ce 07 00 movl $0x7ce,0x4(%esp)
31: 00
32: c7 04 24 01 00 00 00 movl $0x1,(%esp)
39: e8 12 04 00 00 call 450 <printf>
alarm(10, periodic);
3e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
45: 00
46: c7 04 24 0a 00 00 00 movl $0xa,(%esp)
4d: e8 4b 03 00 00 call 39d <alarm>
for(i = 0; i < 25*500000; i++){
52: c7 44 24 1c 00 00 00 movl $0x0,0x1c(%esp)
59: 00
5a: 8b 44 24 1c mov 0x1c(%esp),%eax
5e: 3d 1f bc be 00 cmp $0xbebc1f,%eax
63: 7f 5b jg c0 <main+0xa0>
if((i % 250000) == 0)
65: bb 83 de 1b 43 mov $0x431bde83,%ebx
6a: eb 1a jmp 86 <main+0x66>
6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
main(int argc, char *argv[])
{
volatile int i;
printf(1, "alarmtest starting\n");
alarm(10, periodic);
for(i = 0; i < 25*500000; i++){
70: 8b 44 24 1c mov 0x1c(%esp),%eax
74: 83 c0 01 add $0x1,%eax
77: 89 44 24 1c mov %eax,0x1c(%esp)
7b: 8b 44 24 1c mov 0x1c(%esp),%eax
7f: 3d 1f bc be 00 cmp $0xbebc1f,%eax
84: 7f 3a jg c0 <main+0xa0>
if((i % 250000) == 0)
86: 8b 4c 24 1c mov 0x1c(%esp),%ecx
8a: 89 c8 mov %ecx,%eax
8c: f7 eb imul %ebx
8e: 89 c8 mov %ecx,%eax
90: c1 f8 1f sar $0x1f,%eax
93: c1 fa 10 sar $0x10,%edx
96: 29 c2 sub %eax,%edx
98: 69 d2 90 d0 03 00 imul $0x3d090,%edx,%edx
9e: 39 d1 cmp %edx,%ecx
a0: 75 ce jne 70 <main+0x50>
write(2, ".", 1);
a2: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
a9: 00
aa: c7 44 24 04 e2 07 00 movl $0x7e2,0x4(%esp)
b1: 00
b2: c7 04 24 02 00 00 00 movl $0x2,(%esp)
b9: e8 57 02 00 00 call 315 <write>
be: eb b0 jmp 70 <main+0x50>
}
exit();
c0: e8 30 02 00 00 call 2f5 <exit>
c5: 66 90 xchg %ax,%ax
c7: 66 90 xchg %ax,%ax
c9: 66 90 xchg %ax,%ax
cb: 66 90 xchg %ax,%ax
cd: 66 90 xchg %ax,%ax
cf: 90 nop
000000d0 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
d0: 55 push %ebp
d1: 31 d2 xor %edx,%edx
d3: 89 e5 mov %esp,%ebp
d5: 8b 45 08 mov 0x8(%ebp),%eax
d8: 53 push %ebx
d9: 8b 5d 0c mov 0xc(%ebp),%ebx
dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
char *os;
os = s;
while((*s++ = *t++) != 0)
e0: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
e4: 88 0c 10 mov %cl,(%eax,%edx,1)
e7: 83 c2 01 add $0x1,%edx
ea: 84 c9 test %cl,%cl
ec: 75 f2 jne e0 <strcpy+0x10>
;
return os;
}
ee: 5b pop %ebx
ef: 5d pop %ebp
f0: c3 ret
f1: eb 0d jmp 100 <strcmp>
f3: 90 nop
f4: 90 nop
f5: 90 nop
f6: 90 nop
f7: 90 nop
f8: 90 nop
f9: 90 nop
fa: 90 nop
fb: 90 nop
fc: 90 nop
fd: 90 nop
fe: 90 nop
ff: 90 nop
00000100 <strcmp>:
int
strcmp(const char *p, const char *q)
{
100: 55 push %ebp
101: 89 e5 mov %esp,%ebp
103: 53 push %ebx
104: 8b 4d 08 mov 0x8(%ebp),%ecx
107: 8b 55 0c mov 0xc(%ebp),%edx
while(*p && *p == *q)
10a: 0f b6 01 movzbl (%ecx),%eax
10d: 84 c0 test %al,%al
10f: 75 14 jne 125 <strcmp+0x25>
111: eb 25 jmp 138 <strcmp+0x38>
113: 90 nop
114: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
p++, q++;
118: 83 c1 01 add $0x1,%ecx
11b: 83 c2 01 add $0x1,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
11e: 0f b6 01 movzbl (%ecx),%eax
121: 84 c0 test %al,%al
123: 74 13 je 138 <strcmp+0x38>
125: 0f b6 1a movzbl (%edx),%ebx
128: 38 d8 cmp %bl,%al
12a: 74 ec je 118 <strcmp+0x18>
12c: 0f b6 db movzbl %bl,%ebx
12f: 0f b6 c0 movzbl %al,%eax
132: 29 d8 sub %ebx,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
}
134: 5b pop %ebx
135: 5d pop %ebp
136: c3 ret
137: 90 nop
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
138: 0f b6 1a movzbl (%edx),%ebx
13b: 31 c0 xor %eax,%eax
13d: 0f b6 db movzbl %bl,%ebx
140: 29 d8 sub %ebx,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
}
142: 5b pop %ebx
143: 5d pop %ebp
144: c3 ret
145: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
149: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000150 <strlen>:
uint
strlen(char *s)
{
150: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
151: 31 d2 xor %edx,%edx
return (uchar)*p - (uchar)*q;
}
uint
strlen(char *s)
{
153: 89 e5 mov %esp,%ebp
int n;
for(n = 0; s[n]; n++)
155: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
}
uint
strlen(char *s)
{
157: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
15a: 80 39 00 cmpb $0x0,(%ecx)
15d: 74 0c je 16b <strlen+0x1b>
15f: 90 nop
160: 83 c2 01 add $0x1,%edx
163: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
167: 89 d0 mov %edx,%eax
169: 75 f5 jne 160 <strlen+0x10>
;
return n;
}
16b: 5d pop %ebp
16c: c3 ret
16d: 8d 76 00 lea 0x0(%esi),%esi
00000170 <memset>:
void*
memset(void *dst, int c, uint n)
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 8b 55 08 mov 0x8(%ebp),%edx
176: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
177: 8b 4d 10 mov 0x10(%ebp),%ecx
17a: 8b 45 0c mov 0xc(%ebp),%eax
17d: 89 d7 mov %edx,%edi
17f: fc cld
180: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
182: 89 d0 mov %edx,%eax
184: 5f pop %edi
185: 5d pop %ebp
186: c3 ret
187: 89 f6 mov %esi,%esi
189: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000190 <strchr>:
char*
strchr(const char *s, char c)
{
190: 55 push %ebp
191: 89 e5 mov %esp,%ebp
193: 8b 45 08 mov 0x8(%ebp),%eax
196: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx
for(; *s; s++)
19a: 0f b6 10 movzbl (%eax),%edx
19d: 84 d2 test %dl,%dl
19f: 75 11 jne 1b2 <strchr+0x22>
1a1: eb 15 jmp 1b8 <strchr+0x28>
1a3: 90 nop
1a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1a8: 83 c0 01 add $0x1,%eax
1ab: 0f b6 10 movzbl (%eax),%edx
1ae: 84 d2 test %dl,%dl
1b0: 74 06 je 1b8 <strchr+0x28>
if(*s == c)
1b2: 38 ca cmp %cl,%dl
1b4: 75 f2 jne 1a8 <strchr+0x18>
return (char*)s;
return 0;
}
1b6: 5d pop %ebp
1b7: c3 ret
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
1b8: 31 c0 xor %eax,%eax
if(*s == c)
return (char*)s;
return 0;
}
1ba: 5d pop %ebp
1bb: 90 nop
1bc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1c0: c3 ret
1c1: eb 0d jmp 1d0 <atoi>
1c3: 90 nop
1c4: 90 nop
1c5: 90 nop
1c6: 90 nop
1c7: 90 nop
1c8: 90 nop
1c9: 90 nop
1ca: 90 nop
1cb: 90 nop
1cc: 90 nop
1cd: 90 nop
1ce: 90 nop
1cf: 90 nop
000001d0 <atoi>:
return r;
}
int
atoi(const char *s)
{
1d0: 55 push %ebp
int n;
n = 0;
while('0' <= *s && *s <= '9')
1d1: 31 c0 xor %eax,%eax
return r;
}
int
atoi(const char *s)
{
1d3: 89 e5 mov %esp,%ebp
1d5: 8b 4d 08 mov 0x8(%ebp),%ecx
1d8: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
1d9: 0f b6 11 movzbl (%ecx),%edx
1dc: 8d 5a d0 lea -0x30(%edx),%ebx
1df: 80 fb 09 cmp $0x9,%bl
1e2: 77 1c ja 200 <atoi+0x30>
1e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
n = n*10 + *s++ - '0';
1e8: 0f be d2 movsbl %dl,%edx
1eb: 83 c1 01 add $0x1,%ecx
1ee: 8d 04 80 lea (%eax,%eax,4),%eax
1f1: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
1f5: 0f b6 11 movzbl (%ecx),%edx
1f8: 8d 5a d0 lea -0x30(%edx),%ebx
1fb: 80 fb 09 cmp $0x9,%bl
1fe: 76 e8 jbe 1e8 <atoi+0x18>
n = n*10 + *s++ - '0';
return n;
}
200: 5b pop %ebx
201: 5d pop %ebp
202: c3 ret
203: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
209: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000210 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
210: 55 push %ebp
211: 89 e5 mov %esp,%ebp
213: 56 push %esi
214: 8b 45 08 mov 0x8(%ebp),%eax
217: 53 push %ebx
218: 8b 5d 10 mov 0x10(%ebp),%ebx
21b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
21e: 85 db test %ebx,%ebx
220: 7e 14 jle 236 <memmove+0x26>
n = n*10 + *s++ - '0';
return n;
}
void*
memmove(void *vdst, void *vsrc, int n)
222: 31 d2 xor %edx,%edx
224: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
*dst++ = *src++;
228: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
22c: 88 0c 10 mov %cl,(%eax,%edx,1)
22f: 83 c2 01 add $0x1,%edx
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
232: 39 da cmp %ebx,%edx
234: 75 f2 jne 228 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
236: 5b pop %ebx
237: 5e pop %esi
238: 5d pop %ebp
239: c3 ret
23a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000240 <stat>:
return buf;
}
int
stat(char *n, struct stat *st)
{
240: 55 push %ebp
241: 89 e5 mov %esp,%ebp
243: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
246: 8b 45 08 mov 0x8(%ebp),%eax
return buf;
}
int
stat(char *n, struct stat *st)
{
249: 89 5d f8 mov %ebx,-0x8(%ebp)
24c: 89 75 fc mov %esi,-0x4(%ebp)
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
24f: be ff ff ff ff mov $0xffffffff,%esi
stat(char *n, struct stat *st)
{
int fd;
int r;
fd = open(n, O_RDONLY);
254: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
25b: 00
25c: 89 04 24 mov %eax,(%esp)
25f: e8 d1 00 00 00 call 335 <open>
if(fd < 0)
264: 85 c0 test %eax,%eax
stat(char *n, struct stat *st)
{
int fd;
int r;
fd = open(n, O_RDONLY);
266: 89 c3 mov %eax,%ebx
if(fd < 0)
268: 78 19 js 283 <stat+0x43>
return -1;
r = fstat(fd, st);
26a: 8b 45 0c mov 0xc(%ebp),%eax
26d: 89 1c 24 mov %ebx,(%esp)
270: 89 44 24 04 mov %eax,0x4(%esp)
274: e8 d4 00 00 00 call 34d <fstat>
close(fd);
279: 89 1c 24 mov %ebx,(%esp)
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
r = fstat(fd, st);
27c: 89 c6 mov %eax,%esi
close(fd);
27e: e8 9a 00 00 00 call 31d <close>
return r;
}
283: 89 f0 mov %esi,%eax
285: 8b 5d f8 mov -0x8(%ebp),%ebx
288: 8b 75 fc mov -0x4(%ebp),%esi
28b: 89 ec mov %ebp,%esp
28d: 5d pop %ebp
28e: c3 ret
28f: 90 nop
00000290 <gets>:
return 0;
}
char*
gets(char *buf, int max)
{
290: 55 push %ebp
291: 89 e5 mov %esp,%ebp
293: 57 push %edi
294: 56 push %esi
295: 31 f6 xor %esi,%esi
297: 53 push %ebx
298: 83 ec 2c sub $0x2c,%esp
29b: 8b 7d 08 mov 0x8(%ebp),%edi
int i, cc;
char c;
for(i=0; i+1 < max; ){
29e: eb 06 jmp 2a6 <gets+0x16>
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
2a0: 3c 0a cmp $0xa,%al
2a2: 74 39 je 2dd <gets+0x4d>
2a4: 89 de mov %ebx,%esi
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
2a6: 8d 5e 01 lea 0x1(%esi),%ebx
2a9: 3b 5d 0c cmp 0xc(%ebp),%ebx
2ac: 7d 31 jge 2df <gets+0x4f>
cc = read(0, &c, 1);
2ae: 8d 45 e7 lea -0x19(%ebp),%eax
2b1: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
2b8: 00
2b9: 89 44 24 04 mov %eax,0x4(%esp)
2bd: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2c4: e8 44 00 00 00 call 30d <read>
if(cc < 1)
2c9: 85 c0 test %eax,%eax
2cb: 7e 12 jle 2df <gets+0x4f>
break;
buf[i++] = c;
2cd: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
2d1: 88 44 1f ff mov %al,-0x1(%edi,%ebx,1)
if(c == '\n' || c == '\r')
2d5: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
2d9: 3c 0d cmp $0xd,%al
2db: 75 c3 jne 2a0 <gets+0x10>
2dd: 89 de mov %ebx,%esi
break;
}
buf[i] = '\0';
2df: c6 04 37 00 movb $0x0,(%edi,%esi,1)
return buf;
}
2e3: 89 f8 mov %edi,%eax
2e5: 83 c4 2c add $0x2c,%esp
2e8: 5b pop %ebx
2e9: 5e pop %esi
2ea: 5f pop %edi
2eb: 5d pop %ebp
2ec: c3 ret
000002ed <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2ed: b8 01 00 00 00 mov $0x1,%eax
2f2: cd 40 int $0x40
2f4: c3 ret
000002f5 <exit>:
SYSCALL(exit)
2f5: b8 02 00 00 00 mov $0x2,%eax
2fa: cd 40 int $0x40
2fc: c3 ret
000002fd <wait>:
SYSCALL(wait)
2fd: b8 03 00 00 00 mov $0x3,%eax
302: cd 40 int $0x40
304: c3 ret
00000305 <pipe>:
SYSCALL(pipe)
305: b8 04 00 00 00 mov $0x4,%eax
30a: cd 40 int $0x40
30c: c3 ret
0000030d <read>:
SYSCALL(read)
30d: b8 05 00 00 00 mov $0x5,%eax
312: cd 40 int $0x40
314: c3 ret
00000315 <write>:
SYSCALL(write)
315: b8 10 00 00 00 mov $0x10,%eax
31a: cd 40 int $0x40
31c: c3 ret
0000031d <close>:
SYSCALL(close)
31d: b8 15 00 00 00 mov $0x15,%eax
322: cd 40 int $0x40
324: c3 ret
00000325 <kill>:
SYSCALL(kill)
325: b8 06 00 00 00 mov $0x6,%eax
32a: cd 40 int $0x40
32c: c3 ret
0000032d <exec>:
SYSCALL(exec)
32d: b8 07 00 00 00 mov $0x7,%eax
332: cd 40 int $0x40
334: c3 ret
00000335 <open>:
SYSCALL(open)
335: b8 0f 00 00 00 mov $0xf,%eax
33a: cd 40 int $0x40
33c: c3 ret
0000033d <mknod>:
SYSCALL(mknod)
33d: b8 11 00 00 00 mov $0x11,%eax
342: cd 40 int $0x40
344: c3 ret
00000345 <unlink>:
SYSCALL(unlink)
345: b8 12 00 00 00 mov $0x12,%eax
34a: cd 40 int $0x40
34c: c3 ret
0000034d <fstat>:
SYSCALL(fstat)
34d: b8 08 00 00 00 mov $0x8,%eax
352: cd 40 int $0x40
354: c3 ret
00000355 <link>:
SYSCALL(link)
355: b8 13 00 00 00 mov $0x13,%eax
35a: cd 40 int $0x40
35c: c3 ret
0000035d <mkdir>:
SYSCALL(mkdir)
35d: b8 14 00 00 00 mov $0x14,%eax
362: cd 40 int $0x40
364: c3 ret
00000365 <chdir>:
SYSCALL(chdir)
365: b8 09 00 00 00 mov $0x9,%eax
36a: cd 40 int $0x40
36c: c3 ret
0000036d <dup>:
SYSCALL(dup)
36d: b8 0a 00 00 00 mov $0xa,%eax
372: cd 40 int $0x40
374: c3 ret
00000375 <getpid>:
SYSCALL(getpid)
375: b8 0b 00 00 00 mov $0xb,%eax
37a: cd 40 int $0x40
37c: c3 ret
0000037d <sbrk>:
SYSCALL(sbrk)
37d: b8 0c 00 00 00 mov $0xc,%eax
382: cd 40 int $0x40
384: c3 ret
00000385 <sleep>:
SYSCALL(sleep)
385: b8 0d 00 00 00 mov $0xd,%eax
38a: cd 40 int $0x40
38c: c3 ret
0000038d <uptime>:
SYSCALL(uptime)
38d: b8 0e 00 00 00 mov $0xe,%eax
392: cd 40 int $0x40
394: c3 ret
00000395 <date>:
SYSCALL(date)
395: b8 16 00 00 00 mov $0x16,%eax
39a: cd 40 int $0x40
39c: c3 ret
0000039d <alarm>:
SYSCALL(alarm)
39d: b8 17 00 00 00 mov $0x17,%eax
3a2: cd 40 int $0x40
3a4: c3 ret
3a5: 66 90 xchg %ax,%ax
3a7: 66 90 xchg %ax,%ax
3a9: 66 90 xchg %ax,%ax
3ab: 66 90 xchg %ax,%ax
3ad: 66 90 xchg %ax,%ax
3af: 90 nop
000003b0 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
3b0: 55 push %ebp
3b1: 89 e5 mov %esp,%ebp
3b3: 57 push %edi
3b4: 89 cf mov %ecx,%edi
3b6: 56 push %esi
3b7: 89 c6 mov %eax,%esi
3b9: 53 push %ebx
3ba: 83 ec 4c sub $0x4c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
3bd: 8b 4d 08 mov 0x8(%ebp),%ecx
3c0: 85 c9 test %ecx,%ecx
3c2: 74 04 je 3c8 <printint+0x18>
3c4: 85 d2 test %edx,%edx
3c6: 78 70 js 438 <printint+0x88>
neg = 1;
x = -xx;
} else {
x = xx;
3c8: 89 d0 mov %edx,%eax
3ca: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
3d1: 31 c9 xor %ecx,%ecx
3d3: 8d 5d d7 lea -0x29(%ebp),%ebx
3d6: 66 90 xchg %ax,%ax
}
i = 0;
do{
buf[i++] = digits[x % base];
3d8: 31 d2 xor %edx,%edx
3da: f7 f7 div %edi
3dc: 0f b6 92 eb 07 00 00 movzbl 0x7eb(%edx),%edx
3e3: 88 14 0b mov %dl,(%ebx,%ecx,1)
3e6: 83 c1 01 add $0x1,%ecx
}while((x /= base) != 0);
3e9: 85 c0 test %eax,%eax
3eb: 75 eb jne 3d8 <printint+0x28>
if(neg)
3ed: 8b 45 c4 mov -0x3c(%ebp),%eax
3f0: 85 c0 test %eax,%eax
3f2: 74 08 je 3fc <printint+0x4c>
buf[i++] = '-';
3f4: c6 44 0d d7 2d movb $0x2d,-0x29(%ebp,%ecx,1)
3f9: 83 c1 01 add $0x1,%ecx
while(--i >= 0)
3fc: 8d 79 ff lea -0x1(%ecx),%edi
3ff: 01 fb add %edi,%ebx
401: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
408: 0f b6 03 movzbl (%ebx),%eax
40b: 83 ef 01 sub $0x1,%edi
40e: 83 eb 01 sub $0x1,%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
411: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
418: 00
419: 89 34 24 mov %esi,(%esp)
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
41c: 88 45 e7 mov %al,-0x19(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
41f: 8d 45 e7 lea -0x19(%ebp),%eax
422: 89 44 24 04 mov %eax,0x4(%esp)
426: e8 ea fe ff ff call 315 <write>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
42b: 83 ff ff cmp $0xffffffff,%edi
42e: 75 d8 jne 408 <printint+0x58>
putc(fd, buf[i]);
}
430: 83 c4 4c add $0x4c,%esp
433: 5b pop %ebx
434: 5e pop %esi
435: 5f pop %edi
436: 5d pop %ebp
437: c3 ret
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
438: 89 d0 mov %edx,%eax
43a: f7 d8 neg %eax
43c: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
443: eb 8c jmp 3d1 <printint+0x21>
445: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
449: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000450 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
450: 55 push %ebp
451: 89 e5 mov %esp,%ebp
453: 57 push %edi
454: 56 push %esi
455: 53 push %ebx
456: 83 ec 3c sub $0x3c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
459: 8b 45 0c mov 0xc(%ebp),%eax
45c: 0f b6 10 movzbl (%eax),%edx
45f: 84 d2 test %dl,%dl
461: 0f 84 c9 00 00 00 je 530 <printf+0xe0>
char *s;
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
467: 8d 4d 10 lea 0x10(%ebp),%ecx
46a: 31 ff xor %edi,%edi
46c: 89 4d d4 mov %ecx,-0x2c(%ebp)
46f: 31 db xor %ebx,%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
471: 8d 75 e7 lea -0x19(%ebp),%esi
474: eb 1e jmp 494 <printf+0x44>
476: 66 90 xchg %ax,%ax
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
478: 83 fa 25 cmp $0x25,%edx
47b: 0f 85 b7 00 00 00 jne 538 <printf+0xe8>
481: 66 bf 25 00 mov $0x25,%di
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
485: 83 c3 01 add $0x1,%ebx
488: 0f b6 14 18 movzbl (%eax,%ebx,1),%edx
48c: 84 d2 test %dl,%dl
48e: 0f 84 9c 00 00 00 je 530 <printf+0xe0>
c = fmt[i] & 0xff;
if(state == 0){
494: 85 ff test %edi,%edi
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
496: 0f b6 d2 movzbl %dl,%edx
if(state == 0){
499: 74 dd je 478 <printf+0x28>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
49b: 83 ff 25 cmp $0x25,%edi
49e: 75 e5 jne 485 <printf+0x35>
if(c == 'd'){
4a0: 83 fa 64 cmp $0x64,%edx
4a3: 0f 84 47 01 00 00 je 5f0 <printf+0x1a0>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
4a9: 83 fa 70 cmp $0x70,%edx
4ac: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
4b0: 0f 84 aa 00 00 00 je 560 <printf+0x110>
4b6: 83 fa 78 cmp $0x78,%edx
4b9: 0f 84 a1 00 00 00 je 560 <printf+0x110>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
4bf: 83 fa 73 cmp $0x73,%edx
4c2: 0f 84 c0 00 00 00 je 588 <printf+0x138>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
4c8: 83 fa 63 cmp $0x63,%edx
4cb: 90 nop
4cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
4d0: 0f 84 42 01 00 00 je 618 <printf+0x1c8>
putc(fd, *ap);
ap++;
} else if(c == '%'){
4d6: 83 fa 25 cmp $0x25,%edx
4d9: 0f 84 01 01 00 00 je 5e0 <printf+0x190>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
4df: 8b 4d 08 mov 0x8(%ebp),%ecx
4e2: 89 55 cc mov %edx,-0x34(%ebp)
4e5: c6 45 e7 25 movb $0x25,-0x19(%ebp)
4e9: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
4f0: 00
4f1: 89 74 24 04 mov %esi,0x4(%esp)
4f5: 89 0c 24 mov %ecx,(%esp)
4f8: e8 18 fe ff ff call 315 <write>
4fd: 8b 55 cc mov -0x34(%ebp),%edx
500: 88 55 e7 mov %dl,-0x19(%ebp)
503: 8b 45 08 mov 0x8(%ebp),%eax
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
506: 83 c3 01 add $0x1,%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
509: 31 ff xor %edi,%edi
50b: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
512: 00
513: 89 74 24 04 mov %esi,0x4(%esp)
517: 89 04 24 mov %eax,(%esp)
51a: e8 f6 fd ff ff call 315 <write>
51f: 8b 45 0c mov 0xc(%ebp),%eax
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
522: 0f b6 14 18 movzbl (%eax,%ebx,1),%edx
526: 84 d2 test %dl,%dl
528: 0f 85 66 ff ff ff jne 494 <printf+0x44>
52e: 66 90 xchg %ax,%ax
putc(fd, c);
}
state = 0;
}
}
}
530: 83 c4 3c add $0x3c,%esp
533: 5b pop %ebx
534: 5e pop %esi
535: 5f pop %edi
536: 5d pop %ebp
537: c3 ret
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
538: 8b 45 08 mov 0x8(%ebp),%eax
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
53b: 88 55 e7 mov %dl,-0x19(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
53e: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
545: 00
546: 89 74 24 04 mov %esi,0x4(%esp)
54a: 89 04 24 mov %eax,(%esp)
54d: e8 c3 fd ff ff call 315 <write>
552: 8b 45 0c mov 0xc(%ebp),%eax
555: e9 2b ff ff ff jmp 485 <printf+0x35>
55a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
560: 8b 45 d4 mov -0x2c(%ebp),%eax
563: b9 10 00 00 00 mov $0x10,%ecx
ap++;
568: 31 ff xor %edi,%edi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
56a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
571: 8b 10 mov (%eax),%edx
573: 8b 45 08 mov 0x8(%ebp),%eax
576: e8 35 fe ff ff call 3b0 <printint>
57b: 8b 45 0c mov 0xc(%ebp),%eax
ap++;
57e: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
582: e9 fe fe ff ff jmp 485 <printf+0x35>
587: 90 nop
} else if(c == 's'){
s = (char*)*ap;
588: 8b 55 d4 mov -0x2c(%ebp),%edx
ap++;
if(s == 0)
58b: b9 e4 07 00 00 mov $0x7e4,%ecx
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
s = (char*)*ap;
590: 8b 3a mov (%edx),%edi
ap++;
592: 83 c2 04 add $0x4,%edx
595: 89 55 d4 mov %edx,-0x2c(%ebp)
if(s == 0)
598: 85 ff test %edi,%edi
59a: 0f 44 f9 cmove %ecx,%edi
s = "(null)";
while(*s != 0){
59d: 0f b6 17 movzbl (%edi),%edx
5a0: 84 d2 test %dl,%dl
5a2: 74 33 je 5d7 <printf+0x187>
5a4: 89 5d d0 mov %ebx,-0x30(%ebp)
5a7: 8b 5d 08 mov 0x8(%ebp),%ebx
5aa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
putc(fd, *s);
s++;
5b0: 83 c7 01 add $0x1,%edi
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
5b3: 88 55 e7 mov %dl,-0x19(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
5b6: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
5bd: 00
5be: 89 74 24 04 mov %esi,0x4(%esp)
5c2: 89 1c 24 mov %ebx,(%esp)
5c5: e8 4b fd ff ff call 315 <write>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
5ca: 0f b6 17 movzbl (%edi),%edx
5cd: 84 d2 test %dl,%dl
5cf: 75 df jne 5b0 <printf+0x160>
5d1: 8b 5d d0 mov -0x30(%ebp),%ebx
5d4: 8b 45 0c mov 0xc(%ebp),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
5d7: 31 ff xor %edi,%edi
5d9: e9 a7 fe ff ff jmp 485 <printf+0x35>
5de: 66 90 xchg %ax,%ax
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
ap++;
} else if(c == '%'){
5e0: c6 45 e7 25 movb $0x25,-0x19(%ebp)
5e4: e9 1a ff ff ff jmp 503 <printf+0xb3>
5e9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
5f0: 8b 45 d4 mov -0x2c(%ebp),%eax
5f3: b9 0a 00 00 00 mov $0xa,%ecx
ap++;
5f8: 66 31 ff xor %di,%di
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
5fb: c7 04 24 01 00 00 00 movl $0x1,(%esp)
602: 8b 10 mov (%eax),%edx
604: 8b 45 08 mov 0x8(%ebp),%eax
607: e8 a4 fd ff ff call 3b0 <printint>
60c: 8b 45 0c mov 0xc(%ebp),%eax
ap++;
60f: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
613: e9 6d fe ff ff jmp 485 <printf+0x35>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
618: 8b 55 d4 mov -0x2c(%ebp),%edx
putc(fd, *ap);
ap++;
61b: 31 ff xor %edi,%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
61d: 8b 4d 08 mov 0x8(%ebp),%ecx
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
620: 8b 02 mov (%edx),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
622: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
629: 00
62a: 89 74 24 04 mov %esi,0x4(%esp)
62e: 89 0c 24 mov %ecx,(%esp)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
631: 88 45 e7 mov %al,-0x19(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
634: e8 dc fc ff ff call 315 <write>
639: 8b 45 0c mov 0xc(%ebp),%eax
putc(fd, *s);
s++;
}
} else if(c == 'c'){
putc(fd, *ap);
ap++;
63c: 83 45 d4 04 addl $0x4,-0x2c(%ebp)
640: e9 40 fe ff ff jmp 485 <printf+0x35>
645: 66 90 xchg %ax,%ax
647: 66 90 xchg %ax,%ax
649: 66 90 xchg %ax,%ax
64b: 66 90 xchg %ax,%ax
64d: 66 90 xchg %ax,%ax
64f: 90 nop
00000650 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
650: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
651: a1 04 08 00 00 mov 0x804,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
656: 89 e5 mov %esp,%ebp
658: 57 push %edi
659: 56 push %esi
65a: 53 push %ebx
65b: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
65e: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
661: 39 c8 cmp %ecx,%eax
663: 73 1d jae 682 <free+0x32>
665: 8d 76 00 lea 0x0(%esi),%esi
668: 8b 10 mov (%eax),%edx
66a: 39 d1 cmp %edx,%ecx
66c: 72 1a jb 688 <free+0x38>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
66e: 39 d0 cmp %edx,%eax
670: 72 08 jb 67a <free+0x2a>
672: 39 c8 cmp %ecx,%eax
674: 72 12 jb 688 <free+0x38>
676: 39 d1 cmp %edx,%ecx
678: 72 0e jb 688 <free+0x38>
67a: 89 d0 mov %edx,%eax
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
67c: 39 c8 cmp %ecx,%eax
67e: 66 90 xchg %ax,%ax
680: 72 e6 jb 668 <free+0x18>
682: 8b 10 mov (%eax),%edx
684: eb e8 jmp 66e <free+0x1e>
686: 66 90 xchg %ax,%ax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
688: 8b 71 04 mov 0x4(%ecx),%esi
68b: 8d 3c f1 lea (%ecx,%esi,8),%edi
68e: 39 d7 cmp %edx,%edi
690: 74 19 je 6ab <free+0x5b>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
692: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
695: 8b 50 04 mov 0x4(%eax),%edx
698: 8d 34 d0 lea (%eax,%edx,8),%esi
69b: 39 ce cmp %ecx,%esi
69d: 74 23 je 6c2 <free+0x72>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
69f: 89 08 mov %ecx,(%eax)
freep = p;
6a1: a3 04 08 00 00 mov %eax,0x804
}
6a6: 5b pop %ebx
6a7: 5e pop %esi
6a8: 5f pop %edi
6a9: 5d pop %ebp
6aa: c3 ret
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
6ab: 03 72 04 add 0x4(%edx),%esi
6ae: 89 71 04 mov %esi,0x4(%ecx)
bp->s.ptr = p->s.ptr->s.ptr;
6b1: 8b 10 mov (%eax),%edx
6b3: 8b 12 mov (%edx),%edx
6b5: 89 53 f8 mov %edx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
6b8: 8b 50 04 mov 0x4(%eax),%edx
6bb: 8d 34 d0 lea (%eax,%edx,8),%esi
6be: 39 ce cmp %ecx,%esi
6c0: 75 dd jne 69f <free+0x4f>
p->s.size += bp->s.size;
6c2: 03 51 04 add 0x4(%ecx),%edx
6c5: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
6c8: 8b 53 f8 mov -0x8(%ebx),%edx
6cb: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
6cd: a3 04 08 00 00 mov %eax,0x804
}
6d2: 5b pop %ebx
6d3: 5e pop %esi
6d4: 5f pop %edi
6d5: 5d pop %ebp
6d6: c3 ret
6d7: 89 f6 mov %esi,%esi
6d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000006e0 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
6e0: 55 push %ebp
6e1: 89 e5 mov %esp,%ebp
6e3: 57 push %edi
6e4: 56 push %esi
6e5: 53 push %ebx
6e6: 83 ec 2c sub $0x2c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
6e9: 8b 5d 08 mov 0x8(%ebp),%ebx
if((prevp = freep) == 0){
6ec: 8b 0d 04 08 00 00 mov 0x804,%ecx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
6f2: 83 c3 07 add $0x7,%ebx
6f5: c1 eb 03 shr $0x3,%ebx
6f8: 83 c3 01 add $0x1,%ebx
if((prevp = freep) == 0){
6fb: 85 c9 test %ecx,%ecx
6fd: 0f 84 9b 00 00 00 je 79e <malloc+0xbe>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
703: 8b 01 mov (%ecx),%eax
if(p->s.size >= nunits){
705: 8b 50 04 mov 0x4(%eax),%edx
708: 39 d3 cmp %edx,%ebx
70a: 76 27 jbe 733 <malloc+0x53>
p->s.size -= nunits;
p += p->s.size;
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
70c: 8d 3c dd 00 00 00 00 lea 0x0(,%ebx,8),%edi
morecore(uint nu)
{
char *p;
Header *hp;
if(nu < 4096)
713: be 00 80 00 00 mov $0x8000,%esi
718: 89 7d e4 mov %edi,-0x1c(%ebp)
71b: 90 nop
71c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
720: 3b 05 04 08 00 00 cmp 0x804,%eax
726: 74 30 je 758 <malloc+0x78>
728: 89 c1 mov %eax,%ecx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
72a: 8b 01 mov (%ecx),%eax
if(p->s.size >= nunits){
72c: 8b 50 04 mov 0x4(%eax),%edx
72f: 39 d3 cmp %edx,%ebx
731: 77 ed ja 720 <malloc+0x40>
if(p->s.size == nunits)
733: 39 d3 cmp %edx,%ebx
735: 74 61 je 798 <malloc+0xb8>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
737: 29 da sub %ebx,%edx
739: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
73c: 8d 04 d0 lea (%eax,%edx,8),%eax
p->s.size = nunits;
73f: 89 58 04 mov %ebx,0x4(%eax)
}
freep = prevp;
742: 89 0d 04 08 00 00 mov %ecx,0x804
return (void*)(p + 1);
748: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
74b: 83 c4 2c add $0x2c,%esp
74e: 5b pop %ebx
74f: 5e pop %esi
750: 5f pop %edi
751: 5d pop %ebp
752: c3 ret
753: 90 nop
754: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
morecore(uint nu)
{
char *p;
Header *hp;
if(nu < 4096)
758: 8b 45 e4 mov -0x1c(%ebp),%eax
75b: 81 fb 00 10 00 00 cmp $0x1000,%ebx
761: bf 00 10 00 00 mov $0x1000,%edi
766: 0f 43 fb cmovae %ebx,%edi
769: 0f 42 c6 cmovb %esi,%eax
nu = 4096;
p = sbrk(nu * sizeof(Header));
76c: 89 04 24 mov %eax,(%esp)
76f: e8 09 fc ff ff call 37d <sbrk>
if(p == (char*)-1)
774: 83 f8 ff cmp $0xffffffff,%eax
777: 74 18 je 791 <malloc+0xb1>
return 0;
hp = (Header*)p;
hp->s.size = nu;
779: 89 78 04 mov %edi,0x4(%eax)
free((void*)(hp + 1));
77c: 83 c0 08 add $0x8,%eax
77f: 89 04 24 mov %eax,(%esp)
782: e8 c9 fe ff ff call 650 <free>
return freep;
787: 8b 0d 04 08 00 00 mov 0x804,%ecx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
78d: 85 c9 test %ecx,%ecx
78f: 75 99 jne 72a <malloc+0x4a>
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
791: 31 c0 xor %eax,%eax
793: eb b6 jmp 74b <malloc+0x6b>
795: 8d 76 00 lea 0x0(%esi),%esi
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
798: 8b 10 mov (%eax),%edx
79a: 89 11 mov %edx,(%ecx)
79c: eb a4 jmp 742 <malloc+0x62>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
79e: c7 05 04 08 00 00 fc movl $0x7fc,0x804
7a5: 07 00 00
base.s.size = 0;
7a8: b9 fc 07 00 00 mov $0x7fc,%ecx
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
7ad: c7 05 fc 07 00 00 fc movl $0x7fc,0x7fc
7b4: 07 00 00
base.s.size = 0;
7b7: c7 05 00 08 00 00 00 movl $0x0,0x800
7be: 00 00 00
7c1: e9 3d ff ff ff jmp 703 <malloc+0x23>
| 29.43593
| 60
| 0.417881
|
5431d096fef30c9972cb3451e02f7873098cc6df
| 145
|
asm
|
Assembly
|
kernel/src/memory/paging.asm
|
Stoozy/osdev
|
2c56837ee8789be0b0db472c78f6e8b801f02f25
|
[
"MIT"
] | null | null | null |
kernel/src/memory/paging.asm
|
Stoozy/osdev
|
2c56837ee8789be0b0db472c78f6e8b801f02f25
|
[
"MIT"
] | null | null | null |
kernel/src/memory/paging.asm
|
Stoozy/osdev
|
2c56837ee8789be0b0db472c78f6e8b801f02f25
|
[
"MIT"
] | null | null | null |
global load_pagedir;
global invalidate_tlb;
load_pagedir:
mov cr3, rdi
retq
invalidate_tlb:
mov rax, cr3
mov cr3, rax
retq
| 12.083333
| 22
| 0.682759
|
54772240418455e8d94217cbeacb3c3e3d05dffb
| 1,273
|
asm
|
Assembly
|
programs/oeis/008/A008816.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/008/A008816.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/008/A008816.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A008816: Expansion of (1+x^9)/((1-x)^2*(1-x^9)).
; 1,2,3,4,5,6,7,8,9,12,15,18,21,24,27,30,33,36,41,46,51,56,61,66,71,76,81,88,95,102,109,116,123,130,137,144,153,162,171,180,189,198,207,216,225,236,247,258,269,280,291,302,313,324,337,350,363,376,389,402,415,428,441,456,471,486,501,516,531,546,561,576,593,610,627,644,661,678,695,712,729,748,767,786,805,824,843,862,881,900,921,942,963,984,1005,1026,1047,1068,1089,1112,1135,1158,1181,1204,1227,1250,1273,1296,1321,1346,1371,1396,1421,1446,1471,1496,1521,1548,1575,1602,1629,1656,1683,1710,1737,1764,1793,1822,1851,1880,1909,1938,1967,1996,2025,2056,2087,2118,2149,2180,2211,2242,2273,2304,2337,2370,2403,2436,2469,2502,2535,2568,2601,2636,2671,2706,2741,2776,2811,2846,2881,2916,2953,2990,3027,3064,3101,3138,3175,3212,3249,3288,3327,3366,3405,3444,3483,3522,3561,3600,3641,3682,3723,3764,3805,3846,3887,3928,3969,4012,4055,4098,4141,4184,4227,4270,4313,4356,4401,4446,4491,4536,4581,4626,4671,4716,4761,4808,4855,4902,4949,4996,5043,5090,5137,5184,5233,5282,5331,5380,5429,5478,5527,5576,5625,5676,5727,5778,5829,5880,5931,5982,6033,6084,6137,6190,6243,6296,6349,6402,6455,6508,6561,6616,6671,6726,6781,6836,6891,6946
add $0,1
lpb $0
sub $0,1
add $2,$0
trn $0,8
mov $1,$2
add $1,1
add $1,$0
mov $2,$1
lpe
| 90.928571
| 1,119
| 0.739984
|
f8b95033805882e2353ef46c68bd0b8eb2e319a2
| 4,082
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1455.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_1455.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_1455.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 %r9
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x1e230, %rsi
lea addresses_WT_ht+0x18070, %rdi
nop
nop
nop
nop
sub $64791, %r9
mov $38, %rcx
rep movsb
nop
nop
nop
nop
dec %r15
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %rax
push %rbp
push %rcx
push %rdi
// Faulty Load
lea addresses_RW+0x1c6b0, %rdi
nop
nop
sub $11807, %r8
mov (%rdi), %r13d
lea oracles, %r8
and $0xff, %r13
shlq $12, %r13
mov (%r8,%r13,1), %r13
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 60.925373
| 2,999
| 0.66438
|
d4f7471e173b732f6f18a6238ae061bc905056f0
| 928
|
asm
|
Assembly
|
programs/oeis/024/A024084.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/024/A024084.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/024/A024084.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A024084: a(n) = 7^n - n^9.
; 1,6,-463,-19340,-259743,-1936318,-9960047,-39530064,-128452927,-347066882,-717524751,-380620948,8681506849,86284511034,657562026065,4709118150568,33164211092865,232511926110710,1628215238620081,11398572497675364,79791754297612001,558545069803237426,3909819841313770257,27368745538928254880,191581228738758874177,1341068615849267635182,9387480332218250626673,65712362355908682654556,459986536534161505023393,3219905755798672580861738,22539340290672575087863249,157775382034819366992882072,1104427674243885461933210369,7730993719707398112652692454,54116956037952050951966894385,378818692265664702867078954068,2651730845859653370219066713185,18562115921017574172491423876130,129934811447123019951956044435601,909543680129861140611476658730384,6366805760909027985479291139224001,44567640326363195899862664040174046,311973482284542371300923650438126577
mov $1,7
pow $1,$0
pow $0,9
sub $1,$0
mov $0,$1
| 103.111111
| 849
| 0.897629
|
98bc77bec7408e349dd33730b6b73bf0fc7bd924
| 450
|
asm
|
Assembly
|
programs/oeis/184/A184115.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/184/A184115.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/184/A184115.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A184115: n + ceiling(n^2/25); complement of A184114.
; 2,3,4,5,6,8,9,11,13,14,16,18,20,22,24,27,29,31,34,36,39,42,45,48,50,54,57,60,63,66,70,73,77,81,84,88,92,96,100,104,109,113,117,122,126,131,136,141,146,150,156,161,166,171,176,182,187,193,199,204,210,216,222,228,234,241,247,253,260,266,273,280,287,294,300,308,315,322,329,336,344,351,359,367,374,382,390,398,406,414
mov $1,$0
mov $2,$0
pow $0,2
mul $1,2
add $1,$0
div $1,25
add $1,2
add $1,$2
| 37.5
| 316
| 0.675556
|
0b10a0d8ab667ef5b9d4265373c01822ee233c8d
| 296
|
asm
|
Assembly
|
programs/oeis/248/A248340.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/248/A248340.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/248/A248340.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A248340: 10^n - 5^n.
; 0,5,75,875,9375,96875,984375,9921875,99609375,998046875,9990234375,99951171875,999755859375,9998779296875,99993896484375,999969482421875,9999847412109375,99999237060546875,999996185302734375,9999980926513671875
mov $1,10
pow $1,$0
mov $2,5
pow $2,$0
sub $1,$2
mov $0,$1
| 29.6
| 212
| 0.790541
|
5827f97972ae90b653195ea2345e49905221cf05
| 854
|
asm
|
Assembly
|
archive/minol/source/commands/call.asm
|
paulscottrobson/retrochallenge-jan-2016
|
8bd340efc85969fa6f2fecc788aa21b27123a4db
|
[
"MIT"
] | null | null | null |
archive/minol/source/commands/call.asm
|
paulscottrobson/retrochallenge-jan-2016
|
8bd340efc85969fa6f2fecc788aa21b27123a4db
|
[
"MIT"
] | null | null | null |
archive/minol/source/commands/call.asm
|
paulscottrobson/retrochallenge-jan-2016
|
8bd340efc85969fa6f2fecc788aa21b27123a4db
|
[
"MIT"
] | null | null | null |
; ****************************************************************************************************************
; ****************************************************************************************************************
;
; CALL Command
;
; ****************************************************************************************************************
; ****************************************************************************************************************
CMD_CALL:
lpi p3,EvaluateHL-1 ; evaluate the H,L address
xppc p3
jp CMD_CALL-2 ; if CY/L = 0 then exit
ld -2(p2) ; copy address into P3
xpal p3
ld -1(p2)
xpah p3
ld @-1(p3) ; fix up for pre increment
xppc p3 ; call it
scl ; set carry link flag as okay
jmp CMD_CALL-2
| 42.7
| 114
| 0.233021
|
23f5e4b05da08a1a7ed5315ed20d0b9311f9a7fa
| 1,925
|
asm
|
Assembly
|
programs/oeis/017/A017282.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/017/A017282.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/017/A017282.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A017282: a(n) = (10*n + 1)^2.
; 1,121,441,961,1681,2601,3721,5041,6561,8281,10201,12321,14641,17161,19881,22801,25921,29241,32761,36481,40401,44521,48841,53361,58081,63001,68121,73441,78961,84681,90601,96721,103041,109561,116281,123201,130321,137641,145161,152881,160801,168921,177241,185761,194481,203401,212521,221841,231361,241081,251001,261121,271441,281961,292681,303601,314721,326041,337561,349281,361201,373321,385641,398161,410881,423801,436921,450241,463761,477481,491401,505521,519841,534361,549081,564001,579121,594441,609961,625681,641601,657721,674041,690561,707281,724201,741321,758641,776161,793881,811801,829921,848241,866761,885481,904401,923521,942841,962361,982081,1002001,1022121,1042441,1062961,1083681,1104601,1125721,1147041,1168561,1190281,1212201,1234321,1256641,1279161,1301881,1324801,1347921,1371241,1394761,1418481,1442401,1466521,1490841,1515361,1540081,1565001,1590121,1615441,1640961,1666681,1692601,1718721,1745041,1771561,1798281,1825201,1852321,1879641,1907161,1934881,1962801,1990921,2019241,2047761,2076481,2105401,2134521,2163841,2193361,2223081,2253001,2283121,2313441,2343961,2374681,2405601,2436721,2468041,2499561,2531281,2563201,2595321,2627641,2660161,2692881,2725801,2758921,2792241,2825761,2859481,2893401,2927521,2961841,2996361,3031081,3066001,3101121,3136441,3171961,3207681,3243601,3279721,3316041,3352561,3389281,3426201,3463321,3500641,3538161,3575881,3613801,3651921,3690241,3728761,3767481,3806401,3845521,3884841,3924361,3964081,4004001,4044121,4084441,4124961,4165681,4206601,4247721,4289041,4330561,4372281,4414201,4456321,4498641,4541161,4583881,4626801,4669921,4713241,4756761,4800481,4844401,4888521,4932841,4977361,5022081,5067001,5112121,5157441,5202961,5248681,5294601,5340721,5387041,5433561,5480281,5527201,5574321,5621641,5669161,5716881,5764801,5812921,5861241,5909761,5958481,6007401,6056521,6105841,6155361,6205081
mov $1,$0
mul $1,10
add $1,1
pow $1,2
| 240.625
| 1,853
| 0.85039
|
2b5fa789cdbd21cbc36c32975a84f2d680247ac4
| 584
|
asm
|
Assembly
|
oeis/003/A003031.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/003/A003031.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/003/A003031.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A003031: Denominators of expansion of Fresnel integral S(z).
; 6,336,42240,9676800,3530096640,1880240947200,1377317368627200,1328346084409344000,1631723190138961920000,2487305589722682753024000,4607255276963246207139840000,10192534418301388027739504640000,26543961974469997757347135488000000,80381362496806793208719443230720000000,280066204690692352657696806276169728000000,1112479927649333216421319042692934533120000000,4997471735939404681158169200546698672209920000000,25208142505643003075286789000250183332239769600000000
mul $0,2
add $0,1
seq $0,14481 ; a(n) = 2^n*n!*(2*n+1).
| 83.428571
| 463
| 0.890411
|
321b72d5a9fa8199ef69abf324a439102f33742d
| 775
|
asm
|
Assembly
|
BigNum/Mod/ModArith/bnModInv.asm
|
FloydZ/Crypto-Hash
|
2635450fb16d4d8dc4578d6539cc25ce599f7e21
|
[
"MIT"
] | 11
|
2015-03-17T10:31:23.000Z
|
2022-01-21T17:42:43.000Z
|
BigNum/Mod/ModArith/bnModInv.asm
|
0xFF1E071F/Crypto-Hash
|
2635450fb16d4d8dc4578d6539cc25ce599f7e21
|
[
"MIT"
] | null | null | null |
BigNum/Mod/ModArith/bnModInv.asm
|
0xFF1E071F/Crypto-Hash
|
2635450fb16d4d8dc4578d6539cc25ce599f7e21
|
[
"MIT"
] | 6
|
2018-01-29T16:06:36.000Z
|
2021-05-08T19:22:24.000Z
|
.686
.model flat,stdcall
option casemap:none
include .\bnlib.inc
include .\bignum.inc
.code
bnModInv proc uses ebx edi esi bnX:DWORD, bnN:DWORD, bnR:DWORD
LOCAL t0,t1
; invoke bnGCD,bnX,bnN,bnR
; mov eax,bnR
; .if BN_IS_ONE(eax);
invoke bnCreatei,1
mov t1,eax
bnCreateX ebx,edi,esi,t0
invoke bnMov,ebx,bnX
invoke bnMov,esi,bnN
.while 1
.if ABS_BN_IS_ONE(ebx)
invoke bnMov,bnR,t1
.break
.endif
invoke bnDiv,esi,ebx,edi,esi
invoke bnMul,edi,t1,bnR
invoke bnAdd,t0,bnR
.if ABS_BN_IS_ONE(esi)
invoke bnMov,bnR,bnN
invoke bnSub,bnR,t0 ; never <0
.break
.endif
invoke bnDiv,ebx,esi,edi,ebx
invoke bnMul,edi,t0,bnR
invoke bnAdd,t1,bnR
.endw
bnDestroyX
invoke bnDestroy,t1
ret
; .endif
; invoke bnClear,bnR
; ret
bnModInv endp
end
| 17.222222
| 62
| 0.717419
|
b050e122dc502f2e018530e753b81e99586a8d3c
| 8,089
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_7549_1719.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_7549_1719.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2.log_7549_1719.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 %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x13787, %r14
dec %rsi
vmovups (%r14), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %rcx
nop
nop
nop
and %rcx, %rcx
lea addresses_D_ht+0x15e0f, %r14
cmp $21968, %r15
mov $0x6162636465666768, %rbp
movq %rbp, %xmm7
vmovups %ymm7, (%r14)
sub $46837, %r15
lea addresses_D_ht+0x1d99f, %rdi
nop
nop
nop
add $11608, %rbx
movw $0x6162, (%rdi)
nop
nop
nop
nop
nop
inc %rcx
lea addresses_WC_ht+0x12a6f, %rcx
nop
nop
nop
nop
nop
and %r14, %r14
mov (%rcx), %r15w
nop
nop
and $61506, %rcx
lea addresses_WC_ht+0x108ef, %r15
nop
nop
nop
nop
cmp %rdi, %rdi
movups (%r15), %xmm2
vpextrq $1, %xmm2, %r14
nop
xor $23988, %rbx
lea addresses_UC_ht+0x17c6f, %rsi
lea addresses_D_ht+0x1166f, %rdi
nop
nop
nop
nop
nop
cmp %r11, %r11
mov $94, %rcx
rep movsl
nop
nop
and $42161, %rsi
lea addresses_A_ht+0x7023, %rbx
dec %r11
mov $0x6162636465666768, %rcx
movq %rcx, %xmm4
movups %xmm4, (%rbx)
nop
nop
sub %rbx, %rbx
lea addresses_UC_ht+0x13e13, %rdi
nop
nop
add %r11, %r11
movb $0x61, (%rdi)
nop
nop
sub $50394, %rbp
lea addresses_A_ht+0x1086f, %r14
nop
nop
nop
nop
nop
inc %r11
movups (%r14), %xmm7
vpextrq $0, %xmm7, %rsi
nop
nop
nop
nop
sub %r15, %r15
lea addresses_WT_ht+0xb4ef, %rdi
sub $57255, %r11
mov (%rdi), %rbp
nop
nop
sub $58190, %r11
lea addresses_normal_ht+0xec6f, %rbp
nop
nop
xor %r15, %r15
movl $0x61626364, (%rbp)
nop
nop
nop
nop
add %rsi, %rsi
lea addresses_normal_ht+0x12a6f, %rsi
lea addresses_UC_ht+0x1486f, %rdi
nop
nop
nop
nop
and %r14, %r14
mov $61, %rcx
rep movsw
nop
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_A_ht+0xea03, %rsi
lea addresses_D_ht+0x1216f, %rdi
xor $12559, %r15
mov $4, %rcx
rep movsl
nop
nop
nop
nop
and %rsi, %rsi
lea addresses_WT_ht+0x1346f, %rsi
lea addresses_A_ht+0x72d9, %rdi
nop
xor %r14, %r14
mov $25, %rcx
rep movsq
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_UC_ht+0x1d90f, %rbp
clflush (%rbp)
nop
nop
nop
xor $31906, %r14
and $0xffffffffffffffc0, %rbp
vmovntdqa (%rbp), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %rsi
nop
nop
nop
xor $38898, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %r9
push %rax
push %rbp
push %rbx
push %rcx
// Store
lea addresses_WC+0xe6af, %rax
cmp $30805, %r9
mov $0x5152535455565758, %rbx
movq %rbx, (%rax)
inc %r15
// Faulty Load
lea addresses_D+0x1f86f, %rbx
nop
nop
nop
add $34059, %r14
mov (%rbx), %r9
lea oracles, %r15
and $0xff, %r9
shlq $12, %r9
mov (%r15,%r9,1), %r9
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': True, 'congruent': 5, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False, 'NT': True, 'congruent': 5, 'same': False}}
{'36': 7549}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 33.564315
| 2,999
| 0.656447
|
baadefb5862b85e91c5ebac61210158c1fddc730
| 1,140
|
asm
|
Assembly
|
programs/oeis/122/A122800.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/122/A122800.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/122/A122800.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A122800: A P_4-stuttered arithmetic progression with a(n+1)=a(n) if n is square, a(n+1)=a(n)+2 otherwise.
; 1,1,3,5,5,7,9,11,13,13,15,17,19,21,23,25,25,27,29,31,33,35,37,39,41,41,43,45,47,49,51,53,55,57,59,61,61,63,65,67,69,71,73,75,77,79,81,83,85,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255,257,259,261,263,265,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,311,313,313,315,317,319,321,323,325,327,329,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,365,367,369,371,373,375,377,379,381,383,385,387,389,391,393,395,397,399,401,403,405,407,409,411,413,415,417,419,421,421,423,425,427,429,431,433,435,437,439,441,443,445,447,449,451,453,455,457,459,461,463,465,467,469
mul $0,2
mov $1,$0
mov $2,5
lpb $0
sub $0,1
trn $0,$2
sub $1,2
add $2,4
lpe
add $1,1
| 81.428571
| 937
| 0.709649
|
2b36d05fa942b01018545c5ab6e2507a0f38fc8b
| 5,697
|
asm
|
Assembly
|
Library/Config/Pref/prefEC.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 504
|
2018-11-18T03:35:53.000Z
|
2022-03-29T01:02:51.000Z
|
Library/Config/Pref/prefEC.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 96
|
2018-11-19T21:06:50.000Z
|
2022-03-06T10:26:48.000Z
|
Library/Config/Pref/prefEC.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:
FILE: prefEC.asm
AUTHOR: Chris Boyke
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
cdb 6/19/92 Initial version.
DESCRIPTION:
$Id: prefEC.asm,v 1.1 97/04/04 17:50:33 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ECCheckGenOptionsParams
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Make sure that ss:bp.GOP_key and ss:bp.GOP_category
are valid ascii strings
CALLED BY:
PASS: ss:bp - GenOptionsParams
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cdb 6/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ECCheckGenOptionsParams proc near
uses ds,si
.enter
pushf
segmov ds, ss, si
lea si, ss:[bp].GOP_key
SBCS < call ECCheckAsciiString >
DBCS < call ECCheckAsciiStringSBCS >
lea si, ss:[bp].GOP_category
SBCS < call ECCheckAsciiString >
DBCS < call ECCheckAsciiStringSBCS >
popf
.leave
ret
ECCheckGenOptionsParams endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ECCheckAsciiString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Make sure that ds:si is a valid ascii string
CALLED BY: utility
PASS: ds:si - string to check
RETURN: nothing
DESTROYED: nothing - flags preserved
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
cdb 6/19/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ECCheckAsciiString proc near
uses ax,bx,cx,dx,si
.enter
pushf
;
; hack to determine if SBCS or DBCS string
;
if DBCS_PCGEOS
cmp ({word} ds:[si]).high, 0
je double
;
; SBCS string
;
mov cx, PREF_ITEM_GROUP_STRING_BUFFER_SIZE
clr ah
10$:
lodsb
tst al
jz done
clr bx, dx
call LocalIsDosChar
ERROR_Z ILLEGAL_ASCII_STRING
loop 10$
ERROR ILLEGAL_ASCII_STRING
.unreached
endif
DBCS <double: >
mov cx, PREF_ITEM_GROUP_STRING_BUFFER_SIZE
SBCS < clr ah >
startLoop:
LocalGetChar ax, dssi
LocalIsNull ax
jz done
clr bx, dx
call LocalIsDosChar
ERROR_Z ILLEGAL_ASCII_STRING
loop startLoop
ERROR ILLEGAL_ASCII_STRING
done:
popf
.leave
ret
ECCheckAsciiString endp
if DBCS_PCGEOS
ECCheckAsciiStringSBCS proc near
uses ax,bx,cx,dx,si
.enter
pushf
;
; SBCS string
;
mov cx, PREF_ITEM_GROUP_STRING_BUFFER_SIZE
clr ah
10$:
lodsb
tst al
jz done
clr bx, dx
call LocalIsDosChar
ERROR_Z ILLEGAL_ASCII_STRING
loop 10$
ERROR ILLEGAL_ASCII_STRING
.unreached
done:
popf
.leave
ret
ECCheckAsciiStringSBCS endp
endif
ECCheckAsciiStringDSBX proc near
xchg bx, si
call ECCheckAsciiString
xchg bx, si
ret
ECCheckAsciiStringDSBX endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ECCheckBoundsESDI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Make sure the memory location ES:DI is writable and in
bounds.
CALLED BY:
PASS:
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 10/26/92 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ECCheckBoundsESDI proc far
uses ds, si
.enter
segmov ds, es
mov si, di
call ECCheckBounds
.leave
ret
ECCheckBoundsESDI endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ECCheckPrefObject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
CALLED BY:
PASS:
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 3/ 2/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ECCheckPrefObject proc near
uses es,di
.enter
pushf
segmov es, <segment PrefClass>, di
mov di, offset PrefClass
call ObjIsObjectInClass
ERROR_NC DS_SI_NOT_A_PREF_OBJECT
popf
.leave
ret
ECCheckPrefObject endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ECCheckSrcDestMoveBounds
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: ECCheck that we ain't scribbling
CALLED BY: ?
PASS: ds:si - source
es:di - dest
cx - # bytes to move
RETURN: nothing
DESTROYED: nothing, flags preserved
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
chrisb 4/29/93 Initial version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
if 0
ECCheckSrcDestMoveBounds proc far
uses si, di
.enter
pushf
call ECCheckBounds
add si, cx
dec si
call ECCheckBounds
call ECCheckBoundsESDI
add di, cx
dec di
call ECCheckBoundsESDI
popf
.leave
ret
ECCheckSrcDestMoveBounds endp
endif
| 18.085714
| 71
| 0.526066
|
ed948d1c1c33a9daffa2a0246f6e1da109b3be7b
| 1,073
|
asm
|
Assembly
|
MacOSX/find-the-unique-number/unique.asm
|
shikhar-scs/Assembly-with-MacOS
|
6690d5da758d614fd5af452f86ad5153fb7466f0
|
[
"Apache-2.0"
] | 19
|
2018-04-20T04:41:23.000Z
|
2021-11-14T15:58:24.000Z
|
MacOSX/find-the-unique-number/unique.asm
|
shikhar-scs/Assembly-with-MacOS
|
6690d5da758d614fd5af452f86ad5153fb7466f0
|
[
"Apache-2.0"
] | 1
|
2018-04-20T02:01:17.000Z
|
2018-04-20T11:47:22.000Z
|
MacOSX/find-the-unique-number/unique.asm
|
shikhar-scs/Assembly-with-MacOS
|
6690d5da758d614fd5af452f86ad5153fb7466f0
|
[
"Apache-2.0"
] | 7
|
2018-04-19T20:05:30.000Z
|
2020-06-24T03:12:40.000Z
|
section .text
global _main ;must be declared for linker (ld)
extern _printf, _exit
_main:
push ebp
mov ebp, esp ; Set up stack frame
sub esp, 8 ; 16-byte align stack + room for parameters passed
; to functions we call
mov ebx,0 ;EBX will store the sum
mov eax,11 ;number bytes to be summed
mov ecx, x ;ECX will point to the current element to be summed
top:
xor ebx, [ecx]
add ecx,4 ;move pointer to next element
dec eax ;decrement counter
jnz top ;if counter not 0, then loop again
done:
mov dword[esp+4], ebx
display:
mov dword[esp], msg ; First parameter at esp+0
call _printf
xor eax, eax ; Return value = 0
mov esp, ebp
pop ebp ; Remove stack frame
ret
section .data
msg db "The unique number is %d", 0x0a, 0x00
x dd 13, 13, 42, 42, 43, 56, 56, 90, 90, 43, 50
;/usr/bin/nasm -f macho unique.asm -o unique.o && ld -macosx_version_min 10.8 -no_pie -arch i386 -o unique unique.o -lc
| 26.825
| 119
| 0.598322
|
f0f9d38cece38b6ab08394395a0db93e3ae7e721
| 285
|
asm
|
Assembly
|
programs/oeis/155/A155667.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/155/A155667.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/155/A155667.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A155667: 10^n-8^n+1.
; 1,3,37,489,5905,67233,737857,7902849,83222785,865782273,8926258177,91410065409,931280523265,9450244186113,95601953488897,964815627911169,9718525023289345,97748200186314753,981985601490518017
mov $1,10
pow $1,$0
mov $2,8
pow $2,$0
sub $1,$2
add $1,1
mov $0,$1
| 25.909091
| 192
| 0.775439
|
10a57ed664984340620c297a4340a14aac761ca5
| 3,142
|
asm
|
Assembly
|
software/obsolete/simple-monitor-rom/monitor.asm
|
Noah1989/micro-21
|
f574c3dd089ee93737c8babc6f5eddf85e66987e
|
[
"MIT"
] | 1
|
2019-05-17T14:43:17.000Z
|
2019-05-17T14:43:17.000Z
|
software/obsolete/simple-monitor-rom/monitor.asm
|
Noah1989/loopmicro
|
4d9a49b0aeee1d58aa712c7509cbb46d32477e16
|
[
"MIT"
] | null | null | null |
software/obsolete/simple-monitor-rom/monitor.asm
|
Noah1989/loopmicro
|
4d9a49b0aeee1d58aa712c7509cbb46d32477e16
|
[
"MIT"
] | null | null | null |
entrypoint monitor
.block
ld d, h
ld a, l
and $80
ld e, a
call cursor
loop:
ex de, hl
push de
wait_key:
call dump_page
call get_key
jr z, wait_key
pop de
ex de, hl
push af
call cursor
pop af
call monitor_keys
call cursor
jr loop
.endblock
entrypoint cursor
.block
push hl
and a
sbc hl, de
ld a, l
ld b, 4
loop:
rlca
rl h
djnz loop
inc h
inc h
inc h
ld a, l
and $0F
ld l, a
add a, a
add a, l
add a, 10
ld l, a
ld b, 4
call highlight
pop hl
ret
.endblock
entrypoint highlight
.block
ld a, l
out gaddr_l, a
ld a, h
out gaddr_h, a
loop:
in a, gcolor
rrca
rrca
rrca
rrca
out gcolor_inc, a
djnz loop
ret
.endblock
entrypoint dump_page
.block
ld d, 3
push hl
loop:
ld a, d
out gaddr_h, a
call dump16
inc d
ld a, d
cp 27
jr nz, loop
pop hl
ret
.endblock
entrypoint dump16
.block
push hl
ld a, 4
out gaddr_l, a
ld a, "@"
out gname_inc, a
ld a, h
call print_byte
ld a, l
call print_byte
ld a, ":"
out gname_inc, a
ld b, 16
loop:
ld a, " "
out gname_inc, a
ld a, (hl)
call print_byte
inc hl
djnz loop
ld a, " "
out gname_inc, a
out gname_inc, a
pop hl
ld c, gname_inc
ld b, 16
otir
ret
.endblock
entrypoint print_byte
.block
push af
rrca
rrca
rrca
rrca
call print_nibble
pop af
@print_nibble:
and $0F
add a, $90
daa
adc a, $40
daa
out gname_inc, a
ret
.endblock
entrypoint monitor_keys
.block
cp $7D ; PgUp
jr nz, next1
ld bc, -128
ex de, hl
add hl, bc
ex de, hl
jp scroll_cursor
next1:
cp $7A ; PgDn
jr nz, next2
ld bc, +128
ex de, hl
add hl, bc
ex de, hl
jp scroll_cursor
next2:
cp $74 ; Right
jr nz, next3
inc hl
jp scroll_page
next3:
cp $6B ; Left
jr nz, next4
dec hl
jp scroll_page
next4:
cp $75 ; Up
jr nz, next5
ld bc, -16
add hl, bc
jp scroll_page
next5:
cp $72 ; Down
jr nz, next6
ld bc, +16
add hl, bc
jp scroll_page
next6:
call hex_keys ; 0-9, A-F
jr nz, next7
ld a, c
rld
ret
next7:
cp $5A ; Enter
jr nz, next8
push de
push hl
ld bc, return
push bc
jp (hl)
return:
pop hl
pop de
ret
next8:
cp $34 ; G
jr nz, next9
ld a, 4
out gaddr_l, a
ld a, 28
out gaddr_h, a
ld c, gname_inc
ld b, 7
ld hl, text
otir
call input_addr
ld d, h
ld a, l
and $80
ld e, a
ret
text:
.db "GO TO @"
next9:
cp $29 ; Space
jr nz, next10
inc hl
jp scroll_page
ret
next10:
; ...
ret
.endblock
entrypoint hex_keys
.block
push hl
ld hl, hex_keys_F
ld bc, 16
cpdr
pop hl
ret
.db $45, $16, $1E, $26
.db $25, $2E, $36, $3D
.db $3E, $46, $1C, $32
.db $21, $23, $24
hex_keys_F:
.db $2b
.endblock
entrypoint scroll_cursor
.block
xor a
sbc hl, de
jp p, next
ld bc, +128
add hl, bc
jr done
next:
cp h
jr z, done
ld a, l
cp $80
jr c, done
ld bc, -128
add hl, bc
done:
add hl, de
ret
.endblock
entrypoint scroll_page
.block
push hl
xor a
sbc hl, de
ex de, hl
jp p, next
ld bc, -128
add hl, bc
jr done
next:
cp d
jr z, done
ld a, e
cp $80
jr c, done
ld bc, +128
add hl, bc
done:
ex de, hl
pop hl
ret
.endblock
entrypoint input_addr
.block
call input_byte
ld h, a
call input_byte
ld l, a
ret
.endblock
entrypoint input_byte
.block
call input_nibble
ld a, c
rlca
rlca
rlca
rlca
push af
call input_nibble
pop af
or c
ret
.endblock
entrypoint input_nibble
.block
ld a, "_"
out gname, a
loop:
call get_key
jr z, loop
call hex_keys
jr nz, loop
ld a, c
jp print_nibble
.endblock
| 9.880503
| 24
| 0.699554
|
1258fb6a9b92a13165e3233f6745d2afa2ee533b
| 705
|
asm
|
Assembly
|
step011 - basic boot sector/boot_sect.asm
|
Bigsby/OperatingSystem
|
28abebfba83b66c2dae81a48c8c18bda0c9d44e2
|
[
"MIT"
] | null | null | null |
step011 - basic boot sector/boot_sect.asm
|
Bigsby/OperatingSystem
|
28abebfba83b66c2dae81a48c8c18bda0c9d44e2
|
[
"MIT"
] | null | null | null |
step011 - basic boot sector/boot_sect.asm
|
Bigsby/OperatingSystem
|
28abebfba83b66c2dae81a48c8c18bda0c9d44e2
|
[
"MIT"
] | 1
|
2020-02-25T10:14:17.000Z
|
2020-02-25T10:14:17.000Z
|
;
; A simple boot sector program that loops forever.
;
loop: ; Define a label , " loop " , that will allow
; us to jump back to it , forever.
jmp loop ; Use a simple CPU instruction that jumps
; to a new memory address to continue execution.
; In our case , jump to the address of the current
; instruction.
times 510-($-$$) db 0 ; When compiled , our program must fit into 512 bytes ,
; with the last two bytes being the magic number ,
; so here , tell our assembly compiler to pad out our
; program with enough zero bytes ( db 0) to bring us to the
; 510 th byte.
dw 0xaa55 ; Last two bytes ( one word ) form the magic number ,
; so BIOS knows we are a boot sector.
| 33.571429
| 77
| 0.675177
|
b0627df432a9906c012c2ddc3fd16e61c3596cc7
| 5,920
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_88_372.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_88_372.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_88_372.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r15
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0xac03, %rsi
nop
nop
nop
nop
nop
sub $5700, %rax
mov (%rsi), %r15
nop
sub %rdi, %rdi
lea addresses_normal_ht+0x98dc, %r10
xor $6040, %rcx
movb (%r10), %bl
nop
nop
inc %r10
lea addresses_WT_ht+0xbc43, %r15
nop
nop
add %rdi, %rdi
movups (%r15), %xmm7
vpextrq $0, %xmm7, %rsi
nop
nop
nop
nop
nop
inc %rcx
lea addresses_WC_ht+0x2a03, %rsi
lea addresses_WT_ht+0x16632, %rdi
nop
nop
nop
nop
sub $17905, %rbp
mov $75, %rcx
rep movsw
nop
nop
sub %rdi, %rdi
lea addresses_UC_ht+0x9c03, %rsi
lea addresses_A_ht+0xbcb, %rdi
nop
nop
nop
nop
nop
add $191, %r15
mov $37, %rcx
rep movsb
nop
nop
nop
add %rdi, %rdi
lea addresses_WT_ht+0xf403, %rsi
lea addresses_UC_ht+0x17703, %rdi
clflush (%rsi)
clflush (%rdi)
nop
nop
nop
nop
nop
xor %rbp, %rbp
mov $72, %rcx
rep movsw
nop
nop
nop
add %rbx, %rbx
lea addresses_WT_ht+0xc003, %rsi
clflush (%rsi)
nop
cmp $26808, %rcx
movw $0x6162, (%rsi)
nop
nop
cmp %r15, %r15
lea addresses_D_ht+0x5383, %rbp
nop
xor $41907, %r15
mov (%rbp), %rsi
nop
nop
nop
nop
nop
xor $54990, %rax
lea addresses_D_ht+0xd4fb, %rsi
lea addresses_UC_ht+0x9aff, %rdi
nop
nop
sub $13870, %r15
mov $84, %rcx
rep movsw
nop
nop
nop
nop
and %rbx, %rbx
lea addresses_UC_ht+0xd803, %rsi
lea addresses_normal_ht+0x1df73, %rdi
nop
nop
nop
xor %r15, %r15
mov $65, %rcx
rep movsq
nop
nop
nop
nop
xor $39839, %rcx
lea addresses_UC_ht+0x1eab, %rbx
nop
cmp $50182, %rcx
mov $0x6162636465666768, %rbp
movq %rbp, %xmm7
movups %xmm7, (%rbx)
nop
nop
nop
and $18253, %r15
lea addresses_A_ht+0x1597d, %rdi
nop
nop
nop
nop
nop
sub $5441, %rbp
movups (%rdi), %xmm0
vpextrq $0, %xmm0, %rax
dec %r15
lea addresses_normal_ht+0x1856d, %rsi
lea addresses_D_ht+0x106f3, %rdi
nop
nop
nop
nop
nop
add $13738, %r15
mov $44, %rcx
rep movsl
cmp %rbx, %rbx
lea addresses_A_ht+0x17a03, %rsi
lea addresses_WT_ht+0x18803, %rdi
nop
nop
nop
nop
dec %r15
mov $119, %rcx
rep movsw
nop
add %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r14
push %r8
push %r9
push %rcx
push %rsi
// Store
lea addresses_PSE+0x15a3, %rcx
add $65067, %r8
movb $0x51, (%rcx)
nop
cmp $7828, %r11
// Store
lea addresses_normal+0x627e, %r10
clflush (%r10)
nop
cmp %rsi, %rsi
movb $0x51, (%r10)
nop
nop
nop
nop
cmp $7484, %r8
// Load
mov $0x2b9cb70000000d3d, %rcx
nop
nop
nop
nop
nop
sub %r9, %r9
vmovaps (%rcx), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $1, %xmm5, %rsi
nop
nop
nop
nop
xor %rcx, %rcx
// Load
lea addresses_RW+0x2343, %rcx
nop
nop
nop
nop
nop
add $39896, %rsi
mov (%rcx), %r8d
nop
nop
dec %r10
// Faulty Load
lea addresses_WT+0x1c403, %r10
nop
dec %rsi
mov (%r10), %rcx
lea oracles, %rsi
and $0xff, %rcx
shlq $12, %rcx
mov (%rsi,%rcx,1), %rcx
pop %rsi
pop %rcx
pop %r9
pop %r8
pop %r14
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'size': 32, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_RW', 'size': 4, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': True}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 8, 'AVXalign': True, 'NT': False, 'congruent': 5, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}}
{'39': 88}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 21.067616
| 263
| 0.649831
|
a9d23c3dfbb4d33854872e401366709f7dee6f42
| 9,502
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca_notsx.log_21829_690.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca_notsx.log_21829_690.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca_notsx.log_21829_690.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xa900, %rsi
nop
nop
and %rdx, %rdx
movb $0x61, (%rsi)
nop
nop
xor $15348, %r12
lea addresses_WT_ht+0xe700, %rcx
inc %rdi
movw $0x6162, (%rcx)
nop
nop
nop
xor $40468, %r12
lea addresses_normal_ht+0x6100, %rsi
lea addresses_WT_ht+0x11034, %rdi
nop
add %rax, %rax
mov $39, %rcx
rep movsb
nop
nop
nop
nop
nop
dec %rdx
lea addresses_WC_ht+0x15214, %r12
nop
nop
sub $28812, %r10
vmovups (%r12), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $0, %xmm2, %rcx
nop
nop
inc %rdi
lea addresses_normal_ht+0x1bea5, %rsi
lea addresses_UC_ht+0x1a760, %rdi
clflush (%rsi)
and $14438, %rbp
mov $38, %rcx
rep movsq
nop
sub %rbp, %rbp
lea addresses_WT_ht+0xfe78, %rax
nop
nop
nop
inc %r12
vmovups (%rax), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdx
nop
mfence
lea addresses_D_ht+0x17280, %rsi
lea addresses_WC_ht+0x10980, %rdi
nop
nop
nop
xor $40860, %r12
mov $49, %rcx
rep movsq
nop
add $18044, %rdx
lea addresses_normal_ht+0x6900, %rdx
nop
nop
nop
add %r10, %r10
mov (%rdx), %rdi
nop
nop
nop
sub %rdx, %rdx
lea addresses_UC_ht+0x1eb50, %rdi
clflush (%rdi)
nop
add $12449, %rax
mov (%rdi), %r12d
nop
nop
nop
nop
nop
xor %rdx, %rdx
lea addresses_normal_ht+0x18cc0, %rax
nop
nop
nop
nop
xor $374, %rdi
mov $0x6162636465666768, %rdx
movq %rdx, (%rax)
nop
nop
nop
nop
nop
xor %rdi, %rdi
lea addresses_normal_ht+0x1b5f0, %rsi
lea addresses_WC_ht+0x17900, %rdi
nop
inc %rbp
mov $84, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp $54527, %rdi
lea addresses_D_ht+0x15900, %rax
nop
nop
nop
add $13927, %rcx
movb $0x61, (%rax)
nop
nop
nop
nop
nop
and $40380, %rsi
lea addresses_D_ht+0x15050, %r12
nop
nop
nop
nop
nop
cmp %rdx, %rdx
mov $0x6162636465666768, %rax
movq %rax, %xmm0
movups %xmm0, (%r12)
nop
nop
nop
nop
and $22542, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r8
push %r9
push %rax
push %rbp
push %rcx
// Load
lea addresses_US+0x1c47c, %rbp
cmp %r8, %r8
mov (%rbp), %r9
nop
xor %rax, %rax
// Store
lea addresses_US+0x13900, %rcx
nop
xor %r12, %r12
mov $0x5152535455565758, %rbp
movq %rbp, (%rcx)
nop
nop
nop
nop
cmp %rcx, %rcx
// Store
lea addresses_D+0x17dc0, %rax
nop
nop
nop
nop
and %rbp, %rbp
movw $0x5152, (%rax)
nop
inc %rbp
// Store
lea addresses_normal+0x1c500, %r10
nop
nop
cmp $21030, %r8
movl $0x51525354, (%r10)
nop
nop
nop
xor %r10, %r10
// Load
lea addresses_A+0x12900, %r12
nop
nop
nop
sub $31946, %rcx
mov (%r12), %rax
nop
nop
add %r8, %r8
// Load
lea addresses_normal+0x8500, %rax
add $39554, %r9
mov (%rax), %ecx
nop
and $58687, %rcx
// Load
lea addresses_WC+0x1334a, %rbp
nop
dec %r8
movb (%rbp), %al
nop
nop
xor $9956, %r9
// Store
lea addresses_PSE+0xb700, %r12
nop
nop
xor %rbp, %rbp
mov $0x5152535455565758, %rax
movq %rax, %xmm4
movups %xmm4, (%r12)
nop
nop
nop
cmp %r8, %r8
// Store
lea addresses_normal+0x1d500, %rcx
nop
nop
nop
nop
and %r10, %r10
mov $0x5152535455565758, %r9
movq %r9, (%rcx)
nop
nop
nop
nop
nop
and $64853, %r10
// Faulty Load
lea addresses_US+0x13900, %r8
nop
nop
and $42111, %rbp
mov (%r8), %r9d
lea oracles, %rcx
and $0xff, %r9
shlq $12, %r9
mov (%rcx,%r9,1), %r9
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_US'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 5, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 8, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 10, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 1, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 10, 'same': False, 'type': 'addresses_normal'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_US'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 11, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 1, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'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
*/
| 29.880503
| 2,999
| 0.652073
|
f096e0adec11713203ed1f2b9083a7b3f702d9f0
| 8,155
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0xca.log_21829_265.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_0xca.log_21829_265.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_0xca.log_21829_265.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 %r14
push %r8
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x1cf9a, %rsi
lea addresses_normal_ht+0x7d1a, %rdi
nop
nop
dec %r10
mov $11, %rcx
rep movsb
nop
nop
add $27694, %r14
lea addresses_WC_ht+0x8972, %rsi
lea addresses_A_ht+0x902a, %rdi
cmp $24983, %rbx
mov $38, %rcx
rep movsq
nop
nop
cmp %rsi, %rsi
lea addresses_WC_ht+0x1819a, %rsi
nop
nop
nop
and $3, %r9
movw $0x6162, (%rsi)
nop
nop
and $53269, %r9
lea addresses_normal_ht+0x1b79a, %r10
nop
add %rdi, %rdi
mov (%r10), %r9
xor %r9, %r9
lea addresses_UC_ht+0x1dada, %r10
nop
nop
cmp %rbx, %rbx
and $0xffffffffffffffc0, %r10
movaps (%r10), %xmm3
vpextrq $0, %xmm3, %rdi
nop
and $21725, %r10
lea addresses_WC_ht+0x1579a, %rsi
lea addresses_UC_ht+0x1ab9a, %rdi
nop
nop
nop
nop
add %r8, %r8
mov $11, %rcx
rep movsw
add %r10, %r10
lea addresses_UC_ht+0x2b9a, %rsi
lea addresses_WT_ht+0xb79a, %rdi
nop
nop
cmp %r8, %r8
mov $45, %rcx
rep movsw
sub %rbx, %rbx
lea addresses_D_ht+0x1e5a, %rsi
lea addresses_D_ht+0x99a, %rdi
nop
inc %r14
mov $40, %rcx
rep movsb
nop
nop
nop
sub %rdi, %rdi
lea addresses_WC_ht+0xbce0, %rcx
nop
xor %r9, %r9
movb (%rcx), %r14b
xor %r14, %r14
lea addresses_D_ht+0x1e6ba, %r14
nop
add %r8, %r8
mov $0x6162636465666768, %r10
movq %r10, %xmm4
movups %xmm4, (%r14)
nop
nop
nop
nop
nop
and %rdi, %rdi
lea addresses_A_ht+0x1346a, %rbx
nop
nop
and $25585, %r14
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
and $0xffffffffffffffc0, %rbx
vmovntdq %ymm0, (%rbx)
and %rsi, %rsi
lea addresses_D_ht+0x7b9a, %rsi
lea addresses_A_ht+0x1a9ca, %rdi
nop
nop
nop
cmp $56470, %rbx
mov $54, %rcx
rep movsq
nop
nop
nop
nop
nop
xor %r8, %r8
lea addresses_A_ht+0x16b9a, %r8
nop
nop
nop
inc %rsi
mov $0x6162636465666768, %rdi
movq %rdi, %xmm6
movups %xmm6, (%r8)
nop
nop
nop
nop
inc %r14
lea addresses_D_ht+0x4f1a, %rcx
nop
nop
nop
and $41313, %r14
mov $0x6162636465666768, %rdi
movq %rdi, %xmm3
movups %xmm3, (%rcx)
add %rsi, %rsi
lea addresses_A_ht+0xb517, %rsi
lea addresses_normal_ht+0x1101a, %rdi
nop
nop
and $4993, %r9
mov $25, %rcx
rep movsb
xor $4703, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r14
push %r9
push %rax
push %rbx
// Load
lea addresses_UC+0x1965a, %rax
nop
nop
nop
nop
nop
sub %r9, %r9
mov (%rax), %r14
nop
cmp %r12, %r12
// Faulty Load
lea addresses_WT+0x6f9a, %rbx
clflush (%rbx)
cmp %r11, %r11
movups (%rbx), %xmm6
vpextrq $0, %xmm6, %rax
lea oracles, %r10
and $0xff, %rax
shlq $12, %rax
mov (%r10,%rax,1), %rax
pop %rbx
pop %rax
pop %r9
pop %r14
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 16, 'NT': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}}
{'src': {'congruent': 3, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 3, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}}
{'src': {'congruent': 11, 'AVXalign': True, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 6, 'AVXalign': True, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 1, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': True, 'size': 32, 'NT': True, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 7, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 35.92511
| 2,999
| 0.657633
|
0b5cd2f207a114ef4912c483de33d99d8ffe96fb
| 242
|
asm
|
Assembly
|
libsrc/stdio/ansi/px8/f_ansi_bel.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/stdio/ansi/px8/f_ansi_bel.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/stdio/ansi/px8/f_ansi_bel.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;
; ANSI Video handling for the Epson PX8
; By Stefano Bodrato - 2019
;
; BEL - chr(7) Beep it out
;
;
; $Id: f_ansi_bel.asm $
;
SECTION code_clib
PUBLIC ansi_BEL
EXTERN px8_conout
.ansi_BEL
ld c,7 ; BEL
jp px8_conout
| 11.52381
| 40
| 0.640496
|
86ad61d5cca6c09084d05cd5b85e42e7f169180c
| 553
|
asm
|
Assembly
|
oeis/307/A307229.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/307/A307229.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/307/A307229.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A307229: Decimal expansion of (3*exp(1/2) - 1)/2.
; Submitted by Christian Krause
; 1,9,7,3,0,8,1,9,0,6,0,5,0,1,9,2,2,2,0,2,7,2,9,7,6,1,8,1,7,2,1,2,4,5,3,5,7,4,8,0,6,6,4,1,5,1,0,6,5,2,2,2,0,1,7,3,6,2,6,1,8,9,6,7,4,6,0,9,9,1,5,3,1,7,9,1,3,2,3,4,1,2,9,4,9,1,6,4,7,8,0,0,8,4,5,4,9,9,6,4
mov $1,1
mov $2,1
mov $3,$0
mul $3,5
lpb $3
mul $2,$3
add $1,$2
cmp $4,0
mov $5,$0
div $5,3
add $5,$4
div $1,$5
div $1,2
div $2,$5
add $1,$2
sub $3,1
cmp $4,0
lpe
mov $6,10
pow $6,$0
div $2,$6
div $1,$2
div $6,2
add $1,$6
mod $1,10
mov $0,$1
| 17.83871
| 201
| 0.520796
|
df18b2b4c1d30506155517b94ec0a3a7c99ade75
| 5,461
|
asm
|
Assembly
|
3-Assemble(80x86)/lab-3/task1.asm
|
ftxj/4th-Semester
|
1d5c7e7e028176524bdafc64078775d42b73b51c
|
[
"MIT"
] | null | null | null |
3-Assemble(80x86)/lab-3/task1.asm
|
ftxj/4th-Semester
|
1d5c7e7e028176524bdafc64078775d42b73b51c
|
[
"MIT"
] | null | null | null |
3-Assemble(80x86)/lab-3/task1.asm
|
ftxj/4th-Semester
|
1d5c7e7e028176524bdafc64078775d42b73b51c
|
[
"MIT"
] | null | null | null |
.386
STACK SEGMENT USE16 STACK
DB 256 DUP(0)
STACK ENDS
DATA SEGMENT USE16
N EQU 5
T EQU 16
STU DB N DUP('TEMPVALUE',0,80,90,95,?,?,?)
RANK DW N DUP(0)
PUT0 DB 0AH,0DH,15 DUP(0)
DB 'MENU',0AH,0DH,0AH,0DH,6 DUP(0)
DB '1.Logging the data of student',27h,'name and grades.',0AH,0DH,6 DUP(0)
DB '2.Calculate the average.',0AH,0DH,6 DUP(0)
DB '3.Calculate the rankings.',0AH,0DH,6 DUP(0)
DB '4.Output report card.',0AH,0DH,6 DUP(0)
DB '5.Exits program.',6 DUP(0)
PUT1 DB 0AH,0DH,6 DUP(0),'$'
PUT2 DB 'Please input the number of function to choose:',0AH,0DH,6 DUP(0),'$'
PUT3 DB 'INPUT ERROR!Please input again:',0AH,0DH,6 DUP(0),'$'
SPUT1 DB 0AH,0DH,0AH,0DH,6 DUP(0),'This is SUB1:Logging!',0AH,0DH,6 DUP(0),'Please enter the serail number of the student want to modify:(Only 1-5!)',0AH,0DH,6 DUP(0),'$'
SP1_1 DB 0AH,0DH,6 DUP(0),'INPUT ERROR!Please input again:',0AH,0DH,6 DUP(0),'$'
SP1_2 DB 0AH,0DH,6 DUP(0),'Please enter the name of student',0AH,0DH,6 DUP(0),'$'
SP1_3 DB 0AH,0DH,6 DUP(0),'Please enter the Chinese grade(Only 0-100)',0AH,0DH,6 DUP(0),'$'
SP1_4 DB 0AH,0DH,6 DUP(0),'Please enter the Math grade(Only 0-100)',0AH,0DH,6 DUP(0),'$'
SP1_5 DB 0AH,0DH,6 DUP(0),'Please enter the English grade(Only 0-100)',0AH,0DH,6 DUP(0),'$'
SP1_6 DB 0AH,0DH,6 DUP(0),'Enter succeed!plause any key to the menu',0AH,0DH,6 DUP(0),'$'
SPUT2 DB 0AH,0DH,6 DUP(0),'This is SUB2.:Calculate!',0AH,0DH,'$'
SP2_1 DB 0AH,0DH,0AH,0DH,6 DUP(0),'Calculate succeed!plause any key to the menu',0AH,0DH,6 DUP(0),'$'
SPUT3 DB 0AH,0DH,0AH,0DH,6 DUP(0),'This is SUB3.:Rank!',0AH,0DH,'$'
SPUT4 DB 0AH,0DH,0AH,0DH,6 DUP(0),'This is SUB4.:Put!',0AH,0DH,'$'
SPUT5 DB 0AH,0DH,0AH,0DH,6 DUP(0),'This is SUB5.:Exit!',0AH,0DH,6 DUP(0)
DB 'Aborting...','$'
IN_PUT DB 11;Input buffer memory area
COUNT DB ?;the length of input
DB 11 DUP(0);the content of input
DATA ENDS
CODE SEGMENT USE16
ASSUME CS: CODE, DS: DATA, SS: STACK
START: MOV AX,DATA
MOV DS,AX
MOV ES,AX
MOV AX,STACK
MOV SS,AX
MOV SP,0100H
;宏指令的定义
IO MACRO A,B
LEA DX,A
MOV AH,B
INT 21H
ENDM
JMP MENU;jump to the menu
;********************************************
;选择1=录入学生姓名和各科考试成绩,2=计算平均分,3=计算排名,4=输出成绩单,5=程序退出。
MENU:
MOV AX,0003H;清屏
INT 10H
IO PUT0,9;输出提示符
IO PUT2,9
INP: IO PUT0,1;输入选择
IO PUT1,9
;程序跳转
CMP AL,'1'
JE SUB1
CMP AL,'2'
JE SUB2
CMP AL,'3'
JE SUB3
CMP AL,'4'
JE SUB4
CMP AL,'5'
JE SUB5
MOV AX,0003H
INT 10H
IO PUT0,9;输出提示符
IO PUT3,9
JMP INP
;********************************************
OVER: MOV AH,4CH;end the program
INT 21H
;********************************************
SUB1: MOV AX,0003H;清屏
INT 10H
IO SPUT1,9;输出提示符
S1_1: IO SPUT1,1;输入选择->AL!!!
MOV AH,0
PUSH AX
CMP AL,'1';序号合法
JB S1ERR
CMP AL,'5'
JA S1ERR
S1_2: IO SP1_2,9;输出提示姓名
IO IN_PUT,10;输入学生姓名
LEA BX,IN_PUT;输入为回车则重新提示输入
MOVZX AX,BYTE PTR DS:[BX+1]
CMP AX,0
JE S1_2
ADD BX,AX
S1_3: CMP AX,10;空白置零
JNB S1_4
INC AX
MOV BYTE PTR DS:[BX+2],0
JMP S1_3
S1_4:;字符串移动
POP AX
SUB AX,31H
MOV DL,T
MUL DL
LEA DI,STU
ADD DI,AX
LEA SI,IN_PUT
ADD SI,2
MOV CX,10
CLD
REP MOVSB
;输入学生语文成绩
S1_5: IO SP1_3,9
IO IN_PUT,10
LEA BX,COUNT
MOVZX AX,BYTE PTR DS:[BX]
CMP AX,4;输入合法
JAE S1_5
CMP AX,3
JNE S1_6
MOV EAX,DWORD PTR 1[BX]
CMP EAX,0D303031H
JNE S1_5
MOV BYTE PTR [DI],100
S1_6: MOV AX,WORD PTR 1[BX]
MOV DL,AH
MOV DH,10
AND AX,0FFH
SUB AX,30H
MUL DH
MOV DH,0
SUB DX,30H
ADD AX,DX
MOV BYTE PTR [DI],AL
INC DI
;输入学生数学成绩
S1_7: IO SP1_4,9
IO IN_PUT,10
LEA BX,COUNT
MOVZX AX,BYTE PTR DS:[BX]
CMP AX,4;输入合法
JAE S1_7
CMP AX,3
JNE S1_8
MOV EAX,DWORD PTR 1[BX]
CMP EAX,0D303031H
JNE S1_7
MOV BYTE PTR [DI],100
S1_8: MOV AX,WORD PTR 1[BX]
MOV DL,AH
MOV DH,10
AND AX,0FFH
SUB AX,30H
MUL DH
MOV DH,0
SUB DX,30H
ADD AX,DX
MOV BYTE PTR [DI],AL
INC DI
;输入学生英语成绩
S1_9: IO SP1_5,9
IO IN_PUT,10
LEA BX,COUNT
MOVZX AX,BYTE PTR DS:[BX]
CMP AX,4;输入合法
JAE S1_9
CMP AX,3
JNE S1_10
MOV EAX,DWORD PTR 1[BX]
CMP EAX,0D303031H
JNE S1_9
MOV BYTE PTR [DI],100
S1_10: MOV AX,WORD PTR 1[BX]
MOV DL,AH
MOV DH,10
AND AX,0FFH
SUB AX,30H
MUL DH
MOV DH,0
SUB DX,30H
ADD AX,DX
MOV BYTE PTR [DI],AL
INC DI
IO SP1_6,9
IO SP1_6,1
JMP MENU
S1ERR: IO SP1_1,9
JMP S1_1
;********************************************
SUB2:;计算平均分
MOV AX,0003H;清屏
INT 10H
IO SPUT2,9;输出提示符
MOV CX,N
LEA EBX,STU
S00: PUSH EBX
MOV DWORD PTR EAX,DS:[EBX+10];the grade -> AL
SHL EAX,1
MOVZX DX,AL
SHL DX,1
MOVZX BX,AH
ADD BX,DX
SHR EAX,17
XOR AH,AH
ADD AX,BX
MOV BL,7
DIV BL
POP EBX
ADD EBX,T
MOV DS:[EBX-3],AL;restore the average grade
LOOP S00
IO SP1_6,9
IO SP1_6,1
JMP MENU
;********************************************
SUB3: ;计算排名
MOV AX,0003H;清屏
INT 10H
IO SPUT3,9;输出提示符
;录入首地址至RANK
MOV CX,N
LEA DX,STU
LEA BX,RANK
SP3_1: MOV WORD PTR [BX],DX
ADD DX,T
ADD BX,2
LOOP SP3_1
;任意键退出
IO SP1_6,9
IO SP1_6,1
JMP MENU
;********************************************
SUB4:
MOV AX,0003H;清屏
INT 10H
;输出提示符
IO SPUT4,9
;任意键退出
IO SP1_6,9
IO SP1_6,1
JMP MENU
;********************************************
SUB5: MOV AX,0003H;清屏
INT 10H
;输出提示符
IO SPUT5,9
MOV CX,2
DELAY: PUSH CX
;1s延迟
mov cx,0fh
mov dx,4240h ; 1 秒的延时
mov ah,86h
int 15h
POP CX
LOOP DELAY
JMP OVER
CODE ENDS
END START
| 18.831034
| 171
| 0.604651
|
b4f14a87ddae298fb60c3f2dc1a4fb07f6e234ab
| 7,572
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1521.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1521.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1521.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 %r13
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x822f, %rbp
nop
nop
nop
xor %r10, %r10
mov $0x6162636465666768, %r12
movq %r12, (%rbp)
nop
nop
nop
nop
nop
xor %r13, %r13
lea addresses_WC_ht+0x16047, %r9
nop
inc %r11
mov $0x6162636465666768, %r13
movq %r13, %xmm5
vmovups %ymm5, (%r9)
nop
nop
nop
xor $7326, %rbp
lea addresses_WC_ht+0x11707, %r9
nop
nop
nop
nop
add $63320, %r10
movl $0x61626364, (%r9)
nop
nop
nop
xor %r13, %r13
lea addresses_WT_ht+0x19e07, %r9
nop
nop
nop
nop
nop
and $47752, %r11
and $0xffffffffffffffc0, %r9
vmovntdqa (%r9), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %r10
nop
and %r10, %r10
lea addresses_D_ht+0x16847, %r13
nop
nop
nop
nop
nop
cmp %rdi, %rdi
mov $0x6162636465666768, %r10
movq %r10, %xmm1
and $0xffffffffffffffc0, %r13
movaps %xmm1, (%r13)
nop
nop
nop
nop
and %r13, %r13
lea addresses_A_ht+0xf047, %r12
nop
nop
nop
cmp $24672, %rdi
mov (%r12), %r10
nop
add %rdi, %rdi
lea addresses_normal_ht+0x647, %r12
clflush (%r12)
nop
nop
nop
nop
dec %r13
movl $0x61626364, (%r12)
nop
cmp %r10, %r10
lea addresses_WC_ht+0x1824b, %r11
nop
nop
cmp %r12, %r12
movb (%r11), %r10b
nop
nop
nop
nop
sub %r11, %r11
lea addresses_WC_ht+0xac97, %rsi
lea addresses_normal_ht+0x866f, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
xor %r12, %r12
mov $90, %rcx
rep movsl
nop
add %r11, %r11
lea addresses_A_ht+0x157c7, %rcx
nop
nop
nop
nop
add %r13, %r13
mov (%rcx), %r9d
inc %r13
lea addresses_normal_ht+0x18047, %rsi
lea addresses_UC_ht+0x1602f, %rdi
nop
nop
nop
nop
nop
sub %r13, %r13
mov $68, %rcx
rep movsb
nop
nop
add $15564, %r13
lea addresses_UC_ht+0x3117, %rsi
lea addresses_A_ht+0x14847, %rdi
nop
add $12701, %r11
mov $17, %rcx
rep movsl
nop
nop
nop
nop
xor $47920, %r10
lea addresses_A_ht+0xb387, %r12
clflush (%r12)
xor $8509, %r9
movb (%r12), %r13b
nop
nop
nop
nop
nop
mfence
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r13
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r15
push %r8
push %r9
push %rbx
push %rsi
// Load
lea addresses_WT+0x5847, %r8
nop
nop
nop
and %r9, %r9
mov (%r8), %esi
nop
and $37740, %r10
// Faulty Load
lea addresses_WT+0x18847, %rbx
sub %r15, %r15
mov (%rbx), %r10d
lea oracles, %r8
and $0xff, %r10
shlq $12, %r10
mov (%r8,%r10,1), %r10
pop %rsi
pop %rbx
pop %r9
pop %r8
pop %r15
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 5}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 11}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 8}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 7}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': True}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 32.921739
| 2,999
| 0.657422
|
79684c2e6c3a5a99263762f36492d28ca4f253a7
| 280
|
asm
|
Assembly
|
programs/oeis/109/A109720.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/109/A109720.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/109/A109720.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A109720: Periodic sequence {0,1,1,1,1,1,1} or n^6 mod 7.
; 0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1
pow $0,6
mod $0,7
| 46.666667
| 201
| 0.528571
|
e890dc86028e62c82631bf7a3abf449e13cd60ae
| 40
|
asm
|
Assembly
|
src/main/fragment/mos6502-common/vwum1_gt_vbuyy_then_la1.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | 2
|
2022-03-01T02:21:14.000Z
|
2022-03-01T04:33:35.000Z
|
src/main/fragment/mos6502-common/vwum1_gt_vbuyy_then_la1.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
src/main/fragment/mos6502-common/vwum1_gt_vbuyy_then_la1.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
lda {m1}+1
bne {la1}
cpy {m1}
bcc {la1}
| 8
| 10
| 0.575
|
9c705499036b5abc08ecbac919412422f5b47043
| 1,433
|
asm
|
Assembly
|
programs/oeis/014/A014209.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/014/A014209.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/014/A014209.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A014209: a(n) = n^2 + 3*n - 1.
; -1,3,9,17,27,39,53,69,87,107,129,153,179,207,237,269,303,339,377,417,459,503,549,597,647,699,753,809,867,927,989,1053,1119,1187,1257,1329,1403,1479,1557,1637,1719,1803,1889,1977,2067,2159,2253,2349,2447,2547,2649,2753,2859,2967,3077,3189,3303,3419,3537,3657,3779,3903,4029,4157,4287,4419,4553,4689,4827,4967,5109,5253,5399,5547,5697,5849,6003,6159,6317,6477,6639,6803,6969,7137,7307,7479,7653,7829,8007,8187,8369,8553,8739,8927,9117,9309,9503,9699,9897,10097,10299,10503,10709,10917,11127,11339,11553,11769,11987,12207,12429,12653,12879,13107,13337,13569,13803,14039,14277,14517,14759,15003,15249,15497,15747,15999,16253,16509,16767,17027,17289,17553,17819,18087,18357,18629,18903,19179,19457,19737,20019,20303,20589,20877,21167,21459,21753,22049,22347,22647,22949,23253,23559,23867,24177,24489,24803,25119,25437,25757,26079,26403,26729,27057,27387,27719,28053,28389,28727,29067,29409,29753,30099,30447,30797,31149,31503,31859,32217,32577,32939,33303,33669,34037,34407,34779,35153,35529,35907,36287,36669,37053,37439,37827,38217,38609,39003,39399,39797,40197,40599,41003,41409,41817,42227,42639,43053,43469,43887,44307,44729,45153,45579,46007,46437,46869,47303,47739,48177,48617,49059,49503,49949,50397,50847,51299,51753,52209,52667,53127,53589,54053,54519,54987,55457,55929,56403,56879,57357,57837,58319,58803,59289,59777,60267,60759,61253,61749,62247,62747
mov $1,$0
add $1,3
mul $1,$0
sub $1,1
| 179.125
| 1,360
| 0.79693
|
c451aff0eeda464c9a08da5082d6c0300028c02d
| 886
|
asm
|
Assembly
|
pwnlib/shellcraft/templates/mips/linux/listen.asm
|
DrKeineLust/pwntools
|
415f11bba7096b7d68fe144f5b3432b9c12a4f0a
|
[
"MIT"
] | 8,966
|
2015-01-02T11:58:14.000Z
|
2022-03-31T21:19:56.000Z
|
pwnlib/shellcraft/templates/mips/linux/listen.asm
|
DrKeineLust/pwntools
|
415f11bba7096b7d68fe144f5b3432b9c12a4f0a
|
[
"MIT"
] | 1,401
|
2015-01-01T00:56:22.000Z
|
2022-03-31T16:19:53.000Z
|
pwnlib/shellcraft/templates/mips/linux/listen.asm
|
DrKeineLust/pwntools
|
415f11bba7096b7d68fe144f5b3432b9c12a4f0a
|
[
"MIT"
] | 1,844
|
2015-01-07T04:38:06.000Z
|
2022-03-30T03:54:46.000Z
|
<%
from pwnlib.shellcraft import mips
from pwnlib.util.net import sockaddr
%>
<% from socket import htons %>
<%page args="port, network='ipv4'"/>
<%docstring>
listen(port,network)
Listens on a TCP port, accept a client and leave his socket in $s0.
Port is the TCP port to listen on, network is either 'ipv4' or 'ipv6'.
</%docstring>
<%
sock_addr, addr_len, address_family = sockaddr('0.0.0.0', port, network)
%>\
${mips.syscall('SYS_socket', address_family, 'SOCK_STREAM', 0)}
/* Save socket in $s0 */
${mips.mov('$s0', '$v0')}
/* Build sockaddr_in structure */
${mips.pushstr(sock_addr)}
${mips.mov('$a1', '$sp')}
${mips.syscall('SYS_bind', '$s0', '$a1', addr_len)}
${mips.syscall('SYS_listen', '$s0', 1)}
${mips.syscall('SYS_accept', '$s0', 0, 0)}
/* Move accepted socket to $s0 */
${mips.mov('$s0', '$v0')}
| 26.848485
| 76
| 0.606095
|
a0360f99c2095a5c9ffa161761a3df7783d7bd82
| 9,457
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1187.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1187.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1187.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 %r13
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x3b93, %rdi
clflush (%rdi)
and $47024, %r10
mov $0x6162636465666768, %rbp
movq %rbp, %xmm7
vmovups %ymm7, (%rdi)
nop
nop
add %r11, %r11
lea addresses_D_ht+0x7e9b, %rsi
lea addresses_normal_ht+0x1129b, %rdi
nop
cmp %r10, %r10
mov $6, %rcx
rep movsl
nop
nop
and $59955, %rcx
lea addresses_normal_ht+0x189, %rsi
lea addresses_UC_ht+0xe7db, %rdi
nop
nop
nop
nop
nop
inc %r13
mov $46, %rcx
rep movsq
xor $52655, %rcx
lea addresses_D_ht+0x17e9b, %rsi
lea addresses_WT_ht+0x21ab, %rdi
nop
nop
nop
inc %rbx
mov $86, %rcx
rep movsw
nop
nop
nop
nop
xor $57174, %rdi
lea addresses_D_ht+0x1689b, %r11
nop
nop
nop
nop
xor %rbx, %rbx
vmovups (%r11), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %rdi
cmp %r13, %r13
lea addresses_A_ht+0xcb2f, %r13
cmp %rbp, %rbp
movb (%r13), %r10b
nop
nop
nop
nop
add $47524, %r11
lea addresses_D_ht+0xe59b, %rsi
lea addresses_normal_ht+0x2c9b, %rdi
add %rbp, %rbp
mov $63, %rcx
rep movsw
nop
add $1831, %rsi
lea addresses_D_ht+0x116c7, %rsi
lea addresses_normal_ht+0xdbfb, %rdi
nop
nop
nop
nop
and $13683, %r10
mov $100, %rcx
rep movsl
nop
nop
and %rcx, %rcx
lea addresses_UC_ht+0xb89b, %rsi
lea addresses_normal_ht+0x1e6bd, %rdi
nop
nop
nop
nop
nop
xor %rbx, %rbx
mov $62, %rcx
rep movsw
sub $19024, %rbx
lea addresses_normal_ht+0x99b, %rbp
nop
xor %rsi, %rsi
movb $0x61, (%rbp)
xor $146, %rsi
lea addresses_D_ht+0x1ad29, %rsi
lea addresses_A_ht+0x1199b, %rdi
dec %r11
mov $61, %rcx
rep movsl
nop
nop
add %rcx, %rcx
lea addresses_A_ht+0x1baf, %r10
nop
nop
nop
nop
nop
and $36303, %r13
vmovups (%r10), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %rbp
inc %r10
lea addresses_WT_ht+0x1b69b, %rsi
lea addresses_A_ht+0xc71b, %rdi
dec %rbp
mov $46, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp $30889, %r13
lea addresses_D_ht+0x7a9b, %rdi
clflush (%rdi)
nop
nop
nop
nop
dec %r13
mov $0x6162636465666768, %r11
movq %r11, %xmm4
and $0xffffffffffffffc0, %rdi
movntdq %xmm4, (%rdi)
nop
nop
inc %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r15
push %r8
push %r9
push %rax
push %rdi
push %rdx
// Store
lea addresses_RW+0x1ab07, %rax
nop
nop
nop
inc %rdi
movb $0x51, (%rax)
nop
nop
sub $57052, %r8
// Store
lea addresses_A+0x51b, %r15
clflush (%r15)
add %r9, %r9
movw $0x5152, (%r15)
nop
nop
nop
cmp %r9, %r9
// Load
lea addresses_WC+0x1619b, %rdi
nop
nop
nop
nop
nop
dec %r15
movb (%rdi), %r8b
nop
nop
cmp %rax, %rax
// Load
mov $0x1a5fd90000000a9b, %r9
add $25585, %r15
mov (%r9), %r8w
nop
nop
nop
inc %r9
// Store
lea addresses_WT+0x1b8c5, %r8
nop
nop
nop
add %rax, %rax
mov $0x5152535455565758, %r9
movq %r9, %xmm0
movups %xmm0, (%r8)
nop
nop
sub $16476, %r10
// Load
lea addresses_UC+0x14e9b, %r10
nop
nop
nop
nop
nop
xor $13362, %rdx
mov (%r10), %r9
and $17767, %r8
// Load
lea addresses_UC+0x3e9b, %rdx
clflush (%rdx)
nop
dec %r15
mov (%rdx), %r9w
nop
and %r15, %r15
// Faulty Load
lea addresses_UC+0x14e9b, %r8
nop
and $26579, %rdi
vmovups (%r8), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %rax
lea oracles, %r10
and $0xff, %rax
shlq $12, %rax
mov (%r10,%rax,1), %rax
pop %rdx
pop %rdi
pop %rax
pop %r9
pop %r8
pop %r15
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': True, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_RW', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 5, 'type': 'addresses_A', 'AVXalign': False, 'size': 2}}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_WC', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_NC', 'AVXalign': True, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 16}}
{'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': True, 'size': 8}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_UC', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_UC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}}
{'src': {'same': True, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}}
{'src': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 7, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}}
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}}
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1}}
{'src': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 11, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 9, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 16}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 31.841751
| 2,999
| 0.654224
|
7542bf5b408273aaac1375d7f8b72370635cfae5
| 464
|
asm
|
Assembly
|
programs/oeis/132/A132896.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/132/A132896.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/132/A132896.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A132896: Triangle read by rows: T(n,k)=number of prime divisors of C(n,k), counted with multiplicity (0<=k<=n).
; 0,0,0,0,1,0,0,1,1,0,0,2,2,2,0,0,1,2,2,1,0,0,2,2,3,2,2,0,0,1,2,2,2,2,1,0,0,3,3,4,3,4,3,3,0,0,2,4,4,4,4,4,4,2,0,0,2,3,5,4,5,4,5,3,2,0,0,1,2,3,4,4,4,4,3,2,1,0,0,3,3,4,4,6,5,6,4,4,3,3,0,0,1,3,3,3,4,5,5,4
seq $0,14473 ; Pascal's triangle - 1.
seq $0,1222 ; Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)).
| 77.333333
| 201
| 0.618534
|
5d0a4cb2d0d03ca93f52bace16e1303cf63be9b2
| 2,249
|
asm
|
Assembly
|
src/core/objectfile/coff_pe/read_coff.asm
|
Hiroshi123/bin_tools
|
95929eb218a82e30c43ee5bd209301a24abebffa
|
[
"MIT"
] | null | null | null |
src/core/objectfile/coff_pe/read_coff.asm
|
Hiroshi123/bin_tools
|
95929eb218a82e30c43ee5bd209301a24abebffa
|
[
"MIT"
] | 4
|
2019-02-27T05:41:26.000Z
|
2020-07-16T00:24:24.000Z
|
src/core/objectfile/coff_pe/read_coff.asm
|
Hiroshi123/bin_tools
|
95929eb218a82e30c43ee5bd209301a24abebffa
|
[
"MIT"
] | null | null | null |
default rel
section .text
global __z__obj__run_through_coff_shdr3
global __z__obj__run_through_coff_symtable3
;;; microsoft
;;; caller saved register RAX, RCX, RDX, R8, R9, R10, R11
;;; callee saved register RBX, RBP, RDI, RSI, RSP, R12, R13, R14, and R15
;;; sysv args
;; RDI, RSI, RDX, RCX, R8, R9
__z__obj__run_through_coff_shdr3:
push rbp
mov rbp,rsp
push rbx
push rdx
;; 2nd(rsi) should be set on r13(which is one of registers kept on caller)
mov r13,rsi
;; add number of sections
mov rax,0
mov word ax,[rdi+2]
mov r15,rax
cmp r15,0
je __z__obj__run_through_coff_shdr3._b2
;; r12 = string table pointer (end of symbol table)
;; get End of SymbolTable which is beginning of string table
;; get NumberOfSymbols
;; mov dword eax,[rdi+0xc]
;; mov r14,rax
;; mov rax,0x12
;; mul r14
;; ;; get PointerToSymbolTable(+0x8)
;; mov r12,rax
;; mov dword eax,[rdi+0x8]
;; add r12,rax
;; add r12,rdi
mov r12,rdi
;; 1st argument is the top of file pointer
mov r14,rdi
add r14,0x14
;; add size of optional header
mov rax,0
mov word ax,[rdi+0x10]
add r14,rax
;; preserve rdx(3rd argument) as it is volatile
;; mov rbx,rcx
._b1:
;; 1st arg
mov rdi,r14
;; 2nd arg
mov rsi,r12
;; 3rd arg
mov rdx,[rsp]
call r13
;; increment size of ImageSectionHeader
add r14,40
sub r15,1
cmp r15,0
jne __z__obj__run_through_coff_shdr3._b1
;; mov rax,3
;; pop rdx
;; pop rsi
;; pop rdi
;; ;; these values are promised to be kept from the System5 amd64 convention.
;; pop r15
;; pop r14
;; pop r13
._b2:
pop rdx
pop rbx
pop rbp
ret
__z__obj__run_through_coff_symtable3:
push rbp
mov rbp,rsp
push rbx
push r12
push rdx
;; 2nd(rsi) should be set on r13(which is one of registers kept on caller)
mov r13,rsi
;; get PointerToSymbolTable
mov dword eax,[rdi+0x8]
mov r15,rax
add r15,rdi
;; get NumberOfSymbols
mov dword eax,[rdi+0xc]
mov r14,rax
;; get End of SymbolTable which is beginning of string table
mov rax,0x12
mul r14
mov r12, r15
add r12, rax
._b1:
;; 1st arg
mov rdi,r15
;; 2nd arg
mov rsi,r12
;; 3rd arg
mov rdx,[rsp]
call r13
add r15,0x12
sub r14,1
cmp r14,0
jne __z__obj__run_through_coff_symtable3._b1
pop rdx
pop r12
pop rbx
pop rbp
ret
| 17.037879
| 78
| 0.692308
|
2f6108bde2e879d5ac6ee17317cfb6fa2d41aa94
| 2,109
|
asm
|
Assembly
|
programs/oeis/249/A249227.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/249/A249227.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/249/A249227.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A249227: Number of length n+5 0..2 arrays with no six consecutive terms having two times the sum of any two elements equal to the sum of the remaining four
; 486,972,1944,3888,7776,15552,31104,62208,124416,248832,497664,995328,1990656,3981312,7962624,15925248,31850496,63700992,127401984,254803968,509607936,1019215872,2038431744,4076863488,8153726976,16307453952,32614907904,65229815808,130459631616,260919263232,521838526464,1043677052928,2087354105856,4174708211712,8349416423424,16698832846848,33397665693696,66795331387392,133590662774784,267181325549568,534362651099136,1068725302198272,2137450604396544,4274901208793088,8549802417586176,17099604835172352,34199209670344704,68398419340689408,136796838681378816,273593677362757632,547187354725515264,1094374709451030528,2188749418902061056,4377498837804122112,8754997675608244224,17509995351216488448,35019990702432976896,70039981404865953792,140079962809731907584,280159925619463815168,560319851238927630336,1120639702477855260672,2241279404955710521344,4482558809911421042688,8965117619822842085376,17930235239645684170752,35860470479291368341504,71720940958582736683008,143441881917165473366016,286883763834330946732032,573767527668661893464064,1147535055337323786928128,2295070110674647573856256,4590140221349295147712512,9180280442698590295425024,18360560885397180590850048,36721121770794361181700096,73442243541588722363400192,146884487083177444726800384,293768974166354889453600768,587537948332709778907201536,1175075896665419557814403072,2350151793330839115628806144,4700303586661678231257612288,9400607173323356462515224576,18801214346646712925030449152,37602428693293425850060898304,75204857386586851700121796608,150409714773173703400243593216,300819429546347406800487186432,601638859092694813600974372864,1203277718185389627201948745728,2406555436370779254403897491456,4813110872741558508807794982912,9626221745483117017615589965824,19252443490966234035231179931648,38504886981932468070462359863296,77009773963864936140924719726592,154019547927729872281849439453184,308039095855459744563698878906368
mov $1,2
pow $1,$0
mul $1,486
mov $0,$1
| 263.625
| 1,909
| 0.926031
|
381492b3cdd30c6e3c612eaf57ab3247e95dec4f
| 1,819
|
asm
|
Assembly
|
unittests/ASM/TwoByte/0F_C2.asm
|
cobalt2727/FEX
|
13087f8425aeaad28dc81bed46a83e1d72ff0db8
|
[
"MIT"
] | 628
|
2020-03-06T14:01:32.000Z
|
2022-03-31T06:35:14.000Z
|
unittests/ASM/TwoByte/0F_C2.asm
|
cobalt2727/FEX
|
13087f8425aeaad28dc81bed46a83e1d72ff0db8
|
[
"MIT"
] | 576
|
2020-03-06T08:25:12.000Z
|
2022-03-30T04:05:29.000Z
|
unittests/ASM/TwoByte/0F_C2.asm
|
cobalt2727/FEX
|
13087f8425aeaad28dc81bed46a83e1d72ff0db8
|
[
"MIT"
] | 38
|
2020-03-07T06:10:00.000Z
|
2022-03-29T09:27:36.000Z
|
%ifdef CONFIG
{
"RegData": {
"XMM0": ["0xFFFFFFFFFFFFFFFF", "0x0"],
"XMM1": ["0x0", "0xFFFFFFFF00000000"],
"XMM2": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFF00000000"],
"XMM3": ["0xFFFFFFFF00000000", "0xFFFFFFFFFFFFFFFF"],
"XMM4": ["0x0", "0xFFFFFFFFFFFFFFFF"],
"XMM5": ["0xFFFFFFFFFFFFFFFF", "0x00000000FFFFFFFF"],
"XMM6": ["0x0000000000000000", "0x00000000FFFFFFFF"],
"XMM7": ["0x00000000FFFFFFFF", "0x0000000000000000"]
},
"MemoryRegions": {
"0x100000000": "4096"
}
}
%endif
mov rdx, 0xe0000000
mov rax, 0x3f80000040000000
mov [rdx + 8 * 0], rax
mov rax, 0x4000000040800000
mov [rdx + 8 * 1], rax
mov rax, 0x3f80000040000000
mov [rdx + 8 * 2], rax
mov rax, 0x40a000003f800000
mov [rdx + 8 * 3], rax
movapd xmm0, [rdx + 8 * 0]
movapd xmm1, [rdx + 8 * 0]
movapd xmm2, [rdx + 8 * 0]
movapd xmm3, [rdx + 8 * 0]
movapd xmm4, [rdx + 8 * 0]
movapd xmm5, [rdx + 8 * 0]
movapd xmm6, [rdx + 8 * 0]
movapd xmm7, [rdx + 8 * 0]
movapd xmm8, [rdx + 8 * 2]
cmpps xmm0, xmm8, 0x00 ; EQ
cmpps xmm1, xmm8, 0x01 ; LT
cmpps xmm2, xmm8, 0x02 ; LTE
cmpps xmm4, xmm8, 0x04 ; NEQ
cmpps xmm5, xmm8, 0x05 ; NLT
cmpps xmm6, xmm8, 0x06 ; NLTE
; Unordered and Ordered tests need to be special cased
mov rax, 0x0000000000000000
mov [rdx + 8 * 0], rax
mov rax, 0x7FC000007FC00000
mov [rdx + 8 * 1], rax
mov rax, 0x7FC0000000000000
mov [rdx + 8 * 2], rax
mov rax, 0x7FC0000000000000
mov [rdx + 8 * 3], rax
movapd xmm3, [rdx + 8 * 0]
movapd xmm7, [rdx + 8 * 0]
movapd xmm8, [rdx + 8 * 2]
; Unordered will return true when either input is nan
; [0.0, 0.0, nan, nan] unord [0.0, nan, 0.0, nan] = [0, 1, 1, 1]
cmpps xmm3, xmm8, 0x03 ; Unordered
; Ordered will return true when both inputs are NOT nan
; [0.0, 0.0, nan, nan] ord [0.0, nan, 0.0, nan] = [1, 0, 0, 0]
cmpps xmm7, xmm8, 0x07 ; Ordered
hlt
hlt
| 24.917808
| 64
| 0.639912
|
76e10fce593fe9196fba454724fd3d5b0d2e9616
| 535
|
asm
|
Assembly
|
oeis/083/A083907.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/083/A083907.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/083/A083907.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A083907: a(1) = 1; for n>1, a(n) = n*a(n-1) if GCD(n,a(n-1)) = 1 else a(n) = a(n-1).
; Submitted by Jamie Morken(m4a)
; 1,2,6,6,30,30,210,210,210,210,2310,2310,30030,30030,30030,30030,510510,510510,9699690,9699690,9699690,9699690,223092870,223092870,223092870,223092870,223092870,223092870,6469693230,6469693230,200560490130,200560490130
mov $1,1
mov $2,1
lpb $0
mov $3,$2
lpb $3
sub $0,1
add $2,1
mov $4,$1
gcd $4,$2
cmp $4,1
cmp $4,0
sub $3,$4
lpe
sub $0,1
add $2,1
mul $1,$2
lpe
mov $0,$1
| 23.26087
| 219
| 0.626168
|
946a0f50f97ba6eb734d9e719896379e6f858e9d
| 196
|
asm
|
Assembly
|
libmikeos/src.os/os_check_for_key.asm
|
mynameispyo/InpyoOS
|
b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d
|
[
"BSD-3-Clause",
"MIT"
] | null | null | null |
libmikeos/src.os/os_check_for_key.asm
|
mynameispyo/InpyoOS
|
b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d
|
[
"BSD-3-Clause",
"MIT"
] | null | null | null |
libmikeos/src.os/os_check_for_key.asm
|
mynameispyo/InpyoOS
|
b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d
|
[
"BSD-3-Clause",
"MIT"
] | null | null | null |
; @@@ int mikeos_check_for_key(void);
%include "os_vector.inc"
section .text
use16
global _mikeos_check_for_key
_mikeos_check_for_key:
mov bx, os_check_for_key
call bx
xor ah, ah
ret
| 11.529412
| 37
| 0.75
|
feb1c869a7ec7fe2fbfb06fb48650b3ec3d7715d
| 20,441
|
asm
|
Assembly
|
dos/fcbio2.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
dos/fcbio2.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
dos/fcbio2.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
; SCCSID = @(#)fcbio2.asm 1.2 85/07/23
TITLE FCBIO2 - FCB system calls
NAME FCBIO2
;
; Microsoft Confidential
; Copyright (C) Microsoft Corporation 1991
; All Rights Reserved.
;
;** FCBIO2.ASM - Ancient 1.0 1.1 FCB system calls
;
; GetRR
; GetExtent
; SetExtent
; GetExtended
; GetRecSize
; FCBIO
; $FCB_OPEN
; $FCB_CREATE
; $FCB_RANDOM_WRITE_BLOCK
; $FCB_RANDOM_READ_BLOCK
; $FCB_SEQ_READ
; $FCB_SEQ_WRITE
; $FCB_RANDOM_READ
; $FCB_RANDOM_WRITE
;
; Revision history:
;
; Created: ARR 4 April 1983
; MZ 6 June 1983 completion of functions
; MZ 15 Dec 1983 Brain damaged programs close FCBs multiple
; times. Change so successive closes work by
; always returning OK. Also, detect I/O to
; already closed FCB and return EOF.
; MZ 16 Jan 1984 More braindamage. Need to separate info
; out of sft into FCB for reconnection
;
; A000 version 4.00 Jan. 1988
.xlist
.xcref
include version.inc
include dosseg.inc
INCLUDE DOSSYM.INC
INCLUDE DEVSYM.INC
include sf.inc
include cpmfcb.inc
include filemode.inc
include bugtyp.inc
.cref
.list
I_need DMAAdd,DWORD ; current user's DMA address
I_need OpenBuf,128 ; buffer for translating paths
I_need ThisSFT,DWORD ; SFT in use
I_need sftFCB,DWORD ; pointer to SFTs for FCB cache
I_need FCBLRU,WORD ; least recently used count
I_need DISK_FULL,BYTE ; flag for disk full
I_need LocalSFT,DWORD ;Cache for new FCB implementation
; Defintions for FCBOp flags
Random = 2 ; random operation
FCBRead = 4 ; doing a read
Block = 8 ; doing a block I/O
DOSCODE SEGMENT
ASSUME SS:DOSDATA,CS:DOSCODE
EXTRN DOS_Read:NEAR, DOS_Write:NEAR
EXTRN DOS_Open:NEAR, DOS_Create:NEAR
Break <GetRR - return the random record field in DX:AX>
;---------------------------------------------------------------------------
;
;
; GetRR - correctly load DX:AX with the random record field (3 or 4 bytes)
; from the FCB pointed to by DS:SI
;
; Inputs: DS:SI point to an FCB
; BX has record size
; Outputs: DX:AX contain the contents of the random record field
; Registers modified: none
;---------------------------------------------------------------------------
Procedure GetRR,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AX,WORD PTR [SI.FCB_RR] ; get low order part
MOV DX,WORD PTR [SI.FCB_RR+2] ; get high order part
CMP BX,64 ; ignore MSB of RR if recsiz > 64
JB GetRRBye
XOR DH,DH
GetRRBye:
return
EndProc GetRR
Break <GetExtent - retrieve next location for sequential IO>
;---------------------------------------------------------------------------
;
; GetExtent - Construct the next record to perform I/O from the EXTENT and
; NR fields in the FCB.
;
; Inputs: DS:SI - point to FCB
; Outputs: DX:AX contain the contents of the random record field
; Registers modified: none
;---------------------------------------------------------------------------
Procedure GetExtent,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AL,[SI.fcb_NR] ; get low order piece
MOV DX,[SI.fcb_EXTENT] ; get high order piece
SHL AL,1
SHR DX,1
RCR AL,1 ; move low order bit of DL to high order of AH
MOV AH,DL
MOV DL,DH
XOR DH,DH
return
EndProc GetExtent
Break <SetExtent - update the extent/NR field>
;---------------------------------------------------------------------------
;
; SetExtent - change the position of an FCB by filling in the extent/NR
; fields
;
; Inputs: DS:SI point to FCB
; DX:AX is a record location in file
; Outputs: Extent/NR fields are filled in
; Registers modified: CX
;---------------------------------------------------------------------------
Procedure SetExtent,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
SAVE <AX,DX>
MOV CX,AX
AND AL,7FH ; next rec field
MOV [SI.fcb_NR],AL
AND CL,80H ; save upper bit
SHL CX,1
RCL DX,1 ; move high bit of CX to low bit of DX
MOV AL,CH
MOV AH,DL
MOV [SI.fcb_EXTENT],AX ; all done
RESTORE <DX,AX>
return
EndProc SetExtent
Break <GetExtended - find FCB in potential extended fcb>
;---------------------------------------------------------------------------
;
; GetExtended - Make DS:SI point to FCB from DS:DX
;
; Inputs: DS:DX point to a possible extended FCB
; Outputs: DS:SI point to the FCB part
; zeroflag set if not extended fcb
; Registers modified: SI
;---------------------------------------------------------------------------
Procedure GetExtended,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV SI,DX ; point to Something
CMP BYTE PTR DS:[SI],-1 ; look for extention
JNZ GetBye ; not there
ADD SI,7 ; point to FCB
GetBye:
CMP SI,DX ; set condition codes
return
EndProc GetExtended
Break <GetRecSize - return in BX the FCB record size>
;---------------------------------------------------------------------------
;
; GetRecSize - return in BX the record size from the FCB at DS:SI
;
; Inputs: DS:SI point to a non-extended FCB
; Outputs: BX contains the record size
; Registers modified: None
;---------------------------------------------------------------------------
Procedure GetRecSize,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV BX,[SI.fcb_RECSIZ] ; get his record size
OR BX,BX ; is it nul?
retnz
MOV BX,128 ; use default size
MOV [SI.fcb_RECSIZ],BX ; stuff it back
return
EndProc GetRecSize
BREAK <FCBIO - do internal FCB I/O>
;---------------------------------------------------------------------------
;
; FCBIO - look at FCBOP and merge all FCB operations into a single routine.
;
; Inputs: FCBOP flags which operations need to be performed
; DS:DX point to FCB
; CX may have count of number of records to xfer
; Outputs: AL has error code
; Registers modified: all
;---------------------------------------------------------------------------
Procedure FCBIO,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
PUBLIC FCBIO001S,FCBIO001E
FCBIO001S:
LocalVar FCBErr,BYTE
LocalVar cRec,WORD
LocalVar RecPos,DWORD
LocalVar RecSize,WORD
LocalVar bPos,DWORD
LocalVar cByte,WORD
LocalVar cResult,WORD
LocalVar cRecRes,WORD
LocalVar FCBOp,BYTE
FCBIO001E:
Enter
FEOF EQU 1
FTRIM EQU 2
MOV FCBOp,AL
MOV FCBErr,0 ; FCBErr = 0;
invoke GetExtended ; FCB = GetExtended ();
TESTB FCBOp,BLOCK ; if ((OP&BLOCK) == 0)
JNZ GetPos
MOV CX,1 ; cRec = 1;
GetPos:
MOV cRec,CX ;*Tail coalesce
invoke GetExtent ; RecPos = GetExtent ();
invoke GetRecSize ; RecSize = GetRecSize ();
MOV RecSize,BX
TESTB FCBOp,RANDOM ; if ((OP&RANDOM) <> 0)
JZ GetRec
invoke GetRR ; RecPos = GetRR ();
GetRec:
MOV RecPosL,AX ;*Tail coalesce
MOV RecPosH,DX
invoke SetExtent ; SetExtent (RecPos);
MOV AX,RecPosH ; bPos = RecPos * RecSize;
MUL BX
MOV DI,AX
MOV AX,RecPosL
MUL BX
ADD DX,DI
MOV bPosL,AX
MOV bPosH,DX
MOV AX,cRec ; cByte = cRec * RecSize;
MUL BX
MOV cByte,AX
;hkn; SS override
ADD AX,WORD PTR DMAAdd ; if (cByte+DMA > 64K) {
ADC DX,0
JZ DoOper
MOV FCBErr,FTRIM ; FCBErr = FTRIM;
;hkn; SS override
MOV AX,WORD PTR DMAAdd ; cRec = (64K-DMA)/RecSize;
NEG AX
JNZ DoDiv
DEC AX
DoDiv:
XOR DX,DX
DIV BX
MOV cRec,AX
MUL BX ; cByte = cRec * RecSize;
MOV cByte,AX ; }
DoOper:
XOR BX,BX
MOV cResult,BX ; cResult = 0;
CMP cByte,BX ; if (cByte <> 0 ||
JNZ DoGetExt
TESTB FCBErr,FTRIM ; (FCBErr&FTRIM) == 0) {
JZ DoGetExt
IF DEBUG
JMP SkipOp
ELSE
JMP short SkipOp
ENDIF
DoGetExt:
invoke SFTFromFCB ; if (!SFTFromFCB (SFT,FCB))
JNC ContinueOp
FCBDeath:
invoke FCB_Ret_Err ; signal error, map for extended
MOV cRecRes,0 ; no bytes transferred
MOV FCBErr,FEOF ; return FTRIM;
JMP FCBSave ; bam!
ContinueOp:
Assert ISSFT,<ES,DI>,"ContinueOP"
MOV AX,WORD PTR [SI].fcb_filsiz
MOV WORD PTR ES:[DI].sf_size,AX
MOV AX,WORD PTR [SI].fcb_filsiz+2
MOV WORD PTR ES:[DI].sf_size+2,AX
MOV AX,bPosL
MOV DX,bPosH
MOV WORD PTR ES:[DI.sf_position],AX
XCHG WORD PTR ES:[DI.sf_position+2],DX
PUSH DX ; save away Open age.
MOV CX,cByte ; cResult =
;hkn; DOS_Read is in DOSCODE
MOV DI,OFFSET DOSCODE:DOS_Read ; *(OP&FCBRead ? DOS_Read
TESTB FCBOp,FCBRead ; : DOS_Write)(cRec);
JNZ DoContext
;hkn; DOS_Write is in DOSCODE
MOV DI,OFFSET DOSCODE:DOS_Write
DoContext:
SAVE <BP,DS,SI>
;hkn; SS is DOSDATA
Context DS
;; Fix for disk full
CALL DI
RESTORE <SI,DS,BP>
ASSUME DS:NOTHING
JC FCBDeath
CMP BYTE PTR [DISK_FULL],0 ; treat disk full as error
JZ NODSKFULL
MOV BYTE PTR [DISK_FULL],0 ; clear the flag
MOV FCBerr,FEOF ; set disk full flag
NODSKFULL:
;; Fix for disk full
MOV cResult,CX
invoke SaveFCBInfo ; SaveFCBInfo (FCB);
Assert ISSFT,<ES,DI>,"FCBIO/SaveFCBInfo"
; BUGBUG - why not just use the SF_OPENAGE symbol?
.errnz SF_POSITION+2-SF_OPENAGE
POP WORD PTR ES:[DI].sf_Position+2 ; restore open age
MOV AX,WORD PTR ES:[DI].sf_size
MOV WORD PTR [SI].fcb_filsiz,AX
MOV AX,WORD PTR ES:[DI].sf_size+2
MOV WORD PTR [SI].fcb_filsiz+2,AX
; }
SkipOp:
MOV AX,cResult ; cRecRes = cResult / RecSize;
XOR DX,DX
DIV RecSize
MOV cRecRes,AX
ADD RecPosL,AX ; RecPos += cRecResult;
ADC RecPosH,0
;
; If we have not gotten the expected number of records, we signal an EOF
; condition. On input, this is EOF. On output this is usually disk full.
; BUT... Under 2.0 and before, all device output IGNORED this condition. So
; do we.
;
CMP AX,cRec ; if (cRecRes <> cRec)
JZ TryBlank
TESTB FCBOp,FCBRead ; if (OP&FCBRead || !DEVICE)
JNZ SetEOF
TESTB ES:[DI].sf_flags,devid_device
JNZ TryBlank
SetEOF:
MOV FCBErr,FEOF ; FCBErr = FEOF;
TryBlank: ;
OR DX,DX ; if (cResult%RecSize <> 0) {
JZ SetExt
ADD RecPosL,1 ; RecPos++;
ADC RecPosH,0
TESTB FCBOp,FCBRead ; if(OP&FCBRead) <> 0) {
JZ SetExt
INC cRecRes ; cRecRes++;
MOV FCBErr,FTRIM + FEOF ; FCBErr = FTRIM | FEOF;
MOV CX,RecSize ; Blank (RecSize-cResult%RecSize,
SUB CX,DX ; DMA+cResult);
XOR AL,AL
;hkn; SS override
LES DI,DMAAdd
ADD DI,cResult
REP STOSB ; } }
SetExt:
MOV DX,RecPosH
MOV AX,RecPosL
TESTB FCBOp,RANDOM ; if ((OP&Random) == 0 ||
JZ DoSetExt
TESTB FCBOp,BLOCK ; (OP&BLOCK) <> 0)
JZ TrySetRR
DoSetExt:
invoke SetExtent ; SetExtent (RecPos, FCB);
TrySetRR:
TESTB FCBOp,BLOCK ; if ((op&BLOCK) <> 0)
JZ TryReturn
MOV WORD PTR [SI.FCB_RR],AX ; FCB->RR = RecPos;
MOV BYTE PTR [SI.FCB_RR+2],DL
CMP [SI.fcb_RECSIZ],64
JAE TryReturn
MOV [SI+fcb_RR+2+1],DH ; Set 4th byte only if record size < 64
TryReturn:
TESTB FCBOP,FCBRead ; if (!(FCBOP & FCBREAD)) {
JNZ FCBSave
SAVE <DS> ; FCB->FDate = date;
Invoke Date16 ; FCB->FTime = time;
RESTORE <DS>
MOV [SI].FCB_FDate,AX
MOV [SI].FCB_FTime,DX ; }
FCBSave:
TESTB FCBOp,BLOCK ; if ((op&BLOCK) <> 0)
JZ DoReturn
MOV CX,cRecRes ; user_CX = cRecRes;
invoke Get_User_Stack
MOV [SI.User_CX],CX
DoReturn:
MOV AL,FCBErr ; return (FCBERR);
Leave
return
EndProc FCBIO
Break <$FCB_Open - open an old-style FCB>
;---------------------------------------------------------------------------
;
; $FCB_Open - CPM compatability file open. The user has formatted an FCB
; for us and asked to have the rest filled in.
;
; Inputs: DS:DX point to an unopenned FCB
; Outputs: AL indicates status 0 is ok FF is error
; FCB has the following fields filled in:
; Time/Date Extent/NR Size
;---------------------------------------------------------------------------
Procedure $FCB_Open,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AX,sharing_Compat+Open_For_Both
;hkn; DOS_Open is in DOSCODE
MOV CX,OFFSET DOSCODE:DOS_Open
;
; The following is common code for Creation and openning of FCBs. AX is
; either attributes (for create) or open mode (for open)... DS:DX points to
; the FCB
;
DoAccess:
SAVE <DS,DX,CX,AX> ; save FCB pointer away
;hkn; OpenBuf is in DOSDATA
MOV DI,OFFSET DOSDATA:OpenBuf
invoke TransFCB ; crunch the fcb
RESTORE <AX,CX,DX,DS> ; get fcb
JNC FindFCB ; everything seems ok
FCBOpenErr:
;
; AL has error code
;
transfer FCB_Ret_Err
FindFCB:
invoke GetExtended ; DS:SI will point to FCB
push ax
mov al,1 ;indicate Open/Create operation
invoke LRUFCB ; get a sft entry (no error)
pop ax
JC HardMessage
ASSUME ES:NOTHING
; Message 1,"Entering "
; MessageNum ES
; Message 1,":"
; MessageNum DI
; Message 1,<13,10>
MOV ES:[DI].sf_mode,sf_ISFCB
SAVE <DS,SI,BX> ; save fcb pointer
MOV SI,CX
;hkn; SS is DOSDATA
Context DS ; let DOS_Open see variables
CALL SI ; go open the file
RESTORE <BX,SI,DS> ; get fcb
ASSUME DS:NOTHING
;hkn; SS override
LES DI,ThisSFT ; get sf pointer
JNC FCBOK ; operation succeeded
Assert ISSFT,<ES,DI>,"DeadFCB"
failopen:
PUSH AX
MOV AL,"R" ; clear out field (free sft)
invoke BlastSFT
POP AX
CMP AX,error_too_many_open_files
JZ HardMessage
CMP AX,error_sharing_buffer_exceeded
jnz DeadFCB
HardMessage:
PUSH AX
invoke FCBHardErr
POP AX
DeadFCB:
transfer FCB_Ret_Err
FCBOK:
invoke IsSFTNet ;AN007;F.C. >32mb Non Fat file?
JNZ FCBOK2 ;AN007;F.C. >32mb yes
invoke CheckShare ;AN000;F.C. >32mb share around?
JNZ FCBOK2 ;AN000;F.C. >32mb yes
;SR;
; If we reach here, we know we have got a local SFT. Let's update the
; LocalSFT variable to reflect this.
;
mov word ptr LocalSFT,di ;
mov word ptr LocalSFT+2,es; Store the SFT address
;SR;
; The check below is not valid anymore since we regenerate for media > 32M.
;
; CMP WORD PTR ES:[DI].sf_dirsec+2,0 ;AN000;F.C. >32mb if dirsec >32mb
; JZ FCBOK2 ;AN000;F.C. >32mb then error
; MOV AX,error_sys_comp_not_loaded ;AN000;F.C. >32mb
; JMP failopen ;AN000;F.C. >32mb
FCBOK2:
INC ES:[DI].sf_ref_count ; increment reference count
invoke SaveFCBInfo
Assert ISSFT,<ES,DI>,"FCBOK"
TESTB ES:[DI].sf_flags,devid_device
JNZ FCBNoDrive ; do not munge drive on devices
MOV AL,DS:[SI] ; get drive byte
invoke GetThisDrv ; convert
INC AL
MOV DS:[SI],AL ; stash in good drive letter
FCBNoDrive:
MOV [SI].FCB_RecSiz,80h ; stuff in default record size
MOV AX,ES:[DI].SF_Time ; set time
MOV [SI].FCB_FTime,AX
MOV AX,ES:[DI].SF_Date ; set date
MOV [SI].FCB_FDate,AX
MOV AX,WORD PTR ES:[DI].SF_Size ; set sizes
MOV [SI].FCB_FILSIZ,AX
MOV AX,WORD PTR ES:[DI].SF_Size+2
MOV [SI].FCB_FILSIZ+2,AX
XOR AX,AX ; convenient zero
MOV [SI].FCB_Extent,AX ; point to beginning of file
;
; We must scan the set of FCB SFTs for one that appears to match the current
; one. We cheat and use CheckFCB to match the FCBs.
;
;hkn; SS override
LES DI,SFTFCB ; get the pointer to head of the list
MOV AH,BYTE PTR ES:[DI].sfCount ; get number of SFTs to scan
OpenScan:
CMP AL,[SI].fcb_sfn ; don't compare ourselves
JZ SkipCheck
SAVE <AX> ; preserve count
invoke CheckFCB ; do they match
RESTORE <AX> ; get count back
JNC OpenFound ; found a match!
SkipCheck:
INC AL ; advance to next FCB
CMP AL,AH ; table full?
JNZ OpenScan ; no, go for more
OpenDone:
xor al,al ; return success
return
;
; The SFT at ES:DI is the one that is already in use for this FCB. We set the
; FCB to use this one. We increment its ref count. We do NOT close it at all.
; Consider:
;
; open (foo) delete (foo) open (bar)
;
; This causes us to recycle (potentially) bar through the same local SFT as
; foo even though foo is no longer needed; this is due to the server closing
; foo for us when we delete it. Unfortunately, we cannot see this closure.
; If we were to CLOSE bar, the server would then close the only reference to
; bar and subsequent I/O would be lost to the redirector.
;
; This gets solved by NOT closing the sft, but zeroing the ref count
; (effectively freeing the SFT) and informing the sharer (if relevant) that
; the SFT is no longer in use. Note that the SHARER MUST keep its ref counts
; around. This will allow us to access the same file through multiple network
; connections and NOT prematurely terminate when the ref count on one
; connection goes to zero.
;
OpenFound:
MOV [SI].fcb_SFN,AL ; assign with this
INC ES:[DI].sf_ref_count ; remember this new invocation
MOV AX,FCBLRU ; update LRU counts
MOV ES:[DI].sf_LRU,AX
;
; We have an FCB sft that is now of no use. We release sharing info and then
; blast it to prevent other reuse.
;
;hkn; SS is DOSDATA
context DS
LES DI,ThisSFT
DEC ES:[DI].sf_ref_count ; free the newly allocated SFT
invoke ShareEnd
Assert ISSFT,<ES,DI>,"Open blasting"
MOV AL,'C'
invoke BlastSFT
JMP OpenDone
EndProc $FCB_Open
BREAK <$FCB_Create - create a new directory entry>
;----------------------------------------------------------------------------
;
; $FCB_Create - CPM compatability file create. The user has formatted an
; FCB for us and asked to have the rest filled in.
;
; Inputs: DS:DX point to an unopenned FCB
; Outputs: AL indicates status 0 is ok FF is error
; FCB has the following fields filled in:
; Time/Date Extent/NR Size
;----------------------------------------------------------------------------
Procedure $FCB_Create,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
;hkn; DOS_Create is in DOSCODE
MOV CX,OFFSET DOSCODE:DOS_Create ; routine to call
XOR AX,AX ; attributes to create
invoke GetExtended ; get extended FCB
JZ DoAccessJ ; not an extended FCB
MOV AL,[SI-1] ; get attributes
DoAccessJ:
JMP DoAccess ; do dirty work
EndProc $FCB_Create
BREAK <$FCB_Random_write_Block - write a block of records to a file >
;----------------------------------------------------------------------------
;
; $FCB_Random_Write_Block - retrieve a location from the FCB, seek to it
; and write a number of blocks from it.
;
; Inputs: DS:DX point to an FCB
; Outputs: AL = 0 write was successful and the FCB position is updated
; AL <> 0 Not enough room on disk for the output
;
;----------------------------------------------------------------------------
Procedure $FCB_Random_Write_Block,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AL,Random+Block
JMP FCBIO
EndProc $FCB_Random_Write_Block
BREAK <$FCB_Random_Read_Block - read a block of records to a file >
;----------------------------------------------------------------------------
;
; $FCB_Random_Read_Block - retrieve a location from the FCB, seek to it
; and read a number of blocks from it.
;
; Inputs: DS:DX point to an FCB
; Outputs: AL = error codes defined above
;
;----------------------------------------------------------------------------
Procedure $FCB_Random_Read_Block,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AL,Random+FCBRead+Block
JMP FCBIO
EndProc $FCB_Random_Read_Block
BREAK <$FCB_Seq_Read - read the next record from a file >
;----------------------------------------------------------------------------
;
; $FCB_Seq_Read - retrieve the next record from an FCB and read it into
; memory
;
; Inputs: DS:DX point to an FCB
; Outputs: AL = error codes defined above
;
;----------------------------------------------------------------------------
Procedure $FCB_Seq_Read,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AL,FCBRead
JMP FCBIO
EndProc $FCB_Seq_Read
BREAK <$FCB_Seq_Write - write the next record to a file >
;----------------------------------------------------------------------------
;
; $FCB_Seq_Write - retrieve the next record from an FCB and write it to the
; file
;
; Inputs: DS:DX point to an FCB
; Outputs: AL = error codes defined above
;
;----------------------------------------------------------------------------
Procedure $FCB_Seq_Write,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AL,0
jmp FCBIO
EndProc $FCB_SEQ_WRITE
BREAK <$FCB_Random_Read - Read a single record from a file >
;----------------------------------------------------------------------------
;
; $FCB_Random_Read - retrieve a location from the FCB, seek to it and read a
; record from it.
;
; Inputs: DS:DX point to an FCB
; Outputs: AL = error codes defined above
;
;----------------------------------------------------------------------------
Procedure $FCB_Random_Read,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AL,Random+FCBRead
jmp FCBIO ; single block
EndProc $FCB_RANDOM_READ
BREAK <$FCB_Random_Write - write a single record to a file >
;----------------------------------------------------------------------------
;
; $FCB_Random_Write - retrieve a location from the FCB, seek to it and write
; a record to it.
;
; Inputs: DS:DX point to an FCB
; Outputs: AL = error codes defined above
;
;----------------------------------------------------------------------------
Procedure $FCB_Random_Write,NEAR
ASSUME CS:DOSCODE,SS:DOSDATA
MOV AL,Random
jmp FCBIO
EndProc $FCB_RANDOM_WRITE
DOSCODE ENDS
END
| 27.585695
| 78
| 0.632993
|
ac93c9b7bf9e4125218374fa50df5224297fed34
| 616
|
asm
|
Assembly
|
oeis/112/A112045.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/112/A112045.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/112/A112045.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A112045: Positions of primes (A000040) among nonsquares A000037.
; Submitted by Jamie Morken(s2)
; 1,2,3,5,8,10,13,15,19,24,26,31,35,37,41,46,52,54,59,63,65,71,74,80,88,91,93,97,99,103,116,120,126,128,137,139,145,151,155,160,166,168,178,180,183,185,197,209,212,214,218,224,226,236,241,247,253,255,261
lpb $0
lpb $0
div $0,45
add $0,4
mul $0,2
lpe
mov $2,-2
gcd $2,$0
add $0,1
mul $2,$0
mul $0,$2
sub $2,8
add $0,$2
div $0,2
lpe
seq $0,40 ; The prime numbers.
seq $0,122800 ; A P_4-stuttered arithmetic progression with a(n+1)=a(n) if n is square, a(n+1)=a(n)+2 otherwise.
div $0,2
| 26.782609
| 203
| 0.641234
|
72193df81ad843cae4ef81f4c0beff26332d7766
| 4,509
|
asm
|
Assembly
|
concerto_player/concerto_player.asm
|
biermanncarl/cx16-concerto
|
475c87b10cb011e0be2e3c84ecdd61a9aaf4356e
|
[
"BSD-2-Clause"
] | 4
|
2021-11-08T14:14:02.000Z
|
2022-02-25T02:29:42.000Z
|
concerto_player/concerto_player.asm
|
biermanncarl/cx16-concerto
|
475c87b10cb011e0be2e3c84ecdd61a9aaf4356e
|
[
"BSD-2-Clause"
] | 1
|
2021-03-02T20:31:05.000Z
|
2021-03-15T09:56:24.000Z
|
concerto_player/concerto_player.asm
|
biermanncarl/cx16-concerto
|
475c87b10cb011e0be2e3c84ecdd61a9aaf4356e
|
[
"BSD-2-Clause"
] | 1
|
2022-02-25T01:56:31.000Z
|
2022-02-25T01:56:31.000Z
|
; Copyright 2021 Carl Georg Biermann
; This file contains the interface to a music player. It plays back linear
; data in RAM using the Concerto synth engine.
; The data format is detailed in "specifications.md".
; If you include this file, you do NOT need to include "concerto_synth.asm"
; BUT you still must include "synth_zeropage.asm" in your zero page segment.
concerto_playback_routine = concerto_player_temp
.include "../concerto_synth/concerto_synth.asm"
.scope concerto_player
; PLAYER INTERFACE
; concerto_player::repeat
; This variable states whether or not to repeat the song being played.
; 0 = no repeat. Everything else is repeat.
repeat:
.byte 0
; concerto_player::play_track
; Enables the player and starts playing from the specified address in RAM.
; PARAMETERS: .X low byte address
; .Y high byte address
play_track:
stz wait_timer
stz wait_timer+1
php
sei
stx data_pointer
sty data_pointer+1
plp
stx start_address
sty start_address+1
jsr concerto_synth::activate_synth
rts
stop_track:
; TODO
rts
; this counter counts down the ticks until the next event.
wait_timer:
.word 0
; the music data pointer
; The high byte being 0 is interpreted as player inactive, i.e., the song data
; cannot be on the zero page.
data_pointer:
.word 0
; the zeropage pointer. This is "stolen" from the concerto_synth zeropage.
; However, as the player tick is guaranteed to run BEFORE the synth_tick,
; we can do this, as long as the variable is not needed for any voice
; management routines.
; optimally, one would use a dedicated ZP variable, as this would allow for
; both faster operation and would eliminate the need to copy the pointer
; to the ZP in every tick.
zp_pointer = mzpwf
; remembers the address where the song was started, in case it is repeated
start_address:
.word 0
concerto_player_tick:
; check if active
lda start_address+1
bne :+
rts ; HI address byte being zero indicates player inactive
: ; do wait timer
lda wait_timer
beq @check_zero
dec
sta wait_timer
rts
@check_zero:
lda wait_timer+1
beq @read_event
dec
sta wait_timer+1
dec wait_timer
rts
@read_event:
lda data_pointer
sta zp_pointer
lda data_pointer+1
sta zp_pointer+1
ldy #0
lda (zp_pointer), y
and #%11110000 ; extract upper nibble to get command number
lsr
lsr
lsr
tax
jmp (@jmp_tbl, x)
@jmp_tbl:
.word @wait
.word @play_note
.word @release_note
.word @stop_note
.word 0 ; pitchbend rate
.word 0 ; pitchbend pos
.word 0 ; volume rate
.word 0 ; volume pos
.word 0 ; vibrato rate
.word 0 ; vibrato pos
.word 0 ; unused
.word 0 ; unused
.word 0 ; unused
.word 0 ; user callback
.word 0 ; panic
.word @end_track
@wait:
iny
lda (zp_pointer), y
sta wait_timer
iny
lda (zp_pointer), y
sta wait_timer+1
lda #3
; We have set the timer to the number of ticks we shall wait until the next event.
; After the event address increment, we will end up at the top of this routine,
; where one tick is decremented from the timer,
; which accounts for this very tick we are in right here.
jmp @increment_address
@play_note:
; get channel number
lda (zp_pointer), y
and #%00001111
sta concerto_synth::note_channel
iny
lda (zp_pointer), y
sta concerto_synth::note_timbre
iny
lda (zp_pointer), y
sta concerto_synth::note_pitch
iny
lda (zp_pointer), y
sta concerto_synth::note_volume
jsr concerto_synth::play_note
lda #4
jmp @increment_address
@release_note:
lda (zp_pointer), y
and #%00001111
sta concerto_synth::note_channel
jsr concerto_synth::release_note
lda #1
jmp @increment_address
@stop_note:
lda (zp_pointer), y
and #%00001111
sta concerto_synth::note_channel
jsr concerto_synth::stop_note
lda #1
jmp @increment_address
@end_track:
jsr concerto_synth::panic
lda repeat
bne :+
stz start_address+1
rts ; return if there is no repeat
: lda start_address
sta data_pointer
lda start_address+1
sta data_pointer+1
jmp concerto_player_tick ; continue reading commands if repeat is on
@increment_address:
; expect address increment in .A
clc
adc data_pointer
sta data_pointer
bcc :+
inc data_pointer+1
: ; process next command, until wait command or song's end
jmp concerto_player_tick
.endscope
concerto_player_temp = concerto_player::concerto_player_tick
| 23.362694
| 85
| 0.716123
|
7aee233f34edce8a97a8843d87c4bdd5c1808239
| 411
|
asm
|
Assembly
|
programs/oeis/194/A194112.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/194/A194112.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/194/A194112.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A194112: a(n) = Sum_{j=1..n} floor(j*sqrt(8)); n-th partial sum of Beatty sequence for sqrt(8).
; 2,7,15,26,40,56,75,97,122,150,181,214,250,289,331,376,424,474,527,583,642,704,769,836,906,979,1055,1134,1216,1300,1387,1477,1570,1666,1764,1865,1969,2076,2186,2299,2414,2532,2653,2777,2904,3034,3166
lpb $0
mov $2,$0
sub $0,1
seq $2,22842 ; Beatty sequence for sqrt(8).
add $1,$2
lpe
add $1,2
mov $0,$1
| 34.25
| 200
| 0.678832
|
c83eeaf2146d4699b337a4fc7e7f64eb73a8cff0
| 321
|
asm
|
Assembly
|
programs/oeis/169/A169675.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/169/A169675.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/169/A169675.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A169675: Lexicographically earliest de Bruijn sequence for n = 3 and k = 2.
; 0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0
mod $0,8
lpb $0
gcd $0,4
add $1,1
lpe
| 35.666667
| 199
| 0.557632
|
845e5986123c47b13839098169dfed80c4cbf76a
| 160
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/___hadd.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/___hadd.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/___hadd.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_fp_math16
PUBLIC ___hadd
PUBLIC _addf16
EXTERN cm16_sdcc_add
defc ___hadd = cm16_sdcc_add
defc _addf16 = cm16_sdcc_add
| 14.545455
| 32
| 0.7125
|
913c0ff08506cac38f77de5861a511a6e3062b21
| 441
|
asm
|
Assembly
|
Examples/ch10/HelloNew.asm
|
satadriver/LiunuxOS
|
693174ac2b3e503d72782fc7a14f18c8a4f2756c
|
[
"Apache-2.0"
] | null | null | null |
Examples/ch10/HelloNew.asm
|
satadriver/LiunuxOS
|
693174ac2b3e503d72782fc7a14f18c8a4f2756c
|
[
"Apache-2.0"
] | null | null | null |
Examples/ch10/HelloNew.asm
|
satadriver/LiunuxOS
|
693174ac2b3e503d72782fc7a14f18c8a4f2756c
|
[
"Apache-2.0"
] | null | null | null |
TITLE Macro Functions (HelloNew.asm)
; This program shows how to use macros to configure
; a program to run on multiple platforms.
; Last update: 8/16/01.
INCLUDE Macros.inc
IF IsDefined( RealMode )
INCLUDE Irvine16.inc
ELSE
INCLUDE Irvine32.inc
ENDIF
.code
main PROC
Startup
mWriteLn "This program can be assembled to run "
mWriteLn "in both Real mode and Protected mode."
exit
main ENDP
END main
| 19.173913
| 52
| 0.707483
|
2650f0f90c8ee3327e13fc926e9c59f419168953
| 12,305
|
asm
|
Assembly
|
src/test/ref/sinusgen8.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | 2
|
2022-03-01T02:21:14.000Z
|
2022-03-01T04:33:35.000Z
|
src/test/ref/sinusgen8.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
src/test/ref/sinusgen8.asm
|
jbrandwood/kickc
|
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
|
[
"MIT"
] | null | null | null |
/// @file
/// Sine Generator functions using only multiplication, addition and bit shifting
///
/// Uses a single division for converting the wavelength to a reciprocal.
/// Generates sine using the series sin(x) = x - x^/3! + x^-5! - x^7/7! ...
/// Uses the approximation sin(x) = x - x^/6 + x^/128
/// Optimization possibility: Use symmetries when generating sine tables. wavelength%2==0 -> mirror symmetry over PI, wavelength%4==0 -> mirror symmetry over PI/2.
// Commodore 64 PRG executable file
.file [name="sinusgen8.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
// PI*2 in u[4.12] format
.const PI2_u4f12 = $6488
// PI in u[4.12] format
.const PI_u4f12 = $3244
// PI/2 in u[4.12] format
.const PI_HALF_u4f12 = $1922
.const wavelength = $c0
.label print_screen = $400
.label print_char_cursor = 6
.segment Code
main: {
.label i = $15
// sin8s_gen(sintab2, wavelength)
jsr sin8s_gen
// print_cls()
jsr print_cls
lda #<print_screen
sta.z print_char_cursor
lda #>print_screen
sta.z print_char_cursor+1
lda #0
sta.z i
__b1:
// signed byte sb = sintab2[i]-(signed byte)sintabref[i]
ldy.z i
lda sintab2,y
sec
sbc sintabref,y
// print_schar(sb)
tax
jsr print_schar
// print_str(" ")
jsr print_str
// for(byte i: 0..191)
inc.z i
lda #$c0
cmp.z i
bne __b1
// }
rts
.segment Data
str: .text " "
.byte 0
}
.segment Code
// Generate signed char sine table - on the full -$7f - $7f range
// sintab - the table to generate into
// wavelength - the number of sine points in a total sine wavelength (the size of the table)
// void sin8s_gen(__zp(6) signed char *sintab, unsigned int wavelength)
sin8s_gen: {
.label step = $a
.label sintab = 6
// u[4.12]
// Iterate over the table
.label x = $e
.label i = $c
// unsigned int step = div16u(PI2_u4f12, wavelength)
// u[4.28] step = PI*2/wavelength
jsr div16u
// unsigned int step = div16u(PI2_u4f12, wavelength)
lda #<sintab2
sta.z sintab
lda #>sintab2
sta.z sintab+1
lda #<0
sta.z x
sta.z x+1
sta.z i
sta.z i+1
// u[4.12]
__b1:
// for( unsigned int i=0; i<wavelength; i++)
lda.z i+1
cmp #>@wavelength
bcc __b2
bne !+
lda.z i
cmp #<@wavelength
bcc __b2
!:
// }
rts
__b2:
// sin8s(x)
lda.z x
sta.z sin8s.x
lda.z x+1
sta.z sin8s.x+1
jsr sin8s
// *sintab++ = sin8s(x)
ldy #0
sta (sintab),y
// *sintab++ = sin8s(x);
inc.z sintab
bne !+
inc.z sintab+1
!:
// x = x + step
clc
lda.z x
adc.z step
sta.z x
lda.z x+1
adc.z step+1
sta.z x+1
// for( unsigned int i=0; i<wavelength; i++)
inc.z i
bne !+
inc.z i+1
!:
jmp __b1
}
// Clear the screen. Also resets current line/char cursor.
print_cls: {
// memset(print_screen, ' ', 1000)
jsr memset
// }
rts
}
// Print a signed char as HEX
// void print_schar(__register(X) signed char b)
print_schar: {
// if(b<0)
cpx #0
bmi __b1
// print_char(' ')
lda #' '
jsr print_char
__b2:
// print_uchar((char)b)
jsr print_uchar
// }
rts
__b1:
// print_char('-')
lda #'-'
jsr print_char
// b = -b
txa
eor #$ff
clc
adc #1
tax
jmp __b2
}
// Print a zero-terminated string
// void print_str(__zp($c) char *str)
print_str: {
.label str = $c
lda #<main.str
sta.z str
lda #>main.str
sta.z str+1
__b1:
// while(*str)
ldy #0
lda (str),y
cmp #0
bne __b2
// }
rts
__b2:
// print_char(*(str++))
ldy #0
lda (str),y
jsr print_char
// print_char(*(str++));
inc.z str
bne !+
inc.z str+1
!:
jmp __b1
}
// Performs division on two 16 bit unsigned ints
// Returns the quotient dividend/divisor.
// The remainder will be set into the global variable rem16u
// Implemented using simple binary division
// __zp($a) unsigned int div16u(unsigned int dividend, unsigned int divisor)
div16u: {
.label return = $a
// divr16u(dividend, divisor, 0)
jsr divr16u
// divr16u(dividend, divisor, 0)
// }
rts
}
// Calculate signed char sine sin(x)
// x: unsigned int input u[4.12] in the interval $0000 - PI2_u4f12
// result: signed char sin(x) s[0.7] - using the full range -$7f - $7f
// __register(A) signed char sin8s(__zp(8) unsigned int x)
sin8s: {
// u[2.6] x^3
.const DIV_6 = $2b
.label __4 = 8
.label x = 8
.label x1 = $12
.label x3 = $11
.label usinx = $13
// Move x1 into the range 0-PI/2 using sine mirror symmetries
.label isUpper = $14
// if(x >= PI_u4f12 )
lda.z x+1
cmp #>PI_u4f12
bcc __b5
bne !+
lda.z x
cmp #<PI_u4f12
bcc __b5
!:
// x = x - PI_u4f12
lda.z x
sec
sbc #<PI_u4f12
sta.z x
lda.z x+1
sbc #>PI_u4f12
sta.z x+1
lda #1
sta.z isUpper
jmp __b1
__b5:
lda #0
sta.z isUpper
__b1:
// if(x >= PI_HALF_u4f12 )
lda.z x+1
cmp #>PI_HALF_u4f12
bcc __b2
bne !+
lda.z x
cmp #<PI_HALF_u4f12
bcc __b2
!:
// x = PI_u4f12 - x
lda #<PI_u4f12
sec
sbc.z x
sta.z x
lda #>PI_u4f12
sbc.z x+1
sta.z x+1
__b2:
// x<<3
asl.z __4
rol.z __4+1
asl.z __4
rol.z __4+1
asl.z __4
rol.z __4+1
// char x1 = BYTE1(x<<3)
// sinx = x - x^3/6 + x5/128;
lda.z __4+1
sta.z x1
// char x2 = mulu8_sel(x1, x1, 0)
tax
tay
// u[1.7]
lda #0
sta.z mulu8_sel.select
jsr mulu8_sel
// char x2 = mulu8_sel(x1, x1, 0)
// char x3 = mulu8_sel(x2, x1, 1)
tax
ldy.z x1
// u[2.6] x^2
lda #1
sta.z mulu8_sel.select
jsr mulu8_sel
// char x3 = mulu8_sel(x2, x1, 1)
sta.z x3
// char x3_6 = mulu8_sel(x3, DIV_6, 1)
tax
// u[0.7] - $2a.aa rounded to $2b
lda #1
sta.z mulu8_sel.select
ldy #DIV_6
jsr mulu8_sel
// char x3_6 = mulu8_sel(x3, DIV_6, 1)
// char usinx = x1 - x3_6
// u[1.7] x^3/6;
eor #$ff
sec
adc.z x1
sta.z usinx
// char x4 = mulu8_sel(x3, x1, 0)
ldx.z x3
ldy.z x1
// u[1.7] x - x^3/6
lda #0
sta.z mulu8_sel.select
jsr mulu8_sel
// char x4 = mulu8_sel(x3, x1, 0)
// char x5 = mulu8_sel(x4, x1, 0)
tax
ldy.z x1
// u[3.5] x^4
lda #0
sta.z mulu8_sel.select
jsr mulu8_sel
// char x5 = mulu8_sel(x4, x1, 0)
// char x5_128 = x5>>4
// u[4.4] x^5
lsr
lsr
lsr
lsr
// usinx = usinx + x5_128
clc
adc.z usinx
tax
// if(usinx>=128)
cpx #$80
bcc __b3
// usinx--;
dex
__b3:
// if(isUpper!=0)
lda.z isUpper
beq __b14
// sinx = -(signed char)usinx
txa
eor #$ff
clc
adc #1
// }
rts
__b14:
txa
rts
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// void * memset(void *str, char c, unsigned int num)
memset: {
.const c = ' '
.const num = $3e8
.label str = print_screen
.label end = str+num
.label dst = $e
lda #<str
sta.z dst
lda #>str
sta.z dst+1
__b1:
// for(char* dst = str; dst!=end; dst++)
lda.z dst+1
cmp #>end
bne __b2
lda.z dst
cmp #<end
bne __b2
// }
rts
__b2:
// *dst = c
lda #c
ldy #0
sta (dst),y
// for(char* dst = str; dst!=end; dst++)
inc.z dst
bne !+
inc.z dst+1
!:
jmp __b1
}
// Print a single char
// void print_char(__register(A) char ch)
print_char: {
// *(print_char_cursor++) = ch
ldy #0
sta (print_char_cursor),y
// *(print_char_cursor++) = ch;
inc.z print_char_cursor
bne !+
inc.z print_char_cursor+1
!:
// }
rts
}
// Print a char as HEX
// void print_uchar(__register(X) char b)
print_uchar: {
// b>>4
txa
lsr
lsr
lsr
lsr
// print_char(print_hextab[b>>4])
tay
lda print_hextab,y
// Table of hexadecimal digits
jsr print_char
// b&$f
lda #$f
axs #0
// print_char(print_hextab[b&$f])
lda print_hextab,x
jsr print_char
// }
rts
}
// Performs division on two 16 bit unsigned ints and an initial remainder
// Returns the quotient dividend/divisor.
// The final remainder will be set into the global variable rem16u
// Implemented using simple binary division
// __zp($a) unsigned int divr16u(__zp(2) unsigned int dividend, unsigned int divisor, __zp(8) unsigned int rem)
divr16u: {
.label rem = 8
.label dividend = 2
.label quotient = $a
.label return = $a
ldx #0
txa
sta.z quotient
sta.z quotient+1
lda #<PI2_u4f12
sta.z dividend
lda #>PI2_u4f12
sta.z dividend+1
txa
sta.z rem
sta.z rem+1
__b1:
// rem = rem << 1
asl.z rem
rol.z rem+1
// BYTE1(dividend)
lda.z dividend+1
// BYTE1(dividend) & $80
and #$80
// if( (BYTE1(dividend) & $80) != 0 )
cmp #0
beq __b2
// rem = rem | 1
lda #1
ora.z rem
sta.z rem
__b2:
// dividend = dividend << 1
asl.z dividend
rol.z dividend+1
// quotient = quotient << 1
asl.z quotient
rol.z quotient+1
// if(rem>=divisor)
lda.z rem+1
cmp #>wavelength
bcc __b3
bne !+
lda.z rem
cmp #<wavelength
bcc __b3
!:
// quotient++;
inc.z quotient
bne !+
inc.z quotient+1
!:
// rem = rem - divisor
lda.z rem
sec
sbc #<wavelength
sta.z rem
lda.z rem+1
sbc #>wavelength
sta.z rem+1
__b3:
// for( char i : 0..15)
inx
cpx #$10
bne __b1
// }
rts
}
// Calculate val*val for two unsigned char values - the result is 8 selected bits of the 16-bit result.
// The select parameter indicates how many of the highest bits of the 16-bit result to skip
// __register(A) char mulu8_sel(__register(X) char v1, __register(Y) char v2, __zp($10) char select)
mulu8_sel: {
.label __0 = 2
.label __1 = 2
.label select = $10
// mul8u(v1, v2)
tya
jsr mul8u
// mul8u(v1, v2)<<select
ldy.z select
beq !e+
!:
asl.z __1
rol.z __1+1
dey
bne !-
!e:
// BYTE1(mul8u(v1, v2)<<select)
lda.z __1+1
// }
rts
}
// Perform binary multiplication of two unsigned 8-bit chars into a 16-bit unsigned int
// __zp(2) unsigned int mul8u(__register(X) char a, __register(A) char b)
mul8u: {
.label return = 2
.label mb = 4
.label res = 2
// unsigned int mb = b
sta.z mb
lda #0
sta.z mb+1
sta.z res
sta.z res+1
__b1:
// while(a!=0)
cpx #0
bne __b2
// }
rts
__b2:
// a&1
txa
and #1
// if( (a&1) != 0)
cmp #0
beq __b3
// res = res + mb
clc
lda.z res
adc.z mb
sta.z res
lda.z res+1
adc.z mb+1
sta.z res+1
__b3:
// a = a>>1
txa
lsr
tax
// mb = mb<<1
asl.z mb
rol.z mb+1
jmp __b1
}
.segment Data
print_hextab: .text "0123456789abcdef"
sintab2: .fill $c0, 0
// .fill $c0, round(127.5*sin(i*2*PI/$c0))
sintabref: .byte 0, 4, 8, $c, $11, $15, $19, $1d, $21, $25, $29, $2d, $31, $35, $38, $3c, $40, $43, $47, $4a, $4e, $51, $54, $57, $5a, $5d, $60, $63, $65, $68, $6a, $6c, $6e, $70, $72, $74, $76, $77, $79, $7a, $7b, $7c, $7d, $7e, $7e, $7f, $7f, $7f, $80, $7f, $7f, $7f, $7e, $7e, $7d, $7c, $7b, $7a, $79, $77, $76, $74, $72, $70, $6e, $6c, $6a, $68, $65, $63, $60, $5d, $5a, $57, $54, $51, $4e, $4a, $47, $43, $40, $3c, $38, $35, $31, $2d, $29, $25, $21, $1d, $19, $15, $11, $c, 8, 4, 0, $fc, $f8, $f4, $ef, $eb, $e7, $e3, $df, $db, $d7, $d3, $cf, $cb, $c8, $c4, $c0, $bd, $b9, $b6, $b2, $af, $ac, $a9, $a6, $a3, $a0, $9d, $9b, $98, $96, $94, $92, $90, $8e, $8c, $8a, $89, $87, $86, $85, $84, $83, $82, $82, $81, $81, $81, $81, $81, $81, $81, $82, $82, $83, $84, $85, $86, $87, $89, $8a, $8c, $8e, $90, $92, $94, $96, $98, $9b, $9d, $a0, $a3, $a6, $a9, $ac, $af, $b2, $b6, $b9, $bd, $c0, $c4, $c8, $cb, $cf, $d3, $d7, $db, $df, $e3, $e7, $eb, $ef, $f4, $f8, $fc
| 21.895018
| 963
| 0.549208
|
1e50f9af7fd86f8fdbaa2f1f46ad11698f1a7d42
| 238
|
asm
|
Assembly
|
src/intel/tools/tests/gen7.5/bfi1.asm
|
SoftReaper/Mesa-Renoir-deb
|
8d1de1f66058d62b41fe55d36522efea2bdf996d
|
[
"MIT"
] | null | null | null |
src/intel/tools/tests/gen7.5/bfi1.asm
|
SoftReaper/Mesa-Renoir-deb
|
8d1de1f66058d62b41fe55d36522efea2bdf996d
|
[
"MIT"
] | null | null | null |
src/intel/tools/tests/gen7.5/bfi1.asm
|
SoftReaper/Mesa-Renoir-deb
|
8d1de1f66058d62b41fe55d36522efea2bdf996d
|
[
"MIT"
] | null | null | null |
bfi1(8) g22<1>UD g20<4>.xD g19<4>.xD { align16 1Q };
bfi1(8) g12<1>UD g11<8,8,1>D g10<8,8,1>D { align1 1Q };
bfi1(8) g17<1>UD g15<8,8,1>D g21<8,8,1>D { align1 2Q };
| 59.5
| 79
| 0.411765
|
91a4233e84b744626c5d2ebd7ec0bc5c2dd9a02a
| 1,167
|
asm
|
Assembly
|
Appl/Icon/Viewer/viewerManager.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 504
|
2018-11-18T03:35:53.000Z
|
2022-03-29T01:02:51.000Z
|
Appl/Icon/Viewer/viewerManager.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 96
|
2018-11-19T21:06:50.000Z
|
2022-03-06T10:26:48.000Z
|
Appl/Icon/Viewer/viewerManager.asm
|
steakknife/pcgeos
|
95edd7fad36df400aba9bab1d56e154fc126044a
|
[
"Apache-2.0"
] | 73
|
2018-11-19T20:46:53.000Z
|
2022-03-29T00:59:26.000Z
|
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
(c) Copyright GeoWorks 1994. All Rights Reserved.
GEOWORKS CONFIDENTIAL
PROJECT: Icon editor
MODULE: Viewer
FILE: viewerManager.asm
AUTHOR: Steve Yegge, Jun 17, 1994
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
stevey 6/17/94 Initial revision
DESCRIPTION:
Manager file for Viewer module.
$Id: viewerManager.asm,v 1.1 97/04/04 16:06:59 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
include iconGeode.def
include viewerConstant.def
;-----------------------------------------------------------------------------
; Classes
;-----------------------------------------------------------------------------
idata segment
VisIconClass
idata ends
;-----------------------------------------------------------------------------
; Code
;-----------------------------------------------------------------------------
include viewerVisIcon.asm
include viewerMain.asm
include viewerKbd.asm
include viewerUI.asm
| 23.816327
| 79
| 0.402742
|
7a5fb9d4489f5463e4178f1abb456e4532174d7f
| 284
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sdcc_iy/wv_priority_queue_capacity_fastcall.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sdcc_iy/wv_priority_queue_capacity_fastcall.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/adt/wv_priority_queue/c/sdcc_iy/wv_priority_queue_capacity_fastcall.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; size_t wv_priority_queue_capacity_fastcall(wv_priority_queue_t *q)
SECTION code_clib
SECTION code_adt_wv_priority_queue
PUBLIC _wv_priority_queue_capacity_fastcall
EXTERN asm_wv_priority_queue_capacity
defc _wv_priority_queue_capacity_fastcall = asm_wv_priority_queue_capacity
| 23.666667
| 74
| 0.908451
|
cf3f703ff2e0ec2eacf6a8ebe2460c3c95693bdb
| 1,239
|
asm
|
Assembly
|
Irvine/Examples/ch07/32 bit/Shrd.asm
|
alieonsido/ASM_TESTING
|
4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7
|
[
"Apache-2.0"
] | null | null | null |
Irvine/Examples/ch07/32 bit/Shrd.asm
|
alieonsido/ASM_TESTING
|
4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7
|
[
"Apache-2.0"
] | null | null | null |
Irvine/Examples/ch07/32 bit/Shrd.asm
|
alieonsido/ASM_TESTING
|
4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7
|
[
"Apache-2.0"
] | null | null | null |
; SHRD Example (Shrd.asm)
Comment !
This program shifts an array of five 32-bit integers using the SHRD
instruction. It shifts a series of consecutive doublewords 4 bits
to the right. The number is in little Endian order.
!
INCLUDE Irvine32.inc
COUNT = 4 ; shift count
.data
array DWORD 648B2165h,8C943A29h,6DFA4B86h,91F76C04h,8BAF9857h
.code
main PROC
mov bl,COUNT
call ShiftDoublewords
; Display the results
mov esi,OFFSET array
mov ecx,LENGTHOF array
mov ebx,TYPE array
call DumpMem
exit
main ENDP
;---------------------------------------------------------------
ShiftDoublewords PROC
;
; Shifts an array of doublewords to the right.
; The array is a global variable.
; Receives: BL = number of bits to shift
; Returns: nothing
;---------------------------------------------------------------
mov esi,OFFSET array
mov ecx,(LENGTHOF array) - 1
L1: push ecx ; save loop counter
mov eax,[esi + TYPE DWORD]
mov cl,bl ; shift count
shrd [esi],eax,cl ; shift EAX into high bits of [esi]
add esi,TYPE DWORD ; point to next doubleword pair
pop ecx ; restore loop counter
loop L1
; Right-shift the last doubleword
shr DWORD PTR [esi],COUNT
ret
ShiftDoublewords ENDP
END main
| 22.125
| 68
| 0.64891
|
aa2316fc476a5ba6c1054af273139b4d9710f694
| 3,204
|
asm
|
Assembly
|
src_64bit/func.asm
|
tedtheripper/EAN13-generator-hybrid
|
f394d5e5663d1ec59c1bc22e48a69d712b61d4bd
|
[
"MIT"
] | null | null | null |
src_64bit/func.asm
|
tedtheripper/EAN13-generator-hybrid
|
f394d5e5663d1ec59c1bc22e48a69d712b61d4bd
|
[
"MIT"
] | null | null | null |
src_64bit/func.asm
|
tedtheripper/EAN13-generator-hybrid
|
f394d5e5663d1ec59c1bc22e48a69d712b61d4bd
|
[
"MIT"
] | null | null | null |
; Marcel Jarosz, ARKO 2020L, x64_1, Final version
; EAN-13 Barcode Generator
SECTION .DATA
encoding: db "AAAAAAAABABBAABBABAABBBAABAABBABBAABABBBAAABABABABABBAABBABA", 60, 0
a_code: db "0001101001100100100110111101010001101100010101111011101101101110001011", 70, 0
b_code: db "0100111011001100110110100001001110101110010000101001000100010010010111", 70, 0
c_code: db "1110010110011011011001000010101110010011101010000100010010010001110100", 70, 0
SECTION .bss
result: resb 97
SECTION .TEXT
global _func, create_bin_data, get_encoding_function
extern puts
create_bin_data:
_create_bin_data:
push rbp
mov rbp, rsp
creating_the_result:
mov rax, result
mov rbx, rdi
inc rbx
mov rcx, rsi
call create_bin_data_function
exit:
mov rsp, rbp
mov rax, result ;returns bin(char) representation of the barcode
pop rbp
ret
; ==================FUNCTIONS=====================
create_bin_data_function: ;converts input into readable '1's and '0's
start: ;start symbol
mov [rax], byte '0'
inc rax
mov [rax], byte '1'
inc rax
mov [rax], byte '0'
inc rax
mov [rax], byte '1'
inc rax
a_b_type: ;left part of the barcode
mov rsi, rax ;copy for counting length
add rsi, 7
movzx rdx, BYTE [rbx]
sub rdx, 48
mov rdi, rdx
shl rdx, 3
sub rdx, rdi
cmp [rcx], BYTE 'A'
jg b_type
jl mid_chk
a_type:
mov rdi, a_code
add rdi, rdx
inc rcx
inc rbx
a_loop:
cmp rax, rsi
je a_b_type
movzx rdx, byte [rdi]
mov [rax], dl
inc rdi
inc rax
jmp a_loop
b_type:
mov rdi, b_code
add rdi, rdx
inc rcx
inc rbx
b_loop:
cmp rax, rsi
je a_b_type
movzx rdx, byte [rdi]
mov [rax], dl
inc rdi
inc rax
jmp b_loop
mid_chk: ;middle point symbol
mov [rax], byte '0'
inc rax
mov [rax], byte '1'
inc rax
mov [rax], byte '0'
inc rax
mov [rax], byte '1'
inc rax
mov [rax], byte '0'
inc rax
c_type: ;right part of the barcode
mov rsi, rax ;copy for counting length
add rsi, 7
movzx rdx, BYTE [rbx]
cmp rdx, '0'
jl stop
cmp rdx, '9'
jg stop
inc rbx
sub rdx, 48
mov rdi, rdx
shl rdx, 3
sub rdx, rdi
mov rdi, c_code
add rdi, rdx
c_loop:
cmp rax, rsi
je c_type
movzx rdx, byte [rdi]
mov [rax], dl
inc rdi
inc rax
jmp c_loop
stop: ;stop symbol
mov [rax], byte '1'
inc rax
mov [rax], byte '0'
inc rax
mov [rax], byte '1'
inc rax
mov [rax], byte '0'
inc rax
bin_data_exit:
ret
| 25.632
| 94
| 0.507179
|
67d59d3a7640b52f329737660b50bf34dadc33f9
| 635
|
asm
|
Assembly
|
oeis/046/A046184.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/046/A046184.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/046/A046184.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A046184: Indices of octagonal numbers which are also squares.
; Submitted by Jon Maiga
; 1,9,121,1681,23409,326041,4541161,63250209,880961761,12270214441,170902040409,2380358351281,33154114877521,461777249934009,6431727384198601,89582406128846401,1247721958419651009,17378525011746267721,242051628206028097081,3371344269872647091409,46956768150011031182641,654023409830281789465561,9109370969473934021335209,126877170162804794509227361,1767171011309793189107847841,24613516988174299853000642409,342822066823130404752901145881,4774895418535651366687615399921
seq $0,79935 ; a(n) = 4*a(n-1) - a(n-2) with a(1) = 1, a(2) = 3.
pow $0,2
| 90.714286
| 470
| 0.856693
|
f9a7ea6975ecd6e671e682c996973e95551bf804
| 542
|
asm
|
Assembly
|
oeis/186/A186808.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/186/A186808.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/186/A186808.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A186808: Numbers n such that there are a prime number of unlabeled distributive lattices with n elements.
; Submitted by Jamie Morken(w3)
; 4,5,6,10,12,13,18,21,23,26
mov $4,$0
mov $7,$0
lpb $4
mov $0,$7
mov $2,0
sub $4,1
sub $0,$4
add $0,1
mov $1,3
mov $3,$0
mul $3,4
mov $5,0
mov $6,0
lpb $3
mul $1,2
add $6,$2
add $1,$6
add $1,$2
add $2,$1
add $1,2
sub $3,1
add $5,3
add $5,$2
add $6,$5
lpe
mov $0,$1
mod $0,10
div $0,2
add $0,1
add $8,$0
lpe
mov $0,$8
add $0,4
| 14.263158
| 107
| 0.531365
|
2024ad0d36ddd44fa72cc63bc1f5a7e8485fcdb8
| 434
|
asm
|
Assembly
|
oeis/059/A059734.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/059/A059734.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/059/A059734.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A059734: Carryless 11^n base 10; a(n) is carryless sum of 10*a(n-1) and a(n-1).
; 1,11,121,1331,14641,150051,1650561,17155171,188606881,1964664691,10500200501,115502205511,1260524250621,13865766756831,141412323214141,1555535555355551,16000880008800061,176008680086800671
mov $3,$0
lpb $0
lpb $3
mul $1,10
mov $2,$0
bin $2,$3
mod $2,10
add $1,$2
sub $3,1
lpe
div $0,19
lpe
mov $0,$1
mul $0,10
add $0,1
| 22.842105
| 190
| 0.686636
|
09906f5de65a1655419249f4c33b50b4aa1e77cc
| 213
|
asm
|
Assembly
|
libsrc/stdio/abc800/getk.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | null | null | null |
libsrc/stdio/abc800/getk.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | null | null | null |
libsrc/stdio/abc800/getk.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | 1
|
2019-12-03T23:57:48.000Z
|
2019-12-03T23:57:48.000Z
|
;
; ABC800 Routines
;
; getk() Read key status
;
; Oct 2007 - Stefano Bodrato
;
;
; $Id: getk.asm,v 1.3 2016/06/12 17:00:21 dom Exp $
;
SECTION code_clib
PUBLIC getk
.getk
call 2
ld l,a
ld h,0
ret
| 10.142857
| 51
| 0.610329
|
e6142deb3a6e1f1030bca9a462aff8e0f9169a41
| 1,145
|
asm
|
Assembly
|
engine/phone/scripts/chad.asm
|
Trap-Master/spacworld97-thingy
|
a144827abecacdfec6cdc3baa32098e9290adf70
|
[
"blessing"
] | null | null | null |
engine/phone/scripts/chad.asm
|
Trap-Master/spacworld97-thingy
|
a144827abecacdfec6cdc3baa32098e9290adf70
|
[
"blessing"
] | null | null | null |
engine/phone/scripts/chad.asm
|
Trap-Master/spacworld97-thingy
|
a144827abecacdfec6cdc3baa32098e9290adf70
|
[
"blessing"
] | null | null | null |
ChadPhoneCalleeScript:
gettrainername STRING_BUFFER_3, SCHOOLBOY, CHAD1
checkflag ENGINE_CHAD
iftrue .WantsBattle
farscall PhoneScript_AnswerPhone_Male
checkflag ENGINE_CHAD_FRIDAY_MORNING
iftrue .NotFriday
readvar VAR_WEEKDAY
ifnotequal FRIDAY, .NotFriday
checktime MORN
iftrue ChadFridayMorning
.NotFriday:
farsjump UnknownScript_0xa0980
.WantsBattle:
getlandmarkname STRING_BUFFER_5, ROUTE_101
farsjump UnknownScript_0xa0a7d
ChadPhoneCallerScript:
gettrainername STRING_BUFFER_3, SCHOOLBOY, CHAD1
farscall PhoneScript_GreetPhone_Male
farscall PhoneScript_Random2
ifequal 0, ChadOakGossip
checkflag ENGINE_CHAD
iftrue .Generic
checkflag ENGINE_CHAD_FRIDAY_MORNING
iftrue .Generic
farscall PhoneScript_Random2
ifequal 0, ChadWantsBattle
.Generic:
farscall PhoneScript_Random3
ifequal 0, ChadFoundRare
farsjump Phone_GenericCall_Male
ChadFridayMorning:
setflag ENGINE_CHAD_FRIDAY_MORNING
ChadWantsBattle:
getlandmarkname STRING_BUFFER_5, ROUTE_101
setflag ENGINE_CHAD
farsjump PhoneScript_WantsToBattle_Male
ChadFoundRare:
farsjump Phone_CheckIfUnseenRare_Male
ChadOakGossip:
farsjump ChadOakGossipScript
| 22.9
| 49
| 0.868996
|
dae81272498746b4a4fc409e4509c5127ae33b67
| 20,648
|
asm
|
Assembly
|
modules/errorhandler/ErrorHandler.asm
|
vladikcomper/md-modules
|
24f652a036dc63f295173369dddfffb3be89bdd7
|
[
"MIT"
] | 9
|
2018-01-22T06:44:43.000Z
|
2022-03-26T18:57:40.000Z
|
modules/errorhandler/ErrorHandler.asm
|
vladikcomper/md-modules
|
24f652a036dc63f295173369dddfffb3be89bdd7
|
[
"MIT"
] | null | null | null |
modules/errorhandler/ErrorHandler.asm
|
vladikcomper/md-modules
|
24f652a036dc63f295173369dddfffb3be89bdd7
|
[
"MIT"
] | null | null | null |
; ===============================================================
; ---------------------------------------------------------------
; Error handling module
; 2017, Vladikcomper
; ---------------------------------------------------------------
include '..\core\Macros.asm'
; ---------------------------------------------------------------
; Constants
; ---------------------------------------------------------------
VRAM_Font equ (('!'-1)*$20)
VRAM_PlaneA equ $8000
VRAM_PlaneB equ VRAM_PlaneA
_white equ 0
_yellow equ 1<<13
_blue equ 2<<13
_blue2 equ 3<<13
; ===============================================================
; ---------------------------------------------------------------
; Main error handler
; ---------------------------------------------------------------
; GLOBAL REGISTERS:
; d6 .b Error handler flags bitfield
; a3 Pointer to additional parameters
; a4 Stack pointer (after exception frame)
;
; NOTE: It should be called via JSR/BSR exclusively with error
; information following the JSR/BSR opcode.
;
; ERROR DATA FORMAT:
; dc.b "<Error formatted message>", 0
; dc.b <Error Handler flags>
; even
; jmp <ConsoleProgram> (optional)
;
; Flags bitfield uses the following format:
; bit #0: If set, loads extended stack frame (used for
; Address and Bus errors only)
; bit #1: If set, displays SR and USP registers
; bit #2: <UNUSED>
; bit #3: <UNUSED>
; bit #4: <UNUSED>
; bit #5: If set, displays full screen, but then calls
; console program (via "jmp <ConsoleProgram>")
; bit #6: If set, displays error header only, then calls
; console program (via "jmp <ConsoleProgram>")
; bit #7: If set, skips a byte after this byte, so
; jmp <ConsoleProgram> is word-aligned.
; ---------------------------------------------------------------
ErrorHandler:
move #$2700, sr ; disable interrupts for good
lea -Console_RAM.size(sp), sp ; STACK => allocate memory for console
movem.l d0-a6, -(sp) ; STACK => dump registers ($3C bytes)
jsr ErrorHandler_SetupVDP(pc)
lea $3C+Console_RAM.size(sp), a4 ; a4 = arguments, stack frame
move.l usp, a0
move.l a0, -(sp) ; save USP if needed to display later (as it's overwritten by the console subsystem)
; Initialize console subsystem
lea $3C+4(sp), a3 ; a3 = Console RAM
jsr Error_InitConsole(pc)
; ----------------
; Screen header
; ----------------
lea Str_SetErrorScreen(pc), a0
jsr Console_Write(pc)
; Print error description
movea.l (a4)+, a1 ; get error text
lea (a4), a2 ; a2 = load arguments buffer (if present)
jsr Console_WriteLine_Formatted(pc)
jsr Console_StartNewLine(pc)
lea (a2), a4 ; a4 = stack frame (after arguments buffer was processed by Console_Write)
; Load screen configuration bitfield
move.b (a1)+, d6 ; d6 = configuration bitfield
bpl.s @align_ok ; if "_eh_align_offset" is not set, branch
addq.w #1, a1 ; skip a byte to avoid address error on reading the next word
@align_ok:
lea (a1), a3 ; a3 may be used to fetch console program address later
; Print error address (for Address error and Bus Error only)
btst #0, d6 ; does error has extended stack frame (Address Error and Bus Error only)?
beq.s @skip ; if not, branch
lea Str_Address(pc), a1 ; a1 = formatted string
lea 2(a4), a2 ; a2 = arguments buffer
jsr Console_WriteLine_Formatted(pc)
addq.w #8, a4 ; skip extension part of the stack frame
@skip:
; Print error location
lea Str_Location(pc), a1 ; a1 = formatted string
lea 2(a4), a2 ; a2 = arguments buffer
jsr Console_WriteLine_Formatted(pc)
; Print module name error occured in
lea Str_Module(pc), a1 ; a1 = formatted string
lea 2(a4), a2 ; a2 = arguments buffer
jsr Console_WriteLine_Formatted(pc)
; Print caller
lea 6(a4), a2 ; a2 = call stack (after exception stack frame)
jsr Error_GuessCaller(pc) ; d1 = caller
lea Str_Caller(pc), a1 ; a1 = formatted string
move.l d1, -(sp)
lea (sp), a2 ; a2 = arguments buffer
jsr Console_WriteLine_Formatted(pc)
jsr Console_StartNewLine(pc)
addq.w #4,sp ; free argument
btst #6, d6 ; is execute console program bit set?
bne.w Error_EnterConsoleProgram ; if yes, branch to error trap
; ----------------
; Registers
; ----------------
lea 4(sp), a2 ; use register buffer as arguments
; Print data registers
jsr Console_GetPosAsXY(pc) ; d0/d1 = XY-pos
move.w d1, -(sp) ; remember line
moveq #3, d0 ; left margin for data registers
jsr Console_SetPosAsXY(pc)
move.w #'d0', d0 ; d0 = 'd0', what a twist !!!
moveq #8-1, d5 ; number of registers - 1
jsr Error_DrawRegisters(pc)
; Print address registers
move.w (sp)+, d1 ; restore line
moveq #$11, d0 ; left margin for address registers
jsr Console_SetPosAsXY(pc)
move.w #'a0', d0
moveq #7-1, d5 ; number of registers - 1
jsr Error_DrawRegisters(pc)
; Special case : stack register
move.w #'sp', d0
moveq #0, d5
move.l a4, -(sp)
lea (sp), a2
jsr Error_DrawRegisters(pc)
addq.w #4, sp
; Display USP and SR (if requested)
btst #1, d6
beq.s @skip2
; Draw 'USP'
lea Str_USP(pc), a1
lea (sp), a2 ; a2 = USP saved in stack (how convy!)
jsr Console_Write_Formatted(pc)
; Draw 'SR'
lea Str_SR(pc), a1
lea (a4), a2
jsr Console_WriteLine_Formatted(pc)
@skip2:
addq.w #4, sp ; free USP copy from the stack (we don't need it anymore)
jsr Console_GetPosAsXY(pc) ; d0/d1 = XY-pos
addq.w #1, d1 ; skip a line
moveq #1, d0 ; left margin for data registers
jsr Console_SetPosAsXY(pc)
; --------------------
; Interrupt handlers
; --------------------
; Print vertical and horizontal interrupt handlers, if available
move.l $78.w, d0 ; d0 = VInt vector address
lea Str_VInt(pc), a0
jsr Error_DrawInterruptHandler(pc)
move.l $70.w, d0 ; d0 = HInt vector address
lea Str_HInt(pc), a0
jsr Error_DrawInterruptHandler(pc)
jsr Console_StartNewLine(pc) ; newline
; -----------------
; Stack contents
; -----------------
movea.w a4, a2
movea.w 2.w, a1 ; a1 = stack top
subq.w #1, a1 ; hotfix to convert stack pointer $0000 to $FFFF, decrement by 1 shouldn't make any difference otherwise
jsr Console_GetPosAsXY(pc) ; d0/d1 = XY-pos
moveq #28-3, d5
sub.w d1, d5
bmi.s @stack_done
bsr.s Error_DrawStackRow_First
@stack_loop:
jsr Error_DrawStackRow(pc)
dbf d5, @stack_loop
@stack_done:
btst #5, d6 ; is execute console program (at the end) bit set?
bne.s Error_RunConsoleProgram
; ---------------------------------------------------------------
Error_IdleLoop:
bra.s *
; ---------------------------------------------------------------
; Routine to enter console mode after writting error header
; ---------------------------------------------------------------
Error_EnterConsoleProgram:
moveq #0, d1
jsr Console_SetBasePattern(pc)
Error_RunConsoleProgram:
move.l a3, (sp)+ ; replace USP in stack with return address
movem.l (sp)+, d0-a6 ; restore registers
pea Error_IdleLoop(pc) ; set return address
move.l -$3C(sp), -(sp) ; retrieve "a3" saved earlier
rts ; jump to a3
; ---------------------------------------------------------------
Error_InitConsole: __global
lea ErrorHandler_ConsoleConfig(pc), a1
lea Art1bpp_Font(pc), a2
jmp Console_Init(pc) ; d5 = On-screen position
; ===============================================================
; ---------------------------------------------------------------
; Subroutine to draw contents of stack row
; ---------------------------------------------------------------
; INPUT:
; a0 String buffero
; a1 Top of stack pointer
; a2 Arguments (stack contents)
; ---------------------------------------------------------------
Error_DrawStackRow_First:
lea -$30(sp), sp
lea (sp), a0 ; a0 = string buffer
moveq #-1, d7 ; size of the buffer for formatter functions (we assume buffer will never overflow)
move.l #'(SP)', (a0)+
move.w #': ', (a0)+
bra.s Error_DrawStackRow_Continue
; ---------------------------------------------------------------
Error_DrawStackRow:
lea -$30(sp), sp
lea (sp), a0 ; a0 = string buffer
moveq #-1, d7 ; size of the buffer for formatter functions (we assume buffer will never overflow)
move.w #' +', (a0)+
move.w a2, d1
sub.w a4, d1 ; d1 = stack displacement
jsr FormatHex_Byte(pc)
move.w #': ', (a0)+
; ---------------------------------------------------------------
Error_DrawStackRow_Continue:
moveq #5, d0 ; number of words to display
@loop:
moveq #$FFFFFF00|_pal2, d1 ; use light blue
cmp.w a1, a2 ; is current word out of stack?
blt.s @0 ; if not, branch
moveq #$FFFFFF00|_pal3, d1 ; use dark blue
@0: move.b d1, (a0)+ ; setup color
move.w (a2)+, d1
jsr FormatHex_Word(pc)
move.b #' ', (a0)+
dbf d0, @loop
clr.b (a0)+ ; finalize string
; Draw string on screen
lea (sp), a0
moveq #0, d1
jsr Console_WriteLine_WithPattern(pc)
lea $30(sp), sp
rts
; ===============================================================
; ---------------------------------------------------------------
; Subroutine to draw series of registers
; ---------------------------------------------------------------
; INPUT:
; d0 .w Name of the first register ('d0' or 'a0')
; d5 .w Number of registers
; a2 Registers buffer
; ---------------------------------------------------------------
Error_DrawRegisters:
lea -$10(sp), sp ; allocate string buffaro
moveq #-1, d7 ; size of the buffer for formatter functions (we assume buffer will never overflow)
@regloop:
lea (sp), a0 ; use allocated stack space as string buffer
move.w d0, (a0)+ ; put register name
move.w #': ', (a0)+ ; put ": "
move.b #_pal2, (a0)+ ; put palette flag
move.l (a2)+, d1
jsr FormatHex_LongWord(pc) ; put register contents
clr.b (a0)+ ; finalize string
lea (sp), a0 ; use allocated stack space as string buffer
moveq #0, d1 ; default pattern
jsr Console_WriteLine_WithPattern(pc)
addq.w #1, d0 ; next register name
dbf d5, @regloop
lea $10(sp), sp
rts
; ===============================================================
; ---------------------------------------------------------------
; Subroutine to draw series of registers
; ---------------------------------------------------------------
; INPUT:
; d0 .l Interrupt handler address
; a0 Handler name string
; ---------------------------------------------------------------
Error_DrawInterruptHandler:
move.l d0, d1
swap d1
not.b d1 ; does handler address point to RAM (block $FF)?
bne.s @ret ; if not, branch
subq.w #8, sp
move.l a0, (sp) ; Argument #0 : String pointer
movea.l d0, a2 ; a2 = handler routine
lea Str_IntHandler_Unknown(pc), a1
cmp.w #$4EF9, (a2)+ ; does routine include jmp (xxx).l opcode?
bne.s @0 ; if not, process "Str_IntHandler_Unknown"
lea Str_IntHandler(pc), a1 ; otherwise, process "Str_IntHandler"
move.l (a2), 4(sp) ; Argument #1 : Jump offset
@0 lea (sp), a2
jsr Console_Write_Formatted(pc)
addq.w #8, sp
@ret:
rts
; ---------------------------------------------------------------
Str_IntHandler:
dc.b _str, _pal0, _sym|long|split|forced, _pal2, _disp|weak, _newl, 0
Str_IntHandler_Unknown:
dc.b _str, _pal0, '<undefined>', _newl, 0
even
; ===============================================================
; ---------------------------------------------------------------
; Subroutine to guess caller by inspecting stack
; ---------------------------------------------------------------
; INPUT:
; a2 Bottom of stack (after stack frame)
;
; OUTPUT:
; d1 .l Caller offset
;
; USES:
; a1-a2
; ---------------------------------------------------------------
Error_GuessCaller:
movea.w 2.w, a1 ; a1 = stack top boundary
subq.w #4, a1 ; subtract a longword to set offset you should pass through
cmpa.w a2, a1
blo.s @nocaller
@try_offset:
cmp.w #$40, (a2) ; does this seem like an offset?
blo.s @caller_found ; if yes, branch
addq.w #2, a2 ; try some next offsets
cmpa.w a2, a1
bhs.s @try_offset
@nocaller:
moveq #0, d1
rts
; ---------------------------------------------------------------
@caller_found:
move.l (a2), d1
rts
; ===============================================================
; ---------------------------------------------------------------
; Subroutine to setup/reset VDP in order to display properly
; ---------------------------------------------------------------
ErrorHandler_SetupVDP: __global
lea VDP_Ctrl, a5 ; a5 = VDP_Ctrl
lea -4(a5), a6 ; a6 = VDP_Data
; Make sure there are no pending writes to VDP
tst.w (a5)
; Make sure there are no DMA's occuring, otherwise wait
@wait_dma:
move.w (a5), ccr ; is DMA occuring?
bvs.s @wait_dma ; wait until it's finished
; Setup VDP registers for Error Handler screen
lea @VDPConfig(pc), a0
@setup_regs:
move.w (a0)+, d0
bpl.s @done
move.w d0, (a5)
bra.s @setup_regs
@done:
; Remove all sprites, reset horizontal and vertical scrolling
moveq #0, d0
vram $0000, (a5) ; reset sprites and horizontal scrolling (HSRAM)
move.l d0, (a6) ; ''
move.l #$40000010, (a5) ; reset vertical scrolling
move.l d0, (a6) ; ''
; Fill screen with black
cram $00, (a5)
move.w d0, (a6)
rts
; ---------------------------------------------------------------
; Error screen's VDP configuration
; ---------------------------------------------------------------
@VDPConfig:
dc.w $8004 ; $00, disable HInts
dc.w $8134 ; $01, disable DISP
dc.w $8200+VRAM_PlaneA/$400 ; $02, set Plane A nametable offset in VRAM
dc.w $8400+VRAM_PlaneB/$2000 ; $04, set Plane B nametable offset in VRAM
dc.w $8500 ; $05, set Sprites offset to $0000
dc.w $8700 ; $07, set backdrop color
dc.w $8B00 ; $0B, set VScroll=full, HScroll=full
dc.w $8C81 ; $0C, use 320 pixels horizontal resolution
dc.w $8D00 ; $0D, set HScroll table offset to $0000
dc.w $8F02 ; $0F, set auto-increment to $02
dc.w $9011 ; $10, use 512x512 plane resolution
dc.w $9100 ; $11, reset Window X-position
dc.w $9200 ; $12, reset Window Y-position
dc.w 0 ; WARNING! Make sure the next word is positive!
; ===============================================================
; ---------------------------------------------------------------
; Console loading programme for Error Handler
; ---------------------------------------------------------------
ErrorHandler_ConsoleConfig:
; ---------------------------------------------------------------
; Font decompression programme
; ---------------------------------------------------------------
; NOTICE: It's possible to generate several "samples" of font
; with different color indecies at different VRAM locations.
; However, this is not used for this Error Handler
; ---------------------------------------------------------------
dcvram VRAM_Font ; font offset in VRAM
dc.w $0000, $0001, $0010, $0011 ; decompression table for 1bpp nibbles
dc.w $0100, $0101, $0110, $0111 ; ''
dc.w $1000, $1001, $1010, $1011 ; ''
dc.w $1100, $1101, $1110, $1111 ; ''
dc.w -1 ; end marker
; ---------------------------------------------------------------
; Console RAM initial config
; ---------------------------------------------------------------
dcvram VRAM_PlaneA ; screen start address / plane nametable pointer
dc.w 40 ; number of characters per line
dc.w 40 ; number of charasters on the first line (meant to be the same as the above)
dc.w 0 ; base font pattern (tile id for ASCII $00 + palette flags)
dc.w $80 ; size of screen row (in bytes)
dc.w $2000/$20-1 ; size of screen (in tiles - 1)
; ---------------------------------------------------------------
; CRAM data
; ---------------------------------------------------------------
; FORMAT:
; dc.w Color1, ..., ColorN, -X*2
; X = Number of longwords to fill until line ends
;
; NOTICE: Transparent color at the beginning of a palette line is
; auto-filled with $000 (black), hence Color1 is index #1, etc
;
; WARNING: Caution is required when calculating -X*2 as it's used
; for a jump offset directly in Console_Init code.
;
; WARNING: Make sure size of colors you pass (+automatic
; transparency color) and fill size sums to $20 bytes strictly!
; -- You can only fill with 4 bytes precision!
; -- Use dummy colors if neccessary.
; ---------------------------------------------------------------
dc.w $0EEE, -7*2 ; line 0: white text
dc.w $00CE, -7*2 ; line 1: yellow text
dc.w $0EEA, -7*2 ; line 2: lighter blue text
dc.w $0E86, -7*2 ; line 3: darker blue text
; ---------------------------------------------------------------
; Error Handler interface data
; ---------------------------------------------------------------
Str_SetErrorScreen:
dc.b _pal1, _newl, _setx, 1, _setw, 38, 0
Str_Address:
dc.b _pal1, 'Address: ', _pal0, _sym|long|split, _pal2, _disp, 0
Str_Location:
dc.b _pal1, 'Location: ', _pal2, _hex|long, 0
Str_Module:
dc.b _pal1, 'Module: ', _pal0, _sym|long|split|forced, _pal2, _disp|weak, 0
Str_Caller:
dc.b _pal1, 'Caller: ', _pal0, _sym|long|split, _pal2, _disp, 0
Str_USP:
dc.b _setx, $10, _pal0, 'usp: ', _pal2, _hex|long, 0
Str_SR:
dc.b _setx, $03, _pal0, 'sr: ', _pal2, _hex|word, 0
Str_VInt:
dc.b _pal1, 'VInt: ', 0
Str_HInt:
dc.b _pal1, 'HInt: ', 0
even
; ---------------------------------------------------------------
; Error Handler 1bpp font graphics
; ---------------------------------------------------------------
Art1bpp_Font:
dc.w Art1bpp_Font_End-Art1bpp_Font-1 ; font size - 1
dc.l $00000000, $00000000, $183C3C18, $18001800, $6C6C6C00, $00000000, $6C6CFE6C, $FE6C6C00
dc.l $187EC07C, $06FC1800, $00C60C18, $3060C600, $386C3876, $CCCC7600, $18183000, $00000000
dc.l $18306060, $60301800, $60301818, $18306000, $00EE7CFE, $7CEE0000, $0018187E, $18180000
dc.l $00000000, $18183000, $000000FE, $00000000, $00000000, $00383800, $060C1830, $60C08000
dc.l $7CC6CEDE, $F6E67C00, $18781818, $18187E00, $7CC60C18, $3066FE00, $7CC6063C, $06C67C00
dc.l $0C1C3C6C, $FE0C0C00, $FEC0FC06, $06C67C00, $7CC6C0FC, $C6C67C00, $FEC6060C, $18181800
dc.l $7CC6C67C, $C6C67C00, $7CC6C67E, $06C67C00, $001C1C00, $001C1C00, $00181800, $00181830
dc.l $0C183060, $30180C00, $0000FE00, $00FE0000, $6030180C, $18306000, $7CC6060C, $18001800
dc.l $7CC6C6DE, $DCC07E00, $386CC6C6, $FEC6C600, $FC66667C, $6666FC00, $3C66C0C0, $C0663C00
dc.l $F86C6666, $666CF800, $FEC2C0F8, $C0C2FE00, $FE62607C, $6060F000, $7CC6C0C0, $DEC67C00
dc.l $C6C6C6FE, $C6C6C600, $3C181818, $18183C00, $3C181818, $D8D87000, $C6CCD8F0, $D8CCC600
dc.l $F0606060, $6062FE00, $C6EEFED6, $D6C6C600, $C6E6E6F6, $DECEC600, $7CC6C6C6, $C6C67C00
dc.l $FC66667C, $6060F000, $7CC6C6C6, $C6D67C06, $FCC6C6FC, $D8CCC600, $7CC6C07C, $06C67C00
dc.l $7E5A1818, $18183C00, $C6C6C6C6, $C6C67C00, $C6C6C6C6, $6C381000, $C6C6D6D6, $FEEEC600
dc.l $C66C3838, $386CC600, $6666663C, $18183C00, $FE860C18, $3062FE00, $7C606060, $60607C00
dc.l $C0603018, $0C060200, $7C0C0C0C, $0C0C7C00, $10386CC6, $00000000, $00000000, $000000FF
dc.l $30301800, $00000000, $0000780C, $7CCC7E00, $E0607C66, $6666FC00, $00007CC6, $C0C67C00
dc.l $1C0C7CCC, $CCCC7E00, $00007CC6, $FEC07C00, $1C3630FC, $30307800, $000076CE, $C67E067C
dc.l $E0607C66, $6666E600, $18003818, $18183C00, $0C001C0C, $0C0CCC78, $E060666C, $786CE600
dc.l $18181818, $18181C00, $00006CFE, $D6D6C600, $0000DC66, $66666600, $00007CC6, $C6C67C00
dc.l $0000DC66, $667C60F0, $000076CC, $CC7C0C1E, $0000DC66, $6060F000, $00007CC0, $7C067C00
dc.l $3030FC30, $30361C00, $0000CCCC, $CCCC7600, $0000C6C6, $6C381000, $0000C6C6, $D6FE6C00
dc.l $0000C66C, $386CC600, $0000C6C6, $CE76067C, $0000FC98, $3064FC00, $0E181870, $18180E00
dc.l $18181800, $18181800, $7018180E, $18187000, $76DC0000, $00000000
Art1bpp_Font_End:
; ---------------------------------------------------------------
; Core modules
; ---------------------------------------------------------------
include '..\core\Symbols.asm'
include '..\core\Formatter - Hex.asm'
include '..\core\Formatter - Bin.asm'
include '..\core\Formatter - Dec.asm'
include '..\core\Formatter - Sym.asm'
include '..\core\Format String.asm'
include '..\core\Console.asm'
include '..\core\1bpp - Decompress.asm'
; ---------------------------------------------------------------
SymbolData:
| 33.573984
| 125
| 0.545622
|
203ad2cde609fb577359002ef8a9b1041f8227a8
| 730
|
asm
|
Assembly
|
oeis/098/A098385.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/098/A098385.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/098/A098385.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A098385: Ordered factorizations over hook-type prime signatures with exactly three distinct primes (third column of A098348).
; Submitted by Jon Maiga
; 13,44,132,368,976,2496,6208,15104,36096,84992,197632,454656,1036288,2342912,5259264,11730944,26017792,57409536,126091264,275775488,600834048,1304428544,2822766592,6090129408,13103005696,28118614016,60196651008,128580583424,274072600576,583041810432,1238024323072,2624225017856,5553392713728,11733850652672,24756191494144,52158082842624,109745004347392,230622563926016,484059994128384,1014849232437248,2125355976491008,4446425022726144,9293072277962752,19404181206990848,40479620088201216
add $0,4
mov $1,2
pow $1,$0
pow $0,2
sub $0,4
mul $0,$1
add $1,$0
mov $0,$1
div $0,16
| 52.142857
| 489
| 0.839726
|
46228731aff15a1bb3869031e386629aec687acf
| 814
|
asm
|
Assembly
|
src/mods/dta/remove_ion_storm_effects.asm
|
mvdhout1992/ts-patches
|
a426970abeb6993eea6703d1a756fd74489ffed2
|
[
"MIT"
] | 33
|
2016-07-30T14:17:28.000Z
|
2021-12-19T15:45:19.000Z
|
src/mods/dta/remove_ion_storm_effects.asm
|
A-Productions/ts-patches
|
326db731f7226d9e803feab475777c730688634e
|
[
"MIT"
] | 73
|
2018-08-17T00:25:19.000Z
|
2021-05-10T08:31:15.000Z
|
src/mods/dta/remove_ion_storm_effects.asm
|
A-Productions/ts-patches
|
326db731f7226d9e803feab475777c730688634e
|
[
"MIT"
] | 18
|
2017-05-16T11:28:06.000Z
|
2022-03-20T20:41:03.000Z
|
%include "macros/patch.inc"
%include "macros/datatypes.inc"
%include "TiberianSun.inc"
; Remove Ion Storm special effects: flight denial, immobile hover units, disabled radar,
; IonSensitive weapons
@SET 0x0040E115, {mov eax, 0}
@SET 0x0040E4BB, {mov eax, 0}
@SET 0x0042C6AC, {mov eax, 0}
@SET 0x0042C8F8, {mov eax, 0}
@SET 0x004322D1, {mov eax, 0}
@SET 0x004324B1, {mov eax, 0}
@SET 0x004A2CAC, {mov eax, 0}
@SET 0x004A88FC, {mov eax, 0}
@SET 0x004A893A, {mov eax, 0}
@SET 0x004C9580, {mov eax, 0} ; Remove disabled radar
@SET 0x004CF698, {mov eax, 0}
@SET 0x004D9B83, {mov eax, 0}
@SET 0x004EC95D, {mov ecx, 0}
@SET 0x004EC962, nop
@SET 0x004ECC80, {mov eax, 0}
@SET 0x004F96D6, {mov eax, 0}
@SET 0x004F976E, {mov eax, 0}
@SET 0x0062FA96, {mov eax, 0} ; Remove IonSensitive effect
@SET 0x0065834E, {mov eax, 0}
| 31.307692
| 88
| 0.707617
|
6ae9034d5bb61612b399bba3ef64790c692e2dae
| 344
|
asm
|
Assembly
|
wof/lcs/base/300.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | 6
|
2020-10-14T15:29:10.000Z
|
2022-02-12T18:58:54.000Z
|
wof/lcs/base/300.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | null | null | null |
wof/lcs/base/300.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | 1
|
2020-12-17T08:59:10.000Z
|
2020-12-17T08:59:10.000Z
|
copyright zengfr site:http://github.com/zengfr/romhack
00140E beq $1442 [base+300]
00141A subq.w #1, ($300,A5) [base+2EE]
00141E move.w #$10, ($2,A1) [base+300]
001504 addq.w #1, ($300,A5) [base+2EE]
001508 move.w #$5, D6 [base+300]
01A7CE move.w A6, ($2ee,A5) [base+300]
copyright zengfr site:http://github.com/zengfr/romhack
| 31.272727
| 54
| 0.659884
|
dea15736c0770b2b1bfa8fc8864a29ad0cdb3a74
| 682
|
asm
|
Assembly
|
oeis/045/A045309.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/045/A045309.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/045/A045309.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A045309: Primes congruent to {0, 2} mod 3.
; Submitted by Jon Maiga
; 2,3,5,11,17,23,29,41,47,53,59,71,83,89,101,107,113,131,137,149,167,173,179,191,197,227,233,239,251,257,263,269,281,293,311,317,347,353,359,383,389,401,419,431,443,449,461,467,479,491,503,509,521,557,563,569,587,593,599,617,641,647,653,659,677,683,701,719,743,761,773,797,809,821,827,839,857,863,881,887,911,929,941,947,953,971,977,983,1013,1019,1031,1049,1061,1091,1097,1103,1109,1151,1163,1181
add $0,1
mov $1,1
mov $2,1
lpb $0
mov $3,$2
gcd $2,2
lpb $3
add $2,1
mov $4,$1
gcd $4,$2
add $2,2
cmp $4,1
cmp $4,0
sub $3,$4
lpe
sub $0,1
add $2,1
mul $1,$2
lpe
mov $0,$2
| 27.28
| 396
| 0.642229
|
76eb29ef5baa7a1c1c067e0b3657619c13c2e520
| 5,875
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1583.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_1583.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_1583.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x1c63e, %rdx
nop
and $29162, %rax
mov (%rdx), %r13
nop
nop
nop
nop
nop
add $49052, %rdx
lea addresses_D_ht+0x1eefe, %rsi
nop
nop
nop
nop
nop
sub $10931, %r9
mov (%rsi), %r10w
nop
nop
nop
sub $36915, %rsi
lea addresses_WC_ht+0x1d022, %r13
nop
nop
sub %rcx, %rcx
movb (%r13), %al
inc %rdx
lea addresses_D_ht+0x1c400, %rdx
nop
inc %rsi
vmovups (%rdx), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $0, %xmm7, %r13
nop
nop
nop
nop
cmp %r10, %r10
lea addresses_WT_ht+0x172e2, %rsi
and $4750, %rcx
vmovups (%rsi), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $0, %xmm7, %rax
nop
nop
and $35115, %rsi
lea addresses_A_ht+0x1cbb3, %rsi
lea addresses_WT_ht+0x61a2, %rdi
nop
nop
nop
add %r10, %r10
mov $104, %rcx
rep movsq
nop
add %r13, %r13
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r14
push %r8
push %r9
push %rbp
push %rsi
// Store
lea addresses_A+0x7e22, %r14
nop
nop
nop
nop
add %r8, %r8
movw $0x5152, (%r14)
nop
nop
nop
nop
xor %r10, %r10
// Store
lea addresses_D+0x1c22, %r8
nop
nop
xor %r9, %r9
mov $0x5152535455565758, %rbp
movq %rbp, (%r8)
nop
nop
nop
nop
and %r8, %r8
// Faulty Load
lea addresses_A+0x1822, %r9
nop
nop
nop
nop
cmp %r13, %r13
mov (%r9), %esi
lea oracles, %r8
and $0xff, %rsi
shlq $12, %rsi
mov (%r8,%rsi,1), %rsi
pop %rsi
pop %rbp
pop %r9
pop %r8
pop %r14
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 9, 'same': False, 'type': 'addresses_A'}, 'OP': 'STOR'}
{'dst': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 10, 'same': False, 'type': 'addresses_D'}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 11, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM'}
{'35': 21829}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
| 38.149351
| 2,999
| 0.654298
|
bfa736587518a7bdf0c218d70eb39035a5955d9a
| 728
|
asm
|
Assembly
|
lib/syscall.asm
|
Diversion2k22/x86_64-decOS-MSC-KIIT
|
f4befd7361bb74b903d6ffc3a8aacd451bcf1028
|
[
"MIT"
] | null | null | null |
lib/syscall.asm
|
Diversion2k22/x86_64-decOS-MSC-KIIT
|
f4befd7361bb74b903d6ffc3a8aacd451bcf1028
|
[
"MIT"
] | 1
|
2021-12-17T06:34:39.000Z
|
2021-12-17T06:34:39.000Z
|
lib/syscall.asm
|
Diversion2k22/x86_64-decOS-MSC-KIIT
|
f4befd7361bb74b903d6ffc3a8aacd451bcf1028
|
[
"MIT"
] | 3
|
2022-01-29T07:51:59.000Z
|
2022-02-03T11:48:59.000Z
|
section .text
global writeu
global sleepu
global exitu
global waitu
global keyboard_readu
global get_total_memoryu
writeu:
sub rsp,16
xor eax,eax
mov [rsp],rdi
mov [rsp+8],rsi
mov rdi,2
mov rsi,rsp
int 0x80
add rsp,16
ret
sleepu:
sub rsp,8
mov eax,1
mov [rsp],rdi
mov rdi,1
mov rsi,rsp
int 0x80
add rsp,8
ret
exitu:
mov eax,2
mov rdi,0
int 0x80
ret
waitu:
mov eax,3
mov rdi,0
int 0x80
ret
keyboard_readu:
mov eax,4
xor edi,edi
int 0x80
ret
get_total_memoryu:
mov eax,5
xor edi,edi
int 0x80
ret
| 9.972603
| 25
| 0.520604
|
dedd4e79894eb07d567bba5a4c9cd2f2a5cb2484
| 292
|
asm
|
Assembly
|
Ficheiros assembly (TP's e Testes)/ex11-folha4.asm
|
pemesteves/mpcp-1718
|
a0255feb961fc6cb33f1dae60bf0bfa19ade081d
|
[
"MIT"
] | null | null | null |
Ficheiros assembly (TP's e Testes)/ex11-folha4.asm
|
pemesteves/mpcp-1718
|
a0255feb961fc6cb33f1dae60bf0bfa19ade081d
|
[
"MIT"
] | null | null | null |
Ficheiros assembly (TP's e Testes)/ex11-folha4.asm
|
pemesteves/mpcp-1718
|
a0255feb961fc6cb33f1dae60bf0bfa19ade081d
|
[
"MIT"
] | null | null | null |
include mpcp.inc
;; declaracoes de dados (variaveis globais)
.data
;; seccao de codigo principal
.code
ROTINA PROC uses EDI A:DWORD , B: DWORD
RET
ROTINA ENDP
main PROC C
mov eax, eax
invoke ROTINA , EAX , EBX
main ENDP
;; -----------------------------
;; codigo de outras rotinas
end
| 15.368421
| 43
| 0.64726
|
9a8e52ea156b7b94bba6c77bb4554f84dd446820
| 200
|
asm
|
Assembly
|
Assembly Practice/8_bit addition/Sources/main.asm
|
asheemchhetri/ECE362
|
f144be836356edd0feed18ee542afd9895e1081f
|
[
"MIT"
] | null | null | null |
Assembly Practice/8_bit addition/Sources/main.asm
|
asheemchhetri/ECE362
|
f144be836356edd0feed18ee542afd9895e1081f
|
[
"MIT"
] | null | null | null |
Assembly Practice/8_bit addition/Sources/main.asm
|
asheemchhetri/ECE362
|
f144be836356edd0feed18ee542afd9895e1081f
|
[
"MIT"
] | null | null | null |
;Write a program to add the numbers stored at memory locations $1000, $1001, and $1002
;and store the sum at memory location $1010.
org $800
ldaa $1000
adda $1001
adda $1002
staa $1010
end
| 25
| 86
| 0.705
|
9af07384a8f572fe980825a62428f4aa80d22e91
| 5,400
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1400.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1400.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1400.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x3c7, %r12
cmp $53481, %r15
movl $0x61626364, (%r12)
nop
sub $45475, %rsi
lea addresses_UC_ht+0xccc7, %rsi
nop
nop
nop
nop
nop
cmp %r13, %r13
and $0xffffffffffffffc0, %rsi
movntdqa (%rsi), %xmm1
vpextrq $0, %xmm1, %rdi
nop
nop
sub %r13, %r13
lea addresses_A_ht+0x5547, %rsi
lea addresses_normal_ht+0xbe83, %rdi
nop
nop
nop
nop
nop
cmp %rbp, %rbp
mov $63, %rcx
rep movsb
nop
nop
nop
nop
lfence
lea addresses_A_ht+0x181c7, %rbp
nop
nop
nop
nop
nop
xor %rdi, %rdi
mov (%rbp), %r12
nop
nop
nop
nop
nop
sub $14524, %rdi
lea addresses_UC_ht+0xa1c7, %r12
nop
nop
nop
nop
nop
inc %r9
mov (%r12), %ebp
nop
nop
nop
add %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %rbx
push %rdi
// Store
lea addresses_A+0x12bc7, %rdi
nop
add $60045, %r12
movl $0x51525354, (%rdi)
nop
nop
nop
sub %r8, %r8
// Faulty Load
lea addresses_UC+0x39c7, %r10
nop
nop
nop
dec %rdi
movups (%r10), %xmm0
vpextrq $0, %xmm0, %r12
lea oracles, %rdi
and $0xff, %r12
shlq $12, %r12
mov (%rdi,%r12,1), %r12
pop %rdi
pop %rbx
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_UC', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A', 'congruent': 9}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal_ht', 'congruent': 8}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 8}}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_A_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_A_ht', 'congruent': 10}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 11}}
{'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
*/
| 40
| 2,999
| 0.66
|
b21f866d8223b6605ddac1befbceab3f4885aa9a
| 1,243
|
asm
|
Assembly
|
tests/pgm1.asm
|
stormalf/porth
|
629f63485bd7f2def489290a6b8ace2e37e83788
|
[
"MIT"
] | null | null | null |
tests/pgm1.asm
|
stormalf/porth
|
629f63485bd7f2def489290a6b8ace2e37e83788
|
[
"MIT"
] | null | null | null |
tests/pgm1.asm
|
stormalf/porth
|
629f63485bd7f2def489290a6b8ace2e37e83788
|
[
"MIT"
] | null | null | null |
%define SYS_EXIT 60
BITS 64
segment .text
global main
extern printf
print:
mov rdi, format ; set 1st parameter (format)
mov rsi, rax ; set 2nd parameter (current_number)
xor rax, rax ; because printf is varargs
; Stack is already aligned because we pushed three 8 byte registers
call printf WRT ..plt ; printf(format, current_number)
ret
main:
addr_0:
; push
push 34
addr_1:
; push
push 34
addr_2:
; add
pop rax
pop rbx
add rax, rbx
push rax
addr_3:
pop rax
call print
addr_4:
; push
push 34
addr_5:
; push
push 34
addr_6:
; add
pop rax
pop rbx
add rax, rbx
push rax
addr_7:
pop rax
call print
addr_8:
; push
push 500
addr_9:
; push
push 80
addr_10:
; sub
pop rbx
pop rax
sub rax, rbx
push rax
addr_11:
pop rax
call print
addr_12:
; push
push 344
addr_13:
; push
push 75
addr_14:
; add
pop rax
pop rbx
add rax, rbx
push rax
addr_15:
; push
push 37
addr_16:
; sub
pop rbx
pop rax
sub rax, rbx
push rax
addr_17:
pop rax
call print
mov rax, SYS_EXIT
mov rdi, 69
syscall
section .data
format db "%d", 10, 0
| 13.811111
| 81
| 0.596138
|
6c26275c78d7abc634fcc4c59ed3c122c6e6b4d8
| 1,689
|
asm
|
Assembly
|
test/hack_programs/fill_screen_on_key.asm
|
mbalestrini/hack_soc
|
157428ee6856a9e4cee5953b8b3c144b4f57f5ee
|
[
"Apache-2.0"
] | 1
|
2021-12-18T18:31:53.000Z
|
2021-12-18T18:31:53.000Z
|
test/hack_programs/fill_screen_on_key.asm
|
mbalestrini/hack_soc
|
157428ee6856a9e4cee5953b8b3c144b4f57f5ee
|
[
"Apache-2.0"
] | null | null | null |
test/hack_programs/fill_screen_on_key.asm
|
mbalestrini/hack_soc
|
157428ee6856a9e4cee5953b8b3c144b4f57f5ee
|
[
"Apache-2.0"
] | null | null | null |
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/04/Fill.asm
// Runs an infinite loop that listens to the keyboard input.
// When a key is pressed (any key), the program blackens the screen,
// i.e. writes "black" in every pixel;
// the screen should remain fully black as long as the key is pressed.
// When no key is pressed, the program clears the screen, i.e. writes
// "white" in every pixel;
// the screen should remain fully clear as long as no key is pressed.
@21845
D=A
@key_press_color
M=D
(CHECK_KEYBOARD)
@KBD
D=M
// IF KBD!=0 GOTO ANY_KEY_PRESSED
@ANY_KEY_PRESSED
D;JNE
// Screen should be white
@color
D=M
// IF previous color was already white (0), GOTO CHECK_KEYBOARD
@CHECK_KEYBOARD
D;JEQ
// else, set color to white and fill screen
@color
M=0
@BEGIN_FILL
0;JMP
(ANY_KEY_PRESSED)
// Screen should be black
@color
D=M
// IF previous color was not white (!=0), GOTO CHECK_KEYBOARD
@CHECK_KEYBOARD
D;JNE
// else, set color to @key_press_color and fill screen
@key_press_color
D=M
@color
M=D
@BEGIN_FILL
0;JMP
// Fill screen with @color
(BEGIN_FILL)
// screenIdx = SCREEN
@SCREEN
D=A
@screenIdx
M=D
// i=8192
@8192
D=A
@i
M=D
(FILL_LOOP)
// IF i<0 GOTO END_FILL
@END_FILL
D;JLT
// MEM[screenIdx] = color
@color
D=M
@screenIdx
A=M
M=D
// screenIdx+1
D=A+1
@screenIdx
M=D
// i=i-1
@i
MD=M-1
@FILL_LOOP
0;JMP
(END_FILL)
@CHECK_KEYBOARD
0;JMP
| 15.080357
| 72
| 0.626998
|
b95004223b5fba9aab282e1c4f50fef534cf8496
| 1,963
|
asm
|
Assembly
|
programs/oeis/066/A066616.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/066/A066616.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/066/A066616.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A066616: a(1) = 1; a(n) = n*a(n-1) if n does not divide a(n-1), otherwise a(n) = a(n-1).
; 1,2,6,24,120,120,840,840,7560,7560,83160,83160,1081080,1081080,1081080,17297280,294053760,294053760,5587021440,5587021440,5587021440,5587021440,128501493120,128501493120,3212537328000,3212537328000,3212537328000,3212537328000,93163582512000,93163582512000,2888071057872000,2888071057872000,2888071057872000,2888071057872000,2888071057872000,2888071057872000,106858629141264000,106858629141264000,106858629141264000,106858629141264000,4381203794791824000,4381203794791824000,188391763176048432000,188391763176048432000,188391763176048432000,188391763176048432000,8854412869274276304000,8854412869274276304000,433866230594439538896000,433866230594439538896000,433866230594439538896000,433866230594439538896000,22994910221505295561488000,22994910221505295561488000,22994910221505295561488000,22994910221505295561488000,22994910221505295561488000,22994910221505295561488000,1356699703068812438127792000,1356699703068812438127792000,82758681887197558725795312000,82758681887197558725795312000,82758681887197558725795312000,82758681887197558725795312000,82758681887197558725795312000,82758681887197558725795312000,5544831686442236434628285904000,5544831686442236434628285904000,5544831686442236434628285904000,5544831686442236434628285904000,393683049737398786858608299184000,393683049737398786858608299184000,28738862630830111440678405840432000,28738862630830111440678405840432000,28738862630830111440678405840432000,28738862630830111440678405840432000,28738862630830111440678405840432000,28738862630830111440678405840432000
add $0,1
mov $1,1
mov $3,$0
mov $4,$0
lpb $3
mov $5,$4
mov $6,0
lpb $5
sub $0,$1
add $6,1
mov $7,$0
cmp $0,1
mov $8,$2
cmp $8,0
add $2,$8
mod $7,$2
cmp $7,0
sub $5,$7
lpe
sub $6,$4
cmp $6,0
cmp $6,0
mov $7,$2
pow $7,$6
mul $1,$7
add $2,1
mov $7,$0
cmp $7,0
sub $3,$7
lpe
mov $0,$1
| 56.085714
| 1,521
| 0.835456
|
188c04b2622c603a0723a8fdc712092334483060
| 3,246
|
asm
|
Assembly
|
work/ff3_info_window.asm
|
ypyp-pprn-mnmn/ff3_hack
|
f6b8590de1bd47ff617e56e2813c25305846c002
|
[
"MIT"
] | 4
|
2018-03-29T15:33:26.000Z
|
2022-03-09T13:35:31.000Z
|
work/ff3_info_window.asm
|
take-the-bath/ff3_hack
|
f6b8590de1bd47ff617e56e2813c25305846c002
|
[
"MIT"
] | 45
|
2017-11-17T23:46:35.000Z
|
2021-09-27T11:35:47.000Z
|
work/ff3_info_window.asm
|
take-the-bath/ff3_hack
|
f6b8590de1bd47ff617e56e2813c25305846c002
|
[
"MIT"
] | null | null | null |
; ff3_info_window
;
;description:
; replaces code for information window (larger window on the bottom right)
;
;version:
; 0.01 (2006-10-24)
;
;======================================================================================================
ff3_info_window_begin:
INIT_PATCH $34,$9ba2,$9ce3
drawInfoWindow:
.iPlayer = $52
.pBaseParam = $57
.pBattleParam = $5b
.commandIds = $78cf
lda $7ceb
beq .continue_process
lda #0
sta $7ceb
rts
.continue_process:
jsr initTileArrayStorage
;INIT16 $720a,$7977
INIT16 TILE_ARRAY_BASE+$0a,$7977 ;'H' 'P'
lda <.iPlayer
pha
ldx #0
.for_each_player:
stx <.iPlayer
ldx #$12
jsr initString
;$7ae3 = #c7;
jsr getPlayerOffset ;a541
clc
adc #$0b
tay
ldx #6
.copy_name:
lda [.pBaseParam],y
sta stringCache,x
dey
dex
bne .copy_name
ldx #7+4
lda #3
jsr getStringFromValueAt ;ex
;lda #0
;sta <$24
jsr cachePlayerStatus ;9d1d
lda $7ce8
cmp #$ff
beq .show_maxhp
ldx <.iPlayer
lda .commandIds,x
cmp #$ff
beq .check_status
cmp #$c8
bcc .not_magic
.action_is_magic:
INIT16_x <$18, ($8990 - $c8 * 2)
ldx #$0c
bne .load_string
.not_magic:
.ifdef ENABLE_EXTRA_ABILITY
jsr getExtraAbilityNameId
.endif ;ENABLE_EXTRA_ABILITY
INIT16_x <$18, $8c40
ldx #$0d
bne .load_string
.check_status:
lda <$1b
ora <$1a
beq .show_maxhp
lda <$1b
and #$20
beq .status_bit_to_index
lda <$1b
and #$df
sta <$1b
ora <$1a
beq .show_maxhp
.status_bit_to_index:
ldy #0
.find_index:
asl <$1b
rol <$1a
bcs .got_index
iny
bcc .find_index
.got_index:
INIT16_x <$18,$822c
tya
ldx #$0d
;bne .load_string
.load_string:
jsr loadString
jmp .to_tiles
;$9c7f:
.show_maxhp:
lda $7ce8
cmp #$ff
beq .get_maxhp
lda $7be1
ldx <.iPlayer
jsr maskTargetBit
beq .get_maxhp
lda .commandIds,x
bne .action_is_magic
.get_maxhp:
ldx #$10
lda #5
jsr getStringFromValueAt
;$9cba:
;$7ae3 = #c7;
.to_tiles:
lda #$c7
sta stringCache+$0c
lda #$12
sta <$18
jsr strToTileArray
lda #$12
jsr offsetTilePtr
ldx <.iPlayer
inx
cpx #4
beq .finish
jmp .for_each_player
;$9cd1:
.finish:
pla
sta <.iPlayer
lda #$0b
sta <$18
lda #$1e
sta <$19
lda #$03
sta <$1a
jmp draw8LineWindow
;------------------------------------------------------------------------------------------------------
getStringFromValueAt:
;[in] x = dest end offset
;[in] a = offset to value
.pBattleParam = $5b
jsr setYtoOffsetOf
lda [.pBattleParam],y
sta <$18
iny
lda [.pBattleParam],y
sta <$19
txa
pha
jsr itoa_16 ;95e1
pla
tay
ldx #3
.copy:
lda <$1b,x
sta stringCache,y
dey
dex
bpl .copy
rts
infoWindow_free_begin:
infoWindow_free_end = $9ce3
;------------------------------------------------------------------------------------------------------
;$9ce3
;======================================================================================================
RESTORE_PC ff3_info_window_begin
| 18.443182
| 104
| 0.522489
|
d9b3ff79e3223977552b10bad555abc9d4dca67b
| 445
|
asm
|
Assembly
|
libsrc/target/zx/cpm/zx_colour.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/target/zx/cpm/zx_colour.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/target/zx/cpm/zx_colour.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; 09.2009 stefano
; void __FASTCALL__ zx_colour(uchar colour)
SECTION code_clib
PUBLIC zx_colour
PUBLIC _zx_colour
EXTERN p3_poke
.zx_colour
._zx_colour
ld a,l
push af
; ld c,$0C
; call 5
; cp $31 ; Not CP/M 3.1
; jr nz,not3
;
; pop af
; push af
; ld hl,$2171
; call p3_poke
;
;.not3
ld hl,16384+6144
ld de,768
loop:
pop af
push af
call p3_poke
inc hl
dec de
ld a,d
or e
jr nz,loop
pop af
ret
| 9.888889
| 43
| 0.631461
|
e240de67dd797d1874d3be9885953469b318f3a2
| 360
|
asm
|
Assembly
|
oeis/195/A195913.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/195/A195913.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/195/A195913.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A195913: The denominator in a fraction expansion of log(2)-Pi/8.
; Submitted by Simon Strandgaard
; 2,3,12,30,35,56,90,99,132,182,195,240,306,323,380,462,483,552,650,675,756,870,899,992,1122,1155,1260,1406,1443,1560,1722,1763,1892,2070,2115,2256,2450,2499,2652,2862,2915
mov $1,$0
div $1,3
add $1,$0
add $1,2
mov $0,$1
div $0,2
mul $0,$1
mul $0,2
sub $0,$1
| 25.714286
| 172
| 0.7
|
3e99ae39851b84a88ac8d8ef803601146c99e924
| 144
|
asm
|
Assembly
|
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Shadow.asm
|
prismotizm/gigaleak
|
d082854866186a05fec4e2fdf1def0199e7f3098
|
[
"MIT"
] | null | null | null |
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Shadow.asm
|
prismotizm/gigaleak
|
d082854866186a05fec4e2fdf1def0199e7f3098
|
[
"MIT"
] | null | null | null |
other.7z/SFC.7z/SFC/ソースデータ/MarioKart/Shadow.asm
|
prismotizm/gigaleak
|
d082854866186a05fec4e2fdf1def0199e7f3098
|
[
"MIT"
] | null | null | null |
Name: Shadow.asm
Type: file
Size: 12748
Last-Modified: '1992-07-01T15:00:00Z'
SHA-1: 04E298D6026E01085E5903DFFA56277A401AC8DC
Description: null
| 20.571429
| 47
| 0.8125
|
49b7068bb5cae2729c8b9478fd3dcc72ff2d8742
| 29
|
asm
|
Assembly
|
1e.asm
|
sekharkaredla/8085
|
bca7395498d013c0a337f696aad49ead34f8cbdd
|
[
"MIT"
] | 1
|
2019-07-31T04:41:42.000Z
|
2019-07-31T04:41:42.000Z
|
1e.asm
|
sekharkaredla/8085
|
bca7395498d013c0a337f696aad49ead34f8cbdd
|
[
"MIT"
] | null | null | null |
1e.asm
|
sekharkaredla/8085
|
bca7395498d013c0a337f696aad49ead34f8cbdd
|
[
"MIT"
] | 1
|
2022-01-11T07:50:34.000Z
|
2022-01-11T07:50:34.000Z
|
LDA 2070H
STA 2000H
LDA 2000H
| 9.666667
| 9
| 0.827586
|
0ac5947e762a74e20e9203e7d2ba8eaf020ce1a3
| 106,405
|
asm
|
Assembly
|
Palmtree.Math.Core.Implements/vs_build/x64_Release/memory.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
Palmtree.Math.Core.Implements/vs_build/x64_Release/memory.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
Palmtree.Math.Core.Implements/vs_build/x64_Release/memory.asm
|
rougemeilland/Palmtree.Math.Core.Implements
|
52f4f6c765d16c9b0baf1fd212c61a33daae138c
|
[
"MIT"
] | null | null | null |
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRT
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM number_zero:BYTE:040H
COMM number_one:BYTE:040H
COMM hLocalHeap:QWORD
_DATA ENDS
PUBLIC AllocateHeapArea
PUBLIC DeallocateHeapArea
PUBLIC AllocateBlock
PUBLIC DeallocateBlock
PUBLIC CheckBlockLight
PUBLIC AttatchNumber
PUBLIC AllocateNumber
PUBLIC DetatchNumber
PUBLIC DeallocateNumber
PUBLIC CommitNumber
PUBLIC CheckNumber
PUBLIC DuplicateNumber
PUBLIC Initialize_Memory
PUBLIC PMC_Dispose
EXTRN __imp_HeapCreate:PROC
EXTRN __imp_HeapDestroy:PROC
EXTRN __imp_HeapAlloc:PROC
EXTRN __imp_HeapFree:PROC
; COMDAT pdata
pdata SEGMENT
$pdata$AllocateHeapArea DD imagerel $LN5
DD imagerel $LN5+42
DD imagerel $unwind$AllocateHeapArea
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$DeallocateHeapArea DD imagerel $LN5
DD imagerel $LN5+38
DD imagerel $unwind$DeallocateHeapArea
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$AllocateBlock DD imagerel $LN8
DD imagerel $LN8+128
DD imagerel $unwind$AllocateBlock
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$DeallocateBlock DD imagerel $LN9
DD imagerel $LN9+23
DD imagerel $unwind$DeallocateBlock
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$0$DeallocateBlock DD imagerel $LN9+23
DD imagerel $LN9+69
DD imagerel $chain$0$DeallocateBlock
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$1$DeallocateBlock DD imagerel $LN9+69
DD imagerel $LN9+79
DD imagerel $chain$1$DeallocateBlock
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$AttatchNumber DD imagerel $LN5
DD imagerel $LN5+31
DD imagerel $unwind$AttatchNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$AllocateNumber DD imagerel $LN6
DD imagerel $LN6+110
DD imagerel $unwind$AllocateNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$DeallocateNumber DD imagerel $LN41
DD imagerel $LN41+89
DD imagerel $unwind$DeallocateNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$CommitNumber DD imagerel $LN39
DD imagerel $LN39+353
DD imagerel $unwind$CommitNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$DuplicateNumber DD imagerel $LN18
DD imagerel $LN18+194
DD imagerel $unwind$DuplicateNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$Initialize_Memory DD imagerel $LN157
DD imagerel $LN157+346
DD imagerel $unwind$Initialize_Memory
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$PMC_Dispose DD imagerel $LN52
DD imagerel $LN52+108
DD imagerel $unwind$PMC_Dispose
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_COPY_MEMORY_UNIT DD imagerel _COPY_MEMORY_UNIT
DD imagerel _COPY_MEMORY_UNIT+33
DD imagerel $unwind$_COPY_MEMORY_UNIT
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_ZERO_MEMORY_BYTE DD imagerel _ZERO_MEMORY_BYTE
DD imagerel _ZERO_MEMORY_BYTE+21
DD imagerel $unwind$_ZERO_MEMORY_BYTE
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_ZERO_MEMORY_16 DD imagerel _ZERO_MEMORY_16
DD imagerel _ZERO_MEMORY_16+22
DD imagerel $unwind$_ZERO_MEMORY_16
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_ZERO_MEMORY_32 DD imagerel _ZERO_MEMORY_32
DD imagerel _ZERO_MEMORY_32+21
DD imagerel $unwind$_ZERO_MEMORY_32
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_ZERO_MEMORY_64 DD imagerel _ZERO_MEMORY_64
DD imagerel _ZERO_MEMORY_64+22
DD imagerel $unwind$_ZERO_MEMORY_64
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_FILL_MEMORY_BYTE DD imagerel _FILL_MEMORY_BYTE
DD imagerel _FILL_MEMORY_BYTE+22
DD imagerel $unwind$_FILL_MEMORY_BYTE
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_FILL_MEMORY_16 DD imagerel _FILL_MEMORY_16
DD imagerel _FILL_MEMORY_16+23
DD imagerel $unwind$_FILL_MEMORY_16
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_FILL_MEMORY_32 DD imagerel _FILL_MEMORY_32
DD imagerel _FILL_MEMORY_32+21
DD imagerel $unwind$_FILL_MEMORY_32
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_FILL_MEMORY_64 DD imagerel _FILL_MEMORY_64
DD imagerel _FILL_MEMORY_64+23
DD imagerel $unwind$_FILL_MEMORY_64
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_FILL_MEMORY_UNIT DD imagerel _FILL_MEMORY_UNIT
DD imagerel _FILL_MEMORY_UNIT+23
DD imagerel $unwind$_FILL_MEMORY_UNIT
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$InitializeNumber DD imagerel InitializeNumber
DD imagerel InitializeNumber+184
DD imagerel $unwind$InitializeNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$CleanUpNumber DD imagerel CleanUpNumber
DD imagerel CleanUpNumber+35
DD imagerel $unwind$CleanUpNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$0$CleanUpNumber DD imagerel CleanUpNumber+35
DD imagerel CleanUpNumber+76
DD imagerel $chain$0$CleanUpNumber
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$1$CleanUpNumber DD imagerel CleanUpNumber+76
DD imagerel CleanUpNumber+90
DD imagerel $chain$1$CleanUpNumber
pdata ENDS
; COMDAT xdata
xdata SEGMENT
$chain$1$CleanUpNumber DD 021H
DD imagerel CleanUpNumber
DD imagerel CleanUpNumber+35
DD imagerel $unwind$CleanUpNumber
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$chain$0$CleanUpNumber DD 020521H
DD 067405H
DD imagerel CleanUpNumber
DD imagerel CleanUpNumber+35
DD imagerel $unwind$CleanUpNumber
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$CleanUpNumber DD 020601H
DD 030023206H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$InitializeNumber DD 081501H
DD 087415H
DD 076415H
DD 063415H
DD 0e0113215H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_FILL_MEMORY_UNIT DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_FILL_MEMORY_64 DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_FILL_MEMORY_32 DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_FILL_MEMORY_16 DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_FILL_MEMORY_BYTE DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_ZERO_MEMORY_64 DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_ZERO_MEMORY_32 DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_ZERO_MEMORY_16 DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_ZERO_MEMORY_BYTE DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_COPY_MEMORY_UNIT DD 040a01H
DD 02740aH
DD 016405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$PMC_Dispose DD 020601H
DD 030023206H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$Initialize_Memory DD 040a01H
DD 06340aH
DD 07006320aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$DuplicateNumber DD 085401H
DD 077454H
DD 06344fH
DD 08640bH
DD 0e007320bH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$CommitNumber DD 010401H
DD 04204H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$DeallocateNumber DD 020a01H
DD 03006320aH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$AllocateNumber DD 081401H
DD 086414H
DD 075414H
DD 063414H
DD 070103214H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$AttatchNumber DD 020601H
DD 030023206H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$chain$1$DeallocateBlock DD 021H
DD imagerel $LN9
DD imagerel $LN9+23
DD imagerel $unwind$DeallocateBlock
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$chain$0$DeallocateBlock DD 020521H
DD 047405H
DD imagerel $LN9
DD imagerel $LN9+23
DD imagerel $unwind$DeallocateBlock
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$DeallocateBlock DD 010401H
DD 04204H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$AllocateBlock DD 060f01H
DD 07640fH
DD 06340fH
DD 0700b320fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$DeallocateHeapArea DD 010401H
DD 04204H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$AllocateHeapArea DD 010401H
DD 04204H
xdata ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT GetTrailingZeroBitCount
_TEXT SEGMENT
p$ = 8
word_count$ = 16
GetTrailingZeroBitCount PROC ; COMDAT
; 463 : __UNIT_TYPE bit_count = 0;
xor r8d, r8d
; 464 : while (word_count > 0)
test rdx, rdx
je SHORT $LN3@GetTrailin
npad 8
$LL2@GetTrailin:
; 465 : {
; 466 : --word_count;
; 467 : if (*p != 0)
mov rax, QWORD PTR [rcx]
dec rdx
test rax, rax
jne SHORT $LN10@GetTrailin
; 469 : bit_count += __UNIT_TYPE_BIT_COUNT;
add r8, 64 ; 00000040H
; 470 : ++p;
add rcx, 8
test rdx, rdx
jne SHORT $LL2@GetTrailin
$LN3@GetTrailin:
; 471 : }
; 472 : // このルートには到達しないはず
; 473 : return (0);
xor eax, eax
; 474 : }
ret 0
$LN10@GetTrailin:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 724 : _BitScanForward64(&pos, x);
bsf rax, rax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 468 : return (bit_count + _TZCNT_ALT_UNIT(*p));
cdqe
add rax, r8
; 474 : }
ret 0
GetTrailingZeroBitCount ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT GetEffectiveBitLength
_TEXT SEGMENT
p$ = 8
word_count$ = 16
effective_word_count$ = 24
GetEffectiveBitLength PROC ; COMDAT
; 441 : if (p == NULL)
test rcx, rcx
je SHORT $LN3@GetEffecti
; 442 : {
; 443 : *effective_word_count = 0;
; 444 : return (0);
; 445 : }
; 446 : p += word_count;
lea rax, QWORD PTR [rcx+rdx*8]
; 447 : while (word_count != 0)
test rdx, rdx
je SHORT $LN3@GetEffecti
npad 2
$LL2@GetEffecti:
; 448 : {
; 449 : --p;
; 450 : if (*p != 0)
cmp QWORD PTR [rax-8], 0
lea rax, QWORD PTR [rax-8]
jne SHORT $LN11@GetEffecti
; 454 : }
; 455 : --word_count;
sub rdx, 1
jne SHORT $LL2@GetEffecti
$LN3@GetEffecti:
; 456 : }
; 457 : *effective_word_count = 0;
mov QWORD PTR [r8], 0
; 458 : return (0);
xor eax, eax
; 459 : }
ret 0
$LN11@GetEffecti:
; 451 : {
; 452 : *effective_word_count = word_count;
mov QWORD PTR [r8], rdx
; 453 : return (word_count * __UNIT_TYPE_BIT_COUNT - _LZCNT_ALT_UNIT(*p));
mov rcx, QWORD PTR [rax]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 630 : if (x == 0)
test rcx, rcx
jne SHORT $LN8@GetEffecti
; 631 : return (sizeof(x) * 8);
mov ecx, 64 ; 00000040H
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 453 : return (word_count * __UNIT_TYPE_BIT_COUNT - _LZCNT_ALT_UNIT(*p));
shl rdx, 6
movsxd rax, ecx
sub rdx, rax
mov rax, rdx
; 459 : }
ret 0
$LN8@GetEffecti:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 644 : _BitScanReverse64(&pos, x);
bsr rax, rcx
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 63 ; 0000003fH
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 453 : return (word_count * __UNIT_TYPE_BIT_COUNT - _LZCNT_ALT_UNIT(*p));
shl rdx, 6
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 654 : return (sizeof(x) * 8 - 1 - pos);
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 453 : return (word_count * __UNIT_TYPE_BIT_COUNT - _LZCNT_ALT_UNIT(*p));
movsxd rax, ecx
sub rdx, rax
mov rax, rdx
; 459 : }
ret 0
GetEffectiveBitLength ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT CleanUpNumber
_TEXT SEGMENT
p$ = 48
CleanUpNumber PROC ; COMDAT
; 393 : {
push rbx
sub rsp, 32 ; 00000020H
; 394 : if (p->BLOCK != NULL)
mov rax, QWORD PTR [rcx+56]
mov rbx, rcx
test rax, rax
je SHORT $LN2@CleanUpNum
; 395 : {
; 396 : DeallocateBlock(p->BLOCK, p->BLOCK_COUNT);
mov rcx, QWORD PTR [rcx+48]
; 207 : __UNIT_TYPE* p = buffer - 1;
lea r8, QWORD PTR [rax-8]
; 208 : if (*p != buffer_words)
cmp QWORD PTR [r8], rcx
jne SHORT $LN7@CleanUpNum
; 209 : {
; 210 : // もし、buffer の指す内容が壊れていることが明らかならば、二重解放の恐れがあるので解放処理はしない。
; 211 : }
; 212 : else
; 213 : {
; 214 : // 使用済みのバッファを既定のデータで塗りつぶす。
; 215 : _FILL_MEMORY_UNIT(p, DEFAULT_MEMORY_DATA, buffer_words + 2);
add rcx, 2
mov QWORD PTR [rsp+48], rdi
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 170 : __stosq(d, x, count);
mov rdi, r8
mov rax, -3689348814741910324 ; ccccccccccccccccH
rep stosq
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 217 : HeapFree(hLocalHeap, 0, p);
mov rcx, QWORD PTR hLocalHeap
xor edx, edx
call QWORD PTR __imp_HeapFree
mov rdi, QWORD PTR [rsp+48]
$LN7@CleanUpNum:
; 397 : p->BLOCK = NULL;
mov QWORD PTR [rbx+56], 0
$LN2@CleanUpNum:
; 398 : }
; 399 : }
add rsp, 32 ; 00000020H
pop rbx
ret 0
CleanUpNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT InitializeNumber
_TEXT SEGMENT
p$ = 48
bit_count$ = 56
light_check_code$ = 64
InitializeNumber PROC ; COMDAT
; 365 : {
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
mov QWORD PTR [rsp+24], rdi
push r14
sub rsp, 32 ; 00000020H
mov r14, r8
mov rsi, rdx
mov rbx, rcx
; 366 : if (bit_count > 0)
test rdx, rdx
je SHORT $LN2@Initialize
; 170 : __UNIT_TYPE* buffer = (__UNIT_TYPE*)HeapAlloc(hLocalHeap, HEAP_ZERO_MEMORY, bytes);
mov rcx, QWORD PTR hLocalHeap
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 194 : return ((u + v - 1) / v);
lea rdi, QWORD PTR [rdx+63]
shr rdi, 6
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 170 : __UNIT_TYPE* buffer = (__UNIT_TYPE*)HeapAlloc(hLocalHeap, HEAP_ZERO_MEMORY, bytes);
mov edx, 8
lea r8, QWORD PTR [rdi*8+16]
call QWORD PTR __imp_HeapAlloc
; 171 : if (buffer == NULL)
test rax, rax
je SHORT $LN80@Initialize
; 172 : return (NULL);
; 173 : buffer[0] = words1;
; 174 : *allocated_block_words = words1;
; 175 : #ifdef _DEBUG
; 176 : // 乱数もどきを生成する。
; 177 : #ifdef _M_IX86
; 178 : __UNIT_TYPE r = GetTickCount();
; 179 : #elif defined(_M_IX64)
; 180 : #ifdef _MSC_VER
; 181 : __UNIT_TYPE r = GetTickCount64();
; 182 : #elif defined(__GNUC__)
; 183 : _UINT32_T temp = GetTickCount();
; 184 : __UNIT_TYPE r = _FROMWORDTODWORD(temp, temp);
; 185 : #else
; 186 : #error unknown compiler
; 187 : #endif
; 188 : #else
; 189 : #error unknown platform
; 190 : #endif
; 191 : __UNIT_TYPE check_code = configuration_info.MEMORY_VERIFICATION_ENABLED ? CalculateCheckCode(&buffer[1], words1) : CHECK_CODE_INIT | r;
; 192 : #else
; 193 : __UNIT_TYPE check_code = 0;
; 194 : #endif
; 195 : buffer[words1 + 1] = check_code ^ (__UNIT_TYPE)&buffer[words1 + 1];
lea rcx, QWORD PTR [rdi+1]
mov QWORD PTR [rax], rdi
lea rcx, QWORD PTR [rax+rcx*8]
mov QWORD PTR [rcx], rcx
; 196 : if (code != NULL)
xor ecx, ecx
test r14, r14
je SHORT $LN8@Initialize
; 197 : *code = check_code;
mov QWORD PTR [r14], rcx
$LN8@Initialize:
; 198 : return (&buffer[1]);
add rax, 8
; 367 : {
; 368 : __UNIT_TYPE word_count;
; 369 : __UNIT_TYPE* block = AllocateBlock(bit_count, &word_count, light_check_code);
; 370 : if (block == NULL)
jne SHORT $LN3@Initialize
$LN80@Initialize:
; 371 : return (PMC_STATUS_NOT_ENOUGH_MEMORY);
mov eax, -5
jmp SHORT $LN1@Initialize
$LN2@Initialize:
; 372 : ClearNumberHeader(p);
; 373 : p->SIGNATURE1 = PMC_SIGNATURE;
; 374 : p->SIGNATURE2 = PMC_UINT_SIGNATURE;
; 375 : p->UNIT_BIT_COUNT = bit_count;
; 376 : p->BLOCK_COUNT = word_count;
; 377 : p->BLOCK = block;
; 378 : }
; 379 : else
; 380 : {
; 381 : // bit_count に 0 が与えられるのは、数値が 0 の場合。
; 382 : ClearNumberHeader(p);
; 383 : p->SIGNATURE1 = PMC_SIGNATURE;
; 384 : p->SIGNATURE2 = PMC_UINT_SIGNATURE;
; 385 : p->UNIT_BIT_COUNT = 0;
; 386 : p->BLOCK_COUNT = 0;
; 387 : p->BLOCK = NULL;
xor ecx, ecx
mov eax, ecx
mov edi, ecx
mov esi, ecx
$LN3@Initialize:
; 388 : }
; 389 : return (PMC_STATUS_OK);
mov QWORD PTR [rbx+8], rcx
mov QWORD PTR [rbx+24], rcx
mov QWORD PTR [rbx+32], rcx
mov QWORD PTR [rbx+40], rcx
mov DWORD PTR [rbx], 1231244656 ; 49634d70H
mov DWORD PTR [rbx+4], 1416522069 ; 546e6955H
mov QWORD PTR [rbx+16], rsi
mov QWORD PTR [rbx+48], rdi
mov QWORD PTR [rbx+56], rax
xor eax, eax
$LN1@Initialize:
; 390 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
mov rdi, QWORD PTR [rsp+64]
add rsp, 32 ; 00000020H
pop r14
ret 0
InitializeNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT FillNumberHeader
_TEXT SEGMENT
p$ = 8
FillNumberHeader PROC ; COMDAT
; 322 : #ifdef _M_IX64
; 323 : if (sizeof(*p) == sizeof(_UINT64_T) * 8)
; 324 : {
; 325 : _UINT64_T* __p = (_UINT64_T*)p;
; 326 : __p[0] = DEFAULT_MEMORY_DATA;
mov rax, -3689348814741910324 ; ccccccccccccccccH
mov QWORD PTR [rcx], rax
mov QWORD PTR [rcx+8], rax
mov QWORD PTR [rcx+16], rax
mov QWORD PTR [rcx+24], rax
mov QWORD PTR [rcx+32], rax
mov QWORD PTR [rcx+40], rax
mov QWORD PTR [rcx+48], rax
mov QWORD PTR [rcx+56], rax
; 327 : __p[1] = DEFAULT_MEMORY_DATA;
; 328 : __p[2] = DEFAULT_MEMORY_DATA;
; 329 : __p[3] = DEFAULT_MEMORY_DATA;
; 330 : __p[4] = DEFAULT_MEMORY_DATA;
; 331 : __p[5] = DEFAULT_MEMORY_DATA;
; 332 : __p[6] = DEFAULT_MEMORY_DATA;
; 333 : __p[7] = DEFAULT_MEMORY_DATA;
; 334 : }
; 335 : else if (sizeof(*p) % sizeof(_UINT64_T) == 0)
; 336 : _FILL_MEMORY_64((_UINT64_T*)p, DEFAULT_MEMORY_DATA, sizeof(*p) / sizeof(_UINT64_T));
; 337 : else
; 338 : {
; 339 : #endif
; 340 : if (sizeof(*p) == sizeof(_UINT32_T) * 9)
; 341 : {
; 342 : _UINT32_T* __p = (_UINT32_T*)p;
; 343 : __p[0] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 344 : __p[1] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 345 : __p[2] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 346 : __p[3] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 347 : __p[4] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 348 : __p[5] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 349 : __p[6] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 350 : __p[7] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 351 : __p[8] = (_UINT32_T)DEFAULT_MEMORY_DATA;
; 352 : }
; 353 : else if (sizeof(*p) % sizeof(_UINT32_T) == 0)
; 354 : _FILL_MEMORY_32((_UINT32_T*)p, (_UINT32_T)DEFAULT_MEMORY_DATA, sizeof(*p) / sizeof(_UINT32_T));
; 355 : else if (sizeof(*p) % sizeof(_UINT16_T) == 0)
; 356 : _FILL_MEMORY_16((_UINT16_T*)p, (_UINT16_T)DEFAULT_MEMORY_DATA, sizeof(*p) / sizeof(_UINT16_T));
; 357 : else
; 358 : _FILL_MEMORY_BYTE(p, (unsigned char)DEFAULT_MEMORY_DATA, sizeof(*p));
; 359 : #ifdef _M_IX64
; 360 : }
; 361 : #endif
; 362 : }
ret 0
FillNumberHeader ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT ClearNumberHeader
_TEXT SEGMENT
p$ = 8
ClearNumberHeader PROC ; COMDAT
; 278 : #ifdef _M_IX64
; 279 : if (sizeof(*p) == sizeof(_UINT64_T) * 8)
; 280 : {
; 281 : _UINT64_T* __p = (_UINT64_T*)p;
; 282 : __p[0] = 0;
xor eax, eax
mov QWORD PTR [rcx], rax
mov QWORD PTR [rcx+8], rax
mov QWORD PTR [rcx+16], rax
mov QWORD PTR [rcx+24], rax
mov QWORD PTR [rcx+32], rax
mov QWORD PTR [rcx+40], rax
mov QWORD PTR [rcx+48], rax
mov QWORD PTR [rcx+56], rax
; 283 : __p[1] = 0;
; 284 : __p[2] = 0;
; 285 : __p[3] = 0;
; 286 : __p[4] = 0;
; 287 : __p[5] = 0;
; 288 : __p[6] = 0;
; 289 : __p[7] = 0;
; 290 : }
; 291 : else if (sizeof(*p) % sizeof(_UINT64_T) == 0)
; 292 : _ZERO_MEMORY_64((_UINT64_T*)p, sizeof(*p) / sizeof(_UINT64_T));
; 293 : else
; 294 : {
; 295 : #endif
; 296 : if (sizeof(*p) == sizeof(_UINT32_T) * 9)
; 297 : {
; 298 : _UINT32_T* __p = (_UINT32_T*)p;
; 299 : __p[0] = 0;
; 300 : __p[1] = 0;
; 301 : __p[2] = 0;
; 302 : __p[3] = 0;
; 303 : __p[4] = 0;
; 304 : __p[5] = 0;
; 305 : __p[6] = 0;
; 306 : __p[7] = 0;
; 307 : __p[8] = 0;
; 308 : }
; 309 : else if (sizeof(*p) % sizeof(_UINT32_T) == 0)
; 310 : _ZERO_MEMORY_32((_UINT32_T*)p, sizeof(*p) / sizeof(_UINT32_T));
; 311 : else if (sizeof(*p) % sizeof(_UINT16_T) == 0)
; 312 : _ZERO_MEMORY_16((_UINT16_T*)p, sizeof(*p) / sizeof(_UINT16_T));
; 313 : else
; 314 : _ZERO_MEMORY_BYTE(p, sizeof(*p));
; 315 : #ifdef _M_IX64
; 316 : }
; 317 : #endif
; 318 : }
ret 0
ClearNumberHeader ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT CheckBlock
_TEXT SEGMENT
buffer$ = 8
CheckBlock PROC ; COMDAT
; 241 : #ifdef _DEBUG
; 242 : if (buffer == NULL)
; 243 : return (PMC_STATUS_OK);
; 244 : --buffer;
; 245 : __UNIT_TYPE words = buffer[0];
; 246 : __UNIT_TYPE code_desired = buffer[words + 1];
; 247 : __UNIT_TYPE code_actual = CalculateCheckCode(&buffer[1], words);
; 248 : if (code_actual == code_desired)
; 249 : return (PMC_STATUS_OK);
; 250 : else
; 251 : return (PMC_STATUS_BAD_BUFFER);
; 252 : #else
; 253 : return (PMC_STATUS_OK);
xor eax, eax
; 254 : #endif
; 255 : }
ret 0
CheckBlock ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT CommitBlock
_TEXT SEGMENT
buffer$ = 8
CommitBlock PROC ; COMDAT
; 225 : if (buffer != NULL)
test rcx, rcx
je SHORT $LN2@CommitBloc
; 226 : {
; 227 : --buffer;
; 228 : __UNIT_TYPE words = buffer[0];
; 229 : #ifdef _DEBUG
; 230 : __UNIT_TYPE code = CalculateCheckCode(&buffer[1], words);
; 231 : #else
; 232 : __UNIT_TYPE code = 0;
; 233 : #endif
; 234 : buffer[words + 1] = code;
mov rax, QWORD PTR [rcx-8]
mov QWORD PTR [rcx+rax*8], 0
$LN2@CommitBloc:
; 235 : }
; 236 : }
ret 0
CommitBlock ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT CalculateCheckCode
_TEXT SEGMENT
p$ = 8
words$ = 16
CalculateCheckCode PROC ; COMDAT
; 60 : __UNIT_TYPE code = CHECK_CODE_INIT;
; 61 :
; 62 : __UNIT_TYPE count = words >> 5;
mov r8, rdx
mov rax, -8897841259083430780 ; 8484848484848484H
shr r8, 5
; 63 : while (count != 0)
test r8, r8
je $LN3@CalculateC
npad 6
$LL2@CalculateC:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 65 : code = _ROTATE_L_UNIT(code, 3) ^ p[0];
xor rax, QWORD PTR [rcx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 66 : code = _ROTATE_L_UNIT(code, 3) ^ p[1];
xor rax, QWORD PTR [rcx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 67 : code = _ROTATE_L_UNIT(code, 3) ^ p[2];
xor rax, QWORD PTR [rcx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 68 : code = _ROTATE_L_UNIT(code, 3) ^ p[3];
xor rax, QWORD PTR [rcx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 69 : code = _ROTATE_L_UNIT(code, 3) ^ p[4];
xor rax, QWORD PTR [rcx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 70 : code = _ROTATE_L_UNIT(code, 3) ^ p[5];
xor rax, QWORD PTR [rcx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 71 : code = _ROTATE_L_UNIT(code, 3) ^ p[6];
xor rax, QWORD PTR [rcx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 72 : code = _ROTATE_L_UNIT(code, 3) ^ p[7];
xor rax, QWORD PTR [rcx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 73 : code = _ROTATE_L_UNIT(code, 3) ^ p[8];
xor rax, QWORD PTR [rcx+64]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 74 : code = _ROTATE_L_UNIT(code, 3) ^ p[9];
xor rax, QWORD PTR [rcx+72]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 75 : code = _ROTATE_L_UNIT(code, 3) ^ p[10];
xor rax, QWORD PTR [rcx+80]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 76 : code = _ROTATE_L_UNIT(code, 3) ^ p[11];
xor rax, QWORD PTR [rcx+88]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 77 : code = _ROTATE_L_UNIT(code, 3) ^ p[12];
xor rax, QWORD PTR [rcx+96]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 78 : code = _ROTATE_L_UNIT(code, 3) ^ p[13];
xor rax, QWORD PTR [rcx+104]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 79 : code = _ROTATE_L_UNIT(code, 3) ^ p[14];
xor rax, QWORD PTR [rcx+112]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 80 : code = _ROTATE_L_UNIT(code, 3) ^ p[15];
xor rax, QWORD PTR [rcx+120]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 81 : code = _ROTATE_L_UNIT(code, 3) ^ p[16];
xor rax, QWORD PTR [rcx+128]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 82 : code = _ROTATE_L_UNIT(code, 3) ^ p[17];
xor rax, QWORD PTR [rcx+136]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 83 : code = _ROTATE_L_UNIT(code, 3) ^ p[18];
xor rax, QWORD PTR [rcx+144]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 84 : code = _ROTATE_L_UNIT(code, 3) ^ p[19];
xor rax, QWORD PTR [rcx+152]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 85 : code = _ROTATE_L_UNIT(code, 3) ^ p[20];
xor rax, QWORD PTR [rcx+160]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 86 : code = _ROTATE_L_UNIT(code, 3) ^ p[21];
xor rax, QWORD PTR [rcx+168]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 87 : code = _ROTATE_L_UNIT(code, 3) ^ p[22];
xor rax, QWORD PTR [rcx+176]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 88 : code = _ROTATE_L_UNIT(code, 3) ^ p[23];
xor rax, QWORD PTR [rcx+184]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 89 : code = _ROTATE_L_UNIT(code, 3) ^ p[24];
xor rax, QWORD PTR [rcx+192]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 90 : code = _ROTATE_L_UNIT(code, 3) ^ p[25];
xor rax, QWORD PTR [rcx+200]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 91 : code = _ROTATE_L_UNIT(code, 3) ^ p[26];
xor rax, QWORD PTR [rcx+208]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 92 : code = _ROTATE_L_UNIT(code, 3) ^ p[27];
xor rax, QWORD PTR [rcx+216]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 93 : code = _ROTATE_L_UNIT(code, 3) ^ p[28];
xor rax, QWORD PTR [rcx+224]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 94 : code = _ROTATE_L_UNIT(code, 3) ^ p[29];
xor rax, QWORD PTR [rcx+232]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 95 : code = _ROTATE_L_UNIT(code, 3) ^ p[30];
xor rax, QWORD PTR [rcx+240]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 96 : code = _ROTATE_L_UNIT(code, 3) ^ p[31];
xor rax, QWORD PTR [rcx+248]
; 97 : p += 32;
add rcx, 256 ; 00000100H
; 98 : --count;
sub r8, 1
jne $LL2@CalculateC
$LN3@CalculateC:
; 99 : }
; 100 :
; 101 : if (words & 0x10)
test dl, 16
je $LN4@CalculateC
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 103 : code = _ROTATE_L_UNIT(code, 3) ^ p[0];
xor rax, QWORD PTR [rcx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 104 : code = _ROTATE_L_UNIT(code, 3) ^ p[1];
xor rax, QWORD PTR [rcx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 105 : code = _ROTATE_L_UNIT(code, 3) ^ p[2];
xor rax, QWORD PTR [rcx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 106 : code = _ROTATE_L_UNIT(code, 3) ^ p[3];
xor rax, QWORD PTR [rcx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 107 : code = _ROTATE_L_UNIT(code, 3) ^ p[4];
xor rax, QWORD PTR [rcx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 108 : code = _ROTATE_L_UNIT(code, 3) ^ p[5];
xor rax, QWORD PTR [rcx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 109 : code = _ROTATE_L_UNIT(code, 3) ^ p[6];
xor rax, QWORD PTR [rcx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 110 : code = _ROTATE_L_UNIT(code, 3) ^ p[7];
xor rax, QWORD PTR [rcx+56]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 111 : code = _ROTATE_L_UNIT(code, 3) ^ p[8];
xor rax, QWORD PTR [rcx+64]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 112 : code = _ROTATE_L_UNIT(code, 3) ^ p[9];
xor rax, QWORD PTR [rcx+72]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 113 : code = _ROTATE_L_UNIT(code, 3) ^ p[10];
xor rax, QWORD PTR [rcx+80]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 114 : code = _ROTATE_L_UNIT(code, 3) ^ p[11];
xor rax, QWORD PTR [rcx+88]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 115 : code = _ROTATE_L_UNIT(code, 3) ^ p[12];
xor rax, QWORD PTR [rcx+96]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 116 : code = _ROTATE_L_UNIT(code, 3) ^ p[13];
xor rax, QWORD PTR [rcx+104]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 117 : code = _ROTATE_L_UNIT(code, 3) ^ p[14];
xor rax, QWORD PTR [rcx+112]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 118 : code = _ROTATE_L_UNIT(code, 3) ^ p[15];
xor rax, QWORD PTR [rcx+120]
; 119 : p += 16;
sub rcx, -128 ; ffffffffffffff80H
$LN4@CalculateC:
; 120 : }
; 121 :
; 122 : if (words & 0x8)
test dl, 8
je SHORT $LN5@CalculateC
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 124 : code = _ROTATE_L_UNIT(code, 3) ^ p[0];
xor rax, QWORD PTR [rcx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 125 : code = _ROTATE_L_UNIT(code, 3) ^ p[1];
xor rax, QWORD PTR [rcx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 126 : code = _ROTATE_L_UNIT(code, 3) ^ p[2];
xor rax, QWORD PTR [rcx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 127 : code = _ROTATE_L_UNIT(code, 3) ^ p[3];
xor rax, QWORD PTR [rcx+24]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 128 : code = _ROTATE_L_UNIT(code, 3) ^ p[4];
xor rax, QWORD PTR [rcx+32]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 129 : code = _ROTATE_L_UNIT(code, 3) ^ p[5];
xor rax, QWORD PTR [rcx+40]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 130 : code = _ROTATE_L_UNIT(code, 3) ^ p[6];
xor rax, QWORD PTR [rcx+48]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 131 : code = _ROTATE_L_UNIT(code, 3) ^ p[7];
xor rax, QWORD PTR [rcx+56]
; 132 : p += 8;
add rcx, 64 ; 00000040H
$LN5@CalculateC:
; 133 : }
; 134 :
; 135 : if (words & 0x4)
test dl, 4
je SHORT $LN6@CalculateC
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 137 : code = _ROTATE_L_UNIT(code, 3) ^ p[0];
xor rax, QWORD PTR [rcx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 138 : code = _ROTATE_L_UNIT(code, 3) ^ p[1];
xor rax, QWORD PTR [rcx+8]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 139 : code = _ROTATE_L_UNIT(code, 3) ^ p[2];
xor rax, QWORD PTR [rcx+16]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 140 : code = _ROTATE_L_UNIT(code, 3) ^ p[3];
xor rax, QWORD PTR [rcx+24]
; 141 : p += 4;
add rcx, 32 ; 00000020H
$LN6@CalculateC:
; 142 : }
; 143 :
; 144 : if (words & 0x2)
test dl, 2
je SHORT $LN7@CalculateC
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 146 : code = _ROTATE_L_UNIT(code, 3) ^ p[0];
xor rax, QWORD PTR [rcx]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 147 : code = _ROTATE_L_UNIT(code, 3) ^ p[1];
xor rax, QWORD PTR [rcx+8]
; 148 : p += 2;
add rcx, 16
$LN7@CalculateC:
; 149 : }
; 150 :
; 151 : if (words & 0x1)
test dl, 1
je SHORT $LN140@CalculateC
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 485 : return (_rotl64(x, count));
rol rax, 3
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 152 : code = _ROTATE_L_UNIT(code, 3) ^ p[0];
xor rax, QWORD PTR [rcx]
$LN140@CalculateC:
; 153 :
; 154 : return (code);
; 155 : }
ret 0
CalculateCheckCode ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _TZCNT_ALT_UNIT
_TEXT SEGMENT
x$ = 8
_TZCNT_ALT_UNIT PROC ; COMDAT
; 710 : if (x == 0)
test rcx, rcx
jne SHORT $LN2@TZCNT_ALT_
; 711 : return (sizeof(x) * 8);
lea eax, QWORD PTR [rcx+64]
; 725 : #elif defined(__GNUC__)
; 726 : _UINT64_T pos;
; 727 : __asm__("bsfq %1, %0" : "=r"(pos) : "rm"(x));
; 728 : #else
; 729 : #error unknown compiler
; 730 : #endif
; 731 : #else
; 732 : #error unknown platform
; 733 : #endif
; 734 : return (pos);
; 735 : }
ret 0
$LN2@TZCNT_ALT_:
; 712 : #ifdef _M_IX86
; 713 : _UINT32_T pos;
; 714 : #ifdef _MSC_VER
; 715 : _BitScanForward(&pos, x);
; 716 : #elif defined(__GNUC__)
; 717 : __asm__("bsfl %1, %0" : "=r"(pos) : "rm"(x));
; 718 : #else
; 719 : #error unknown compiler
; 720 : #endif
; 721 : #elif defined(_M_X64)
; 722 : #ifdef _MSC_VER
; 723 : _UINT32_T pos;
; 724 : _BitScanForward64(&pos, x);
bsf rax, rcx
; 725 : #elif defined(__GNUC__)
; 726 : _UINT64_T pos;
; 727 : __asm__("bsfq %1, %0" : "=r"(pos) : "rm"(x));
; 728 : #else
; 729 : #error unknown compiler
; 730 : #endif
; 731 : #else
; 732 : #error unknown platform
; 733 : #endif
; 734 : return (pos);
; 735 : }
ret 0
_TZCNT_ALT_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _LZCNT_ALT_UNIT
_TEXT SEGMENT
x$ = 8
_LZCNT_ALT_UNIT PROC ; COMDAT
; 630 : if (x == 0)
test rcx, rcx
jne SHORT $LN2@LZCNT_ALT_
; 631 : return (sizeof(x) * 8);
mov eax, 64 ; 00000040H
; 655 : }
ret 0
$LN2@LZCNT_ALT_:
; 632 : #ifdef _M_IX86
; 633 : _UINT32_T pos;
; 634 : #ifdef _MSC_VER
; 635 : _BitScanReverse(&pos, x);
; 636 : #elif defined(__GNUC__)
; 637 : __asm__("bsrl %1, %0" : "=r"(pos) : "rm"(x));
; 638 : #else
; 639 : #error unknown compiler
; 640 : #endif
; 641 : #elif defined(_M_X64)
; 642 : #ifdef _MSC_VER
; 643 : _UINT32_T pos;
; 644 : _BitScanReverse64(&pos, x);
bsr rcx, rcx
; 645 : #elif defined(__GNUC__)
; 646 : _UINT64_T pos;
; 647 : __asm__("bsrq %1, %0" : "=r"(pos) : "rm"(x));
; 648 : #else
; 649 : #error unknown compiler
; 650 : #endif
; 651 : #else
; 652 : #error unknown platform
; 653 : #endif
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov eax, 63 ; 0000003fH
sub eax, ecx
; 655 : }
ret 0
_LZCNT_ALT_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ROTATE_L_UNIT
_TEXT SEGMENT
x$ = 8
count$ = 16
_ROTATE_L_UNIT PROC ; COMDAT
; 481 : {
mov rax, rcx
; 482 : #ifdef _M_IX86
; 483 : return (_rotl(x, count));
; 484 : #elif defined(_M_X64)
; 485 : return (_rotl64(x, count));
mov ecx, edx
rol rax, cl
; 486 : #else
; 487 : #error unknown platform
; 488 : #endif
; 489 : }
ret 0
_ROTATE_L_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _DIVIDE_CEILING_UNIT
_TEXT SEGMENT
u$ = 8
v$ = 16
_DIVIDE_CEILING_UNIT PROC ; COMDAT
; 194 : return ((u + v - 1) / v);
lea rax, QWORD PTR [rdx-1]
mov r8, rdx
add rax, rcx
xor edx, edx
div r8
; 195 : }
ret 0
_DIVIDE_CEILING_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FILL_MEMORY_UNIT
_TEXT SEGMENT
d$ = 8
x$ = 16
count$ = 24
_FILL_MEMORY_UNIT PROC ; COMDAT
; 166 : {
mov QWORD PTR [rsp+8], rdi
; 167 : #ifdef _M_IX86
; 168 : __stosd((unsigned long*)d, x, (unsigned long)count);
; 169 : #elif defined(_M_X64)
; 170 : __stosq(d, x, count);
mov rdi, rcx
mov rax, rdx
mov rcx, r8
rep stosq
; 171 : #else
; 172 : #error unknown platform
; 173 : #endif
; 174 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_FILL_MEMORY_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FILL_MEMORY_64
_TEXT SEGMENT
d$ = 8
x$ = 16
count$ = 24
_FILL_MEMORY_64 PROC ; COMDAT
; 160 : {
mov QWORD PTR [rsp+8], rdi
; 161 : __stosq(d, x, count);
mov rdi, rcx
mov rax, rdx
mov rcx, r8
rep stosq
; 162 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_FILL_MEMORY_64 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FILL_MEMORY_32
_TEXT SEGMENT
d$ = 8
x$ = 16
count$ = 24
_FILL_MEMORY_32 PROC ; COMDAT
; 154 : {
mov QWORD PTR [rsp+8], rdi
; 155 : __stosd((unsigned long*)d, x, count);
mov rdi, rcx
mov eax, edx
mov rcx, r8
rep stosd
; 156 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_FILL_MEMORY_32 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FILL_MEMORY_16
_TEXT SEGMENT
d$ = 8
x$ = 16
count$ = 24
_FILL_MEMORY_16 PROC ; COMDAT
; 149 : {
mov QWORD PTR [rsp+8], rdi
; 150 : __stosw(d, x, count);
mov rdi, rcx
movzx eax, dx
mov rcx, r8
rep stosw
; 151 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_FILL_MEMORY_16 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _FILL_MEMORY_BYTE
_TEXT SEGMENT
d$ = 8
x$ = 16
count$ = 24
_FILL_MEMORY_BYTE PROC ; COMDAT
; 144 : {
mov QWORD PTR [rsp+8], rdi
; 145 : __stosb(d, x, count);
mov rdi, rcx
movzx eax, dl
mov rcx, r8
rep stosb
; 146 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_FILL_MEMORY_BYTE ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ZERO_MEMORY_64
_TEXT SEGMENT
d$ = 8
count$ = 16
_ZERO_MEMORY_64 PROC ; COMDAT
; 110 : {
mov QWORD PTR [rsp+8], rdi
; 111 : __stosq(d, 0, count);
mov rdi, rcx
xor eax, eax
mov rcx, rdx
rep stosq
; 112 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_ZERO_MEMORY_64 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ZERO_MEMORY_32
_TEXT SEGMENT
d$ = 8
count$ = 16
_ZERO_MEMORY_32 PROC ; COMDAT
; 104 : {
mov QWORD PTR [rsp+8], rdi
; 105 : __stosd((unsigned long*)d, 0, count);
mov rdi, rcx
xor eax, eax
mov rcx, rdx
rep stosd
; 106 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_ZERO_MEMORY_32 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ZERO_MEMORY_16
_TEXT SEGMENT
d$ = 8
count$ = 16
_ZERO_MEMORY_16 PROC ; COMDAT
; 99 : {
mov QWORD PTR [rsp+8], rdi
; 100 : __stosw(d, 0, count);
mov rdi, rcx
xor eax, eax
mov rcx, rdx
rep stosw
; 101 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_ZERO_MEMORY_16 ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ZERO_MEMORY_BYTE
_TEXT SEGMENT
d$ = 8
count$ = 16
_ZERO_MEMORY_BYTE PROC ; COMDAT
; 94 : {
mov QWORD PTR [rsp+8], rdi
; 95 : __stosb(d, 0, count);
mov rdi, rcx
xor eax, eax
mov rcx, rdx
rep stosb
; 96 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_ZERO_MEMORY_BYTE ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _COPY_MEMORY_UNIT
_TEXT SEGMENT
d$ = 8
s$ = 16
count$ = 24
_COPY_MEMORY_UNIT PROC ; COMDAT
; 66 : {
mov QWORD PTR [rsp+8], rsi
mov QWORD PTR [rsp+16], rdi
; 67 : #ifdef _M_IX86
; 68 : __movsd((unsigned long *)d, (unsigned long *)s, (unsigned long)count);
; 69 : #elif defined(_M_X64)
; 70 : __movsq(d, s, count);
mov rdi, rcx
mov rsi, rdx
mov rcx, r8
rep movsq
; 71 : #else
; 72 : #error unknown platform
; 73 : #endif
; 74 : }
mov rsi, QWORD PTR [rsp+8]
mov rdi, QWORD PTR [rsp+16]
ret 0
_COPY_MEMORY_UNIT ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT PMC_Dispose
_TEXT SEGMENT
p$ = 48
PMC_Dispose PROC ; COMDAT
; 553 : {
$LN52:
push rbx
sub rsp, 32 ; 00000020H
; 511 : if (p->SIGNATURE1 != PMC_SIGNATURE || p->SIGNATURE2 != PMC_UINT_SIGNATURE)
cmp DWORD PTR [rcx], 1231244656 ; 49634d70H
; 553 : {
mov rbx, rcx
; 511 : if (p->SIGNATURE1 != PMC_SIGNATURE || p->SIGNATURE2 != PMC_UINT_SIGNATURE)
jne SHORT $LN14@PMC_Dispos
cmp DWORD PTR [rcx+4], 1416522069 ; 546e6955H
jne SHORT $LN14@PMC_Dispos
; 432 : if (p == NULL || p->IS_STATIC)
test BYTE PTR [rcx+40], 1
jne SHORT $LN14@PMC_Dispos
; 433 : return;
; 434 : CleanUpNumber(p);
call CleanUpNumber
; 326 : __p[0] = DEFAULT_MEMORY_DATA;
mov rax, -3689348814741910324 ; ccccccccccccccccH
; 436 : HeapFree(hLocalHeap, 0, p);
mov r8, rbx
; 326 : __p[0] = DEFAULT_MEMORY_DATA;
mov QWORD PTR [rbx], rax
; 436 : HeapFree(hLocalHeap, 0, p);
xor edx, edx
; 326 : __p[0] = DEFAULT_MEMORY_DATA;
mov QWORD PTR [rbx+8], rax
mov QWORD PTR [rbx+16], rax
mov QWORD PTR [rbx+24], rax
mov QWORD PTR [rbx+32], rax
mov QWORD PTR [rbx+40], rax
mov QWORD PTR [rbx+48], rax
mov QWORD PTR [rbx+56], rax
; 436 : HeapFree(hLocalHeap, 0, p);
mov rcx, QWORD PTR hLocalHeap
; 554 : NUMBER_HEADER* np = (NUMBER_HEADER*)p;
; 555 : PMC_STATUS_CODE result = CheckNumber(np);
; 556 : if (result != PMC_STATUS_OK)
; 557 : return;
; 558 : DeallocateNumber(np);
; 559 : return;
; 560 : }
add rsp, 32 ; 00000020H
pop rbx
; 436 : HeapFree(hLocalHeap, 0, p);
rex_jmp QWORD PTR __imp_HeapFree
$LN14@PMC_Dispos:
; 554 : NUMBER_HEADER* np = (NUMBER_HEADER*)p;
; 555 : PMC_STATUS_CODE result = CheckNumber(np);
; 556 : if (result != PMC_STATUS_OK)
; 557 : return;
; 558 : DeallocateNumber(np);
; 559 : return;
; 560 : }
add rsp, 32 ; 00000020H
pop rbx
ret 0
PMC_Dispose ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT Initialize_Memory
_TEXT SEGMENT
feature$ = 48
Initialize_Memory PROC ; COMDAT
; 563 : {
$LN157:
mov QWORD PTR [rsp+8], rbx
push rdi
sub rsp, 32 ; 00000020H
; 282 : __p[0] = 0;
xor edi, edi
; 383 : p->SIGNATURE1 = PMC_SIGNATURE;
mov DWORD PTR number_zero, 1231244656 ; 49634d70H
; 282 : __p[0] = 0;
mov QWORD PTR number_zero+40, rdi
; 564 : PMC_STATUS_CODE result = PMC_STATUS_OK;
; 565 :
; 566 : BOOL number_zero_ok = TRUE;
; 567 : BOOL number_one_ok = TRUE;
; 568 : if (result == PMC_STATUS_OK)
; 569 : {
; 570 : result = AttatchNumber(&number_zero, 0);
; 571 : if (result == PMC_STATUS_OK)
; 572 : {
; 573 : CommitNumber(&number_zero);
lea rcx, OFFSET FLAT:number_zero
; 406 : p->IS_STATIC = TRUE;
mov DWORD PTR number_zero+40, 1
; 282 : __p[0] = 0;
mov QWORD PTR number_zero+8, rdi
mov QWORD PTR number_zero+24, rdi
mov QWORD PTR number_zero+32, rdi
; 384 : p->SIGNATURE2 = PMC_UINT_SIGNATURE;
mov DWORD PTR number_zero+4, 1416522069 ; 546e6955H
; 385 : p->UNIT_BIT_COUNT = 0;
mov QWORD PTR number_zero+16, rdi
; 386 : p->BLOCK_COUNT = 0;
mov QWORD PTR number_zero+48, rdi
; 387 : p->BLOCK = NULL;
mov QWORD PTR number_zero+56, rdi
; 564 : PMC_STATUS_CODE result = PMC_STATUS_OK;
; 565 :
; 566 : BOOL number_zero_ok = TRUE;
; 567 : BOOL number_one_ok = TRUE;
; 568 : if (result == PMC_STATUS_OK)
; 569 : {
; 570 : result = AttatchNumber(&number_zero, 0);
; 571 : if (result == PMC_STATUS_OK)
; 572 : {
; 573 : CommitNumber(&number_zero);
call CommitNumber
; 170 : __UNIT_TYPE* buffer = (__UNIT_TYPE*)HeapAlloc(hLocalHeap, HEAP_ZERO_MEMORY, bytes);
mov rcx, QWORD PTR hLocalHeap
lea edx, QWORD PTR [rdi+8]
lea r8d, QWORD PTR [rdi+24]
call QWORD PTR __imp_HeapAlloc
; 171 : if (buffer == NULL)
test rax, rax
je SHORT $LN154@Initialize
; 172 : return (NULL);
; 173 : buffer[0] = words1;
; 174 : *allocated_block_words = words1;
; 175 : #ifdef _DEBUG
; 176 : // 乱数もどきを生成する。
; 177 : #ifdef _M_IX86
; 178 : __UNIT_TYPE r = GetTickCount();
; 179 : #elif defined(_M_IX64)
; 180 : #ifdef _MSC_VER
; 181 : __UNIT_TYPE r = GetTickCount64();
; 182 : #elif defined(__GNUC__)
; 183 : _UINT32_T temp = GetTickCount();
; 184 : __UNIT_TYPE r = _FROMWORDTODWORD(temp, temp);
; 185 : #else
; 186 : #error unknown compiler
; 187 : #endif
; 188 : #else
; 189 : #error unknown platform
; 190 : #endif
; 191 : __UNIT_TYPE check_code = configuration_info.MEMORY_VERIFICATION_ENABLED ? CalculateCheckCode(&buffer[1], words1) : CHECK_CODE_INIT | r;
; 192 : #else
; 193 : __UNIT_TYPE check_code = 0;
; 194 : #endif
; 195 : buffer[words1 + 1] = check_code ^ (__UNIT_TYPE)&buffer[words1 + 1];
lea rcx, QWORD PTR [rax+8]
mov QWORD PTR [rax], 1
add rax, 16
mov QWORD PTR [rcx+8], rax
; 370 : if (block == NULL)
test rcx, rcx
je SHORT $LN154@Initialize
; 282 : __p[0] = 0;
mov QWORD PTR number_one+40, rdi
; 404 : if (result != PMC_STATUS_OK)
mov ebx, edi
; 405 : return (result);
; 406 : p->IS_STATIC = TRUE;
mov DWORD PTR number_one+40, 1
; 282 : __p[0] = 0;
mov QWORD PTR number_one+8, rdi
mov QWORD PTR number_one+24, rdi
mov QWORD PTR number_one+32, rdi
; 373 : p->SIGNATURE1 = PMC_SIGNATURE;
mov DWORD PTR number_one, 1231244656 ; 49634d70H
; 374 : p->SIGNATURE2 = PMC_UINT_SIGNATURE;
mov DWORD PTR number_one+4, 1416522069 ; 546e6955H
; 375 : p->UNIT_BIT_COUNT = bit_count;
mov QWORD PTR number_one+16, 1
; 376 : p->BLOCK_COUNT = word_count;
mov QWORD PTR number_one+48, 1
; 377 : p->BLOCK = block;
mov QWORD PTR number_one+56, rcx
; 406 : p->IS_STATIC = TRUE;
jmp SHORT $LN64@Initialize
$LN154@Initialize:
; 371 : return (PMC_STATUS_NOT_ENOUGH_MEMORY);
mov rcx, QWORD PTR number_one+56
mov ebx, -5
$LN64@Initialize:
; 574 : number_zero_ok = TRUE;
; 575 : }
; 576 : }
; 577 :
; 578 : if (result == PMC_STATUS_OK)
; 579 : {
; 580 : result = AttatchNumber(&number_one, 1);
; 581 : if (result == PMC_STATUS_OK)
test ebx, ebx
jne SHORT $LN5@Initialize
; 582 : {
; 583 : number_one.BLOCK[0] = 1;
mov QWORD PTR [rcx], 1
; 584 : CommitNumber(&number_one);
lea rcx, OFFSET FLAT:number_one
call CommitNumber
; 585 : number_one_ok = TRUE;
; 586 : }
; 587 : }
; 588 :
; 589 : if (result != PMC_STATUS_OK)
; 590 : {
; 591 : if (number_zero_ok)
; 592 : DetatchNumber(&number_zero);
; 593 : if (number_one_ok)
; 594 : DetatchNumber(&number_one);
; 595 : }
; 596 :
; 597 : return (result);
mov eax, edi
; 598 : }
mov rbx, QWORD PTR [rsp+48]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN5@Initialize:
; 425 : if (p == NULL || !p->IS_STATIC)
test BYTE PTR number_zero+40, 1
je SHORT $LN120@Initialize
; 426 : return;
; 427 : CleanUpNumber(p);
lea rcx, OFFSET FLAT:number_zero
call CleanUpNumber
$LN120@Initialize:
; 425 : if (p == NULL || !p->IS_STATIC)
test BYTE PTR number_one+40, 1
je SHORT $LN155@Initialize
; 426 : return;
; 427 : CleanUpNumber(p);
lea rcx, OFFSET FLAT:number_one
call CleanUpNumber
$LN155@Initialize:
; 598 : }
mov eax, ebx
mov rbx, QWORD PTR [rsp+48]
add rsp, 32 ; 00000020H
pop rdi
ret 0
Initialize_Memory ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT DuplicateNumber
_TEXT SEGMENT
x$ = 48
op$ = 56
DuplicateNumber PROC ; COMDAT
; 529 : {
$LN18:
mov QWORD PTR [rsp+24], rsi
push r14
sub rsp, 32 ; 00000020H
; 530 : if (x->IS_STATIC)
mov eax, DWORD PTR [rcx+40]
mov r14, rdx
mov rsi, rcx
test al, 1
je SHORT $LN2@DuplicateN
; 531 : {
; 532 : *op = x;
mov QWORD PTR [rdx], rcx
; 533 : return (PMC_STATUS_OK);
xor eax, eax
; 549 : }
mov rsi, QWORD PTR [rsp+64]
add rsp, 32 ; 00000020H
pop r14
ret 0
$LN2@DuplicateN:
; 534 : }
; 535 : if (x->IS_ZERO)
test al, 2
je SHORT $LN3@DuplicateN
; 536 : {
; 537 : *op = &number_zero;
lea rax, OFFSET FLAT:number_zero
mov QWORD PTR [rdx], rax
; 538 : return (PMC_STATUS_OK);
xor eax, eax
; 549 : }
mov rsi, QWORD PTR [rsp+64]
add rsp, 32 ; 00000020H
pop r14
ret 0
$LN3@DuplicateN:
; 412 : NUMBER_HEADER* p = (NUMBER_HEADER*)HeapAlloc(hLocalHeap, HEAP_ZERO_MEMORY, sizeof(NUMBER_HEADER));
mov edx, 8
mov QWORD PTR [rsp+48], rbx
mov QWORD PTR [rsp+56], rdi
; 539 : }
; 540 : __UNIT_TYPE x_bit_count = x->UNIT_BIT_COUNT;
mov rdi, QWORD PTR [rcx+16]
; 412 : NUMBER_HEADER* p = (NUMBER_HEADER*)HeapAlloc(hLocalHeap, HEAP_ZERO_MEMORY, sizeof(NUMBER_HEADER));
mov rcx, QWORD PTR hLocalHeap
lea r8d, QWORD PTR [rdx+56]
call QWORD PTR __imp_HeapAlloc
mov rbx, rax
; 413 : if (p == NULL)
test rax, rax
jne SHORT $LN7@DuplicateN
; 414 : return (PMC_STATUS_NOT_ENOUGH_MEMORY);
lea eax, QWORD PTR [rbx-5]
jmp SHORT $LN16@DuplicateN
$LN7@DuplicateN:
; 415 : PMC_STATUS_CODE result = InitializeNumber(p, bit_count, light_check_code);
xor r8d, r8d
mov rdx, rdi
mov rcx, rbx
call InitializeNumber
; 416 : if (result != PMC_STATUS_OK)
test eax, eax
jne SHORT $LN16@DuplicateN
; 417 : return (result);
; 418 : p->IS_STATIC = FALSE;
and DWORD PTR [rbx+40], -2 ; fffffffeH
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 194 : return ((u + v - 1) / v);
lea rcx, QWORD PTR [rdi+63]
; 70 : __movsq(d, s, count);
mov rdi, QWORD PTR [rbx+56]
mov rsi, QWORD PTR [rsi+56]
; 194 : return ((u + v - 1) / v);
shr rcx, 6
; 70 : __movsq(d, s, count);
rep movsq
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 546 : CommitNumber(o);
mov rcx, rbx
call CommitNumber
; 547 : *op = o;
; 548 : return (PMC_STATUS_OK);
xor eax, eax
mov QWORD PTR [r14], rbx
$LN16@DuplicateN:
; 549 : }
mov rbx, QWORD PTR [rsp+48]
mov rdi, QWORD PTR [rsp+56]
mov rsi, QWORD PTR [rsp+64]
add rsp, 32 ; 00000020H
pop r14
ret 0
DuplicateNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT CheckNumber
_TEXT SEGMENT
p$ = 8
CheckNumber PROC ; COMDAT
; 511 : if (p->SIGNATURE1 != PMC_SIGNATURE || p->SIGNATURE2 != PMC_UINT_SIGNATURE)
cmp DWORD PTR [rcx], 1231244656 ; 49634d70H
jne SHORT $LN3@CheckNumbe
cmp DWORD PTR [rcx+4], 1416522069 ; 546e6955H
jne SHORT $LN3@CheckNumbe
; 513 : if (!p->IS_ZERO)
; 514 : {
; 515 : PMC_STATUS_CODE result;
; 516 : if ((result = CheckBlock(p->BLOCK)) != PMC_STATUS_OK)
; 517 : return (result);
; 518 : #ifdef _DEBUG
; 519 : __UNIT_TYPE desired_hash_code = CalculateCheckCode(p->BLOCK, p->UNIT_WORD_COUNT);
; 520 : if (desired_hash_code != p->HASH_CODE)
; 521 : return (PMC_STATUS_BAD_BUFFER);
; 522 : #endif
; 523 : }
; 524 : return (PMC_STATUS_OK);
xor eax, eax
; 525 : }
ret 0
$LN3@CheckNumbe:
; 512 : return (PMC_STATUS_BAD_BUFFER);
mov eax, -257 ; fffffffffffffeffH
; 525 : }
ret 0
CheckNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT CommitNumber
_TEXT SEGMENT
p$ = 48
CommitNumber PROC ; COMDAT
; 477 : {
$LN39:
sub rsp, 40 ; 00000028H
mov r10, rcx
; 225 : if (buffer != NULL)
xor r11d, r11d
; 478 : CommitBlock(p->BLOCK);
mov rcx, QWORD PTR [rcx+56]
; 225 : if (buffer != NULL)
test rcx, rcx
je SHORT $LN8@CommitNumb
; 226 : {
; 227 : --buffer;
; 228 : __UNIT_TYPE words = buffer[0];
; 229 : #ifdef _DEBUG
; 230 : __UNIT_TYPE code = CalculateCheckCode(&buffer[1], words);
; 231 : #else
; 232 : __UNIT_TYPE code = 0;
; 233 : #endif
; 234 : buffer[words + 1] = code;
mov rax, QWORD PTR [rcx-8]
mov QWORD PTR [rcx+rax*8], r11
mov rcx, QWORD PTR [r10+56]
$LN8@CommitNumb:
; 479 : p->UNIT_BIT_COUNT = GetEffectiveBitLength(p->BLOCK, p->BLOCK_COUNT, &p->UNIT_WORD_COUNT);
mov r9, QWORD PTR [r10+48]
; 441 : if (p == NULL)
test rcx, rcx
je SHORT $LN12@CommitNumb
; 442 : {
; 443 : *effective_word_count = 0;
; 444 : return (0);
; 445 : }
; 446 : p += word_count;
lea rax, QWORD PTR [rcx+r9*8]
; 447 : while (word_count != 0)
test r9, r9
je SHORT $LN12@CommitNumb
$LL11@CommitNumb:
; 448 : {
; 449 : --p;
; 450 : if (*p != 0)
cmp QWORD PTR [rax-8], r11
lea rax, QWORD PTR [rax-8]
jne SHORT $LN29@CommitNumb
; 454 : }
; 455 : --word_count;
sub r9, 1
jne SHORT $LL11@CommitNumb
$LN12@CommitNumb:
; 479 : p->UNIT_BIT_COUNT = GetEffectiveBitLength(p->BLOCK, p->BLOCK_COUNT, &p->UNIT_WORD_COUNT);
mov r9, r11
mov QWORD PTR [r10+8], r11
$LN10@CommitNumb:
mov QWORD PTR [r10+16], r9
; 480 : if (p->UNIT_BIT_COUNT <= 0)
test r9, r9
jne SHORT $LN2@CommitNumb
; 481 : {
; 482 : p->HASH_CODE = 0;
; 483 : p->IS_ZERO = TRUE;
mov eax, DWORD PTR [r10+40]
and eax, -21 ; ffffffebH
mov QWORD PTR [r10+24], r11
; 484 : p->IS_ONE = FALSE;
; 485 : p->IS_EVEN = TRUE;
; 486 : p->TRAILING_ZERO_BITS_COUNT = 0;
; 487 : p->IS_POWER_OF_TWO = FALSE;
or eax, 10
mov QWORD PTR [r10+32], r11
; 506 : }
; 507 : }
mov DWORD PTR [r10+40], eax
add rsp, 40 ; 00000028H
ret 0
$LN29@CommitNumb:
; 452 : *effective_word_count = word_count;
mov QWORD PTR [r10+8], r9
; 453 : return (word_count * __UNIT_TYPE_BIT_COUNT - _LZCNT_ALT_UNIT(*p));
mov rcx, QWORD PTR [rax]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 630 : if (x == 0)
test rcx, rcx
jne SHORT $LN17@CommitNumb
; 631 : return (sizeof(x) * 8);
mov ecx, 64 ; 00000040H
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 453 : return (word_count * __UNIT_TYPE_BIT_COUNT - _LZCNT_ALT_UNIT(*p));
shl r9, 6
movsxd rax, ecx
sub r9, rax
jmp SHORT $LN10@CommitNumb
$LN17@CommitNumb:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 644 : _BitScanReverse64(&pos, x);
bsr rax, rcx
; 654 : return (sizeof(x) * 8 - 1 - pos);
mov ecx, 63 ; 0000003fH
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 453 : return (word_count * __UNIT_TYPE_BIT_COUNT - _LZCNT_ALT_UNIT(*p));
shl r9, 6
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 654 : return (sizeof(x) * 8 - 1 - pos);
sub ecx, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 453 : return (word_count * __UNIT_TYPE_BIT_COUNT - _LZCNT_ALT_UNIT(*p));
movsxd rax, ecx
sub r9, rax
jmp SHORT $LN10@CommitNumb
$LN2@CommitNumb:
; 488 : }
; 489 : else if (p->UNIT_BIT_COUNT == 1)
mov rdx, QWORD PTR [r10+8]
mov rcx, QWORD PTR [r10+56]
call CalculateCheckCode
mov QWORD PTR [r10+24], rax
mov edx, DWORD PTR [r10+40]
and edx, -3 ; fffffffdH
mov DWORD PTR [r10+40], edx
mov rcx, QWORD PTR [r10+56]
cmp r9, 1
jne SHORT $LN4@CommitNumb
; 490 : {
; 491 : p->HASH_CODE = CalculateCheckCode(p->BLOCK, p->UNIT_WORD_COUNT);
; 492 : p->IS_ZERO = FALSE;
; 493 : p->IS_ONE = p->BLOCK[0] == 1; // 無条件でTRUEでも大丈夫だが念のため。
mov rax, QWORD PTR [rcx]
mov ecx, 4
; 494 : p->IS_EVEN = FALSE;
; 495 : p->TRAILING_ZERO_BITS_COUNT = 0;
mov QWORD PTR [r10+32], r11
cmp rax, r9
cmove r11d, ecx
and edx, -5 ; fffffffbH
; 496 : p->IS_POWER_OF_TWO = TRUE;
or r11d, edx
and r11d, -9 ; fffffff7H
or r11d, 16
; 506 : }
; 507 : }
mov DWORD PTR [r10+40], r11d
add rsp, 40 ; 00000028H
ret 0
$LN4@CommitNumb:
; 497 : }
; 498 : else
; 499 : {
; 500 : p->HASH_CODE = CalculateCheckCode(p->BLOCK, p->UNIT_WORD_COUNT);
; 501 : p->IS_ZERO = FALSE;
; 502 : p->IS_ONE = FALSE;
and edx, -5 ; fffffffbH
mov DWORD PTR [r10+40], edx
; 503 : p->IS_EVEN = !(p->BLOCK[0] & 1);
mov eax, DWORD PTR [rcx]
shl eax, 3
not eax
xor eax, edx
and eax, 8
xor eax, edx
; 463 : __UNIT_TYPE bit_count = 0;
mov rdx, r11
; 503 : p->IS_EVEN = !(p->BLOCK[0] & 1);
mov DWORD PTR [r10+40], eax
; 504 : p->TRAILING_ZERO_BITS_COUNT = GetTrailingZeroBitCount(p->BLOCK, p->UNIT_WORD_COUNT);
mov rax, QWORD PTR [r10+8]
; 464 : while (word_count > 0)
test rax, rax
je SHORT $LN21@CommitNumb
$LL20@CommitNumb:
; 465 : {
; 466 : --word_count;
; 467 : if (*p != 0)
mov r8, QWORD PTR [rcx]
dec rax
test r8, r8
jne SHORT $LN30@CommitNumb
; 469 : bit_count += __UNIT_TYPE_BIT_COUNT;
add rdx, 64 ; 00000040H
; 470 : ++p;
add rcx, 8
test rax, rax
jne SHORT $LL20@CommitNumb
$LN21@CommitNumb:
; 471 : }
; 472 : // このルートには到達しないはず
; 473 : return (0);
mov rax, r11
$LN19@CommitNumb:
; 504 : p->TRAILING_ZERO_BITS_COUNT = GetTrailingZeroBitCount(p->BLOCK, p->UNIT_WORD_COUNT);
mov QWORD PTR [r10+32], rax
; 505 : p->IS_POWER_OF_TWO = p->TRAILING_ZERO_BITS_COUNT + 1 == p->UNIT_BIT_COUNT;
mov ecx, 16
inc rax
cmp rax, r9
mov eax, DWORD PTR [r10+40]
cmove r11d, ecx
and eax, -17 ; ffffffefH
or r11d, eax
; 506 : }
; 507 : }
mov DWORD PTR [r10+40], r11d
add rsp, 40 ; 00000028H
ret 0
$LN30@CommitNumb:
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 724 : _BitScanForward64(&pos, x);
bsf rax, r8
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 468 : return (bit_count + _TZCNT_ALT_UNIT(*p));
cdqe
add rax, rdx
jmp SHORT $LN19@CommitNumb
CommitNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT DeallocateNumber
_TEXT SEGMENT
p$ = 48
DeallocateNumber PROC ; COMDAT
; 431 : {
$LN41:
; 432 : if (p == NULL || p->IS_STATIC)
test rcx, rcx
je SHORT $LN39@Deallocate
push rbx
sub rsp, 32 ; 00000020H
test BYTE PTR [rcx+40], 1
mov rbx, rcx
jne SHORT $LN3@Deallocate
; 433 : return;
; 434 : CleanUpNumber(p);
call CleanUpNumber
; 326 : __p[0] = DEFAULT_MEMORY_DATA;
mov rax, -3689348814741910324 ; ccccccccccccccccH
; 435 : FillNumberHeader(p);
; 436 : HeapFree(hLocalHeap, 0, p);
mov r8, rbx
; 326 : __p[0] = DEFAULT_MEMORY_DATA;
mov QWORD PTR [rbx], rax
; 435 : FillNumberHeader(p);
; 436 : HeapFree(hLocalHeap, 0, p);
xor edx, edx
; 326 : __p[0] = DEFAULT_MEMORY_DATA;
mov QWORD PTR [rbx+8], rax
mov QWORD PTR [rbx+16], rax
mov QWORD PTR [rbx+24], rax
mov QWORD PTR [rbx+32], rax
mov QWORD PTR [rbx+40], rax
mov QWORD PTR [rbx+48], rax
mov QWORD PTR [rbx+56], rax
; 435 : FillNumberHeader(p);
; 436 : HeapFree(hLocalHeap, 0, p);
mov rcx, QWORD PTR hLocalHeap
call QWORD PTR __imp_HeapFree
$LN3@Deallocate:
; 437 : }
add rsp, 32 ; 00000020H
pop rbx
$LN39@Deallocate:
ret 0
DeallocateNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT DetatchNumber
_TEXT SEGMENT
p$ = 8
DetatchNumber PROC ; COMDAT
; 425 : if (p == NULL || !p->IS_STATIC)
test rcx, rcx
je SHORT $LN3@DetatchNum
test BYTE PTR [rcx+40], 1
jne CleanUpNumber
$LN3@DetatchNum:
; 426 : return;
; 427 : CleanUpNumber(p);
; 428 : }
ret 0
DetatchNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT AllocateNumber
_TEXT SEGMENT
pp$ = 48
bit_count$ = 56
light_check_code$ = 64
AllocateNumber PROC ; COMDAT
; 411 : {
$LN6:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rbp
mov QWORD PTR [rsp+24], rsi
push rdi
sub rsp, 32 ; 00000020H
mov rbp, rdx
mov rsi, r8
; 412 : NUMBER_HEADER* p = (NUMBER_HEADER*)HeapAlloc(hLocalHeap, HEAP_ZERO_MEMORY, sizeof(NUMBER_HEADER));
mov edx, 8
mov rdi, rcx
mov rcx, QWORD PTR hLocalHeap
lea r8d, QWORD PTR [rdx+56]
call QWORD PTR __imp_HeapAlloc
mov rbx, rax
; 413 : if (p == NULL)
test rax, rax
jne SHORT $LN2@AllocateNu
; 414 : return (PMC_STATUS_NOT_ENOUGH_MEMORY);
lea eax, QWORD PTR [rbx-5]
jmp SHORT $LN1@AllocateNu
$LN2@AllocateNu:
; 415 : PMC_STATUS_CODE result = InitializeNumber(p, bit_count, light_check_code);
mov r8, rsi
mov rdx, rbp
mov rcx, rbx
call InitializeNumber
; 416 : if (result != PMC_STATUS_OK)
test eax, eax
jne SHORT $LN1@AllocateNu
; 417 : return (result);
; 418 : p->IS_STATIC = FALSE;
and DWORD PTR [rbx+40], -2 ; fffffffeH
; 419 : *pp = p;
mov QWORD PTR [rdi], rbx
$LN1@AllocateNu:
; 420 : return (PMC_STATUS_OK);
; 421 : }
mov rbx, QWORD PTR [rsp+48]
mov rbp, QWORD PTR [rsp+56]
mov rsi, QWORD PTR [rsp+64]
add rsp, 32 ; 00000020H
pop rdi
ret 0
AllocateNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT AttatchNumber
_TEXT SEGMENT
p$ = 48
bit_count$ = 56
AttatchNumber PROC ; COMDAT
; 402 : {
$LN5:
push rbx
sub rsp, 32 ; 00000020H
; 403 : PMC_STATUS_CODE result = InitializeNumber(p, bit_count, NULL);
xor r8d, r8d
mov rbx, rcx
call InitializeNumber
; 404 : if (result != PMC_STATUS_OK)
test eax, eax
jne SHORT $LN1@AttatchNum
; 405 : return (result);
; 406 : p->IS_STATIC = TRUE;
or DWORD PTR [rbx+40], 1
$LN1@AttatchNum:
; 407 : return (PMC_STATUS_OK);
; 408 : }
add rsp, 32 ; 00000020H
pop rbx
ret 0
AttatchNumber ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT CheckBlockLight
_TEXT SEGMENT
buffer$ = 8
code$ = 16
CheckBlockLight PROC ; COMDAT
; 260 : #ifdef _DEBUG
; 261 : if (buffer == NULL)
; 262 : return (PMC_STATUS_OK);
; 263 : --buffer;
; 264 : __UNIT_TYPE words = buffer[0];
; 265 : __UNIT_TYPE code_desired = buffer[words + 1] ^ (__UNIT_TYPE)&buffer[words + 1];
; 266 : __UNIT_TYPE code_actual = code;
; 267 : if (code_actual == code_desired)
; 268 : return (PMC_STATUS_OK);
; 269 : else
; 270 : return (PMC_STATUS_BAD_BUFFER);
; 271 : #else
; 272 : return (PMC_STATUS_OK);
xor eax, eax
; 273 : #endif
; 274 : }
ret 0
CheckBlockLight ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT DeallocateBlock
_TEXT SEGMENT
buffer$ = 48
buffer_words$ = 56
DeallocateBlock PROC ; COMDAT
; 204 : {
$LN9:
sub rsp, 40 ; 00000028H
; 205 : if (buffer != NULL)
test rcx, rcx
je SHORT $LN4@Deallocate
; 206 : {
; 207 : __UNIT_TYPE* p = buffer - 1;
; 208 : if (*p != buffer_words)
cmp QWORD PTR [rcx-8], rdx
lea r8, QWORD PTR [rcx-8]
jne SHORT $LN4@Deallocate
; 209 : {
; 210 : // もし、buffer の指す内容が壊れていることが明らかならば、二重解放の恐れがあるので解放処理はしない。
; 211 : }
; 212 : else
; 213 : {
; 214 : // 使用済みのバッファを既定のデータで塗りつぶす。
; 215 : _FILL_MEMORY_UNIT(p, DEFAULT_MEMORY_DATA, buffer_words + 2);
lea rcx, QWORD PTR [rdx+2]
mov QWORD PTR [rsp+32], rdi
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 170 : __stosq(d, x, count);
mov rdi, r8
mov rax, -3689348814741910324 ; ccccccccccccccccH
rep stosq
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 217 : HeapFree(hLocalHeap, 0, p);
mov rcx, QWORD PTR hLocalHeap
xor edx, edx
mov rdi, QWORD PTR [rsp+32]
; 218 : }
; 219 : }
; 220 : }
add rsp, 40 ; 00000028H
; 217 : HeapFree(hLocalHeap, 0, p);
rex_jmp QWORD PTR __imp_HeapFree
mov rdi, QWORD PTR [rsp+32]
$LN4@Deallocate:
; 218 : }
; 219 : }
; 220 : }
add rsp, 40 ; 00000028H
ret 0
DeallocateBlock ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT AllocateBlock
_TEXT SEGMENT
bits$ = 48
allocated_block_words$ = 56
code$ = 64
AllocateBlock PROC ; COMDAT
; 162 : {
$LN8:
mov QWORD PTR [rsp+8], rbx
mov QWORD PTR [rsp+16], rsi
push rdi
sub rsp, 32 ; 00000020H
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 194 : return ((u + v - 1) / v);
lea rbx, QWORD PTR [rcx+63]
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 162 : {
mov rdi, r8
; 170 : __UNIT_TYPE* buffer = (__UNIT_TYPE*)HeapAlloc(hLocalHeap, HEAP_ZERO_MEMORY, bytes);
mov rcx, QWORD PTR hLocalHeap
mov rsi, rdx
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 194 : return ((u + v - 1) / v);
shr rbx, 6
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; 170 : __UNIT_TYPE* buffer = (__UNIT_TYPE*)HeapAlloc(hLocalHeap, HEAP_ZERO_MEMORY, bytes);
mov edx, 8
lea r8, QWORD PTR [rbx*8+16]
call QWORD PTR __imp_HeapAlloc
mov rcx, rax
; 171 : if (buffer == NULL)
test rax, rax
jne SHORT $LN2@AllocateBl
; 198 : return (&buffer[1]);
; 199 : }
mov rbx, QWORD PTR [rsp+48]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
$LN2@AllocateBl:
; 172 : return (NULL);
; 173 : buffer[0] = words1;
mov QWORD PTR [rax], rbx
; 174 : *allocated_block_words = words1;
; 175 : #ifdef _DEBUG
; 176 : // 乱数もどきを生成する。
; 177 : #ifdef _M_IX86
; 178 : __UNIT_TYPE r = GetTickCount();
; 179 : #elif defined(_M_IX64)
; 180 : #ifdef _MSC_VER
; 181 : __UNIT_TYPE r = GetTickCount64();
; 182 : #elif defined(__GNUC__)
; 183 : _UINT32_T temp = GetTickCount();
; 184 : __UNIT_TYPE r = _FROMWORDTODWORD(temp, temp);
; 185 : #else
; 186 : #error unknown compiler
; 187 : #endif
; 188 : #else
; 189 : #error unknown platform
; 190 : #endif
; 191 : __UNIT_TYPE check_code = configuration_info.MEMORY_VERIFICATION_ENABLED ? CalculateCheckCode(&buffer[1], words1) : CHECK_CODE_INIT | r;
; 192 : #else
; 193 : __UNIT_TYPE check_code = 0;
; 194 : #endif
; 195 : buffer[words1 + 1] = check_code ^ (__UNIT_TYPE)&buffer[words1 + 1];
lea rax, QWORD PTR [rbx+1]
mov QWORD PTR [rsi], rbx
lea rax, QWORD PTR [rcx+rax*8]
mov QWORD PTR [rax], rax
; 196 : if (code != NULL)
test rdi, rdi
je SHORT $LN3@AllocateBl
; 197 : *code = check_code;
mov QWORD PTR [rdi], 0
$LN3@AllocateBl:
; 198 : return (&buffer[1]);
; 199 : }
mov rbx, QWORD PTR [rsp+48]
lea rax, QWORD PTR [rcx+8]
mov rsi, QWORD PTR [rsp+56]
add rsp, 32 ; 00000020H
pop rdi
ret 0
AllocateBlock ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT DeallocateHeapArea
_TEXT SEGMENT
DeallocateHeapArea PROC ; COMDAT
; 609 : {
$LN5:
sub rsp, 40 ; 00000028H
; 610 : if (hLocalHeap != NULL)
mov rcx, QWORD PTR hLocalHeap
test rcx, rcx
je SHORT $LN2@Deallocate
; 611 : {
; 612 : HeapDestroy(hLocalHeap);
call QWORD PTR __imp_HeapDestroy
; 613 : hLocalHeap = NULL;
mov QWORD PTR hLocalHeap, 0
$LN2@Deallocate:
; 614 : }
; 615 : }
add rsp, 40 ; 00000028H
ret 0
DeallocateHeapArea ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\memory.c
; COMDAT AllocateHeapArea
_TEXT SEGMENT
AllocateHeapArea PROC ; COMDAT
; 601 : {
$LN5:
sub rsp, 40 ; 00000028H
; 602 : hLocalHeap = HeapCreate(0, 0x1000, 0);
xor r8d, r8d
mov edx, 4096 ; 00001000H
xor ecx, ecx
call QWORD PTR __imp_HeapCreate
; 603 : if (hLocalHeap == NULL)
xor ecx, ecx
mov QWORD PTR hLocalHeap, rax
test rax, rax
setne cl
mov eax, ecx
; 604 : return (FALSE);
; 605 : return (TRUE);
; 606 : }
add rsp, 40 ; 00000028H
ret 0
AllocateHeapArea ENDP
_TEXT ENDS
END
| 29.458749
| 148
| 0.696979
|
f201dc9c6282e1ee889b00c8b2696afc44c3b5dc
| 535
|
asm
|
Assembly
|
oeis/311/A311613.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/311/A311613.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/311/A311613.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A311613: Coordination sequence Gal.6.231.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 Jon Maiga
; 1,4,8,12,18,22,28,32,38,42,46,50,54,58,62,68,72,78,82,88,92,96,100,104,108,112,118,122,128,132,138,142,146,150,154,158,162,168,172,178,182,188,192,196,200,204,208,212,218,222
mul $0,5
mov $1,1
mov $3,$0
lpb $0
mov $0,5
mul $0,$3
pow $3,7
mul $3,9
mov $2,$3
mod $2,11
add $0,$2
div $0,11
mov $1,$0
lpe
add $0,$1
| 26.75
| 177
| 0.669159
|
ab077b6c5b44e9e73b508bd3152ce35eec1f35c5
| 94,473
|
asm
|
Assembly
|
source/Pas2.asm
|
bootrino/gpascal
|
69ad86698c1b06d57c65ed861ef7f31ee16f8a14
|
[
"MIT"
] | null | null | null |
source/Pas2.asm
|
bootrino/gpascal
|
69ad86698c1b06d57c65ed861ef7f31ee16f8a14
|
[
"MIT"
] | null | null | null |
source/Pas2.asm
|
bootrino/gpascal
|
69ad86698c1b06d57c65ed861ef7f31ee16f8a14
|
[
"MIT"
] | null | null | null |
************************************************
2 * PASCAL COMPILER
3 * for Commodore 64
4 * PART 2
5 * Authors: Nick Gammon & Sue Gobbett
6 * SYM $9000
************************************************
8 *
9 P1 EQU $8013
10 P2 EQU $8DD4
11 P3 EQU $992E
12 P4 EQU $A380
13 P5 EQU $B384
14 P6 EQU $BCB8
15 *
16 STACK EQU $100
17 INBUF EQU $33C
18 KBD:BUF EQU $277
19 HIMEM EQU $283
20 COLOR EQU $286
21 HIBASE EQU $288
22 AUTODN EQU $292
23 BITNUM EQU $298
24 BAUDOF EQU $299
25 RODBS EQU $29D
26 RODBE EQU $29E
27 ENABRS EQU $2A1 ; RS232 enables
28 WARM:STR EQU $302 ; basic warm start vector
29 CINV EQU $314 ; hardware interrupt vector
30 *
31 SPACE EQU $20
32 CR EQU $D
33 FF EQU $C
34 LF EQU $A
35 MAX:STK EQU 32
36 NEW:STK EQU $FF
37 *
38 VIC EQU $D000
39 SID EQU $D400
40 CIA1 EQU $DC00
41 CIA2 EQU $DD00
42 DATAREG EQU $DD01
43 DDRB EQU $DD03
44 FLAG EQU $DD0D
45 BORDER EQU $D020
46 BKGND EQU $D021
47 *
48 COUT EQU $FFD2
49 STOP EQU $FFE1
50 GETIN EQU $FFE4
51 CHKOUT EQU $FFC9
52 CLRCHN EQU $FFCC
53 UNLSN EQU $FFAE
54 UNTKL EQU $FFAB
55 CHRIN EQU $FFCF
56 CHKIN EQU $FFC6
57 PLOT EQU $FFF0
58 CHROUT EQU $FFD2
59 CINT EQU $FF81
60 IOINIT EQU $FF84
61 CLALL EQU $FFE7
62 SETMSG EQU $FF90
63 SETLFS EQU $FFBA
64 SETNAM EQU $FFBD
65 OPEN EQU $FFC0
66 LOAD EQU $FFD5
67 READST EQU $FFB7
68 SAVE EQU $FFD8
69 RAMTAS EQU $FF87
70 RESTOR EQU $FF8A
71 MEMTOP EQU $FF99
72 UNTLK EQU $FFAB
73 CLOSE EQU $FFC3
74 *
75 *
76 DUM $2A7
77 *
78 * PASCAL WORK AREAS
79 *
************************************************
81 LINE:CNT EQU $2 ; 2 BYTES
82 LINE:NO EQU LINE:CNT
83 REG EQU $4 ; 2 BYTES
84 ROWL EQU REG
85 ROWH EQU REG+1
86 SRCE EQU REG
87 REG2 EQU $6 ; 2 BYTES
88 DEST EQU REG2
89 WX EQU $8 ; 2 BYTES
90 ERR:RTN EQU $B ; 2 BYTES
91 SYMTBL EQU $D
92 TOKEN EQU $16
93 TKNADR EQU $17 ; 2 BYTES
94 TKNLEN EQU $19
95 EOF EQU $1A
96 LIST EQU $1B
97 NXTCHR EQU $1C ; 2 BYTES
98 VALUE EQU $1E ; 3 BYTES
99 DIGIT EQU $21
100 NOTRSV EQU $22
101 FRAME EQU $23 ; 2 BYTES
102 LEVEL EQU $25
103 PCODE EQU $26
104 P EQU PCODE
105 PNTR EQU PCODE
106 ACT:PCDA EQU $28 ; 2 BYTES
107 DISPL EQU $2A ; 2 BYTES
108 OFFSET EQU $2C ; 2 BYTES
109 OPND EQU $2E ; 3 BYTES
110 DCODE EQU $31
111 ENDSYM EQU $32 ; 2 BYTES
112 ARG EQU $34
113 PROMPT EQU $35
114 WORKD EQU $36 ; 2 BYTES
115 ERRNO EQU $38
116 RTNADR EQU $39 ; 2 BYTES
117 BSAVE EQU $3B
118 WORK EQU $3C ; 2 BYTES
119 PRCITM EQU $3E ; 2 BYTES
120 DSPWRK EQU $40 ; 2 BYTES
121 PFLAG EQU $42
122 T EQU ENDSYM ; STACK POINTER 2 BYTES
123 TMP:PNTR EQU T
124 BASE EQU $45 ; 2 BYTES
125 TO EQU BASE
126 DATA EQU $47 ; 2 BYTES
127 RUNNING EQU $49
128 UPR:CASE EQU $4A
129 SCE:LIM EQU $4B ; 2 BYTES
130 FUNCTION EQU SCE:LIM
131 SPRITENO EQU SCE:LIM+1
132 STK:USE EQU $4D
133 VOICENO EQU STK:USE
134 SYMITM EQU $4E ; 2 BYTES
135 FROM EQU SYMITM
136 SYNTAX EQU $50
137 CHK:ARY EQU $51
138 SECRET EQU $52
139 VAL:CMP EQU $53
140 CTRLC:RT EQU $54 ; 2 BYTES
141 END:PCD EQU $56 ; 2 BYTES
142 REGB EQU $58
143 REG2B EQU $59
144 LEFTCOL EQU $5A
145 SIGN EQU $5B
146 TEMP EQU $5C ; 2 BYTES
147 CALL EQU $5E ; 2 BYTES
148 COUNT EQU $60
149 LNCNT EQU $61
150 LS EQU $62
151 PCSVD EQU $63 ; 2 BYTES
152 FIRST EQU $65
153 DBGTYP EQU $66
154 DBGFLG EQU $67
155 DEFP EQU $68 ; 2 BYTES
156 DEFS EQU $6A ; 2 BYTES
157 DATTYP EQU $6C
158 DOS:FLG EQU DATTYP
159 A5 EQU $6D ; 2 BYTES
160 MASK EQU A5
161 COLL:REG EQU A5+1
162 ST EQU $90
163 DFLTN EQU $99 ; input device
164 QUEUE EQU $C6
165 INDX EQU $C8
166 LXSP EQU $C9
167 BLNSW EQU $CC
168 BLNON EQU $CF
169 CRSW EQU $D0
170 BASL EQU $D1
171 CH EQU $D3
172 *
173 P:STACK EQU $CED0 ; P-CODE STACK
174 S:ANIMCT EQU $CED8 ; count of frames
175 S:ANIMPS EQU $CEE0 ; current position
176 S:ANIMCC EQU $CEE8 ; current frame count
177 S:ANIMFM EQU $CEF0 ; no. of frames
178 S:POINTR EQU $CEF8 ; pointers - 16 per sprite
179 SID:IMG EQU $CF7C
180 S:ACTIVE EQU $CF98
181 S:XPOS EQU $CFA0 ; 3 bytes each
182 S:YPOS EQU $CFB8 ; 2 bytes each
183 S:XINC EQU $CFC8 ; 3 bytes each
184 S:YINC EQU $CFE0 ; 2 bytes each
185 S:COUNT EQU $CFF0 ; 2 bytes each
186 *
187 COUNT1 DS 1
188 COUNT2 DS 1
189 SYM:USE DS 2 ; 2 BYTES
190 SAVCUR DS 6 ; 6 BYTES
191 BPOINT DS 20
192 CALL:P EQU BPOINT
193 CALL:A EQU BPOINT+1
194 CALL:X EQU BPOINT+2
195 CALL:Y EQU BPOINT+3
196 FNC:VAL EQU BPOINT+15
197 REMAIN EQU BPOINT+4
198 XPOSL EQU BPOINT+15
199 XPOSH EQU BPOINT+16
200 YPOS EQU BPOINT+17
201 CNTR EQU BPOINT+10
202 REP:FROM EQU BPOINT+2
203 REP:TO EQU BPOINT+3
204 REP:LEN EQU BPOINT+4
205 PNTR:HI EQU BPOINT+5
206 IN:LGTH EQU BPOINT+6
207 LENGTH EQU BPOINT+7
208 FROM:ST EQU BPOINT+9
209 NUM:LINS EQU BPOINT+11
210 ED:COM EQU BPOINT+13
211 TO:LINE EQU BPOINT+15
212 FND:FROM EQU BPOINT+17
213 FND:TO EQU BPOINT+18
214 FND:POS EQU BPOINT+19
215 LASTP DS 2
216 INCHAR DS 1
217 IO:A DS 1
218 IO:Y DS 1
219 IO:X DS 1
220 CURR:CHR DS 1
221 HEX:WK DS 1
222 DS 2
223 STK:AVL DS 1
224 STK:PAGE DS 1
225 STK:WRK DS 1
226 STK:RT DS 2
227 BEG:STK DS 1
228 XSAVE DS 1
229 RES DS 3 ; 3 BYTES
230 MCAND DS 3 ; 3 BYTES
231 DIVISOR EQU MCAND
232 DVDN DS 3 ; 3 BYTES
233 RMNDR DS 1
234 TEMP1 DS 2
235 BIN:WRK DS 3
236 ASC:WRK DS 10
237 DEF:PCD DS 1
238 REP:SIZE DS 1
239 NLN:FLAG DS 1
240 Q:FLAG DS 1
241 FND:FLG DS 1
242 FND:LEN DS 1
243 UC:FLAG DS 1
244 TRN:FLAG DS 1
245 GLB:FLAG DS 1
246 INT:RTN DS 2 ; address to return to after a timer interrupt
247 INT:TEMP DS 1 ; for interrupt service routine
248 INT:TMP1 DS 1
249 INT:TMP2 DS 1
250 QT:TGL DS 1 ; quote toggle
251 QT:SIZE DS 1 ; number of characters in reserved words
252 DEND
************************************************
254 * SYMBOL TABLE DEFINES - RELATIVE TO SYMBOL TABLE ENTRY
************************************************
256 SYMPRV EQU 0
257 SYMLVL EQU 2
258 SYMTYP EQU 3
259 SYMDSP EQU 4
260 SYMARG EQU 6
261 SYMSUB EQU 6
262 SYMDAT EQU 8
263 SYMLEN EQU 9
264 SYMNAM EQU 10
************************************************
266 * ADDRESS CONSTANTS ETC.
************************************************
268 DUM $8000
269 DS 3
270 DS 3
271 DS 3
8009: 00 40 272 TS DA $4000
800B: 10 273 SYM:SIZE DFB 16
800C: 5B 274 LHB ASC '['
800D: 5D 275 RHB ASC ']'
800E: 22 276 QUOT:SYM ASC '"' ; QUOTE SYMBOL
800F: 3A 277 DELIMIT ASC ':' ; FIND/REPLACE DELIMITER
8010: 04 278 PR:CHAN DFB 4 ; PRINTER CHANNEL
8011: 08 279 DISK:CHN DFB 8 ; DISK CHANNEL
8012: 00 280 DFB 0 ; SPARE FOR NOW
281 DEND
282 *
************************************************
284 * PART 1 VECTORS
************************************************
286 V1 EQU P1
287 INIT EQU V1
288 GETNEXT EQU V1+3
289 COMSTL EQU V1+6
290 ISITHX EQU V1+9
291 ISITAL EQU V1+12
292 ISITNM EQU V1+15
293 CHAR EQU V1+18
294 GEN2:B EQU V1+21
295 DISHX EQU V1+24
296 ERROR EQU V1+27
297 GETCHK EQU V1+30
298 CHKTKN EQU V1+33
299 GENNOP EQU V1+36
300 GENADR EQU V1+39
301 GENNJP EQU V1+42
302 GENNJM EQU V1+45
303 TKNWRK EQU V1+48
304 PRBYTE EQU V1+51
305 GTOKEN EQU V1+54
306 WRKTKN EQU V1+57
307 FIXAD EQU V1+60
308 PSHWRK EQU V1+63
309 PULWRK EQU V1+66
310 PC EQU V1+69
311 PT EQU V1+72
312 PL EQU V1+75
313 PC8 EQU V1+78
314 GETANS EQU V1+81
315 PUTSP EQU V1+84
316 DISPAD EQU V1+87
317 CROUT EQU V1+90
318 SHLVAL EQU V1+93
319 GET:NUM EQU V1+96
320 GET:HEX EQU V1+99
321 FND:ENQ EQU V1+102
322 PAUSE EQU V1+105
323 HOME EQU V1+108
324 RDKEY EQU V1+111
325 GENJMP EQU V1+114
326 GENRJMP EQU V1+117
************************************************
328 * PART 2 STARTS HERE
************************************************
330 ORG P2
************************************************
332 * PART 2 VECTORS
************************************************
8DD4: 4C 63 93 334 JMP STMNT
8DD7: 4C 04 93 335 JMP EXPRES
8DDA: 4C 13 8E 336 JMP CHKLHP
8DDD: 4C 1A 8E 337 JMP CHKRHP
8DE0: 4C 2D 8E 338 JMP CHKLHB
8DE3: 4C 38 8E 339 JMP CHKRHB
8DE6: 4C A6 8F 340 JMP LOOKUP
8DE9: 4C B1 8F 341 JMP CHKDUP
8DEC: 4C C1 8F 342 JMP CONDEC
8DEF: 4C DB 90 343 JMP VARDEC
8DF2: 4C B4 90 344 JMP CONST
8DF5: 4C 24 8E 345 JMP GETSUB
8DF8: 4C 6E 94 346 JMP W:STRING
8DFB: 4C 4C 80 347 JMP WRKTKN
8DFE: 4C EC 8F 348 JMP SYMWRK
8E01: 4C F7 8F 349 JMP WRKSYM
8E04: 4C 02 90 350 JMP PSHPCODE
8E07: 4C A8 90 351 JMP CHK:STAK
8E0A: 4C 54 8E 352 JMP SEARCH
8E0D: 4C C5 8E 353 JMP ADDSYM
8E10: 4C 77 8F 354 JMP TKNJMP
************************************************
356 *
357 * PART 6 VECTORS
************************************************
359 BLOCK EQU P6
360 *
361 *
362 CHKLHP EQU *
8E13: A9 28 363 LDA #'('
8E15: A2 1F 364 LDX #31
8E17: 4C 31 80 365 JMP GETCHK
366 *
367 CHKRHP EQU *
8E1A: A9 29 368 LDA #')'
8E1C: A2 16 369 LDX #22
8E1E: 20 34 80 370 JSR CHKTKN
8E21: 4C 49 80 371 JMP GTOKEN
372 *
373 GETSUB EQU *
8E24: 20 2D 8E 374 JSR CHKLHB
8E27: 20 04 93 375 JSR EXPRES
8E2A: 4C 38 8E 376 JMP CHKRHB
377 *
378 CHKLHB EQU *
8E2D: AD 0C 80 379 LDA LHB
8E30: A2 21 380 LDX #33
8E32: 20 31 80 381 JSR GETCHK
8E35: 4C 49 80 382 JMP GTOKEN
383 *
384 CHKRHB EQU *
8E38: AD 0D 80 385 LDA RHB
8E3B: A2 22 386 LDX #34
8E3D: 20 34 80 387 JSR CHKTKN
8E40: 4C 49 80 388 JMP GTOKEN
389 *
390 GET:LEV EQU *
8E43: A5 25 391 LDA LEVEL
8E45: A0 02 392 LDY #SYMLVL
8E47: 38 393 SEC
8E48: F1 4E 394 SBC (SYMITM),Y
8E4A: 85 2A 395 STA DISPL
8E4C: 60 396 RTS
397 *
398 GET:DAT EQU *
8E4D: A0 08 399 LDY #SYMDAT
8E4F: B1 4E 400 LDA (SYMITM),Y
8E51: 85 6C 401 STA DATTYP
8E53: 60 402 RTS
403 *
404 *
************************************************
406 *SEARCH SYMBOL TABLE
************************************************
408 SEARCH EQU *
8E54: A5 32 409 LDA ENDSYM
8E56: 85 4E 410 STA SYMITM
8E58: A5 33 411 LDA ENDSYM+1
8E5A: 85 4F 412 STA SYMITM+1
413 SEA1 EQU *
8E5C: A0 00 414 LDY #SYMPRV
8E5E: B1 4E 415 LDA (SYMITM),Y
8E60: AA 416 TAX
8E61: C8 417 INY
8E62: B1 4E 418 LDA (SYMITM),Y
8E64: 85 4F 419 STA SYMITM+1 ; PREVIOUS LINK
8E66: 8A 420 TXA
8E67: 85 4E 421 STA SYMITM
8E69: 05 4F 422 ORA SYMITM+1
8E6B: D0 01 423 BNE SEA2 ; MORE TO GO
8E6D: 60 424 RTS ; FINISHED
425 SEA2 EQU *
8E6E: A0 09 426 LDY #SYMLEN
8E70: B1 4E 427 LDA (SYMITM),Y
8E72: C5 19 428 CMP TKNLEN
8E74: D0 E6 429 BNE SEA1 ; WRONG LENGTH
8E76: A5 4E 430 LDA SYMITM
8E78: 18 431 CLC
8E79: 69 0A 432 ADC #SYMNAM
8E7B: 85 06 433 STA DEST
8E7D: A5 4F 434 LDA SYMITM+1
8E7F: 69 00 435 ADC #0
8E81: 85 07 436 STA DEST+1
8E83: A5 17 437 LDA TKNADR
8E85: 85 04 438 STA SRCE
8E87: A5 18 439 LDA TKNADR+1
8E89: 85 05 440 STA SRCE+1
8E8B: A4 19 441 LDY TKNLEN
8E8D: 20 19 80 442 JSR COMSTL
8E90: D0 CA 443 BNE SEA1 ; NOT THAT ONE
8E92: 20 4D 8E 444 JSR GET:DAT
8E95: A0 02 445 LDY #SYMLVL
8E97: B1 4E 446 LDA (SYMITM),Y
8E99: AA 447 TAX ; LEVEL
8E9A: A0 03 448 LDY #SYMTYP
8E9C: B1 4E 449 LDA (SYMITM),Y
8E9E: 85 3B 450 STA BSAVE
8EA0: C9 43 451 CMP #'C' ; CONSTANT
8EA2: D0 13 452 BNE SEA4
8EA4: A0 04 453 LDY #SYMDSP
8EA6: B1 4E 454 LDA (SYMITM),Y
8EA8: 85 1E 455 STA VALUE
8EAA: C8 456 INY
8EAB: B1 4E 457 LDA (SYMITM),Y
8EAD: 85 1F 458 STA VALUE+1
8EAF: C8 459 INY
8EB0: B1 4E 460 LDA (SYMITM),Y
8EB2: 85 20 461 STA VALUE+2
8EB4: 4C C2 8E 462 JMP SEA3
463 SEA4 EQU * ; NOT CONSTANT
8EB7: C9 56 464 CMP #'V' ; VARIABLE?
8EB9: F0 04 465 BEQ SEA5 ; YES
8EBB: C9 59 466 CMP #'Y' ; ARGUMENT?
8EBD: D0 03 467 BNE SEA3 ; NO
468 SEA5 EQU *
8EBF: 20 15 90 469 JSR GET:OFF
470 SEA3 EQU *
8EC2: A5 3B 471 LDA BSAVE
8EC4: 60 472 RTS ; SHOULD SET 'NEQ' FLAG
************************************************
474 * ADD SYMBOL TO SYMBOL TABLE
************************************************
476 ADDSYM EQU *
8EC5: A6 32 477 LDX ENDSYM
8EC7: 86 4E 478 STX SYMITM
8EC9: A6 33 479 LDX ENDSYM+1
8ECB: 86 4F 480 STX SYMITM+1
8ECD: A0 03 481 LDY #SYMTYP
8ECF: 91 4E 482 STA (SYMITM),Y
8ED1: A0 02 483 LDY #SYMLVL
8ED3: 48 484 PHA
8ED4: A5 25 485 LDA LEVEL
8ED6: 91 4E 486 STA (SYMITM),Y
8ED8: A0 09 487 LDY #SYMLEN
8EDA: A5 19 488 LDA TKNLEN
8EDC: 91 4E 489 STA (SYMITM),Y
8EDE: A8 490 TAY
8EDF: 88 491 DEY
8EE0: A5 4E 492 LDA SYMITM
8EE2: 18 493 CLC
8EE3: 69 0A 494 ADC #SYMNAM
8EE5: 85 06 495 STA DEST
8EE7: A5 4F 496 LDA SYMITM+1
8EE9: 69 00 497 ADC #0
8EEB: 85 07 498 STA DEST+1
499 ADD1 EQU *
8EED: B1 17 500 LDA (TKNADR),Y
8EEF: C9 C1 501 CMP #$C1
8EF1: 90 02 502 BLT ADD2
8EF3: 29 7F 503 AND #$7F ; UPPER CASE
504 ADD2 EQU *
8EF5: 91 06 505 STA (DEST),Y
8EF7: 88 506 DEY
8EF8: 10 F3 507 BPL ADD1
8EFA: A5 06 508 LDA DEST
8EFC: 18 509 CLC
8EFD: 65 19 510 ADC TKNLEN
8EFF: 85 32 511 STA ENDSYM
8F01: A5 07 512 LDA DEST+1
8F03: 69 00 513 ADC #0
8F05: 85 33 514 STA ENDSYM+1
8F07: AD AA 02 515 LDA SYM:USE+1
8F0A: C5 33 516 CMP ENDSYM+1
8F0C: 90 09 517 BLT SYM:NEW
8F0E: D0 11 518 BNE SYM:LOW
8F10: AD A9 02 519 LDA SYM:USE
8F13: C5 32 520 CMP ENDSYM
8F15: B0 0A 521 BGE SYM:LOW
8F17: A5 32 522 SYM:NEW LDA ENDSYM
8F19: 8D A9 02 523 STA SYM:USE
8F1C: A5 33 524 LDA ENDSYM+1
8F1E: 8D AA 02 525 STA SYM:USE+1
526 SYM:LOW EQU *
8F21: A5 33 527 LDA ENDSYM+1
8F23: CD 84 02 528 CMP HIMEM+1
8F26: 90 0E 529 BLT SYM:NTFL
8F28: D0 07 530 BNE SYM:FULL
8F2A: A5 32 531 LDA ENDSYM
8F2C: CD 83 02 532 CMP HIMEM
8F2F: 90 05 533 BLT SYM:NTFL
8F31: A2 25 534 SYM:FULL LDX #37
8F33: 20 2E 80 535 JSR ERROR
536 SYM:NTFL EQU *
537 *
8F36: 68 538 PLA
8F37: AA 539 TAX ; ENTRY TYPE
8F38: C9 43 540 CMP #'C' ; CONSTANT??
8F3A: D0 13 541 BNE ADD4
8F3C: A0 04 542 LDY #SYMDSP
8F3E: A5 1E 543 LDA VALUE
8F40: 91 4E 544 STA (SYMITM),Y
8F42: C8 545 INY
8F43: A5 1F 546 LDA VALUE+1
8F45: 91 4E 547 STA (SYMITM),Y
8F47: C8 548 INY
8F48: A5 20 549 LDA VALUE+2
8F4A: 91 4E 550 STA (SYMITM),Y
8F4C: 4C 6B 8F 551 JMP ADD9
552 ADD4 EQU *
8F4F: A0 08 553 LDY #SYMDAT
8F51: A9 01 554 LDA #1
8F53: 91 4E 555 STA (SYMITM),Y
8F55: 8A 556 TXA
8F56: C9 56 557 CMP #'V'
8F58: D0 11 558 BNE ADD9
8F5A: A0 05 559 LDY #SYMDSP+1
8F5C: A5 24 560 LDA FRAME+1
8F5E: 91 4E 561 STA (SYMITM),Y
8F60: 88 562 DEY
8F61: A5 23 563 LDA FRAME
8F63: 91 4E 564 STA (SYMITM),Y
8F65: E6 23 565 INC FRAME
8F67: D0 02 566 BNE ADD9
8F69: E6 24 567 INC FRAME+1
568 ADD9 EQU *
8F6B: A0 00 569 LDY #SYMPRV
8F6D: A5 4E 570 LDA SYMITM
8F6F: 91 32 571 STA (ENDSYM),Y
8F71: C8 572 INY
8F72: A5 4F 573 LDA SYMITM+1
8F74: 91 32 574 STA (ENDSYM),Y
8F76: 60 575 RTS
576 *
************************************************
578 * JUMP ON TOKEN
579 * X/Y = START OF TABLE
580 * END OF TABLE IS A NULL
581 * A = TOKEN
************************************************
583 TKNJMP EQU *
8F77: 86 04 584 STX REG
8F79: 84 05 585 STY REG+1
8F7B: AA 586 TAX
587 JMP1 EQU *
8F7C: A0 00 588 LDY #0
8F7E: B1 04 589 LDA (REG),Y
8F80: D0 02 590 BNE JMP2
8F82: 8A 591 TXA
8F83: 60 592 RTS
593 JMP2 EQU *
8F84: 8A 594 TXA
8F85: D1 04 595 CMP (REG),Y
8F87: D0 10 596 BNE JMP3
8F89: 68 597 PLA
8F8A: 68 598 PLA ; REMOVE RETURN ADDRESS
8F8B: C8 599 INY
8F8C: B1 04 600 LDA (REG),Y
8F8E: 85 06 601 STA REG2
8F90: C8 602 INY
8F91: B1 04 603 LDA (REG),Y
8F93: 85 07 604 STA REG2+1
8F95: 8A 605 TXA
8F96: 6C 06 00 606 JMP (REG2)
607 JMP3 EQU *
8F99: A5 04 608 LDA REG
8F9B: 18 609 CLC
8F9C: 69 03 610 ADC #3
8F9E: 85 04 611 STA REG
8FA0: 90 DA 612 BCC JMP1
8FA2: E6 05 613 INC REG+1
8FA4: D0 D6 614 BNE JMP1
615 *
616 LOOKUP EQU *
8FA6: 20 54 8E 617 JSR SEARCH
8FA9: D0 05 618 BNE LOOK1
8FAB: A2 0B 619 LDX #11
8FAD: 20 2E 80 620 JSR ERROR
8FB0: 60 621 LOOK1 RTS
622 *
8FB1: 20 54 8E 623 CHKDUP JSR SEARCH
8FB4: F0 0A 624 BEQ DUP9
8FB6: 8A 625 TXA
8FB7: C5 25 626 CMP LEVEL
8FB9: D0 05 627 BNE DUP9
8FBB: A2 26 628 LDX #38
8FBD: 20 2E 80 629 JSR ERROR
8FC0: 60 630 DUP9 RTS
631 *
632 * CONSTANT DEC
633 *
634 CONDEC EQU *
8FC1: A9 49 635 LDA #'I'
8FC3: A2 04 636 LDX #4
8FC5: 20 34 80 637 JSR CHKTKN
8FC8: 20 43 80 638 JSR TKNWRK
8FCB: A5 19 639 LDA TKNLEN
8FCD: 48 640 PHA
8FCE: A9 3D 641 LDA #'='
8FD0: A2 03 642 LDX #3
8FD2: 20 31 80 643 JSR GETCHK
8FD5: 20 49 80 644 JSR GTOKEN
8FD8: 20 B4 90 645 JSR CONST
8FDB: 20 4C 80 646 JSR WRKTKN
8FDE: 68 647 PLA
8FDF: 85 19 648 STA TKNLEN
8FE1: 20 B1 8F 649 JSR CHKDUP
8FE4: A9 43 650 LDA #'C'
8FE6: 20 C5 8E 651 JSR ADDSYM
8FE9: 4C 49 80 652 JMP GTOKEN
653 *
654 *
655 *--- SYMITM --> WORK
656 *
657 SYMWRK EQU *
8FEC: 48 658 PHA
8FED: A5 4E 659 LDA SYMITM
8FEF: 85 3C 660 STA WORK
8FF1: A5 4F 661 LDA SYMITM+1
8FF3: 85 3D 662 STA WORK+1
8FF5: 68 663 PLA
8FF6: 60 664 RTS
665 *
666 *--- WORK --> SYMITM
667 *
668 WRKSYM EQU *
8FF7: 48 669 PHA
8FF8: A5 3C 670 LDA WORK
8FFA: 85 4E 671 STA SYMITM
8FFC: A5 3D 672 LDA WORK+1
8FFE: 85 4F 673 STA SYMITM+1
9000: 68 674 PLA
9001: 60 675 RTS
676 *
677 * PUSH PCODE ONTO STACK
678 *
679 PSHPCODE EQU *
9002: 85 3B 680 STA BSAVE
9004: 68 681 PLA
9005: AA 682 TAX
9006: 68 683 PLA
9007: A8 684 TAY
9008: A5 27 685 LDA PCODE+1
900A: 48 686 PHA
900B: A5 26 687 LDA PCODE
900D: 48 688 PHA
900E: 98 689 TYA
900F: 48 690 PHA
9010: 8A 691 TXA
9011: 48 692 PHA
9012: A5 3B 693 LDA BSAVE
9014: 60 694 RTS
695 *
696 GET:OFF EQU *
9015: 48 697 PHA
9016: A0 04 698 LDY #SYMDSP
9018: B1 4E 699 LDA (SYMITM),Y
901A: 85 2C 700 STA OFFSET
901C: C8 701 INY
901D: B1 4E 702 LDA (SYMITM),Y
901F: 85 2D 703 STA OFFSET+1
9021: A0 03 704 LDY #SYMTYP
9023: B1 4E 705 LDA (SYMITM),Y
9025: C9 56 706 CMP #'V'
9027: F0 08 707 BEQ GETO:1
9029: C9 41 708 CMP #'A'
902B: F0 04 709 BEQ GETO:1
902D: C9 59 710 CMP #'Y'
902F: D0 0D 711 BNE GETO:2
712 GETO:1 EQU *
9031: 38 713 SEC
9032: A9 FD 714 LDA #$FD
9034: E5 2C 715 SBC OFFSET
9036: 85 2C 716 STA OFFSET
9038: A9 FF 717 LDA #$FF
903A: E5 2D 718 SBC OFFSET+1
903C: 85 2D 719 STA OFFSET+1
720 GETO:2 EQU *
903E: 68 721 PLA
903F: 60 722 RTS
723 *
724 GETEXPR EQU *
9040: 20 49 80 725 JSR GTOKEN
9043: 4C 04 93 726 JMP EXPRES
727 *
728 *
729 PCD:WRKD EQU *
9046: 48 730 PHA
9047: A5 26 731 LDA PCODE
9049: 85 36 732 STA WORKD
904B: A5 27 733 LDA PCODE+1
904D: 85 37 734 STA WORKD+1
904F: 68 735 PLA
9050: 60 736 RTS
737 *
738 WRK:OPND EQU *
9051: 48 739 PHA
9052: A5 3C 740 LDA WORK
9054: 85 2E 741 STA OPND
9056: A5 3D 742 LDA WORK+1
9058: 85 2F 743 STA OPND+1
905A: 68 744 PLA
905B: 60 745 RTS
746 *
747 WRKD:WRK EQU *
905C: 48 748 PHA
905D: A5 36 749 LDA WORKD
905F: 85 3C 750 STA WORK
9061: A5 37 751 LDA WORKD+1
9063: 85 3D 752 STA WORK+1
9065: 68 753 PLA
9066: 60 754 RTS
755 *
756 WRK:WRKD EQU *
9067: 48 757 PHA
9068: A5 3C 758 LDA WORK
906A: 85 36 759 STA WORKD
906C: A5 3D 760 LDA WORK+1
906E: 85 37 761 STA WORKD+1
9070: 68 762 PLA
9071: 60 763 RTS
764 *
765 GET:COMM EQU *
9072: A9 2C 766 LDA #','
9074: A2 20 767 LDX #32
9076: 4C 34 80 768 JMP CHKTKN
769 *
770 GET:ITEM EQU *
9079: 20 72 90 771 JSR GET:COMM ; check for comma
907C: 4C 40 90 772 JMP GETEXPR
773 *
774 VAL:MOVE EQU *
907F: 48 775 PHA
9080: 18 776 CLC
9081: A5 1E 777 LDA VALUE
9083: 85 2A 778 STA DISPL
9085: 10 01 779 BPL VAL:1
9087: 38 780 SEC
781 VAL:1 EQU *
9088: A5 1F 782 LDA VALUE+1
908A: F0 01 783 BEQ VAL:2
908C: 38 784 SEC
785 VAL:2 EQU *
908D: 85 2C 786 STA OFFSET
908F: A5 20 787 LDA VALUE+2
9091: 85 2D 788 STA OFFSET+1
9093: F0 01 789 BEQ VAL:3
9095: 38 790 SEC
791 VAL:3 EQU *
9096: 90 07 792 BCC VAL:5
9098: A9 00 793 LDA #0
909A: 20 3A 80 794 JSR GENADR
909D: 68 795 PLA
909E: 60 796 RTS
797 VAL:5 EQU *
909F: A5 1E 798 LDA VALUE
90A1: 09 80 799 ORA #$80
90A3: 20 37 80 800 JSR GENNOP
90A6: 68 801 PLA
90A7: 60 802 RTS
803 *
804 *
805 CHK:STAK EQU *
90A8: BA 806 TSX
90A9: 8A 807 TXA
90AA: C9 20 808 CMP #MAX:STK
90AC: 90 01 809 BLT STK:FULL
90AE: 60 810 RTS
811 STK:FULL EQU *
90AF: A2 1B 812 STK:ERR LDX #27
90B1: 20 2E 80 813 JSR ERROR ; FULL
814 *
815 *
816 * CONST
817 *
818 CONST EQU *
90B4: A5 16 819 LDA TOKEN
90B6: C9 4E 820 CMP #'N'
90B8: F0 20 821 BEQ CONST9
90BA: C9 49 822 CMP #'I'
90BC: F0 0E 823 BEQ CONST1
90BE: CD 0E 80 824 CMP QUOT:SYM
90C1: D0 0E 825 BNE CONST3
90C3: A6 19 826 LDX TKNLEN
90C5: E0 04 827 CPX #4
90C7: 90 11 828 BLT CONST9
90C9: 4C 5A 92 829 JMP FACERR1 ; STRING TOO BIG
90CC: 20 54 8E 830 CONST1 JSR SEARCH
90CF: D0 05 831 BNE CONST2
832 CONST3 EQU *
90D1: A2 02 833 LDX #2
90D3: 20 2E 80 834 JSR ERROR
90D6: C9 43 835 CONST2 CMP #'C'
90D8: D0 F7 836 BNE CONST3
90DA: 60 837 CONST9 RTS
838 *
839 * VARIABLE DEC
840 *
90DB: A9 49 841 VARDEC LDA #'I'
90DD: A2 04 842 LDX #4
90DF: 20 34 80 843 JSR CHKTKN
90E2: 20 B1 8F 844 JSR CHKDUP
90E5: A9 56 845 LDA #'V'
90E7: 20 C5 8E 846 JSR ADDSYM
90EA: 4C 49 80 847 JMP GTOKEN
848 *
849 * SIMPLE EXPRESSION
850 *
851 SIMEXP EQU *
90ED: A5 16 852 LDA TOKEN
90EF: C9 2B 853 CMP #'+'
90F1: F0 04 854 BEQ SIM1
90F3: C9 2D 855 CMP #'-'
90F5: D0 48 856 BNE SIM2
90F7: 48 857 SIM1 PHA
90F8: 20 49 80 858 JSR GTOKEN
90FB: 20 5F 91 859 JSR TERM
90FE: 68 860 PLA
90FF: C9 2D 861 CMP #'-'
9101: D0 05 862 BNE SIM3
9103: A9 02 863 LDA #2
9105: 20 37 80 864 JSR GENNOP ; NEGATE
9108: A5 16 865 SIM3 LDA TOKEN
910A: C9 2B 866 CMP #'+'
910C: F0 0D 867 BEQ SIM4
910E: C9 2D 868 CMP #'-'
9110: F0 09 869 BEQ SIM4
9112: C9 8A 870 CMP #$8A ; OR
9114: F0 05 871 BEQ SIM4
9116: C9 A4 872 CMP #$A4 ; XOR
9118: F0 01 873 BEQ SIM4
911A: 60 874 RTS
911B: 48 875 SIM4 PHA
911C: 20 49 80 876 JSR GTOKEN
911F: 20 5F 91 877 JSR TERM
9122: 68 878 PLA
9123: C9 2D 879 CMP #'-'
9125: F0 10 880 BEQ SIM5
9127: C9 2B 881 CMP #'+'
9129: F0 10 882 BEQ SIM6
912B: C9 A4 883 CMP #$A4 ; XOR
912D: F0 16 884 BEQ SIM8
912F: A9 1A 885 LDA #26 ; OR
9131: 20 37 80 886 SIM7 JSR GENNOP
9134: 4C 08 91 887 JMP SIM3
9137: A9 06 888 SIM5 LDA #6 ; MINUS
9139: D0 F6 889 BNE SIM7
913B: A9 04 890 SIM6 LDA #4 ; PLUS
913D: D0 F2 891 BNE SIM7
913F: 20 5F 91 892 SIM2 JSR TERM
9142: 4C 08 91 893 JMP SIM3
9145: A9 3A 894 SIM8 LDA #58 ; XOR
9147: D0 E8 895 BNE SIM7
896 *
897 * TERM
898 *
9149: 2A 899 TERMT1 ASC '*'
914A: 6C 91 900 DA TERM1
914C: 8B 901 DFB $8B
914D: 6C 91 902 DA TERM1
914F: 2F 903 ASC '/'
9150: 6C 91 904 DA TERM1
9152: 8D 905 DFB $8D
9153: 6C 91 906 DA TERM1
9155: 8C 907 DFB $8C
9156: 6C 91 908 DA TERM1
9158: 8E 909 DFB $8E
9159: 6C 91 910 DA TERM1
915B: 8F 911 DFB $8F
915C: 6C 91 912 DA TERM1
915E: 00 913 DFB 0
914 *
915F: 20 AD 91 915 TERM JSR FACTOR
9162: A2 49 916 TERM2 LDX #TERMT1
9164: A0 91 917 LDY #>TERMT1
9166: A5 16 918 LDA TOKEN
9168: 20 77 8F 919 JSR TKNJMP
916B: 60 920 RTS
921 *
916C: 48 922 TERM1 PHA
916D: 20 49 80 923 JSR GTOKEN
9170: 20 AD 91 924 JSR FACTOR
9173: 68 925 PLA
9174: A2 97 926 LDX #TERMT3
9176: A0 91 927 LDY #>TERMT3
9178: 20 77 8F 928 JSR TKNJMP
929 *
917B: A9 0A 930 TERM4 LDA #10
917D: 20 37 80 931 TERM3 JSR GENNOP
9180: 4C 62 91 932 JMP TERM2
9183: A9 1B 933 TERM5 LDA #27 ; AND
9185: D0 F6 934 BNE TERM3
9187: A9 0B 935 TERM6 LDA #11 ; MOD
9189: D0 F2 936 BNE TERM3
918B: A9 22 937 TERM7 LDA #34
918D: D0 EE 938 BNE TERM3
918F: A9 24 939 TERM8 LDA #36
9191: D0 EA 940 BNE TERM3
9193: A9 08 941 TERM9 LDA #8
9195: D0 E6 942 BNE TERM3
943 *
9197: 8B 944 TERMT3 DFB $8B
9198: 7B 91 945 DA TERM4
919A: 2F 946 ASC '/'
919B: 7B 91 947 DA TERM4
919D: 8D 948 DFB $8D
919E: 83 91 949 DA TERM5
91A0: 8C 950 DFB $8C
91A1: 87 91 951 DA TERM6
91A3: 8E 952 DFB $8E
91A4: 8B 91 953 DA TERM7
91A6: 8F 954 DFB $8F
91A7: 8F 91 955 DA TERM8
91A9: 2A 956 ASC '*'
91AA: 93 91 957 DA TERM9
91AC: 00 958 DFB 0
959 *
960 * FACTOR
961 *
91AD: 20 A8 90 962 FACTOR JSR CHK:STAK
91B0: A5 16 963 LDA TOKEN
91B2: A2 B5 964 LDX #FACTB1
91B4: A0 92 965 LDY #>FACTB1
91B6: 20 77 8F 966 JSR TKNJMP
91B9: A2 17 967 LDX #23
91BB: 20 2E 80 968 JSR ERROR
969 *
91BE: 20 A6 8F 970 IDENT JSR LOOKUP
91C1: C9 50 971 IDENT1 CMP #'P'
91C3: D0 05 972 BNE IDENT2
91C5: A2 15 973 LDX #21
91C7: 20 2E 80 974 JSR ERROR
91CA: C9 59 975 IDENT2 CMP #'Y'
91CC: D0 1D 976 BNE IDENT3
91CE: A9 00 977 LDA #0
91D0: 85 2F 978 STA OPND+1
91D2: A9 03 979 LDA #3
91D4: 85 2E 980 STA OPND
91D6: A0 00 981 LDY #SYMPRV
91D8: B1 4E 982 LDA (SYMITM),Y
91DA: AA 983 TAX
91DB: C8 984 INY
91DC: B1 4E 985 LDA (SYMITM),Y
91DE: 85 4F 986 STA SYMITM+1
91E0: 8A 987 TXA
91E1: 85 4E 988 STA SYMITM
91E3: A9 3B 989 LDA #59
91E5: 20 85 80 990 JSR GENJMP
91E8: 4C 4D 96 991 JMP FNCPRC
992 *
91EB: C9 41 993 IDENT3 CMP #'A'
91ED: F0 30 994 BEQ IDENT4
91EF: C9 43 995 CMP #'C'
91F1: D0 0E 996 BNE IDENT5
91F3: 20 7F 90 997 JSR VAL:MOVE
91F6: 4C 14 92 998 JMP IDENT7
999 *
91F9: A9 0C 1000 FACAD1 LDA #12
91FB: 20 03 92 1001 JSR IDENT5:A
91FE: 4C 1A 8E 1002 JMP CHKRHP
1003 *
9201: A9 2C 1004 IDENT5 LDA #44
9203: 48 1005 IDENT5:A PHA
1006 *
9204: 86 3B 1007 STX BSAVE
9206: A5 25 1008 LDA LEVEL
9208: 38 1009 SEC
9209: E5 3B 1010 SBC BSAVE
920B: 85 2A 1011 STA DISPL
920D: 68 1012 PLA
920E: 18 1013 IDENT6 CLC
920F: 65 6C 1014 ADC DATTYP
9211: 20 3A 80 1015 JSR GENADR
9214: 4C 49 80 1016 IDENT7 JMP GTOKEN
1017 *
9217: A9 0E 1018 FACAD2 LDA #14
9219: 20 21 92 1019 JSR IDENT4:A
921C: 4C 1A 8E 1020 JMP CHKRHP
1021 *
921F: A9 30 1022 IDENT4 LDA #48
9221: 48 1023 IDENT4:A PHA
1024 *
9222: 20 EC 8F 1025 JSR SYMWRK
9225: 20 52 80 1026 JSR PSHWRK
9228: 20 24 8E 1027 JSR GETSUB
922B: 20 55 80 1028 JSR PULWRK
922E: 20 F7 8F 1029 JSR WRKSYM
9231: 20 4D 8E 1030 JSR GET:DAT
9234: 20 43 8E 1031 JSR GET:LEV
9237: 20 15 90 1032 JSR GET:OFF
923A: 68 1033 PLA
923B: 18 1034 CLC
923C: 65 6C 1035 ADC DATTYP
923E: 4C 3A 80 1036 JMP GENADR
1037 *
1038 * ADDRESS (IDENTIFIER)
1039 *
1040 *
1041 FACADR EQU *
9241: 20 13 8E 1042 JSR CHKLHP
9244: 20 B6 94 1043 JSR GET:LOOK
9247: C9 56 1044 CMP #'V'
9249: F0 AE 1045 BEQ FACAD1
924B: C9 41 1046 CMP #'A'
924D: F0 C8 1047 BEQ FACAD2
924F: A2 17 1048 LDX #23
9251: 20 2E 80 1049 JSR ERROR
1050 *
1051 *
9254: A5 19 1052 FACSTR LDA TKNLEN
9256: C9 04 1053 CMP #4
9258: 90 05 1054 BLT FACNUM
925A: A2 1D 1055 FACERR1 LDX #29 ; STRING TOO BIG
925C: 20 2E 80 1056 JSR ERROR
1057 FACNUM EQU *
925F: 20 7F 90 1058 JSR VAL:MOVE
9262: 4C 14 92 1059 JMP IDENT7
1060 *
9265: 20 40 90 1061 PAREN JSR GETEXPR
9268: 4C 1A 8E 1062 JMP CHKRHP
1063 *
926B: A9 00 1064 FACMEM LDA #0
926D: 85 6C 1065 STA DATTYP
926F: F0 04 1066 BEQ FACM2
9271: A9 01 1067 FACMMC LDA #1
9273: 85 6C 1068 STA DATTYP
9275: A5 6C 1069 FACM2 LDA DATTYP
9277: 48 1070 PHA
9278: 20 24 8E 1071 JSR GETSUB
927B: 68 1072 PLA
927C: 18 1073 CLC
927D: 69 2E 1074 ADC #46
927F: D0 08 1075 BNE GENNOP1
1076 *
9281: 20 49 80 1077 FACNOT JSR GTOKEN
9284: 20 AD 91 1078 JSR FACTOR
9287: A9 20 1079 LDA #32
9289: 4C 37 80 1080 GENNOP1 JMP GENNOP
1081 *
928C: 20 AB 92 1082 SPCL:FAC JSR TKNCNV
928F: 20 37 80 1083 FACRND1 JSR GENNOP
9292: 4C 49 80 1084 JMP GTOKEN
1085 *
9295: A9 15 1086 S:FREEZE LDA #$15
9297: D0 0F 1087 BNE WAIT1:J
1088 *
9299: A9 5F 1089 CLOSE:FL LDA #$5F
929B: D0 0B 1090 BNE WAIT1:J
1091 *
929D: A9 60 1092 GET LDA #$60
929F: D0 07 1093 BNE WAIT1:J
1094 *
92A1: A9 61 1095 PUT LDA #$61
92A3: D0 03 1096 BNE WAIT1:J
1097 *
1098 *
92A5: 20 AB 92 1099 SPC:FAC2 JSR TKNCNV
92A8: 4C CE 95 1100 WAIT1:J JMP WAIT:1 ; now get its argument
1101 *
1102 TKNCNV EQU *
92AB: A5 16 1103 LDA TOKEN
92AD: 38 1104 SEC
92AE: E9 A0 1105 SBC #$A0
92B0: 60 1106 RTS
1107 *
92B1: A9 07 1108 FACGTKY LDA #7
92B3: D0 DA 1109 BNE FACRND1 ; getkey
1110 *
92B5: 49 1111 FACTB1 ASC 'I'
92B6: BE 91 1112 DA IDENT
92B8: 4E 1113 ASC 'N'
92B9: 5F 92 1114 DA FACNUM
92BB: 22 1115 FACTQT1 DFB $22 ; QUOTE SYMBOL
92BC: 54 92 1116 DA FACSTR
92BE: 28 1117 ASC '('
92BF: 65 92 1118 DA PAREN
92C1: 91 1119 DFB $91
92C2: 6B 92 1120 DA FACMEM ; MEM
92C4: 90 1121 DFB $90
92C5: 81 92 1122 DA FACNOT
92C7: A2 1123 DFB $A2
92C8: 71 92 1124 DA FACMMC ; MEMC
92CA: A9 1125 DFB $A9
92CB: 41 92 1126 DA FACADR
92CD: E6 1127 DFB $E6
92CE: 8C 92 1128 DA SPCL:FAC ; spritecollide
92D0: E7 1129 DFB $E7
92D1: 8C 92 1130 DA SPCL:FAC ; bkgndcollide
92D3: E8 1131 DFB $E8
92D4: 8C 92 1132 DA SPCL:FAC ; cursorx
92D6: E9 1133 DFB $E9
92D7: 8C 92 1134 DA SPCL:FAC ; cursory
92D9: EA 1135 DFB $EA
92DA: A5 92 1136 DA SPC:FAC2 ; clock
92DC: EB 1137 DFB $EB
92DD: A5 92 1138 DA SPC:FAC2 ; paddle
92DF: ED 1139 DFB $ED
92E0: A5 92 1140 DA SPC:FAC2 ; joystick
92E2: EF 1141 DFB $EF
92E3: 8C 92 1142 DA SPCL:FAC ; random
92E5: F0 1143 DFB $F0
92E6: 8C 92 1144 DA SPCL:FAC ; envelope
92E8: F1 1145 DFB $F1
92E9: 8C 92 1146 DA SPCL:FAC ; scrollx
92EB: F2 1147 DFB $F2
92EC: 8C 92 1148 DA SPCL:FAC ; scrolly
92EE: F3 1149 DFB $F3
92EF: A5 92 1150 DA SPC:FAC2 ; spritestatus
92F1: A7 1151 DFB $A7
92F2: B1 92 1152 DA FACGTKY ; getkey
92F4: EC 1153 DFB $EC
92F5: A5 92 1154 DA SPC:FAC2 ; spritex
92F7: EE 1155 DFB $EE
92F8: A5 92 1156 DA SPC:FAC2 ; spritey
92FA: F9 1157 DFB $F9
92FB: 8C 92 1158 DA SPCL:FAC ; invalid
92FD: F8 1159 DFB $F8
92FE: A5 92 1160 DA SPC:FAC2 ; abs
9300: FD 1161 DFB $FD
9301: 8C 92 1162 DA SPCL:FAC ; freezestatus
9303: 00 1163 DFB 0
1164 *
1165 * EXPRESSION
1166 *
9304: 20 A8 90 1167 EXPRES JSR CHK:STAK
9307: 20 ED 90 1168 JSR SIMEXP
930A: A5 16 1169 LDA TOKEN
930C: A2 14 1170 LDX #EXPTB1
930E: A0 93 1171 LDY #>EXPTB1
9310: 20 77 8F 1172 JSR TKNJMP
9313: 60 1173 RTS
1174 *
9314: 3D 1175 EXPTB1 ASC '='
9315: 27 93 1176 DA EXPR1
9317: 55 1177 ASC 'U'
9318: 27 93 1178 DA EXPR1
931A: 3C 1179 ASC '<'
931B: 27 93 1180 DA EXPR1
931D: 80 1181 DFB $80
931E: 27 93 1182 DA EXPR1
9320: 81 1183 DFB $81
9321: 27 93 1184 DA EXPR1
9323: 3E 1185 ASC '>'
9324: 27 93 1186 DA EXPR1
9326: 00 1187 DFB 0
1188 *
9327: 48 1189 EXPR1 PHA
9328: 20 49 80 1190 JSR GTOKEN
932B: 20 ED 90 1191 JSR SIMEXP
932E: 68 1192 PLA
932F: A2 36 1193 LDX #EXPTB3
9331: A0 93 1194 LDY #>EXPTB3
9333: 20 77 8F 1195 JSR TKNJMP
1196 *
9336: 3D 1197 EXPTB3 ASC '='
9337: 49 93 1198 DA EXPR2
9339: 55 1199 ASC 'U'
933A: 4F 93 1200 DA EXPR3
933C: 3C 1201 ASC '<'
933D: 53 93 1202 DA EXPR4
933F: 81 1203 DFB $81
9340: 57 93 1204 DA EXPR5
9342: 3E 1205 ASC '>'
9343: 5B 93 1206 DA EXPR6
9345: 80 1207 DFB $80
9346: 5F 93 1208 DA EXPR7
9348: 00 1209 DFB 0
1210 *
9349: A9 10 1211 EXPR2 LDA #16
934B: 20 37 80 1212 EXPR8 JSR GENNOP
934E: 60 1213 RTS
934F: A9 12 1214 EXPR3 LDA #18
9351: D0 F8 1215 BNE EXPR8
9353: A9 14 1216 EXPR4 LDA #20
9355: D0 F4 1217 BNE EXPR8
9357: A9 16 1218 EXPR5 LDA #22
9359: D0 F0 1219 BNE EXPR8
935B: A9 18 1220 EXPR6 LDA #24
935D: D0 EC 1221 BNE EXPR8
935F: A9 19 1222 EXPR7 LDA #25
9361: D0 E8 1223 BNE EXPR8
1224 *
1225 * STATEMENT
1226 *
9363: 20 A8 90 1227 STMNT JSR CHK:STAK
9366: A5 16 1228 LDA TOKEN
9368: A2 70 1229 LDX #STMNT1
936A: A0 93 1230 LDY #>STMNT1
936C: 20 77 8F 1231 JSR TKNJMP
936F: 60 1232 RTS
1233 *
9370: 49 1234 STMNT1 ASC 'I'
9371: DD 93 1235 DA ASSIGN
9373: 92 1236 DFB $92
9374: DE 96 1237 DA IF
9376: 9A 1238 DFB $9A
9377: 51 98 1239 DA FOR
9379: 96 1240 DFB $96
937A: 58 97 1241 DA WHILE
937C: 95 1242 DFB $95
937D: 8A 97 1243 DA CASE
937F: 98 1244 DFB $98
9380: 34 97 1245 DA REPEAT
9382: 88 1246 DFB $88
9383: 1E 97 1247 DA BEG
9385: 9E 1248 DFB $9E
9386: C0 94 1249 DA READ
9388: 9D 1250 DFB $9D
9389: 5B 94 1251 DA WRITE
938B: 91 1252 DFB $91
938C: 25 96 1253 DA MEM
938E: 9F 1254 DFB $9F
938F: 40 96 1255 DA CALLSB
9391: A2 1256 DFB $A2
9392: 2A 96 1257 DA MEMC
9394: A3 1258 DFB $A3
9395: 68 95 1259 DA CURSOR
9397: A5 1260 DFB $A5
9398: E5 95 1261 DA DEF:SPRT
939A: A6 1262 DFB $A6
939B: 16 96 1263 DA HPLOT
939D: AA 1264 DFB $AA
939E: CC 95 1265 DA WAIT
93A0: 81 1266 DFB $81
93A1: 9D 92 1267 DA GET
93A3: AD 1268 DFB $AD
93A4: 95 92 1269 DA S:FREEZE ; freezesprite (n)
93A6: AE 1270 DFB $AE
93A7: 99 92 1271 DA CLOSE:FL
93A9: AF 1272 DFB $AF
93AA: A1 92 1273 DA PUT
93AC: DF 1274 DFB $DF
93AD: 7B 95 1275 DA SPRITE
93AF: E0 1276 DFB $E0
93B0: 7B 95 1277 DA MVE:SPRT
93B2: E1 1278 DFB $E1
93B3: 7B 95 1279 DA VOICE
93B5: E2 1280 DFB $E2
93B6: 7B 95 1281 DA GRAPHICS
93B8: E3 1282 DFB $E3
93B9: 7B 95 1283 DA SOUND
93BB: E4 1284 DFB $E4
93BC: C5 95 1285 DA SETCLOCK
93BE: E5 1286 DFB $E5
93BF: D8 95 1287 DA SCROLL
93C1: A8 1288 DFB $A8
93C2: 63 95 1289 DA CLEAR
93C4: F4 1290 DFB $F4
93C5: 7B 95 1291 DA MVE:SPRT ; movesprite (6 args)
93C7: F5 1292 DFB $F5
93C8: A5 92 1293 DA SPC:FAC2 ; stopsprite
93CA: F6 1294 DFB $F6
93CB: A5 92 1295 DA SPC:FAC2 ; startsprite
93CD: F7 1296 DFB $F7
93CE: DE 95 1297 DA ANIM:SPT
93D0: FA 1298 DFB $FA
93D1: 36 94 1299 DA LOAD:FIL
93D3: FB 1300 DFB $FB
93D4: 36 94 1301 DA SAVE:FIL
93D6: FC 1302 DFB $FC
93D7: 36 94 1303 DA OPEN:FIL
93D9: FF 1304 DFB $FF
93DA: 4C 94 1305 DA WRITELN
93DC: 00 1306 DFB 0
1307 *
1308 * ASSIGNMENT
1309 *
93DD: 20 A6 8F 1310 ASSIGN JSR LOOKUP
93E0: A2 EC 1311 ASS1 LDX #ASSTB1
93E2: A0 93 1312 LDY #>ASSTB1
93E4: 20 77 8F 1313 JSR TKNJMP
93E7: A2 18 1314 LDX #24
93E9: 20 2E 80 1315 JSR ERROR
1316 *
93EC: 41 1317 ASSTB1 ASC 'A'
93ED: F9 93 1318 DA ASSARR
93EF: 56 1319 ASC 'V'
93F0: 0B 94 1320 DA ASSVAR
93F2: 59 1321 ASC 'Y'
93F3: 0B 94 1322 DA ASSVAR
93F5: 50 1323 ASC 'P'
93F6: 4D 96 1324 DA FNCPRC
93F8: 00 1325 DFB 0
1326 *
93F9: 20 EC 8F 1327 ASSARR JSR SYMWRK
93FC: 20 52 80 1328 JSR PSHWRK
93FF: A9 36 1329 LDA #54
9401: 18 1330 CLC
9402: 65 6C 1331 ADC DATTYP
9404: 48 1332 PHA
9405: 20 24 8E 1333 JSR GETSUB
9408: 4C 1A 94 1334 JMP ASS2
1335 *
940B: 20 EC 8F 1336 ASSVAR JSR SYMWRK
940E: 20 52 80 1337 JSR PSHWRK
9411: A9 32 1338 LDA #50
9413: 18 1339 CLC
9414: 65 6C 1340 ADC DATTYP
9416: 48 1341 PHA
9417: 20 49 80 1342 JSR GTOKEN
941A: A9 41 1343 ASS2 LDA #'A'
941C: A2 0D 1344 LDX #13
941E: 20 34 80 1345 JSR CHKTKN
9421: 20 40 90 1346 JSR GETEXPR
9424: 68 1347 PLA
9425: 20 55 80 1348 JSR PULWRK
9428: 20 F7 8F 1349 JSR WRKSYM
942B: 48 1350 PHA
942C: 20 43 8E 1351 JSR GET:LEV
942F: 20 15 90 1352 JSR GET:OFF
9432: 68 1353 PLA
9433: 4C 3A 80 1354 JMP GENADR
1355 *
1356 * LOAD/SAVE
1357 *
1358 OPEN:FIL EQU *
1359 LOAD:FIL EQU *
1360 SAVE:FIL EQU *
9436: 20 B3 95 1361 JSR ARGS3
9439: 48 1362 PHA
943A: 20 72 90 1363 JSR GET:COMM
943D: AD 0E 80 1364 LDA QUOT:SYM
9440: A2 08 1365 LDX #8 ; " expected
9442: 20 31 80 1366 JSR GETCHK
9445: 68 1367 PLA
9446: 20 6E 94 1368 JSR W:STRING
9449: 4C 1A 8E 1369 JMP CHKRHP
1370 *
1371 *
1372 * WRITELN
1373 *
944C: 20 49 80 1374 WRITELN JSR GTOKEN ; SEE IF ( PRESENT
944F: C9 28 1375 CMP #'('
9451: D0 03 1376 BNE WRITELN9 ; NOPE
9453: 20 5E 94 1377 JSR WRIT9
1378 WRITELN9 EQU *
9456: A9 5E 1379 LDA #$5E ; OUTPUT C/R
9458: 4C 37 80 1380 JMP GENNOP
1381 *
1382 *
1383 * WRITE
1384 *
945B: 20 13 8E 1385 WRITE JSR CHKLHP
945E: 20 49 80 1386 WRIT9 JSR GTOKEN
9461: CD 0E 80 1387 CMP QUOT:SYM
9464: D0 2B 1388 BNE WRIT1
9466: A9 23 1389 LDA #35
9468: 20 6E 94 1390 JSR W:STRING
946B: 4C A1 94 1391 JMP WRIT5
1392 *
1393 W:STRING EQU *
946E: 20 37 80 1394 JSR GENNOP
9471: A5 19 1395 LDA TKNLEN
9473: 20 37 80 1396 JSR GENNOP
9476: A0 00 1397 LDY #0
9478: B1 17 1398 WRIT2 LDA (TKNADR),Y
947A: CD 0E 80 1399 CMP QUOT:SYM
947D: D0 01 1400 BNE WRIT10
947F: C8 1401 INY
9480: C8 1402 WRIT10 INY
9481: AA 1403 TAX ; save A temporarily
9482: 98 1404 TYA ; save Y on stack
9483: 48 1405 PHA
9484: 8A 1406 TXA
9485: 20 37 80 1407 JSR GENNOP
9488: 68 1408 PLA
9489: A8 1409 TAY
948A: C6 19 1410 DEC TKNLEN
948C: D0 EA 1411 BNE WRIT2
948E: 4C 49 80 1412 JMP GTOKEN
1413 *
1414 WRIT1 EQU * ; here if not string
9491: C9 AB 1415 CMP #$AB ; CHR?
9493: F0 15 1416 BEQ W:CHR ; yes
9495: C9 AC 1417 CMP #$AC ; HEX?
9497: F0 19 1418 BEQ W:HEX ; yes
9499: 20 04 93 1419 JSR EXPRES ; just ordinary number - get it
949C: A9 1E 1420 LDA #30 ; output number
949E: 20 37 80 1421 JSR GENNOP
94A1: A5 16 1422 WRIT5 LDA TOKEN
94A3: C9 2C 1423 CMP #','
94A5: F0 B7 1424 BEQ WRIT9
94A7: 4C 1A 8E 1425 JMP CHKRHP
1426 *
1427 * here for write (chr(x))
1428 *
1429 W:CHR EQU *
94AA: A9 1F 1430 LDA #31 ; output character
1431 W:CHR1 EQU *
94AC: 20 CE 95 1432 JSR WAIT:1 ; process expression in parentheses
94AF: 4C A1 94 1433 JMP WRIT5 ; back for next item
1434 *
1435 * here for write (hex(x))
1436 *
1437 W:HEX EQU *
94B2: A9 21 1438 LDA #33 ; output hex
94B4: D0 F6 1439 BNE W:CHR1
1440 *
1441 *
1442 *
1443 * GET NEXT TOKEN - MUST BE IDENTIFIER
1444 * THEN LOOK IT UP IN SYMBOL TABLE
1445 *
94B6: A9 49 1446 GET:LOOK LDA #'I'
94B8: A2 04 1447 LDX #4
94BA: 20 31 80 1448 JSR GETCHK
94BD: 4C A6 8F 1449 JMP LOOKUP
1450 *
1451 *
1452 * READ
1453 *
94C0: 20 13 8E 1454 READ JSR CHKLHP
94C3: 20 B6 94 1455 READ8 JSR GET:LOOK
94C6: 20 EC 8F 1456 READ2 JSR SYMWRK
94C9: 20 52 80 1457 JSR PSHWRK
94CC: A2 00 1458 LDX #0
94CE: 8E A7 02 1459 STX COUNT1
94D1: C9 41 1460 CMP #'A'
94D3: F0 4D 1461 BEQ READ3
94D5: C9 56 1462 CMP #'V'
94D7: F0 05 1463 BEQ READ9
94D9: A2 0C 1464 LDX #12
94DB: 20 2E 80 1465 JSR ERROR
94DE: 20 49 80 1466 READ9 JSR GTOKEN
94E1: 48 1467 READ11 PHA
94E2: A9 1C 1468 LDA #28
94E4: 18 1469 CLC
94E5: 65 6C 1470 ADC DATTYP
94E7: AA 1471 TAX
94E8: 68 1472 PLA
94E9: C9 24 1473 READ4 CMP #'$'
94EB: D0 09 1474 BNE READ6
94ED: A2 17 1475 LDX #23
94EF: 8A 1476 READ5 TXA
94F0: 48 1477 PHA
94F1: 20 49 80 1478 JSR GTOKEN
94F4: 68 1479 PLA
94F5: AA 1480 TAX
94F6: 8A 1481 READ6 TXA
94F7: 20 37 80 1482 JSR GENNOP
94FA: 20 55 80 1483 JSR PULWRK
94FD: 20 F7 8F 1484 JSR WRKSYM
9500: 20 4D 8E 1485 JSR GET:DAT
9503: 20 43 8E 1486 READ10 JSR GET:LEV
9506: 20 15 90 1487 JSR GET:OFF
9509: A9 32 1488 LDA #50
950B: AE A7 02 1489 LDX COUNT1
950E: F0 02 1490 BEQ READ7
9510: A9 36 1491 LDA #54
9512: 18 1492 READ7 CLC
9513: 65 6C 1493 ADC DATTYP
9515: 20 3A 80 1494 JSR GENADR
9518: A5 16 1495 READ7:A LDA TOKEN
951A: C9 2C 1496 CMP #','
951C: F0 A5 1497 BEQ READ8
951E: 20 1A 8E 1498 JSR CHKRHP
9521: 60 1499 RTS
9522: A5 6C 1500 READ3 LDA DATTYP
9524: 48 1501 PHA
9525: 20 49 80 1502 JSR GTOKEN
9528: CD 0C 80 1503 CMP LHB
952B: F0 25 1504 BEQ READ3:A
952D: 68 1505 PLA
952E: 85 6C 1506 STA DATTYP
9530: D0 05 1507 BNE READ3:B
9532: A2 18 1508 LDX #24
9534: 20 2E 80 1509 JSR ERROR
9537: 20 55 80 1510 READ3:B JSR PULWRK
953A: 20 F7 8F 1511 JSR WRKSYM
953D: A9 25 1512 LDA #37 ; READ STRING
953F: 20 37 80 1513 JSR GENNOP
9542: 20 43 8E 1514 JSR GET:LEV
9545: 20 15 90 1515 JSR GET:OFF
9548: A0 06 1516 LDY #SYMSUB
954A: B1 4E 1517 LDA (SYMITM),Y
954C: 20 3A 80 1518 JSR GENADR ; A = LENGTH
954F: 4C 18 95 1519 JMP READ7:A
1520 *
9552: 20 40 90 1521 READ3:A JSR GETEXPR
9555: 20 38 8E 1522 JSR CHKRHB
9558: EE A7 02 1523 INC COUNT1
955B: 68 1524 PLA
955C: 85 6C 1525 STA DATTYP
955E: A5 16 1526 LDA TOKEN
9560: 4C E1 94 1527 JMP READ11
1528 *
1529 * CLEAR
1530 *
9563: A9 09 1531 CLEAR LDA #9
9565: 4C DA 95 1532 JMP SCROLL:1
1533 *
1534 *
1535 * CURSOR
1536 *
9568: A9 13 1537 CURSOR LDA #19
956A: 48 1538 PHA
1539 *
1540 *
956B: 20 13 8E 1541 TWO:OP JSR CHKLHP
956E: 20 40 90 1542 JSR GETEXPR
9571: 20 79 90 1543 ONE:OP2 JSR GET:ITEM
9574: 20 1A 8E 1544 ONE:OP JSR CHKRHP
9577: 68 1545 PLA
9578: 4C 37 80 1546 JMP GENNOP
1547 *
1548 * GRAPHICS/SOUND/SPRITE/MOVESPRITE/VOICE
1549 *
1550 GRAPHICS EQU *
1551 SOUND EQU *
1552 SPRITE EQU *
1553 MVE:SPRT EQU *
1554 VOICE EQU *
957B: 20 AB 92 1555 JSR TKNCNV
957E: 48 1556 PHA ; SAVE FOR LATER
957F: 20 13 8E 1557 JSR CHKLHP
1558 VOICE:1 EQU *
9582: 20 40 90 1559 JSR GETEXPR
9585: 20 79 90 1560 JSR GET:ITEM
9588: 68 1561 PLA
9589: 48 1562 PHA
958A: C9 54 1563 CMP #$54 ; 6-arg move sprite
958C: F0 0A 1564 BEQ VOICE:3
958E: C9 42 1565 CMP #$42 ; graphics
9590: B0 12 1566 BGE VOICE:2 ; only 2 arguments wanted
9592: 20 79 90 1567 JSR GET:ITEM
9595: 4C A4 95 1568 JMP VOICE:2
1569 VOICE:3 EQU * ; want 4 more args
9598: 20 79 90 1570 JSR GET:ITEM
959B: 20 79 90 1571 JSR GET:ITEM
959E: 20 79 90 1572 JSR GET:ITEM
95A1: 20 79 90 1573 JSR GET:ITEM
1574 VOICE:2 EQU *
95A4: 68 1575 PLA
95A5: 48 1576 PHA
95A6: 20 37 80 1577 JSR GENNOP
95A9: A5 16 1578 LDA TOKEN
95AB: C9 2C 1579 CMP #','
95AD: F0 D3 1580 BEQ VOICE:1 ; another 3
95AF: 68 1581 PLA
95B0: 4C 1A 8E 1582 JMP CHKRHP
1583 *
1584 * Process 3 arguments
1585 *
1586 ARGS3 EQU *
95B3: 20 AB 92 1587 JSR TKNCNV
95B6: 48 1588 PHA
95B7: 20 13 8E 1589 JSR CHKLHP
95BA: 20 40 90 1590 JSR GETEXPR
95BD: 20 79 90 1591 JSR GET:ITEM
95C0: 20 79 90 1592 JSR GET:ITEM
95C3: 68 1593 PLA
95C4: 60 1594 RTS
1595 *
1596 * SETCLOCK ( hours, mins, secs, 10ths. )
1597 *
1598 SETCLOCK EQU *
95C5: 20 B3 95 1599 JSR ARGS3
95C8: 48 1600 PHA
95C9: 4C 71 95 1601 JMP ONE:OP2
1602 *
95CC: A9 39 1603 WAIT LDA #57
95CE: 48 1604 WAIT:1 PHA
95CF: 20 13 8E 1605 JSR CHKLHP
95D2: 20 40 90 1606 JSR GETEXPR
95D5: 4C 74 95 1607 JMP ONE:OP
1608 *
1609 * SCROLL
1610 *
1611 SCROLL EQU *
95D8: A9 45 1612 LDA #69
95DA: 48 1613 SCROLL:1 PHA
95DB: 4C 6B 95 1614 JMP TWO:OP
1615 *
1616 ANIM:SPT EQU *
95DE: A9 57 1617 LDA #$57
95E0: 48 1618 PHA
95E1: A9 11 1619 LDA #17 ; count plus 16 pointers
95E3: D0 05 1620 BNE DEF:SPT2
1621 *
1622 *
1623 * DEFINESPRITE
1624 *
1625 DEF:SPRT EQU *
95E5: A9 01 1626 LDA #1 ; PCODE
95E7: 48 1627 PHA
95E8: A9 15 1628 LDA #21 ; row count
95EA: 48 1629 DEF:SPT2 PHA
95EB: 20 13 8E 1630 JSR CHKLHP
95EE: 20 40 90 1631 JSR GETEXPR ; sprite pointer
95F1: 20 79 90 1632 DEF:1 JSR GET:ITEM ; next row
95F4: 68 1633 PLA
95F5: AA 1634 TAX
95F6: CA 1635 DEX ; one less row
95F7: F0 16 1636 BEQ DEF:8 ; zero? none left
95F9: 8A 1637 TXA
95FA: 48 1638 PHA
95FB: A5 16 1639 LDA TOKEN
95FD: C9 2C 1640 CMP #','
95FF: F0 F0 1641 BEQ DEF:1 ; more supplied
1642 *
1643 * no more supplied - zero out rest
1644 *
9601: A9 80 1645 DEF:2 LDA #$80 ; load zero pcode
9603: 20 37 80 1646 JSR GENNOP
9606: 68 1647 PLA
9607: AA 1648 TAX
9608: CA 1649 DEX
9609: F0 04 1650 BEQ DEF:8 ; all done
960B: 8A 1651 TXA
960C: 48 1652 PHA
960D: D0 F2 1653 BNE DEF:2 ; do another
960F: 20 1A 8E 1654 DEF:8 JSR CHKRHP
9612: 68 1655 PLA ; pcode for define/animate sprite
9613: 4C 37 80 1656 GENNOP2 JMP GENNOP
1657 *
1658 *
1659 * HPLOT
1660 *
9616: 20 13 8E 1661 HPLOT JSR CHKLHP
9619: 20 40 90 1662 JSR GETEXPR ; colour
961C: A9 03 1663 LDA #3
961E: 48 1664 PHA
961F: 20 79 90 1665 JSR GET:ITEM
9622: 4C 71 95 1666 JMP ONE:OP2
1667 *
1668 *
1669 * MEM
1670 *
9625: A9 00 1671 MEM LDA #0
9627: 48 1672 PHA
9628: F0 03 1673 BEQ MEM2
962A: A9 01 1674 MEMC LDA #1
962C: 48 1675 PHA
962D: 20 24 8E 1676 MEM2 JSR GETSUB
9630: A9 41 1677 LDA #'A'
9632: A2 0D 1678 LDX #13
9634: 20 34 80 1679 JSR CHKTKN
9637: 20 40 90 1680 JSR GETEXPR
963A: 68 1681 PLA
963B: 18 1682 CLC
963C: 69 34 1683 ADC #52
963E: D0 D3 1684 BNE GENNOP2
1685 *
1686 * CALL ABSOLUTE ADDRESS
1687 *
9640: 20 13 8E 1688 CALLSB JSR CHKLHP
9643: 20 40 90 1689 JSR GETEXPR
9646: 20 1A 8E 1690 JSR CHKRHP
9649: A9 2B 1691 LDA #43
964B: D0 C6 1692 BNE GENNOP2
1693 *
1694 * FUNCTION OR PROCEDURE CALL
1695 *
964D: A9 00 1696 FNCPRC LDA #0
964F: 8D A7 02 1697 STA COUNT1
9652: A0 06 1698 LDY #SYMARG
9654: B1 4E 1699 LDA (SYMITM),Y
9656: F0 37 1700 BEQ FNC1
9658: 20 13 8E 1701 JSR CHKLHP
965B: AD A7 02 1702 FNC2 LDA COUNT1
965E: 48 1703 PHA
965F: 20 EC 8F 1704 JSR SYMWRK
9662: 20 52 80 1705 JSR PSHWRK
9665: 20 40 90 1706 JSR GETEXPR
9668: 20 55 80 1707 JSR PULWRK
966B: 20 F7 8F 1708 JSR WRKSYM
966E: 68 1709 PLA
966F: 8D A7 02 1710 STA COUNT1
9672: EE A7 02 1711 INC COUNT1
9675: A5 16 1712 LDA TOKEN
9677: C9 2C 1713 CMP #','
9679: F0 E0 1714 BEQ FNC2
967B: AD A7 02 1715 LDA COUNT1
967E: A0 06 1716 LDY #SYMARG
9680: D1 4E 1717 CMP (SYMITM),Y
9682: F0 05 1718 BEQ FNC3
9684: A2 23 1719 LDX #35
9686: 20 2E 80 1720 JSR ERROR
9689: 20 1A 8E 1721 FNC3 JSR CHKRHP
968C: 4C 92 96 1722 JMP FNC5
968F: 20 49 80 1723 FNC1 JSR GTOKEN
9692: 20 43 8E 1724 FNC5 JSR GET:LEV
9695: 20 15 90 1725 JSR GET:OFF
9698: A0 08 1726 LDY #SYMDAT
969A: B1 4E 1727 LDA (SYMITM),Y
969C: D0 11 1728 BNE FNC5A
969E: A5 2C 1729 LDA OFFSET
96A0: 38 1730 SEC
96A1: E5 26 1731 SBC PCODE
96A3: 85 2C 1732 STA OFFSET
96A5: A5 2D 1733 LDA OFFSET+1
96A7: E5 27 1734 SBC PCODE+1
96A9: 85 2D 1735 STA OFFSET+1
96AB: A9 27 1736 LDA #39
96AD: D0 02 1737 BNE FNC5B
96AF: A9 38 1738 FNC5A LDA #56
96B1: 20 3A 80 1739 FNC5B JSR GENADR
96B4: AD A7 02 1740 LDA COUNT1
96B7: F0 1F 1741 BEQ FNC4
96B9: AD A7 02 1742 LDA COUNT1 ; TIMES 3
96BC: 0A 1743 ASL
96BD: B0 1A 1744 BCS FNC6
96BF: 6D A7 02 1745 ADC COUNT1
96C2: 8D A7 02 1746 STA COUNT1
96C5: B0 12 1747 BCS FNC6
96C7: A9 00 1748 LDA #0
96C9: 38 1749 SEC
96CA: ED A7 02 1750 SBC COUNT1
96CD: 85 2E 1751 STA OPND
96CF: A9 FF 1752 LDA #$FF
96D1: 85 2F 1753 STA OPND+1
96D3: A9 3B 1754 LDA #59
96D5: 20 85 80 1755 JSR GENJMP
96D8: 60 1756 FNC4 RTS
96D9: A2 0F 1757 FNC6 LDX #15
96DB: 20 2E 80 1758 JSR ERROR
1759 *
1760 *
1761 * IF
1762 *
96DE: 20 40 90 1763 IF JSR GETEXPR
96E1: A9 93 1764 LDA #$93
96E3: A2 10 1765 LDX #16
96E5: 20 34 80 1766 JSR CHKTKN
96E8: 20 49 80 1767 JSR GTOKEN
96EB: 20 02 90 1768 JSR PSHPCODE
96EE: A9 3D 1769 LDA #61
96F0: 20 40 80 1770 JSR GENNJM
96F3: 20 63 93 1771 JSR STMNT
96F6: A5 16 1772 LDA TOKEN
96F8: C9 94 1773 CMP #$94 ; ELSE
96FA: F0 07 1774 BEQ IF1
96FC: 20 55 80 1775 IF2 JSR PULWRK
96FF: 20 4F 80 1776 JSR FIXAD
9702: 60 1777 RTS
9703: 20 55 80 1778 IF1 JSR PULWRK ; HERE FOR ELSE
9706: 20 67 90 1779 JSR WRK:WRKD
9709: 20 02 90 1780 JSR PSHPCODE
970C: 20 3D 80 1781 JSR GENNJP
970F: 20 5C 90 1782 JSR WRKD:WRK
9712: 20 4F 80 1783 JSR FIXAD
9715: 20 49 80 1784 JSR GTOKEN
9718: 20 63 93 1785 JSR STMNT
971B: 4C FC 96 1786 JMP IF2
1787 *
1788 * BEGIN
1789 *
971E: 20 49 80 1790 BEG JSR GTOKEN
9721: 20 63 93 1791 JSR STMNT
9724: A5 16 1792 LDA TOKEN
9726: C9 3B 1793 CMP #';'
9728: F0 F4 1794 BEQ BEG
972A: A9 89 1795 LDA #$89 ; END
972C: A2 11 1796 LDX #17
972E: 20 34 80 1797 JSR CHKTKN
9731: 4C 49 80 1798 JMP GTOKEN
1799 *
1800 * REPEAT
1801 *
9734: 20 02 90 1802 REPEAT JSR PSHPCODE
9737: 20 49 80 1803 REP1 JSR GTOKEN
973A: 20 63 93 1804 JSR STMNT
973D: A5 16 1805 LDA TOKEN
973F: C9 3B 1806 CMP #';'
9741: F0 F4 1807 BEQ REP1
9743: A9 99 1808 LDA #$99
9745: A2 0A 1809 LDX #10
9747: 20 34 80 1810 JSR CHKTKN
974A: 20 40 90 1811 JSR GETEXPR
974D: 20 55 80 1812 JSR PULWRK
9750: 20 51 90 1813 JSR WRK:OPND
9753: A9 3D 1814 LDA #61
9755: 4C 88 80 1815 JMP GENRJMP
1816 *
1817 * WHILE
1818 *
9758: 20 02 90 1819 WHILE JSR PSHPCODE
975B: 20 40 90 1820 JSR GETEXPR
975E: 20 02 90 1821 JSR PSHPCODE
9761: A9 3D 1822 LDA #61
9763: 20 40 80 1823 JSR GENNJM
9766: A9 97 1824 LDA #$97
9768: A2 12 1825 LDX #18
976A: 20 34 80 1826 JSR CHKTKN
976D: 20 49 80 1827 JSR GTOKEN
9770: 20 63 93 1828 JSR STMNT
9773: 20 55 80 1829 JSR PULWRK
9776: 20 67 90 1830 JSR WRK:WRKD
9779: 20 55 80 1831 JSR PULWRK
977C: 20 51 90 1832 JSR WRK:OPND
977F: A9 3C 1833 LDA #60
9781: 20 88 80 1834 JSR GENRJMP
9784: 20 5C 90 1835 JSR WRKD:WRK
9787: 4C 4F 80 1836 JMP FIXAD
1837 *
1838 * CASE
1839 *
978A: 20 40 90 1840 CASE JSR GETEXPR
978D: A9 85 1841 LDA #$85 ; OF
978F: A2 19 1842 LDX #25
9791: 20 34 80 1843 JSR CHKTKN
9794: A9 01 1844 LDA #1
9796: 8D A7 02 1845 STA COUNT1
9799: A9 00 1846 CASE7 LDA #0
979B: 8D A8 02 1847 STA COUNT2
1848 CASE2 EQU *
979E: A9 2A 1849 LDA #42 ; make copy of selector
97A0: 20 37 80 1850 JSR GENNOP
97A3: 20 40 90 1851 JSR GETEXPR ; next expression to compare
97A6: A9 10 1852 LDA #16
97A8: 20 37 80 1853 JSR GENNOP
97AB: A5 16 1854 LDA TOKEN
97AD: C9 3A 1855 CMP #':'
97AF: F0 15 1856 BEQ CASE1
97B1: A9 2C 1857 LDA #','
97B3: A2 05 1858 LDX #5
97B5: 20 34 80 1859 JSR CHKTKN
97B8: 20 02 90 1860 JSR PSHPCODE
97BB: A9 3E 1861 LDA #62
97BD: 20 40 80 1862 JSR GENNJM
97C0: EE A8 02 1863 INC COUNT2
97C3: 4C 9E 97 1864 JMP CASE2
97C6: 20 46 90 1865 CASE1 JSR PCD:WRKD
97C9: A9 3D 1866 LDA #61
97CB: 20 40 80 1867 JSR GENNJM
97CE: AD A8 02 1868 LDA COUNT2
97D1: F0 0B 1869 BEQ CASE3
97D3: 20 55 80 1870 CASE4 JSR PULWRK
97D6: 20 4F 80 1871 JSR FIXAD
97D9: CE A8 02 1872 DEC COUNT2
97DC: D0 F5 1873 BNE CASE4
97DE: 20 5C 90 1874 CASE3 JSR WRKD:WRK
97E1: 20 52 80 1875 JSR PSHWRK
97E4: 20 49 80 1876 JSR GTOKEN
97E7: AD A7 02 1877 LDA COUNT1
97EA: 48 1878 PHA
97EB: 20 63 93 1879 JSR STMNT
97EE: 68 1880 PLA
97EF: 8D A7 02 1881 STA COUNT1
97F2: A5 16 1882 LDA TOKEN
97F4: C9 94 1883 CMP #$94 ; ELSE
97F6: F0 1C 1884 BEQ CASE5
97F8: C9 3B 1885 CMP #';'
97FA: D0 38 1886 BNE CASE6
97FC: 20 46 90 1887 JSR PCD:WRKD
97FF: 20 3D 80 1888 JSR GENNJP
9802: 20 55 80 1889 JSR PULWRK
9805: 20 4F 80 1890 JSR FIXAD
9808: 20 5C 90 1891 JSR WRKD:WRK
980B: 20 52 80 1892 JSR PSHWRK
980E: EE A7 02 1893 INC COUNT1
9811: 4C 99 97 1894 JMP CASE7
9814: 20 46 90 1895 CASE5 JSR PCD:WRKD
9817: 20 3D 80 1896 JSR GENNJP
981A: 20 55 80 1897 JSR PULWRK
981D: 20 4F 80 1898 JSR FIXAD
9820: 20 5C 90 1899 JSR WRKD:WRK
9823: 20 52 80 1900 JSR PSHWRK
9826: 20 49 80 1901 JSR GTOKEN
9829: AD A7 02 1902 LDA COUNT1
982C: 48 1903 PHA
982D: 20 63 93 1904 JSR STMNT
9830: 68 1905 PLA
9831: 8D A7 02 1906 STA COUNT1
9834: A9 89 1907 CASE6 LDA #$89 ; END
9836: A2 11 1908 LDX #17
9838: 20 34 80 1909 JSR CHKTKN
983B: AD A7 02 1910 LDA COUNT1
983E: F0 0B 1911 BEQ CASE8
9840: 20 55 80 1912 CASE9 JSR PULWRK
9843: 20 4F 80 1913 JSR FIXAD
9846: CE A7 02 1914 DEC COUNT1
9849: D0 F5 1915 BNE CASE9
984B: 20 1F 99 1916 CASE8 JSR FOR6
984E: 4C 49 80 1917 JMP GTOKEN
1918 *
1919 * FOR
1920 *
9851: A9 49 1921 FOR LDA #'I'
9853: A2 04 1922 LDX #4
9855: 20 31 80 1923 JSR GETCHK
9858: 20 A6 8F 1924 JSR LOOKUP
985B: C9 56 1925 FOR1 CMP #'V'
985D: F0 09 1926 BEQ FOR2
985F: C9 59 1927 CMP #'Y'
9861: F0 05 1928 BEQ FOR2
9863: A2 0C 1929 LDX #12
9865: 20 2E 80 1930 JSR ERROR
9868: 20 0B 94 1931 FOR2 JSR ASSVAR
986B: 20 EC 8F 1932 JSR SYMWRK
986E: A9 00 1933 LDA #0
9870: 8D A7 02 1934 STA COUNT1
9873: A5 16 1935 LDA TOKEN
9875: C9 9B 1936 CMP #$9B ; TO
9877: F0 0A 1937 BEQ FOR3
9879: A9 9C 1938 LDA #$9C ; DOWNTO
987B: A2 1C 1939 LDX #28
987D: 20 34 80 1940 JSR CHKTKN
9880: CE A7 02 1941 DEC COUNT1
9883: AD A7 02 1942 FOR3 LDA COUNT1
9886: 48 1943 PHA
9887: 20 52 80 1944 JSR PSHWRK
988A: 20 40 90 1945 JSR GETEXPR
988D: 20 55 80 1946 JSR PULWRK
9890: 20 F7 8F 1947 JSR WRKSYM
9893: 68 1948 PLA
9894: 8D A7 02 1949 STA COUNT1
9897: 20 02 90 1950 JSR PSHPCODE
989A: A9 2A 1951 LDA #42
989C: 20 37 80 1952 JSR GENNOP
989F: 20 43 8E 1953 JSR GET:LEV
98A2: 20 15 90 1954 JSR GET:OFF
98A5: 20 4D 8E 1955 JSR GET:DAT
98A8: 18 1956 CLC
98A9: 69 2C 1957 ADC #44
98AB: 20 3A 80 1958 JSR GENADR
98AE: A9 16 1959 LDA #22 ; UP (GEQ)
98B0: AE A7 02 1960 LDX COUNT1
98B3: F0 02 1961 BEQ FOR4
98B5: A9 19 1962 LDA #25 ; DOWN (LEQ)
98B7: 20 37 80 1963 FOR4 JSR GENNOP
98BA: 20 02 90 1964 JSR PSHPCODE
98BD: A9 3D 1965 LDA #61
98BF: 20 40 80 1966 JSR GENNJM
98C2: AD A7 02 1967 LDA COUNT1
98C5: 48 1968 PHA
98C6: 20 EC 8F 1969 JSR SYMWRK
98C9: 20 52 80 1970 JSR PSHWRK
98CC: A9 97 1971 LDA #$97
98CE: A2 12 1972 LDX #18
98D0: 20 34 80 1973 JSR CHKTKN
98D3: 20 49 80 1974 JSR GTOKEN
98D6: 20 63 93 1975 JSR STMNT
98D9: 20 55 80 1976 JSR PULWRK
98DC: 20 F7 8F 1977 JSR WRKSYM
98DF: 20 43 8E 1978 JSR GET:LEV
98E2: 20 4D 8E 1979 JSR GET:DAT
98E5: 20 15 90 1980 JSR GET:OFF
98E8: A5 6C 1981 LDA DATTYP
98EA: 18 1982 CLC
98EB: 69 2C 1983 ADC #44
98ED: 20 3A 80 1984 JSR GENADR
98F0: 68 1985 PLA
98F1: 8D A7 02 1986 STA COUNT1
98F4: A9 26 1987 LDA #38
98F6: AE A7 02 1988 LDX COUNT1
98F9: F0 02 1989 BEQ FOR5
98FB: A9 28 1990 LDA #40 ; DEC
98FD: 20 37 80 1991 FOR5 JSR GENNOP
9900: A9 32 1992 LDA #50
9902: 18 1993 CLC
9903: 65 6C 1994 ADC DATTYP
9905: 20 3A 80 1995 JSR GENADR
9908: 20 55 80 1996 JSR PULWRK
990B: 20 67 90 1997 JSR WRK:WRKD
990E: 20 55 80 1998 JSR PULWRK
9911: 20 51 90 1999 JSR WRK:OPND
9914: A9 3C 2000 LDA #60
9916: 20 88 80 2001 JSR GENRJMP
9919: 20 5C 90 2002 JSR WRKD:WRK
991C: 20 4F 80 2003 JSR FIXAD
991F: A9 FF 2004 FOR6 LDA #$FF
9921: 85 2F 2005 STA OPND+1
9923: A9 FD 2006 LDA #$FD
9925: 85 2E 2007 STA OPND
9927: A9 3B 2008 LDA #59
9929: 4C 85 80 2009 JMP GENJMP
992C: 00 2011 BRK
--End assembly, 2905 bytes, Errors: 0
| 46.908143
| 93
| 0.369989
|
a53ff0072b6f1965a853e7527b69caa3d5cbd5c6
| 1,775
|
asm
|
Assembly
|
programs/oeis/017/A017719.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/017/A017719.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/017/A017719.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A017719: Binomial coefficients C(n,55).
; 1,56,1596,30856,455126,5461512,55525372,491796152,3872894697,27540584512,179013799328,1074082795968,5996962277488,31368725759168,154603005527328,721480692460864,3201570572795084,13559593014190944,54991682779774384,214178132931752864,803167998494073240,2906703232645217440,10173461314258261040,34501303587484537440,113566790975469935740,363413731121503794368,1132173546955454128608,3438452994457305131328,10192557090712725925008,29523268814478240610368,83649261641021681729376,232059241971866600926656,630911064111012321269346,1682429504296032856718256,4404006643598438948468376,11324588512110271581775824,28626043183389853165044444,71178269537077472734705104,174199449130215920113883544,419865338929238371556539824,997180179956941132446782082,2334860909167471919875392192,5392416861648685148283643872,12289694242827235919344118592,27651812046361280818524266832,61448471214136179596720592960,134919469404951176940625649760,292803954878830213786038644160,628308486510823167082541257260,1333552706063787946460903892960,2800460682733954687567898175216,5820565340584297978082298168096,11976932527740766993361651999736,24405824773509487458170913508896,49263609265046928387789436527216,98527218530093856775578873054432,195295022443578894680165266232892,383737587959312915862780874001472,747626679989695853318866185554592,1444566805403819106412724494122432,2768753043690653287291055280401328,5265169722428127562717416598795968,9935884798775660078031253904179488,18610069940563934749328380328463168,34603098795736066174532457173236203,63882643930589660629906074781359144,117118180539414377821494470432491764,213259970534456031257049632727820824,385749652584383703597310365081205314,693231259716863467334296887972021144
add $0,55
bin $0,55
| 295.833333
| 1,711
| 0.948169
|
381f6d98a8e668aa8e37ae6f99827d4e438c160e
| 243
|
asm
|
Assembly
|
programs/oeis/017/A017555.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/017/A017555.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/017/A017555.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A017555: (12n+2)^11.
; 2048,4049565169664,3670344486987776,238572050223552512,4882812500000000000,52036560683837093888,364375289404334925824,1903193578437064103936,8007313507497959524352,28531167061100000000000
mul $0,12
add $0,2
pow $0,11
| 34.714286
| 189
| 0.855967
|
af8f2bacaaca3928ab7bc3a45bbe6509bd8f0b8b
| 531
|
asm
|
Assembly
|
oeis/120/A120799.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/120/A120799.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/120/A120799.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A120799: 3^(n^2)-2^n.
; Submitted by Jon Maiga
; 0,1,77,19675,43046705,847288609411,150094635296999057,239299329230617529589955,3433683820292512484657849089025,443426488243037769948249630619149892291,515377520732011331036461129765621272702107520977,5391030899743293631239539488528815119194426882613553317155,507528786056415600719754159741696356908742250191663887263627442110785,430023359390034222082732011948356798311147247214997695270038813781532497547413091
mov $1,3
pow $1,$0
pow $1,$0
mov $2,2
pow $2,$0
sub $1,$2
mov $0,$1
| 44.25
| 412
| 0.87194
|
21a277e340a3557c9a90449bafbaf9c0b29a0262
| 343
|
asm
|
Assembly
|
programs/oeis/132/A132119.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/132/A132119.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/132/A132119.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A132119: A002260 + A000027 - A000012 as infinite lower triangular matrices.
; 1,3,3,6,5,6,10,8,9,10,15,12,13,14,15,21,17,18,19,20,21,28,23,24,25,26,27,28,36,30,31,32,33,34,35,36,45,38,39,40,41,42,43,44,45,55,47,48,49,50,51,52,53,54,55
mov $1,$0
seq $0,130296 ; Triangle read by rows: T[i,1]=i, T[i,j]=1 for 1 < j <= i = 1,2,3,...
add $0,$1
| 49
| 158
| 0.635569
|
efd723e1368dbd522664697e7ec4bf186d4a30a7
| 7,112
|
asm
|
Assembly
|
ver0/2_pro/3priority/pmtest3.asm
|
RongbinZhuang/simpleOS
|
81a817eb5f2c7891ab3f107a5cd5e0f0c31af143
|
[
"MIT"
] | null | null | null |
ver0/2_pro/3priority/pmtest3.asm
|
RongbinZhuang/simpleOS
|
81a817eb5f2c7891ab3f107a5cd5e0f0c31af143
|
[
"MIT"
] | null | null | null |
ver0/2_pro/3priority/pmtest3.asm
|
RongbinZhuang/simpleOS
|
81a817eb5f2c7891ab3f107a5cd5e0f0c31af143
|
[
"MIT"
] | null | null | null |
;pmtest3.asm
;nasm pmtest3.asm -o pmtest3.com
%include "pm.inc" ;常量,宏
org 0100h
jmp LABEL_BEGIN
[section .gdt]
;GDT
; 段基址, 段界限 , 属性
LABEL_GDT: Descriptor 0, 0, 0
; 空描述符
LABEL_DESC_NORMAL: Descriptor 0, 0ffffh, DA_DRW
; Normal 描述符
LABEL_DESC_CODE32: Descriptor 0, SegCode32Len-1,DA_C + DA_32
; 非一致代码段, 32
LABEL_DESC_CODE16: Descriptor 0, 0ffffh, DA_C ; 非一致代码段, 16
LABEL_DESC_DATA: Descriptor 0, DataLen - 1, DA_DRW+DA_DPL1 ; Data
LABEL_DESC_STACK: Descriptor 0, TopOfStack, DA_DRWA + DA_32; Stack, 32 位
LABEL_DESC_LDT: Descriptor 0, LDTLen - 1, DA_LDT ; LDT
LABEL_DESC_VIDEO:
Descriptor 0B8000H ,0FFFFH ,DA_DRW+DA_DPL3
LABEL_DESC_CODE_DEST:
Descriptor 0 ,SegCodeDestLen-1 ,DA_C+DA_32
LABEL_CALL_GATE_TEST:
Gate SelectorCodeDest ,0 ,0 ,DA_386CGate+DA_DPL3
; 目标选择子 偏移 Dcount 属性
LABEL_DESC_CODE_RING3:
Descriptor 0 ,SegCodeRing3Len-1 ,DA_C+DA_32+DA_DPL3
LABEL_DESC_STACK3:
Descriptor 0 ,TopOfStack3 ,DA_DRWA+DA_32+DA_DPL3
LABEL_DESC_TSS:
Descriptor 0 ,TSSLen-1 ,DA_386TSS
; GDT 结束
GdtLen equ $ - LABEL_GDT ; GDT长度
GdtPtr dw GdtLen - 1 ; GDT界限
dd 0 ; GDT基地址
; GDT 选择子
SelectorNormal equ LABEL_DESC_NORMAL - LABEL_GDT
SelectorCode32 equ LABEL_DESC_CODE32 - LABEL_GDT
SelectorCode16 equ LABEL_DESC_CODE16 - LABEL_GDT
SelectorData equ LABEL_DESC_DATA - LABEL_GDT
SelectorStack equ LABEL_DESC_STACK - LABEL_GDT
SelectorLDT equ LABEL_DESC_LDT - LABEL_GDT
SelectorVideo equ LABEL_DESC_VIDEO - LABEL_GDT
SelectorCodeDest equ LABEL_DESC_CODE_DEST- LABEL_GDT
SelectorCallGateTest equ LABEL_CALL_GATE_TEST-LABEL_GDT
SelectorCodeRing3 equ LABEL_DESC_CODE_RING3 -LABEL_GDT+SA_RPL3
SelectorStack3 equ LABEL_DESC_STACK3 -LABEL_GDT+SA_RPL3
SelectorTSS equ LABEL_DESC_TSS -LABEL_GDT
; END of [SECTION .gdt]
[section .s16]
align 32
[BITS 32]
LABEL_DATA:
SPValueInRealMode dw 0
PMMessage: db "In Protect Mode now.",0
OffsetPMMessage equ PMMessage - $$
StrTest: db "HELLOWORLD",0
OffsetStrText equ StrTest-$$
DataLen equ $-LABEL_DATA
[section .gs]
ALIGN 32
[BITS 32]
LABEL_STACK:
times 512 db 0
TopOfStack equ $-LABEL_STACK-1
[section .s16]
[BITS 16]
LABEL_BEGIN:
mov ax ,cs
mov ds ,ax
mov es ,ax
mov ss ,ax
mov sp ,0100h
mov [LABEL_GO_BACK_TO_REAL+3] ,ax
mov [SPValueInRealMode] ,sp
mov ax ,cs
movzx eax ,ax
shl eax ,4
add eax ,LABEL_SEG_CODE16
mov word[LABEL_DESC_CODE16+2] ,ax
shr eax ,16
mov byte[LABEL_DESC_CODE16+4] ,al
mov byte[LABEL_DESC_CODE16+7] ,ah
xor eax ,eax
mov ax ,cs
movzx eax ,ax
shl eax ,4
add eax ,LABEL_TSS
mov WORD[LABEL_DESC_TSS+2] ,ax
shr eax ,16
mov BYTE[LABEL_DESC_TSS+4] ,al
mov BYTE[LABEL_DESC_TSS+7] ,ah
xor eax ,eax
mov ax ,cs
movzx eax ,ax
shl eax ,4
add eax ,LABEL_CODE_RING3
mov word[LABEL_DESC_CODE_RING3+2] ,ax
shr eax ,16
mov byte[LABEL_DESC_CODE_RING3+4] ,al
mov byte[LABEL_DESC_CODE_RING3+7] ,ah
xor eax ,eax
mov ax ,cs
movzx eax ,ax
shl eax ,4
add eax ,LABEL_STACK3
mov word[LABEL_DESC_STACK3+2] ,ax
shr eax ,16
mov byte[LABEL_DESC_STACK3+4] ,al
mov byte[LABEL_DESC_STACK3+7] ,ah
xor eax ,eax
mov ax ,cs
movzx eax ,ax
shl eax ,4
add eax ,LABEL_SEG_CODE_DEST
mov word[LABEL_DESC_CODE_DEST+2] ,ax
shr eax ,16
mov byte[LABEL_DESC_CODE_DEST+4] ,al
mov byte[LABEL_DESC_CODE_DEST+7] ,ah
xor eax ,eax
mov ax ,cs
shl eax ,4
add eax ,LABEL_SEG_CODE32
mov WORD[LABEL_DESC_CODE32+2] ,ax
shr eax ,16
mov BYTE[LABEL_DESC_CODE32+4] ,al
mov BYTE[LABEL_DESC_CODE32+7] ,ah
xor eax, eax
mov ax, ds
shl eax, 4
add eax, LABEL_DATA
mov word [LABEL_DESC_DATA + 2], ax
shr eax, 16
mov byte [LABEL_DESC_DATA + 4], al
mov byte [LABEL_DESC_DATA + 7], ah
; 初始化堆栈段描述符
xor eax, eax
mov ax, ds
shl eax, 4
add eax, LABEL_STACK
mov word [LABEL_DESC_STACK + 2], ax
shr eax, 16
mov byte [LABEL_DESC_STACK + 4], al
mov byte [LABEL_DESC_STACK + 7], ah
; 初始化 LDT 在 GDT 中的描述符
xor eax, eax
mov ax, ds
shl eax, 4
add eax, LABEL_LDT
mov word [LABEL_DESC_LDT + 2], ax
shr eax, 16
mov byte [LABEL_DESC_LDT + 4], al
mov byte [LABEL_DESC_LDT + 7], ah
xor eax, eax
mov ax, ds
shl eax, 4
add eax, LABEL_CODE_A
mov word [LABEL_LDT_DESC_CODEA + 2], ax
shr eax, 16
mov byte [LABEL_LDT_DESC_CODEA + 4], al
mov byte [LABEL_LDT_DESC_CODEA + 7], ah
xor eax ,eax
mov ax ,ds
shl eax ,4
add eax ,LABEL_GDT
mov DWORD[GdtPtr+2] ,eax
lgdt [GdtPtr]
cli
in al ,92h
or al ,00000010b
out 92h ,al
mov eax ,cr0
or eax ,1
mov cr0 ,eax
jmp DWORD SelectorCode32:0
LABEL_REAL_ENTRY:
mov ax ,cs
mov ds ,ax
mov es ,ax
mov ss ,ax
mov sp ,[SPValueInRealMode]
in al ,92h
and al ,11111101b
out 92h ,al
sti
mov ax ,4c00h
int 21h
[section .s32]
[BITS 32]
LABEL_SEG_CODE32:
mov ax ,SelectorData
mov ds ,ax
mov ax ,SelectorVideo
mov gs ,ax
mov ax ,SelectorStack
mov ss ,ax
mov esp ,TopOfStack
mov ah ,0ch
xor esi ,esi
xor edi ,edi
mov esi ,OffsetPMMessage
mov edi ,40
cld
.1:
lodsb
test al ,al
jz .2
mov [gs:edi] ,ax
add edi ,2
jmp .1
.2:
call DispReturn
mov ax ,SelectorLDT
lldt ax
mov ax ,SelectorTSS
ltr ax
push SelectorStack3
push TopOfStack3
push SelectorCodeRing3
push 0
retf
call SelectorCallGateTest:0
jmp SelectorLDTCodeA:0
DispReturn:
push eax
push ebx
mov eax ,edi
mov bl ,160
div bl
and eax ,0ffh
inc eax
mov bl ,160
mul bl
mov edi ,eax
pop ebx
pop eax
ret
SegCode32Len equ $-LABEL_SEG_CODE32
[section .s16code]
align 32
[BITS 16]
LABEL_SEG_CODE16:
mov ax ,SelectorNormal
mov ds ,ax
mov es ,ax
mov fs ,ax
mov gs ,ax
mov ss ,ax
mov eax ,cr0
and al ,11111110b
mov cr0 ,eax
LABEL_GO_BACK_TO_REAL:
jmp 0:LABEL_REAL_ENTRY
Code16Len equ $-LABEL_SEG_CODE16
[section .ldt]
align 32
LABEL_LDT:
LABEL_LDT_DESC_CODEA:Descriptor 0 ,CodeALen-1 ,DA_C+DA_32
LDTLen equ $-LABEL_LDT
SelectorLDTCodeA equ LABEL_LDT_DESC_CODEA-LABEL_LDT+SA_TIL
[section .la]
align 32
[BITS 32]
LABEL_CODE_A:
mov ax ,SelectorVideo
mov gs ,ax
mov edi ,160*12
mov ah ,0ch
mov al ,'L'
mov [gs:edi] ,ax
jmp SelectorCode16:0
CodeALen equ $-LABEL_CODE_A
[section .sdest]
[BITS 32]
LABEL_SEG_CODE_DEST:
;JMP $
mov ax ,SelectorVideo
mov gs ,ax
mov edi ,(80*12+40)*2
mov ah ,0ch
mov al ,'c'
mov [gs:edi] ,ax
mov ax ,SelectorLDT
lldt ax
jmp SelectorLDTCodeA:0
;retf
SegCodeDestLen equ $-LABEL_SEG_CODE_DEST
[section .s3]
align 32
[BITS 32]
LABEL_STACK3:
times 512 db 0
TopOfStack3 equ $-LABEL_STACK3-1
[section .ring3]
align 32
[BITS 32]
LABEL_CODE_RING3:
mov ax ,SelectorVideo
mov gs ,ax
mov edi ,(80*13+40)*2
mov ah ,0ch
mov al ,'3'
mov [gs:edi] ,ax
call SelectorCallGateTest:0
jmp $
SegCodeRing3Len equ $-LABEL_CODE_RING3
[section .tss]
align 32
[BITS 32]
LABEL_TSS:
DD 0
DD TopOfStack
DD SelectorStack
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DD 0
DW 0
DW $-LABEL_TSS+2
DB 0FFH
TSSLen equ $-LABEL_TSS
| 17.824561
| 86
| 0.695585
|
97a673d9bfbd62ed24546abbf9d1526d500632a9
| 6,207
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_4962_544.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_4962_544.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_4962_544.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 %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x169a8, %rsi
lea addresses_normal_ht+0x3638, %rdi
nop
nop
nop
nop
nop
lfence
mov $62, %rcx
rep movsw
add $63668, %rbx
lea addresses_WC_ht+0x1b190, %rax
nop
nop
nop
nop
and %r8, %r8
vmovups (%rax), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %rcx
nop
nop
cmp %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r8
push %rax
push %rbp
push %rcx
push %rdi
// Load
lea addresses_A+0x17d92, %r8
clflush (%r8)
nop
nop
nop
nop
nop
inc %rbp
mov (%r8), %rdi
nop
nop
nop
nop
sub $10334, %r13
// Store
lea addresses_WC+0x69a8, %r15
clflush (%r15)
nop
inc %rcx
movl $0x51525354, (%r15)
nop
nop
cmp %r8, %r8
// Store
lea addresses_US+0x1b5a8, %r15
nop
nop
nop
nop
nop
add $57045, %r8
movb $0x51, (%r15)
nop
nop
xor %r15, %r15
// Store
lea addresses_A+0x1f828, %rdi
nop
nop
nop
nop
nop
sub $14740, %r8
movb $0x51, (%rdi)
nop
nop
nop
nop
nop
cmp %rdi, %rdi
// Store
lea addresses_RW+0xeaa8, %r15
nop
nop
and $61080, %rcx
mov $0x5152535455565758, %r13
movq %r13, %xmm7
vmovups %ymm7, (%r15)
nop
nop
sub $45169, %r13
// Store
lea addresses_US+0x15fa8, %rax
nop
add $10450, %r8
movl $0x51525354, (%rax)
and $2360, %rbp
// Store
mov $0x4ac0a5000000048e, %r8
nop
nop
nop
nop
nop
and %rcx, %rcx
movl $0x51525354, (%r8)
add $5803, %rdi
// Faulty Load
lea addresses_WC+0x69a8, %rbp
nop
nop
nop
nop
add %r15, %r15
vmovups (%rbp), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %rdi
lea oracles, %r13
and $0xff, %rdi
shlq $12, %rdi
mov (%r13,%rdi,1), %rdi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_US', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'00': 4962}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 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.675978
| 2,999
| 0.653778
|
310f225116563f842133dfb1855986d7aa82d7b1
| 313
|
asm
|
Assembly
|
oeis/147/A147626.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/147/A147626.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/147/A147626.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A147626: Octo-factorial numbers(5).
; 1,6,84,1848,55440,2106720,96909120,5233092480,324451733760,22711621363200,1771506466329600,152349556104345600,14320858273808486400,1460727543928465612800,160680029832131217408000
mul $0,4
mov $2,2
lpb $0
sub $0,1
mul $2,2
mul $2,$0
sub $0,3
lpe
mov $0,$2
div $0,2
| 22.357143
| 180
| 0.763578
|
0387e17da3f4fbd1a96ceb18065ddd9f98596636
| 6,204
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1619.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1619.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1619.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 %r13
push %r14
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x4786, %rsi
lea addresses_A_ht+0x2876, %rdi
clflush (%rsi)
nop
sub %rbp, %rbp
mov $103, %rcx
rep movsq
nop
inc %r14
lea addresses_WT_ht+0x16076, %r11
nop
nop
nop
nop
cmp $30631, %r13
movups (%r11), %xmm6
vpextrq $1, %xmm6, %r14
nop
nop
xor $5751, %r14
lea addresses_A_ht+0x16ba, %r13
xor $63751, %r11
mov $0x6162636465666768, %r14
movq %r14, %xmm7
vmovups %ymm7, (%r13)
nop
add %rbp, %rbp
lea addresses_normal_ht+0xd396, %r13
nop
nop
nop
xor %rsi, %rsi
movups (%r13), %xmm1
vpextrq $0, %xmm1, %rcx
nop
nop
nop
nop
add $62367, %rdi
lea addresses_normal_ht+0x1dd76, %r11
nop
nop
nop
cmp $47735, %r14
movl $0x61626364, (%r11)
nop
nop
nop
nop
nop
dec %rbp
lea addresses_UC_ht+0xc67e, %r14
nop
dec %rsi
and $0xffffffffffffffc0, %r14
vmovaps (%r14), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $1, %xmm7, %rdi
inc %r13
lea addresses_UC_ht+0x15676, %rbp
nop
nop
nop
nop
nop
xor %rcx, %rcx
movb (%rbp), %r11b
nop
add %rbp, %rbp
lea addresses_UC_ht+0x10878, %r14
add $56020, %r11
and $0xffffffffffffffc0, %r14
vmovntdqa (%r14), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %rdi
nop
nop
nop
nop
nop
xor %r14, %r14
lea addresses_WC_ht+0x12a76, %rsi
nop
nop
nop
xor %rdi, %rdi
mov (%rsi), %r13d
nop
cmp %r13, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %rax
push %rcx
push %rsi
// Faulty Load
lea addresses_A+0x18276, %r13
nop
nop
cmp $57641, %rcx
mov (%r13), %rax
lea oracles, %rsi
and $0xff, %rax
shlq $12, %rax
mov (%rsi,%rax,1), %rax
pop %rsi
pop %rcx
pop %rax
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}}
{'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}}
{'src': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}, '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
*/
| 40.815789
| 2,999
| 0.659252
|
282aecb64e7afa3a7d9d0c40704b3ec4aa915ffc
| 2,570
|
asm
|
Assembly
|
c2000/C2000Ware_1_00_06_00/libraries/control/DCL/c28/source/DCL_DF23_L2L3.asm
|
ramok/Themis_ForHPSDR
|
d0f323a843ac0a488ef816ccb7c828032855a40a
|
[
"Unlicense"
] | null | null | null |
c2000/C2000Ware_1_00_06_00/libraries/control/DCL/c28/source/DCL_DF23_L2L3.asm
|
ramok/Themis_ForHPSDR
|
d0f323a843ac0a488ef816ccb7c828032855a40a
|
[
"Unlicense"
] | null | null | null |
c2000/C2000Ware_1_00_06_00/libraries/control/DCL/c28/source/DCL_DF23_L2L3.asm
|
ramok/Themis_ForHPSDR
|
d0f323a843ac0a488ef816ccb7c828032855a40a
|
[
"Unlicense"
] | 1
|
2021-07-21T08:10:37.000Z
|
2021-07-21T08:10:37.000Z
|
; DCL_DF23_L2L3.asm - Pre-computed Direct Form 2 implementation in third order
;
; Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
; ALL RIGHTS RESERVED
.if __TI_EABI__
.asg DCL_runDF23_L2, _DCL_runDF23_L2
.asg DCL_runDF23_L3, _DCL_runDF23_L3
.endif
.global _DCL_runDF23_L2
.global _DCL_runDF23_L3
.def __cla_DCL_DF23_L2L3_sp
SIZEOF_LFRAME .set 2
LFRAME_MR3 .set 0
.align 2
__cla_DCL_DF23_L2L3_sp .usect ".scratchpad:Cla1Prog:_DCL_DF23_L2L3_LSECT", SIZEOF_LFRAME, 0, 1
.asg __cla_DCL_DF23_L2L3_sp, LFRAME
.sect "Cla1Prog:_DCL_DF23_L2L3_LSECT"
; C prototype: float DCL_runDF23_L2(DCL_DF23 *p, float32_t ek);
; argument 1 = *p : controller structure address [MAR0]
; argument 2 = ek : controller input [MR0]
; return = uk : controller output [MR0]
_DCL_runDF23_L2:
MNOP ; MAR0 load delay slot 1
MNOP ; MAR0 load delay slot 2
MNOP ; MAR0 load delay slot 3
MMOV32 MR2, *MAR0[14]++ ; MR2 = b0
MRCNDD UNC ; return call
MMPYF32 MR1, MR0, MR2 ; MR1 = ek * b0
MMOV32 MR2, *MAR0[0]++ ; MR2 = x1
MADDF32 MR0, MR1, MR2 ; MR0 = uk
; C prototype: void DCL_runDF23_L3(DF23 *p, float ek, float uk);
; argument 1 = *p : structure address [MAR0]
; argument 2 = ek : controller input [MR0]
; argument 3 = uk : u(k) controller output [MR1]
; return: void
_DCL_runDF23_L3:
MMOV32 @LFRAME + LFRAME_MR3, MR3 ; save MR3
MNOP ; MAR0 load delay slot 2
MNOP ; MAR0 load delay slot 3
MMOV32 MR2, *MAR0[2]++ ; MR2 = b0
MMOV32 MR2, *MAR0[14]++ ; MR2 = b1
MMPYF32 MR2, MR0, MR2 ; MR2 = v2
MMOV32 MR3, *MAR0[-8]++ ; MR3 = x2
MADDF32 MR2, MR2, MR3 ; MR2 = x2 + v2
MMOV32 MR3, *MAR0[-4]++ ; MR3 = a1
MMPYF32 MR3, MR1, MR3 ; MR3 = v3
MNOP
MSUBF32 MR2, MR2, MR3 ; MR2 = x1d
MMOV32 MR3, *MAR0[10]++ ; MR3 = b2
MMOV32 *MAR0[4]++, MR2 ; save x1
MMPYF32 MR3, MR0, MR3 ; MR3 = v4
MMOV32 MR2, *MAR0[-8]++ ; MR2 = x3
MADDF32 MR2, MR2, MR3 ; MR2 = x3 + v4
MMOV32 MR3, *MAR0[-4]++ ; MR3 = a2
MMPYF32 MR3, MR1, MR3 ; MR3 = v5
MNOP
MSUBF32 MR2, MR2, MR3 ; MR2 = x2d
MMOV32 MR3, *MAR0[10]++ ; MR3 = b3
MMOV32 *MAR0[-4]++, MR2 ; save x2
MMPYF32 MR3, MR0, MR3 ; MR3 = v6
MMOV32 MR2, *MAR0[6]++ ; MR2 = a3
MMPYF32 MR2, MR1, MR2 ; MR2 = v7
MNOP
MSUBF32 MR2, MR3, MR2 ; MR2 = x3d
MRCNDD UNC ; return call
MMOV32 *MAR0[0]++, MR2 ; save x3
MNOP
MMOV32 MR3, @LFRAME + LFRAME_MR3 ; restore MR3
.unasg LFRAME
; end of file
| 30.235294
| 94
| 0.619844
|
8f6c3ba02b5fbbeb835cc1626bd2896dc9bef694
| 5,048
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_9288_1783.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_9288_1783.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_9288_1783.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r8
push %rbp
push %rbx
push %rcx
push %rsi
lea addresses_D_ht+0x1d581, %rsi
inc %rbp
mov $0x6162636465666768, %rcx
movq %rcx, (%rsi)
nop
nop
nop
dec %rcx
lea addresses_D_ht+0x1a033, %rbx
nop
nop
nop
nop
xor %r11, %r11
mov $0x6162636465666768, %r8
movq %r8, %xmm4
vmovups %ymm4, (%rbx)
nop
nop
dec %rbp
pop %rsi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r14
push %rbx
push %rcx
push %rdi
// Store
lea addresses_A+0x1ccf3, %r14
nop
add $21905, %rcx
movw $0x5152, (%r14)
nop
inc %rcx
// Store
mov $0xa05, %r13
nop
nop
and $31819, %r11
mov $0x5152535455565758, %rdi
movq %rdi, %xmm6
movups %xmm6, (%r13)
nop
nop
cmp %rdi, %rdi
// Store
lea addresses_A+0x14a13, %r14
nop
nop
nop
nop
add $62680, %rbx
movb $0x51, (%r14)
inc %rbx
// Faulty Load
lea addresses_D+0x16c13, %r14
clflush (%r14)
nop
nop
nop
add %rbx, %rbx
mov (%r14), %r12d
lea oracles, %r14
and $0xff, %r12
shlq $12, %r12
mov (%r14,%r12,1), %r12
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 1, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 9, 'size': 1, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': True, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 1, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': True, 'NT': False}}
{'36': 9288}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 44.672566
| 2,999
| 0.656498
|
01e3c90015fe0e80bac7c0764c457d6d26a00c8d
| 731
|
asm
|
Assembly
|
programs/oeis/340/A340375.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/340/A340375.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/340/A340375.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A340375: a(n) = 1 if n is of the form 2^i - 2^j with i >= j, and 0 otherwise.
; 1,1,1,1,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0
cal $0,5811 ; Number of runs in binary expansion of n (n>0); number of 1's in Gray code for n.
mov $1,2
lpb $0,1
sub $0,4
div $1,6
lpe
div $1,2
| 66.454545
| 501
| 0.534884
|
87bb224d8854e349bec275f7511aab1f483215e5
| 340
|
asm
|
Assembly
|
programs/oeis/161/A161436.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/161/A161436.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/161/A161436.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A161436: Number of reduced words of length n in the Weyl group A_4.
; 1,4,9,15,20,22,20,15,9,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mov $2,10
bin $2,$0
lpb $2,1
add $1,1
sub $2,$1
lpe
| 34
| 212
| 0.558824
|
f96aef10cde5224be5e3bf6d3a33d74f49ce64fc
| 2,532
|
asm
|
Assembly
|
ASS3/transpose_of_matrix (q8).asm
|
rahulkumawat1/NASM
|
09b69e1338e59e43b6ff7403337d13810070d59f
|
[
"MIT"
] | null | null | null |
ASS3/transpose_of_matrix (q8).asm
|
rahulkumawat1/NASM
|
09b69e1338e59e43b6ff7403337d13810070d59f
|
[
"MIT"
] | null | null | null |
ASS3/transpose_of_matrix (q8).asm
|
rahulkumawat1/NASM
|
09b69e1338e59e43b6ff7403337d13810070d59f
|
[
"MIT"
] | null | null | null |
section .data
tab: db 9
newline: db 10
msg1: db 'Matrix:',10
l1: equ $-msg1
msg2: db 'Transpose of Matrix:',10
l2: equ $-msg2
row: db 'Enter # of ROWS:',10
r: equ $-row
col: db 'Enter # of COLUMNS:',10
c: equ $-col
section .bss
just_read: resd 1
just_print: resd 1
temp: resd 1
counter: resd 1
zero: resd 1
m: resd 1
n: resd 1
arr: resd 50
i: resd 1
j: resd 1
section .text
global _start:
_start:
mov eax,4
mov ebx,1
mov ecx,row
mov edx,r
int 80h
call read_num
mov eax,dword[just_read]
mov dword[m],eax
mov eax,4
mov ebx,1
mov ecx,col
mov edx,c
int 80h
call read_num
mov eax,dword[just_read]
mov dword[n],eax
mov eax,4
mov ebx,1
mov ecx,msg1
mov edx,l1
int 80h
mov ebx,arr
mov eax,0
mov dword[i],0
call read_2Darray
mov eax,4
mov ebx,1
mov ecx,msg2
mov edx,l2
int 80h
mov ebx,arr
mov eax,0
call print_2Darray
print_newline:
mov eax,4
mov ebx,1
mov ecx,newline
mov edx,1
int 80h
end:
mov eax,1
mov ebx,0
int 80h
read_2Darray:
pusha
row_loop1:
mov dword[j],0
col_loop1:
call read_num
mov ecx,dword[just_read]
mov dword[ebx+(4*eax)],ecx
inc eax
inc dword[j]
mov ecx,dword[j]
cmp ecx,dword[n]
jb col_loop1
inc dword[i]
mov ecx,dword[i]
cmp ecx,dword[m]
jb row_loop1
end_read_2Darray:
popa
ret
print_2Darray:
pusha
mov dword[i],0
row_loop2:
mov dword[j],0
mov eax,dword[i]
col_loop2:
mov ecx,dword[ebx+(4*eax)]
mov dword[just_print],ecx
call print_num
pusha
mov eax,4
mov ebx,1
mov ecx,tab
mov edx,1
int 80h
popa
add eax,dword[n]
inc dword[j]
mov ecx,dword[j]
cmp ecx,dword[m]
jb col_loop2
pusha
mov eax,4
mov ebx,1
mov ecx,newline
mov edx,1
int 80h
popa
inc dword[i]
mov ecx,dword[i]
cmp ecx,dword[n]
jb row_loop2
end_print_2Darray:
popa
ret
read_num:
pusha
mov dword[just_read],0
reading:
mov eax,3
mov ebx,0
mov ecx,temp
mov edx,1
int 80h
cmp dword[temp],10
je end_read
sub dword[temp],30h
mov eax,dword[just_read]
mov edx,0
mov ebx,10
mul ebx
add eax,dword[temp]
mov dword[just_read],eax
jmp reading
end_read:
popa
ret
print_num:
pusha
mov dword[counter],0
cmp dword[just_print],0
jne extracting
mov dword[zero],30h
mov eax,4
mov ebx,1
mov ecx,zero
mov edx,1
int 80h
jmp end_print
extracting:
cmp dword[just_print],0
je printing
mov eax,dword[just_print]
mov edx,0
mov ebx,10
div ebx
push edx
mov dword[just_print],eax
inc dword[counter]
jmp extracting
printing:
cmp dword[counter],0
je end_print
pop edx
add edx,30h
mov dword[temp],edx
mov eax,4
mov ebx,1
mov ecx,temp
mov edx,1
int 80h
dec dword[counter]
jmp printing
end_print:
mov eax,4
mov ebx,1
mov ecx,tab
mov edx,1
int 80h
popa
ret
| 10.913793
| 34
| 0.736177
|
892b87b4c3196a0d0d069f406e776d13caa7fb3b
| 389
|
asm
|
Assembly
|
programs/oeis/318/A318930.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/318/A318930.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/318/A318930.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A318930: RUNS transform of A279620.
; 1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,1,1,2,1,1,1,2,1,1
lpb $0
mov $2,$0
div $2,2
seq $2,4641 ; Fixed under 0 -> 10, 1 -> 100.
mul $2,2
mov $3,$2
cmp $3,0
add $2,$3
mod $0,$2
lpe
add $0,1
| 25.933333
| 201
| 0.51671
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.