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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34c027517db5f6a4cdb01b05ad6122ccdccc4b28 | 5,694 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1210.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1210.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_21829_1210.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0x1d344, %rsi
lea addresses_WT_ht+0x1b244, %rdi
nop
nop
sub $19768, %rdx
mov $107, %rcx
rep movsb
dec %r8
lea addresses_D_ht+0xa244, %rsi
lea addresses_WC_ht+0x3a04, %rdi
nop
nop
nop
nop
nop
add $4402, %rdx
mov $73, %rcx
rep movsq
cmp $43897, %rcx
lea addresses_WC_ht+0x1644, %rsi
lea addresses_A_ht+0x1048c, %rdi
nop
nop
xor %rbp, %rbp
mov $112, %rcx
rep movsq
add $53375, %rcx
lea addresses_UC_ht+0x1ba44, %rsi
lea addresses_normal_ht+0x1b67b, %rdi
nop
add %r8, %r8
mov $94, %rcx
rep movsb
cmp $4311, %rdx
lea addresses_D_ht+0xd244, %rdi
nop
sub %r9, %r9
vmovups (%rdi), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $0, %xmm2, %rbp
nop
xor %r9, %r9
lea addresses_normal_ht+0x147c4, %rdi
nop
nop
inc %rdx
mov $0x6162636465666768, %r8
movq %r8, (%rdi)
nop
nop
dec %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r8
push %r9
push %rbx
push %rcx
// Load
lea addresses_US+0x4fa4, %rbx
nop
nop
nop
nop
inc %r9
mov (%rbx), %r8
add $29662, %r8
// Faulty Load
mov $0x335fd40000000a44, %r15
nop
nop
and %rcx, %rcx
movups (%r15), %xmm2
vpextrq $0, %xmm2, %r9
lea oracles, %rcx
and $0xff, %r9
shlq $12, %r9
mov (%rcx,%r9,1), %r9
pop %rcx
pop %rbx
pop %r9
pop %r8
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_US', 'AVXalign': True, 'size': 8}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': True, 'congruent': 7, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}}
{'src': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WC_ht'}}
{'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 1, 'type': 'addresses_A_ht'}}
{'src': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_normal_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': True, 'congruent': 3, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 8}}
{'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
*/
| 45.552 | 2,999 | 0.659466 |
ca113b3bfbe1c48117b0faea677594872778393e | 546 | asm | Assembly | libsrc/_DEVELOPMENT/arch/zx/display/z80/asm_zx_aaddr2cx.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/arch/zx/display/z80/asm_zx_aaddr2cx.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/arch/zx/display/z80/asm_zx_aaddr2cx.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; ===============================================================
; Jun 2007
; ===============================================================
;
; uint zx_aaddr2cx(void *attraddr)
;
; Attribute address to character x coordinate.
;
; ===============================================================
SECTION code_arch
PUBLIC asm_zx_aaddr2cx
asm_zx_aaddr2cx:
; enter : hl = valid attribute address
;
; exit : hl = character x coordinate of attr square
;
; uses : af, hl
ld a,l
and $1f
ld l,a
ld h,0
ret
| 17.612903 | 65 | 0.399267 |
70853116a7d8ba9c47c17f84aa2bc5d296fd7eb6 | 4,915 | asm | Assembly | assembler/tests/t_z80syntax/t_z80syntax.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | assembler/tests/t_z80syntax/t_z80syntax.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | assembler/tests/t_z80syntax/t_z80syntax.asm | paulscottrobson/RCA-Cosmac-VIP-III | 5d3fcea325aacb7c99269f266bc14e30439cdc2b | [
"MIT"
] | null | null | null | cpu 8080
page 0
z80syntax on
mov a,a
ld a,a
mov a,b
ld a,b
mov a,c
ld a,c
mov a,d
ld a,d
mov a,e
ld a,e
mov a,h
ld a,h
mov a,l
ld a,l
mov a,m
ld a,(hl)
ldax b
ld a,(bc)
ldax d
ld a,(de)
lda 1234h
ld a,(1234h)
mov b,a
ld b,a
mov b,b
ld b,b
mov b,c
ld b,c
mov b,d
ld b,d
mov b,e
ld b,e
mov b,h
ld b,h
mov b,l
ld b,l
mov b,m
ld b,(hl)
mov c,a
ld c,a
mov c,b
ld c,b
mov c,c
ld c,c
mov c,d
ld c,d
mov c,e
ld c,e
mov c,h
ld c,h
mov c,l
ld c,l
mov c,m
ld c,(hl)
mov d,a
ld d,a
mov d,b
ld d,b
mov d,c
ld d,c
mov d,d
ld d,d
mov d,e
ld d,e
mov d,h
ld d,h
mov d,l
ld d,l
mov d,m
ld d,(hl)
mov e,a
ld e,a
mov e,b
ld e,b
mov e,c
ld e,c
mov e,d
ld e,d
mov e,e
ld e,e
mov e,h
ld e,h
mov e,l
ld e,l
mov e,m
ld e,(hl)
mov h,a
ld h,a
mov h,b
ld h,b
mov h,c
ld h,c
mov h,d
ld h,d
mov h,e
ld h,e
mov h,h
ld h,h
mov h,l
ld h,l
mov h,m
ld h,(hl)
mov l,a
ld l,a
mov l,b
ld l,b
mov l,c
ld l,c
mov l,d
ld l,d
mov l,e
ld l,e
mov l,h
ld l,h
mov l,l
ld l,l
mov l,m
ld l,(hl)
mov m,a
ld (hl),a
mov m,b
ld (hl),b
mov m,c
ld (hl),c
mov m,d
ld (hl),d
mov m,e
ld (hl),e
mov m,h
ld (hl),h
mov m,l
ld (hl),l
mvi a,12h
ld a,12h
mvi b,12h
ld b,12h
mvi c,12h
ld c,12h
mvi d,12h
ld d,12h
mvi e,12h
ld e,12h
mvi h,12h
ld h,12h
mvi l,12h
ld l,12h
mvi m,12h
ld (hl),12h
stax b
ld (bc),a
stax d
ld (de),a
sta 1234h
ld (1234h),a
lxi b,1234h
ld bc,1234h
lxi d,1234h
ld de,1234h
lxi h,1234h
ld hl,1234h
lxi sp,1234h
ld sp,1234h
lhld 1234h
ld hl,(1234h)
shld 1234h
ld (1234h),hl
sphl
ld sp,hl
xchg
ex de,hl
ex hl,de
xthl
ex (sp),hl
ex hl,(sp)
add a
add a,a
add b
add a,b
add c
add a,c
add d
add a,d
add e
add a,e
add h
add a,h
add l
add a,l
add m
add a,(hl)
adi 12h
add a,12h
adc a
adc a,a
adc b
adc a,b
adc c
adc a,c
adc d
adc a,d
adc e
adc a,e
adc h
adc a,h
adc l
adc a,l
adc m
adc a,(hl)
aci 12h
adc a,12h
sub a
sub a,a
sub b
sub a,b
sub c
sub a,c
sub d
sub a,d
sub e
sub a,e
sub h
sub a,h
sub l
sub a,l
sub m
sub (hl)
sub a,(hl)
sui 12h
sub 12h
sub a,12h
sbb a
sbc a
sbc a,a
sbb b
sbc b
sbc a,b
sbb c
sbc c
sbc a,c
sbb d
sbc d
sbc a,d
sbb e
sbc e
sbc a,e
sbb h
sbc h
sbc a,h
sbb l
sbc l
sbc a,l
sbb m
sbc (hl)
sbc a,(hl)
sbi 12h
sbc 12h
sbc a,12h
dad b
add hl,bc
dad d
add hl,de
dad h
add hl,hl
dad sp
add hl,sp
inr a
inc a
inr b
inc b
inr c
inc c
inr d
inc d
inr e
inc e
inr h
inc h
inr l
inc l
inr m
inc (hl)
dcr a
dec a
dcr b
dec b
dcr c
dec c
dcr d
dec d
dcr e
dec e
dcr h
dec h
dcr l
dec l
dcr m
dec (hl)
inx b
inc bc
inx d
inc de
inx h
inc hl
inx sp
inc sp
dcx b
dec bc
dcx d
dec de
dcx h
dec hl
dcx sp
dec sp
cma
cpl
stc
scf
cmc
ccf
rlc
rlca
rrc
rrca
ral
rla
rar
rra
ana a
and a
and a,a
ana b
and b
and a,b
ana c
and c
and a,c
ana d
and d
and a,d
ana e
and e
and a,e
ana h
and h
and a,h
ana l
and l
and a,l
ana m
and (hl)
and a,(hl)
ani 12h
and 12h
and a,12h
xra a
xor a
xor a,a
xra b
xor b
xor a,b
xra c
xor c
xor a,c
xra d
xor d
xor a,d
xra e
xor e
xor a,e
xra h
xor h
xor a,h
xra l
xor l
xor a,l
xra m
xor (hl)
xor a,(hl)
xri 12h
xor 12h
xor a,12h
ora a
or a
or a,a
ora b
or b
or a,b
ora c
or c
or a,c
ora d
or d
or a,d
ora e
or e
or a,e
ora h
or h
or a,h
ora l
or l
or a,l
ora m
or (hl)
or a,(hl)
ori 12h
or 12h
or a,12h
cmp a
cp a
cp a,a
cmp b
cp b
cp a,b
cmp c
cp c
cp a,c
cmp d
cp d
cp a,d
cmp e
cp e
cp a,e
cmp h
cp h
cp a,h
cmp l
cp l
cp a,l
cmp m
cp (hl)
cp a,(hl)
cpi 12h
;cp 12h ; leave this out since CP <addr> is call-on-positive <addr> on 8080
cp a,12h
jmp 1234h
;jp 1234h ; leave this out since JP <addr> is jump-on-positive <addr> on 8080
jnz 1234h
jp nz,1234h
jz 1234h
jp z,1234h
jnc 1234h
jp nc,1234h
jc 1234h
jp c,1234h
jpo 1234h
jp po,1234h
jpe 1234h
jp pe,1234h
jp 1234h
jp p,1234h
jm 1234h
jp m,1234h
pchl
jp (hl)
call 1234h
cnz 1234h
call nz,1234h
cz 1234h
call z,1234h
cnc 1234h
call nc,1234h
cc 1234h
call c,1234h
cpo 1234h
call po,1234h
cpe 1234h
call pe,1234h
cp 1234h
call p,1234h
cm 1234h
call m,1234h
ret
rnz
ret nz
rz
ret z
rnc
ret nc
rc
ret c
rpo
ret po
rpe
ret pe
rp
ret p
rm
ret m
rst 0
rst 00h
rst 1
rst 08h
rst 2
rst 10h
rst 3
rst 18h
rst 4
rst 20h
rst 5
rst 28h
rst 6
rst 30h
rst 7
rst 38h
push b
push bc
push d
push de
push h
push hl
push psw
push af
pop b
pop bc
pop d
pop de
pop h
pop hl
pop psw
pop af
in 56h
in a,(56h)
out 56h
out (56h),a
| 6.39974 | 78 | 0.555849 |
2b8c01bc9edce6666a206c8c9ce8455d00330893 | 886 | asm | Assembly | programs/oeis/255/A255875.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/255/A255875.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/255/A255875.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A255875: a(n) = Fibonacci(n+2) + n - 2.
; 1,3,6,10,16,25,39,61,96,152,242,387,621,999,1610,2598,4196,6781,10963,17729,28676,46388,75046,121415,196441,317835,514254,832066,1346296,2178337,3524607,5702917,9227496,14930384,24157850,39088203,63246021,102334191,165580178,267914334,433494476,701408773,1134903211,1836311945,2971215116,4807527020,7778742094,12586269071,20365011121,32951280147,53316291222,86267571322,139583862496,225851433769,365435296215,591286729933,956722026096,1548008755976,2504730782018,4052739537939,6557470319901,10610209857783,17167680177626,27777890035350,44945570212916,72723460248205,117669030461059,190392490709201,308061521170196,498454011879332,806515533049462,1304969544928727,2111485077978121,3416454622906779,5527939700884830,8944394323791538
mov $1,1
mov $5,$0
lpb $0
sub $0,1
mov $2,$5
add $4,1
mov $3,$4
mov $4,$1
add $1,$3
lpe
add $1,$2
| 59.066667 | 732 | 0.822799 |
c78f9ed9c6af46013035344aaf34f405d669d673 | 3,745 | asm | Assembly | src/fadd.asm | BhekimpiloNdhlela/Floating-Point-Addition-Implementation | a797aac4136edb9d5497a58c62ceb1195d1495cb | [
"MIT"
] | null | null | null | src/fadd.asm | BhekimpiloNdhlela/Floating-Point-Addition-Implementation | a797aac4136edb9d5497a58c62ceb1195d1495cb | [
"MIT"
] | null | null | null | src/fadd.asm | BhekimpiloNdhlela/Floating-Point-Addition-Implementation | a797aac4136edb9d5497a58c62ceb1195d1495cb | [
"MIT"
] | 1 | 2020-10-29T11:04:25.000Z | 2020-10-29T11:04:25.000Z | ; asmsyntax=nasm
;******************************************************************
;* RW244: nasm implementation of floating point addition *
;******************************************************************
global addf
;******************************************************************
; void addf(float a, float b, float *x); *
;******************************************************************
%define a [ebp+8]
%define b [ebp+12]
%define x [ebp+16]
%define f1 [ebp-4]
%define f2 [ebp-8]
%define f3 [ebp-12]
%define s1 [ebp-16]
%define s2 [ebp-20]
%define s3 [ebp-24]
%define e1 [ebp-28]
%define e2 [ebp-32]
%define e3 [ebp-36]
addf:
push ebp
mov ebp, esp
sub esp, 36
;HANDLE SPECIAL CASES
;check if a == 0 ==> return b
mov eax, a
cmp eax, 0x0
mov eax, b
je .return
xor eax, eax
;check if b == 0 ==> return a
mov eax, b
cmp eax, 0x0
mov eax, a
je .return
xor eax, eax
;EXTRACT FOR FLOATING NUMBER a
mov eax, a
cmp eax, 0x0
jz .else_a
;sign part for a = s1
mov eax, a
shr eax, 31
mov s1, eax
xor eax, eax
;fractional part for a = f1
mov eax, a
and eax, 0x7fffff
xor eax, 0x800000
mov f1, eax
xor eax, eax
;exponent part for a = f1
mov eax, a
shr eax, 23
and eax, 0xff
mov e1, eax
xor eax, eax
jmp .endif_a
.else_a:
mov dword e1, 0x0
mov dword f1, 0x0
xor eax, eax
.endif_a:
;EXTRACT FOR FLOATING NUMBER b
mov eax, b
cmp eax, 0x0
jz .else_b
;sign part for b = s1
shr eax, 31
mov s2, eax
xor eax, eax
;fractional part for b = f1
mov eax, b
and eax, 0x7fffff
xor eax, 0x800000
mov f2, eax
xor eax, eax
;exponent part for b = f1
mov eax, b
shr eax, 23
and eax, 0xff
mov e2, eax
xor eax, eax
jmp .endif_b
.else_b:
mov dword e2, 0x0
mov dword f2, 0x0
.endif_b:
;check if a == -b || b == -a ==> return 0x0
mov eax, e1
mov edx, e2
cmp eax, edx
jne .continue_with_algorithm
mov eax, f1
mov edx, f2
cmp eax , edx
jne .continue_with_algorithm
mov eax, s1
mov edx, s2
cmp eax, edx
mov eax, 0x0
jne .return
.continue_with_algorithm:
;EXPONENT EQAULIZATION
mov eax, e1
mov edx, e2
mov ebx, f1
.while_a:
cmp eax, edx
jge .end_while_a
inc eax
shr ebx, 1
jmp .while_a
.end_while_a:
mov f1, ebx
mov ebx, f2
.while_b:
cmp edx, eax
jge .end_while_b
inc edx
shr ebx, 1
jmp .while_b
.end_while_b:
mov f2, ebx
mov e1, eax
mov e2, edx
;TAKING THE COMMON EXPONENT
mov e3, eax
;clear up the used registers
xor eax, eax
xor ebx, ebx
xor edx, edx
;f1 = (a < 0) ? -f1 : f1
mov eax, a
cmp eax, 0x0
jge .endif0
xor eax, eax
mov eax, f1
neg eax
mov f1, eax
xor eax, eax
.endif0:
;f2 = (b < 0) ? -f2 : f2
mov eax, b
cmp eax, 0x0
jge .endif1
xor eax, eax
mov eax, f2
neg eax
mov f2, eax
xor eax, eax
.endif1:
; add f1 to f2 and get f3 i.e.) f3 = f1 + f2;
mov eax, f1
mov edx, f2
add eax, edx
mov f3, eax
xor eax, eax
xor edx, edx
;if (f3 < 0) => f3 = -f3 and s3 = 1 else s3 = 0
cmp dword f3, 0x0
jge .else0
mov eax, f3
neg eax
mov f3, eax
mov dword s3, 0x1
xor eax, eax
jmp .endif_0
.else0:
mov dword s3, 0x0
.endif_0:
;NORMALIZE f3, s3, & e3
mov eax, f3
xor eax, 0x800000
cmp eax, 0
je .combine_float_parts
.while1:
mov eax, f3
xor eax, 0x800000
cmp eax, 0
je .while2
and eax, 0xff000000
cmp eax, 0
je .while2
shr dword f3, 1
add dword e3, 1
jmp .while1
.while2:
cmp dword f3, 0
je .combine_float_parts
mov eax, f3
shr eax, 23
cmp eax, 1
je .combine_float_parts
shl dword f3, 1
sub dword e3, 1
jmp .while2
;COMBINE s3, e3, & f3 to form a 32-bit real value r3
.combine_float_parts:
mov ah, s3
mov al, e3
shl eax, 23
xor dword f3, 0x800000
add eax, f3
;RETURN *x
.return:
mov edx, x
mov [edx], eax
mov esp, ebp
pop ebp
ret
| 16.004274 | 67 | 0.59466 |
cd2cb3f95d44d272353eed23d00aa03668a3bc76 | 15,662 | asm | Assembly | simd/i386/jdcolext-mmx.asm | 1camper/libjpeg-turbo | f2729c983afbc093a5afea7dde9b469cf08aaa61 | [
"BSD-3-Clause"
] | 522 | 2020-01-19T05:59:00.000Z | 2022-03-25T04:36:52.000Z | simd/i386/jdcolext-mmx.asm | 1camper/libjpeg-turbo | f2729c983afbc093a5afea7dde9b469cf08aaa61 | [
"BSD-3-Clause"
] | 91 | 2015-08-28T14:48:12.000Z | 2021-09-14T09:02:51.000Z | simd/i386/jdcolext-mmx.asm | 1camper/libjpeg-turbo | f2729c983afbc093a5afea7dde9b469cf08aaa61 | [
"BSD-3-Clause"
] | 94 | 2015-07-23T13:36:27.000Z | 2022-03-22T08:50:02.000Z | ;
; jdcolext.asm - colorspace conversion (MMX)
;
; Copyright 2009 Pierre Ossman <ossman@cendio.se> for Cendio AB
; Copyright (C) 2016, D. R. Commander.
;
; Based on the x86 SIMD extension for IJG JPEG library
; Copyright (C) 1999-2006, MIYASAKA Masaru.
; For conditions of distribution and use, see copyright notice in jsimdext.inc
;
; This file should be assembled with NASM (Netwide Assembler),
; can *not* be assembled with Microsoft's MASM or any compatible
; assembler (including Borland's Turbo Assembler).
; NASM is available from http://nasm.sourceforge.net/ or
; http://sourceforge.net/project/showfiles.php?group_id=6208
;
; [TAB8]
%include "jcolsamp.inc"
; --------------------------------------------------------------------------
;
; Convert some rows of samples to the output colorspace.
;
; GLOBAL(void)
; jsimd_ycc_rgb_convert_mmx(JDIMENSION out_width, JSAMPIMAGE input_buf,
; JDIMENSION input_row, JSAMPARRAY output_buf,
; int num_rows)
;
%define out_width(b) (b) + 8 ; JDIMENSION out_width
%define input_buf(b) (b) + 12 ; JSAMPIMAGE input_buf
%define input_row(b) (b) + 16 ; JDIMENSION input_row
%define output_buf(b) (b) + 20 ; JSAMPARRAY output_buf
%define num_rows(b) (b) + 24 ; int num_rows
%define original_ebp ebp + 0
%define wk(i) ebp - (WK_NUM - (i)) * SIZEOF_MMWORD
; mmword wk[WK_NUM]
%define WK_NUM 2
%define gotptr wk(0) - SIZEOF_POINTER ; void * gotptr
align 32
GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_mmx)
EXTN(jsimd_ycc_rgb_convert_mmx):
push ebp
mov eax, esp ; eax = original ebp
sub esp, byte 4
and esp, byte (-SIZEOF_MMWORD) ; align to 64 bits
mov [esp], eax
mov ebp, esp ; ebp = aligned ebp
lea esp, [wk(0)]
pushpic eax ; make a room for GOT address
push ebx
; push ecx ; need not be preserved
; push edx ; need not be preserved
push esi
push edi
get_GOT ebx ; get GOT address
movpic POINTER [gotptr], ebx ; save GOT address
mov ecx, JDIMENSION [out_width(eax)] ; num_cols
test ecx, ecx
jz near .return
push ecx
mov edi, JSAMPIMAGE [input_buf(eax)]
mov ecx, JDIMENSION [input_row(eax)]
mov esi, JSAMPARRAY [edi+0*SIZEOF_JSAMPARRAY]
mov ebx, JSAMPARRAY [edi+1*SIZEOF_JSAMPARRAY]
mov edx, JSAMPARRAY [edi+2*SIZEOF_JSAMPARRAY]
lea esi, [esi+ecx*SIZEOF_JSAMPROW]
lea ebx, [ebx+ecx*SIZEOF_JSAMPROW]
lea edx, [edx+ecx*SIZEOF_JSAMPROW]
pop ecx
mov edi, JSAMPARRAY [output_buf(eax)]
mov eax, INT [num_rows(eax)]
test eax, eax
jle near .return
alignx 16, 7
.rowloop:
push eax
push edi
push edx
push ebx
push esi
push ecx ; col
mov esi, JSAMPROW [esi] ; inptr0
mov ebx, JSAMPROW [ebx] ; inptr1
mov edx, JSAMPROW [edx] ; inptr2
mov edi, JSAMPROW [edi] ; outptr
movpic eax, POINTER [gotptr] ; load GOT address (eax)
alignx 16, 7
.columnloop:
movq mm5, MMWORD [ebx] ; mm5=Cb(01234567)
movq mm1, MMWORD [edx] ; mm1=Cr(01234567)
pcmpeqw mm4, mm4
pcmpeqw mm7, mm7
psrlw mm4, BYTE_BIT
psllw mm7, 7 ; mm7={0xFF80 0xFF80 0xFF80 0xFF80}
movq mm0, mm4 ; mm0=mm4={0xFF 0x00 0xFF 0x00 ..}
pand mm4, mm5 ; mm4=Cb(0246)=CbE
psrlw mm5, BYTE_BIT ; mm5=Cb(1357)=CbO
pand mm0, mm1 ; mm0=Cr(0246)=CrE
psrlw mm1, BYTE_BIT ; mm1=Cr(1357)=CrO
paddw mm4, mm7
paddw mm5, mm7
paddw mm0, mm7
paddw mm1, mm7
; (Original)
; R = Y + 1.40200 * Cr
; G = Y - 0.34414 * Cb - 0.71414 * Cr
; B = Y + 1.77200 * Cb
;
; (This implementation)
; R = Y + 0.40200 * Cr + Cr
; G = Y - 0.34414 * Cb + 0.28586 * Cr - Cr
; B = Y - 0.22800 * Cb + Cb + Cb
movq mm2, mm4 ; mm2=CbE
movq mm3, mm5 ; mm3=CbO
paddw mm4, mm4 ; mm4=2*CbE
paddw mm5, mm5 ; mm5=2*CbO
movq mm6, mm0 ; mm6=CrE
movq mm7, mm1 ; mm7=CrO
paddw mm0, mm0 ; mm0=2*CrE
paddw mm1, mm1 ; mm1=2*CrO
pmulhw mm4, [GOTOFF(eax,PW_MF0228)] ; mm4=(2*CbE * -FIX(0.22800))
pmulhw mm5, [GOTOFF(eax,PW_MF0228)] ; mm5=(2*CbO * -FIX(0.22800))
pmulhw mm0, [GOTOFF(eax,PW_F0402)] ; mm0=(2*CrE * FIX(0.40200))
pmulhw mm1, [GOTOFF(eax,PW_F0402)] ; mm1=(2*CrO * FIX(0.40200))
paddw mm4, [GOTOFF(eax,PW_ONE)]
paddw mm5, [GOTOFF(eax,PW_ONE)]
psraw mm4, 1 ; mm4=(CbE * -FIX(0.22800))
psraw mm5, 1 ; mm5=(CbO * -FIX(0.22800))
paddw mm0, [GOTOFF(eax,PW_ONE)]
paddw mm1, [GOTOFF(eax,PW_ONE)]
psraw mm0, 1 ; mm0=(CrE * FIX(0.40200))
psraw mm1, 1 ; mm1=(CrO * FIX(0.40200))
paddw mm4, mm2
paddw mm5, mm3
paddw mm4, mm2 ; mm4=(CbE * FIX(1.77200))=(B-Y)E
paddw mm5, mm3 ; mm5=(CbO * FIX(1.77200))=(B-Y)O
paddw mm0, mm6 ; mm0=(CrE * FIX(1.40200))=(R-Y)E
paddw mm1, mm7 ; mm1=(CrO * FIX(1.40200))=(R-Y)O
movq MMWORD [wk(0)], mm4 ; wk(0)=(B-Y)E
movq MMWORD [wk(1)], mm5 ; wk(1)=(B-Y)O
movq mm4, mm2
movq mm5, mm3
punpcklwd mm2, mm6
punpckhwd mm4, mm6
pmaddwd mm2, [GOTOFF(eax,PW_MF0344_F0285)]
pmaddwd mm4, [GOTOFF(eax,PW_MF0344_F0285)]
punpcklwd mm3, mm7
punpckhwd mm5, mm7
pmaddwd mm3, [GOTOFF(eax,PW_MF0344_F0285)]
pmaddwd mm5, [GOTOFF(eax,PW_MF0344_F0285)]
paddd mm2, [GOTOFF(eax,PD_ONEHALF)]
paddd mm4, [GOTOFF(eax,PD_ONEHALF)]
psrad mm2, SCALEBITS
psrad mm4, SCALEBITS
paddd mm3, [GOTOFF(eax,PD_ONEHALF)]
paddd mm5, [GOTOFF(eax,PD_ONEHALF)]
psrad mm3, SCALEBITS
psrad mm5, SCALEBITS
packssdw mm2, mm4 ; mm2=CbE*-FIX(0.344)+CrE*FIX(0.285)
packssdw mm3, mm5 ; mm3=CbO*-FIX(0.344)+CrO*FIX(0.285)
psubw mm2, mm6 ; mm2=CbE*-FIX(0.344)+CrE*-FIX(0.714)=(G-Y)E
psubw mm3, mm7 ; mm3=CbO*-FIX(0.344)+CrO*-FIX(0.714)=(G-Y)O
movq mm5, MMWORD [esi] ; mm5=Y(01234567)
pcmpeqw mm4, mm4
psrlw mm4, BYTE_BIT ; mm4={0xFF 0x00 0xFF 0x00 ..}
pand mm4, mm5 ; mm4=Y(0246)=YE
psrlw mm5, BYTE_BIT ; mm5=Y(1357)=YO
paddw mm0, mm4 ; mm0=((R-Y)E+YE)=RE=(R0 R2 R4 R6)
paddw mm1, mm5 ; mm1=((R-Y)O+YO)=RO=(R1 R3 R5 R7)
packuswb mm0, mm0 ; mm0=(R0 R2 R4 R6 ** ** ** **)
packuswb mm1, mm1 ; mm1=(R1 R3 R5 R7 ** ** ** **)
paddw mm2, mm4 ; mm2=((G-Y)E+YE)=GE=(G0 G2 G4 G6)
paddw mm3, mm5 ; mm3=((G-Y)O+YO)=GO=(G1 G3 G5 G7)
packuswb mm2, mm2 ; mm2=(G0 G2 G4 G6 ** ** ** **)
packuswb mm3, mm3 ; mm3=(G1 G3 G5 G7 ** ** ** **)
paddw mm4, MMWORD [wk(0)] ; mm4=(YE+(B-Y)E)=BE=(B0 B2 B4 B6)
paddw mm5, MMWORD [wk(1)] ; mm5=(YO+(B-Y)O)=BO=(B1 B3 B5 B7)
packuswb mm4, mm4 ; mm4=(B0 B2 B4 B6 ** ** ** **)
packuswb mm5, mm5 ; mm5=(B1 B3 B5 B7 ** ** ** **)
%if RGB_PIXELSIZE == 3 ; ---------------
; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
; mmG=(** ** ** ** ** ** ** **), mmH=(** ** ** ** ** ** ** **)
punpcklbw mmA, mmC ; mmA=(00 10 02 12 04 14 06 16)
punpcklbw mmE, mmB ; mmE=(20 01 22 03 24 05 26 07)
punpcklbw mmD, mmF ; mmD=(11 21 13 23 15 25 17 27)
movq mmG, mmA
movq mmH, mmA
punpcklwd mmA, mmE ; mmA=(00 10 20 01 02 12 22 03)
punpckhwd mmG, mmE ; mmG=(04 14 24 05 06 16 26 07)
psrlq mmH, 2*BYTE_BIT ; mmH=(02 12 04 14 06 16 -- --)
psrlq mmE, 2*BYTE_BIT ; mmE=(22 03 24 05 26 07 -- --)
movq mmC, mmD
movq mmB, mmD
punpcklwd mmD, mmH ; mmD=(11 21 02 12 13 23 04 14)
punpckhwd mmC, mmH ; mmC=(15 25 06 16 17 27 -- --)
psrlq mmB, 2*BYTE_BIT ; mmB=(13 23 15 25 17 27 -- --)
movq mmF, mmE
punpcklwd mmE, mmB ; mmE=(22 03 13 23 24 05 15 25)
punpckhwd mmF, mmB ; mmF=(26 07 17 27 -- -- -- --)
punpckldq mmA, mmD ; mmA=(00 10 20 01 11 21 02 12)
punpckldq mmE, mmG ; mmE=(22 03 13 23 04 14 24 05)
punpckldq mmC, mmF ; mmC=(15 25 06 16 26 07 17 27)
cmp ecx, byte SIZEOF_MMWORD
jb short .column_st16
movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
sub ecx, byte SIZEOF_MMWORD
jz short .nextrow
add esi, byte SIZEOF_MMWORD ; inptr0
add ebx, byte SIZEOF_MMWORD ; inptr1
add edx, byte SIZEOF_MMWORD ; inptr2
add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr
jmp near .columnloop
alignx 16, 7
.column_st16:
lea ecx, [ecx+ecx*2] ; imul ecx, RGB_PIXELSIZE
cmp ecx, byte 2*SIZEOF_MMWORD
jb short .column_st8
movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
movq MMWORD [edi+1*SIZEOF_MMWORD], mmE
movq mmA, mmC
sub ecx, byte 2*SIZEOF_MMWORD
add edi, byte 2*SIZEOF_MMWORD
jmp short .column_st4
.column_st8:
cmp ecx, byte SIZEOF_MMWORD
jb short .column_st4
movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
movq mmA, mmE
sub ecx, byte SIZEOF_MMWORD
add edi, byte SIZEOF_MMWORD
.column_st4:
movd eax, mmA
cmp ecx, byte SIZEOF_DWORD
jb short .column_st2
mov DWORD [edi+0*SIZEOF_DWORD], eax
psrlq mmA, DWORD_BIT
movd eax, mmA
sub ecx, byte SIZEOF_DWORD
add edi, byte SIZEOF_DWORD
.column_st2:
cmp ecx, byte SIZEOF_WORD
jb short .column_st1
mov WORD [edi+0*SIZEOF_WORD], ax
shr eax, WORD_BIT
sub ecx, byte SIZEOF_WORD
add edi, byte SIZEOF_WORD
.column_st1:
cmp ecx, byte SIZEOF_BYTE
jb short .nextrow
mov BYTE [edi+0*SIZEOF_BYTE], al
%else ; RGB_PIXELSIZE == 4 ; -----------
%ifdef RGBX_FILLER_0XFF
pcmpeqb mm6, mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
pcmpeqb mm7, mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
%else
pxor mm6, mm6 ; mm6=(X0 X2 X4 X6 ** ** ** **)
pxor mm7, mm7 ; mm7=(X1 X3 X5 X7 ** ** ** **)
%endif
; mmA=(00 02 04 06 ** ** ** **), mmB=(01 03 05 07 ** ** ** **)
; mmC=(10 12 14 16 ** ** ** **), mmD=(11 13 15 17 ** ** ** **)
; mmE=(20 22 24 26 ** ** ** **), mmF=(21 23 25 27 ** ** ** **)
; mmG=(30 32 34 36 ** ** ** **), mmH=(31 33 35 37 ** ** ** **)
punpcklbw mmA, mmC ; mmA=(00 10 02 12 04 14 06 16)
punpcklbw mmE, mmG ; mmE=(20 30 22 32 24 34 26 36)
punpcklbw mmB, mmD ; mmB=(01 11 03 13 05 15 07 17)
punpcklbw mmF, mmH ; mmF=(21 31 23 33 25 35 27 37)
movq mmC, mmA
punpcklwd mmA, mmE ; mmA=(00 10 20 30 02 12 22 32)
punpckhwd mmC, mmE ; mmC=(04 14 24 34 06 16 26 36)
movq mmG, mmB
punpcklwd mmB, mmF ; mmB=(01 11 21 31 03 13 23 33)
punpckhwd mmG, mmF ; mmG=(05 15 25 35 07 17 27 37)
movq mmD, mmA
punpckldq mmA, mmB ; mmA=(00 10 20 30 01 11 21 31)
punpckhdq mmD, mmB ; mmD=(02 12 22 32 03 13 23 33)
movq mmH, mmC
punpckldq mmC, mmG ; mmC=(04 14 24 34 05 15 25 35)
punpckhdq mmH, mmG ; mmH=(06 16 26 36 07 17 27 37)
cmp ecx, byte SIZEOF_MMWORD
jb short .column_st16
movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
movq MMWORD [edi+2*SIZEOF_MMWORD], mmC
movq MMWORD [edi+3*SIZEOF_MMWORD], mmH
sub ecx, byte SIZEOF_MMWORD
jz short .nextrow
add esi, byte SIZEOF_MMWORD ; inptr0
add ebx, byte SIZEOF_MMWORD ; inptr1
add edx, byte SIZEOF_MMWORD ; inptr2
add edi, byte RGB_PIXELSIZE*SIZEOF_MMWORD ; outptr
jmp near .columnloop
alignx 16, 7
.column_st16:
cmp ecx, byte SIZEOF_MMWORD/2
jb short .column_st8
movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
movq MMWORD [edi+1*SIZEOF_MMWORD], mmD
movq mmA, mmC
movq mmD, mmH
sub ecx, byte SIZEOF_MMWORD/2
add edi, byte 2*SIZEOF_MMWORD
.column_st8:
cmp ecx, byte SIZEOF_MMWORD/4
jb short .column_st4
movq MMWORD [edi+0*SIZEOF_MMWORD], mmA
movq mmA, mmD
sub ecx, byte SIZEOF_MMWORD/4
add edi, byte 1*SIZEOF_MMWORD
.column_st4:
cmp ecx, byte SIZEOF_MMWORD/8
jb short .nextrow
movd DWORD [edi+0*SIZEOF_DWORD], mmA
%endif ; RGB_PIXELSIZE ; ---------------
alignx 16, 7
.nextrow:
pop ecx
pop esi
pop ebx
pop edx
pop edi
pop eax
add esi, byte SIZEOF_JSAMPROW
add ebx, byte SIZEOF_JSAMPROW
add edx, byte SIZEOF_JSAMPROW
add edi, byte SIZEOF_JSAMPROW ; output_buf
dec eax ; num_rows
jg near .rowloop
emms ; empty MMX state
.return:
pop edi
pop esi
; pop edx ; need not be preserved
; pop ecx ; need not be preserved
pop ebx
mov esp, ebp ; esp <- aligned ebp
pop esp ; esp <- original ebp
pop ebp
ret
; For some reason, the OS X linker does not honor the request to align the
; segment unless we do this.
align 32
| 38.481572 | 84 | 0.481548 |
7fa806e3ed2a2ddd227d22d4a9f5f07716da43e5 | 2,053 | asm | Assembly | examples/keyboard-input.asm | KCreate/stackvm | eaa6b72dbb5057c41496265e52acceec3e1a70a2 | [
"MIT"
] | 45 | 2017-03-27T11:49:12.000Z | 2021-09-13T22:24:19.000Z | examples/keyboard-input.asm | KCreate/stack-machine | eaa6b72dbb5057c41496265e52acceec3e1a70a2 | [
"MIT"
] | 10 | 2017-04-22T22:15:30.000Z | 2020-06-07T05:19:47.000Z | examples/keyboard-input.asm | KCreate/stack-machine | eaa6b72dbb5057c41496265e52acceec3e1a70a2 | [
"MIT"
] | 4 | 2017-05-02T10:20:05.000Z | 2021-09-13T22:24:22.000Z | ; Instructions:
;
; ./stackvm build keyboard-input.asm -o out.bc
; ./stackvm run out.bc
; ./stackvm monitor machine.memory -s 2
;
; Focus the window opened by the monitor command
; and press some keys on your keyboard. You should now
; see some stuff popping up in the terminal off the run command
; Configure the interrupt handler's address
.org INTERRUPT_HANDLER_ADDRESS
.db _interrupt_handler_address t_address my_interrupt_handler
.org INTERRUPT_MEMORY
.db _interrupt_memory INTERRUPT_MEMORY_SIZE 0
.org 0x00
.db io_buffer 255 0
.def io_cursor r0
.label entry_addr
; execute the main function
push t_size, 0
call main
; exit the program
push byte, 0
push t_syscall, sys_exit
syscall
.label main
nop
jmp main
.label my_interrupt_handler
; skip if this is a keydown
readc r2b, INTERRUPT_KEYBOARD_KEYDOWN
loadi r3b, 1
cmp r2b, r3b
jz read_char
ret
.label read_char
; calculate the cursor offset
mov r1, io_cursor
loadi r2, io_buffer
add r1, r2
; copy the char
readc r2b, INTERRUPT_KEYBOARD_SYM
write r1, r2b
; increment the io cursor
push t_size, 0x0
call increment_io_cursor
push t_size, 0x0
call print_io_buffer
ret
.label increment_io_cursor
mov r1, io_cursor
loadi r2, 1
add r1, r2
mov io_cursor, r1
ret
.label print_io_buffer
mov r1, INTERRUPT_MEMORY
mov r2, io_cursor
add r2, r1
.label loop
cmp r1, r2
jz loop_end
rpush r1
push t_size, byte
push t_syscall, sys_write
syscall
loadi r3, 1
add r1, r3
jmp loop
.label loop_end
push byte, 13
rpush sp
push t_size, 1
push t_syscall, sys_write
syscall
loadi r59, 1
add sp, r59
ret
; Note to future self
; Somewhere is a bug which causes an invalid jump to 0x3a
; in the case when an interrupt happens inside an interrupt handler
;
; this is likely an issue of us not producing a correct stack frame
; and thus making it jump to some weird address
;
; something worth to investiage:
; 0x3a = 58 = syscall
;
; maybe the ret instruction tries to jump to an opcodes value ???
| 17.852174 | 67 | 0.733561 |
fdcbca9338a5754688c9cf33e72ecefa3f2ea1c0 | 279 | asm | Assembly | programs/oeis/130/A130543.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/130/A130543.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/130/A130543.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A130543: Multiplicative persistence of n!.
; 0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
mov $2,4
trn $2,$0
pow $1,$2
| 39.857143 | 203 | 0.541219 |
2378f983d1f35edbd195050736667d2e63700d27 | 342 | asm | Assembly | programs/oeis/074/A074367.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/074/A074367.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/074/A074367.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A074367: (p^2-5)/4 for odd primes p.
; 1,5,11,29,41,71,89,131,209,239,341,419,461,551,701,869,929,1121,1259,1331,1559,1721,1979,2351,2549,2651,2861,2969,3191,4031,4289,4691,4829,5549,5699,6161,6641,6971,7481,8009,8189,9119,9311,9701,9899,11129
add $0,1
cal $0,40 ; The prime numbers.
pow $0,2
mov $1,$0
sub $1,9
div $1,8
mul $1,2
add $1,1
| 28.5 | 206 | 0.69883 |
c31fc284d7b834748cdcb7516bce61df4f431c6d | 8,121 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1669.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_1669.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_1669.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 %r14
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x159b5, %rsi
lea addresses_A_ht+0x1bf5b, %rdi
nop
cmp $24053, %r12
mov $24, %rcx
rep movsl
nop
nop
nop
nop
cmp $50429, %r14
lea addresses_WT_ht+0x13f1b, %rsi
lea addresses_normal_ht+0x1a59b, %rdi
nop
nop
add %r9, %r9
mov $88, %rcx
rep movsq
sub $8644, %r9
lea addresses_normal_ht+0xe4f3, %rdi
clflush (%rdi)
nop
nop
nop
cmp %rdx, %rdx
movw $0x6162, (%rdi)
nop
add %rsi, %rsi
lea addresses_WC_ht+0xe51b, %rdi
nop
nop
nop
nop
sub %rcx, %rcx
mov $0x6162636465666768, %rdx
movq %rdx, %xmm1
movups %xmm1, (%rdi)
nop
nop
add $47694, %rcx
lea addresses_WT_ht+0x509b, %rsi
lea addresses_UC_ht+0x147ef, %rdi
nop
nop
nop
nop
nop
and %r10, %r10
mov $50, %rcx
rep movsl
nop
nop
nop
sub $46487, %rdx
lea addresses_normal_ht+0xdc4, %r9
nop
nop
nop
nop
nop
add %rdx, %rdx
mov $0x6162636465666768, %r12
movq %r12, %xmm4
vmovups %ymm4, (%r9)
nop
nop
nop
nop
nop
cmp %rdi, %rdi
lea addresses_UC_ht+0xc79b, %r10
nop
nop
sub $31589, %r12
vmovups (%r10), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %r9
nop
nop
nop
xor $61650, %r10
lea addresses_D_ht+0x1a39b, %rdi
nop
nop
nop
nop
nop
add %r10, %r10
mov $0x6162636465666768, %rdx
movq %rdx, (%rdi)
nop
nop
xor %r12, %r12
lea addresses_UC_ht+0x1674f, %rsi
lea addresses_normal_ht+0x9e5b, %rdi
nop
dec %rdx
mov $52, %rcx
rep movsw
nop
nop
nop
and %r12, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
// Store
lea addresses_normal+0x1761b, %rbx
nop
nop
nop
nop
sub $12298, %r9
mov $0x5152535455565758, %rsi
movq %rsi, %xmm7
vmovups %ymm7, (%rbx)
nop
nop
nop
nop
nop
add %rsi, %rsi
// Store
lea addresses_WT+0x18f9b, %r11
clflush (%r11)
nop
nop
nop
and $23998, %rsi
movl $0x51525354, (%r11)
nop
nop
nop
xor $49223, %rbx
// Store
lea addresses_normal+0x1e39b, %rcx
nop
nop
nop
nop
add $709, %rbx
movl $0x51525354, (%rcx)
nop
nop
nop
xor %r9, %r9
// Store
lea addresses_normal+0x1e39b, %r11
nop
nop
nop
mfence
movw $0x5152, (%r11)
nop
nop
add %rsi, %rsi
// Store
lea addresses_WT+0x1d91b, %r11
nop
nop
nop
nop
add $27243, %rcx
mov $0x5152535455565758, %r15
movq %r15, (%r11)
nop
nop
nop
nop
nop
cmp $24723, %r11
// REPMOV
lea addresses_A+0x1849b, %rsi
lea addresses_WT+0x372b, %rdi
clflush (%rdi)
nop
nop
nop
xor %rax, %rax
mov $48, %rcx
rep movsq
nop
cmp %rsi, %rsi
// Faulty Load
lea addresses_normal+0x1e39b, %rax
nop
nop
nop
nop
cmp %rcx, %rcx
movups (%rax), %xmm2
vpextrq $1, %xmm2, %rdi
lea oracles, %rax
and $0xff, %rdi
shlq $12, %rdi
mov (%rax,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT', 'congruent': 8}, 'OP': 'STOR'}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WT'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_A'}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': True, 'congruent': 5, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal_ht', 'congruent': 3}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC_ht', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_WT_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 0}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_UC_ht', 'congruent': 10}}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_D_ht', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 6, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}}
{'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
*/
| 30.530075 | 2,999 | 0.659894 |
bc41c0ab9716e3c0a9a35a41497acbb3b4969801 | 1,445 | asm | Assembly | Source/Input.asm | AAKMakes/ASM-projects | 43dcee38398c02f6c2b0ca91d7bfd72f166217ea | [
"CC0-1.0"
] | null | null | null | Source/Input.asm | AAKMakes/ASM-projects | 43dcee38398c02f6c2b0ca91d7bfd72f166217ea | [
"CC0-1.0"
] | null | null | null | Source/Input.asm | AAKMakes/ASM-projects | 43dcee38398c02f6c2b0ca91d7bfd72f166217ea | [
"CC0-1.0"
] | null | null | null | ; Console Input Assembly Program
; === STACK SEGMENT ===
MyStack segment stack
DB 64 dup('12345678')
MyStack endS
; === DATA SEGMENT ===
MyData Segment
; --- Declare Varibles here ---
inputBuffer DB "1234567890123456"
inputBufferTwo DB "1234567890123456"
firstPrompt DB "What is your first name? ","$"
secondPrompt DB "What is your last name? ","$"
helloMsg DB "Hello ","$"
MyData endS
; === CODE SEGMENT ===
MyCode segment
Assume CS:MyCode,DS:MyData
; === INCLUDE DIRECTIVES ===
include CONIO.INC
; === PROCEDURES ===
Main PROC
Start:
MOV AX, MyData
MOV DS, AX
; --- Inital Code Here ---
; Print the Prompt
MOV AH,9
LEA DX,firstPrompt
INT 21h
MOV AH,16 ; Set AH to size of buffer
LEA DX,inputBuffer ; Set DX to buffer address
CALL InputStr ; Get input
; Print the 2nd Prompt
MOV AH,9
LEA DX,secondPrompt
INT 21h
MOV AH,16 ; Set AH to size of buffer
LEA DX,inputBufferTwo ; Set DX to buffer address
CALL InputStr ; Get input
; Print "Hello "
MOV AH,9
LEA DX,helloMsg
INT 21h
; Print the input buffer
MOV AH,9
LEA DX,inputBuffer
INT 21h
; Print a space
MOV AH,2
MOV DL, ' '
INT 21h
; Print the 2nd input buffer
MOV AH,9
LEA DX,inputBufferTwo
INT 21h
; ***Closing program and returning to DOS***
MOV AH, 4Ch
XOR AL, AL
INT 21h
Main ENDP
MyCode endS
End Start | 18.525641 | 51 | 0.62699 |
9f91c9f28bf7d54560ba259758e8a3390f4217d7 | 1,060 | asm | Assembly | 18. TRIANGLE.asm | rng70/Assembly-Programming | 38c60807b944b49e52f189930c5bf1beadf80d74 | [
"MIT"
] | null | null | null | 18. TRIANGLE.asm | rng70/Assembly-Programming | 38c60807b944b49e52f189930c5bf1beadf80d74 | [
"MIT"
] | null | null | null | 18. TRIANGLE.asm | rng70/Assembly-Programming | 38c60807b944b49e52f189930c5bf1beadf80d74 | [
"MIT"
] | null | null | null | ; PRINT A TRIANGLE OF NUMBER
; 1
; 1 2
; 1 2 3
; 1 2 3 4
; 1 2 3 4 5
; 1 2 3 4 5 6
; 1 2 3 4 5 6 7
; 1 2 3 4 5 6 7 8
; 1 2 3 4 5 6 7 8 9
.MODEL SMALL
.STACK 100H
.DATA
MSG DB ' $'
.CODE
MAIN PROC
; INITIALIZATION
MOV AX, @DATA
MOV DS, AX
MOV CL, 1 ; I = 1
MOV BL, 9 ; N = 9
LOOP1:
MOV AH, 2
MOV DL, '1'
MOV BH, 1 ; J = 1
LOOP2:
INT 21H
; PRINT MSG
LEA DX, MSG
MOV AH, 9
INT 21H
MOV AH, 2
INC DL
INC BH
CMP BH, CL
JNG LOOP2
MOV AH, 2
MOV DL, 0DH
INT 21H
MOV DL, 0AH
INT 21H
INC CL
CMP CL, BL
JNG LOOP1
; RETURN TO DOS
MOV AH, 4CH
INT 21H
MAIN ENDP
| 16.307692 | 29 | 0.316038 |
ca94b7ac29a321e64bec70139561c49acb7ab255 | 1,438 | asm | Assembly | c2000/C2000Ware_1_00_06_00/libraries/flash_api/f2806x/Example_Flash2806x_API_FPU/Example_Flash2806x_CsmKeys.asm | ramok/Themis_ForHPSDR | d0f323a843ac0a488ef816ccb7c828032855a40a | [
"Unlicense"
] | null | null | null | c2000/C2000Ware_1_00_06_00/libraries/flash_api/f2806x/Example_Flash2806x_API_FPU/Example_Flash2806x_CsmKeys.asm | ramok/Themis_ForHPSDR | d0f323a843ac0a488ef816ccb7c828032855a40a | [
"Unlicense"
] | null | null | null | c2000/C2000Ware_1_00_06_00/libraries/flash_api/f2806x/Example_Flash2806x_API_FPU/Example_Flash2806x_CsmKeys.asm | ramok/Themis_ForHPSDR | d0f323a843ac0a488ef816ccb7c828032855a40a | [
"Unlicense"
] | 1 | 2021-07-21T08:10:37.000Z | 2021-07-21T08:10:37.000Z | ;//###########################################################################
;//
;// FILE: Example_Flash2806x_CsmKeys.asm
;//
;// TITLE: F2806x Code Security Module Keys for
;// the Flash API example
;//
;// NOTE:
;//###########################################################################
;// $TI Release: F2806x Flash API Release V1.00 $
;// $Release Date: Marc 31, 2011 $
;//###########################################################################
; Use this file to pass key values to the Example Flash program
; to unlock the Code Security module before attempting to erase,
; program or verify the part.
.global _PRG_key0
.global _PRG_key1
.global _PRG_key2
.global _PRG_key3
.global _PRG_key4
.global _PRG_key5
.global _PRG_key6
.global _PRG_key7
; For erased flash the password locations will all be 0xFFFF
.text
_PRG_key0 .word 0xFFFF ; PSWD bits 15-0
_PRG_key1 .word 0xFFFF ; PSWD bits 31-16
_PRG_key2 .word 0xFFFF ; PSWD bits 47-32
_PRG_key3 .word 0xFFFF ; PSWD bits 63-48
_PRG_key4 .word 0xFFFF ; PSWD bits 79-64
_PRG_key5 .word 0xFFFF ; PSWD bits 95-80
_PRG_key6 .word 0xFFFF ; PSWD bits 111-96
_PRG_key7 .word 0xFFFF ; PSWD bits 127-112
| 34.238095 | 78 | 0.481919 |
4524d9066eb0bd7defb7056ada74cd1d3ebf7f74 | 3,322 | asm | Assembly | kernel/asmfunc.asm | ngwork0301/mikanos | 10cfea456ef198dff63af52f3eac5565ebce9586 | [
"Apache-2.0"
] | null | null | null | kernel/asmfunc.asm | ngwork0301/mikanos | 10cfea456ef198dff63af52f3eac5565ebce9586 | [
"Apache-2.0"
] | 3 | 2021-09-24T21:55:51.000Z | 2022-02-26T00:11:06.000Z | kernel/asmfunc.asm | ngwork0301/mikanos | 10cfea456ef198dff63af52f3eac5565ebce9586 | [
"Apache-2.0"
] | null | null | null | ; asmfunc.asm
;
; System V ADM64 Calling Conversion
; Registers: RDI, RSI, RDX, RCX, R8, R9
bits 64
section .text
global IoOut32 ; void IoOut32(uint16_t addr, uint32_t data);
IoOut32:
mov dx, di ; dx = addr
mov eax, esi ; eax = data
out dx, eax
ret
global IoIn32 ; uint32_t IoIn32(uint16_t addr);
IoIn32:
mov dx, di ; dx = addr
in eax, dx
ret
global GetCS ; uint16_t GetCS(void);
GetCS:
xor eax, eax ; also clears upper 32 bits of rax
mov ax, cs
ret
global LoadIDT ; void LoadIDT(uint64_t limit, uint64_t offset);
LoadIDT:
push rbp
mov rbp, rsp
sub rsp, 10
mov [rsp], di ; limit
mov [rsp + 2], rsi ; offset
lidt [rsp]
mov rsp, rbp
pop rbp
ret
global LoadGDT ; void LoadGDT(uint16_t limit, uint64_t offset);
LoadGDT:
push rbp
mov rbp, rsp
sub rsp, 10
mov [rsp], di ; limit
mov [rsp + 2], rsi ; offset
lgdt [rsp]
mov rsp, rbp
pop rbp
ret
global SetCSSS ; void SetCSSS(uint16_t cs, uint16_t ss);
SetCSSS:
push rbp
mov rbp, rsp
mov ss, si
mov rax, .next
push rdi ; cs
push rax ; RIP
o64 retf
.next:
mov rsp, rbp
pop rbp
ret
global SetDSAll ; void SetDSAll(uint16_t value);
SetDSAll:
mov ds, di
mov es, di
mov fs, di
mov gs, di
ret
global GetCR3 ; uint64_t GetCR3();
GetCR3:
mov rax, cr3
ret
global SetCR3 ; void SetCR3(uint64_t value);
SetCR3:
mov cr3, rdi
ret
global SwitchContext
SwitchContext: ; void SwitchContext(void* next_ctx, void* current_ctx);
mov [rsi + 0x40], rax
mov [rsi + 0x48], rbx
mov [rsi + 0x50], rcx
mov [rsi + 0x58], rdx
mov [rsi + 0x60], rdi
mov [rsi + 0x68], rsi
lea rax, [rsp + 8]
mov [rsi + 0x70], rax ; RSP
mov [rsi + 0x78], rbp
mov [rsi + 0x80], r8
mov [rsi + 0x88], r9
mov [rsi + 0x90], r10
mov [rsi + 0x98], r11
mov [rsi + 0xa0], r12
mov [rsi + 0xa8], r13
mov [rsi + 0xb0], r14
mov [rsi + 0xb8], r15
mov rax, cr3
mov [rsi + 0x00], rax ; CR3
mov rax, [rsp]
mov [rsi + 0x08], rax ; RIP
pushfq
pop qword [rsi + 0x10] ; RFLAGS
mov ax, cs
mov [rsi + 0x20], rax
mov bx, ss
mov [rsi + 0x28], rbx
mov cx, fs
mov [rsi + 0x30], rcx
mov dx, gs
mov [rsi + 0x38], rdx
fxsave [rsi + 0xc0]
; iret 用のスタックフレーム
push qword [rdi + 0x28] ; SS
push qword [rdi + 0x70] ; RSP
push qword [rdi + 0x10] ; RFLAGS
push qword [rdi + 0x20] ; CS
push qword [rdi + 0x08] ; RIP
; コンテキストの復帰
fxrstor [rdi + 0xc0]
mov rax, [rdi + 0x00]
mov cr3, rax
mov rax, [rdi + 0x30]
mov fs, ax
mov rax, [rdi + 0x38]
mov gs, ax
mov rax, [rdi + 0x40]
mov rbx, [rdi + 0x48]
mov rcx, [rdi + 0x50]
mov rdx, [rdi + 0x58]
mov rsi, [rdi + 0x68]
mov rbp, [rdi + 0x78]
mov r8, [rdi + 0x80]
mov r9, [rdi + 0x88]
mov r10, [rdi + 0x90]
mov r11, [rdi + 0x98]
mov r12, [rdi + 0xa0]
mov r13, [rdi + 0xa8]
mov r14, [rdi + 0xb0]
mov r15, [rdi + 0xb8]
mov rdi, [rdi + 0x60]
o64 iret
extern kernel_main_stack
extern KernelMainNewStack
global KernelMain
KernelMain:
mov rsp, kernel_main_stack + 1024 * 1024
call KernelMainNewStack
.fin:
hlt
jmp .fin
| 19.656805 | 72 | 0.571343 |
0b08ad92d55aa88ca4d01522b964ff1c6cb44b3c | 6,226 | asm | Assembly | mapa01.asm | fjpena/zx-multiscroll-demo | 4969dd5e9ea785d5249e5f73859030b33e53885b | [
"Apache-2.0"
] | 7 | 2019-05-28T16:08:21.000Z | 2020-08-29T14:43:15.000Z | mapa01.asm | Spirax2/zx-multiscroll-demo | 10d821f7bcc3e1105cc393dab18efb2e652a8420 | [
"Apache-2.0"
] | null | null | null | mapa01.asm | Spirax2/zx-multiscroll-demo | 10d821f7bcc3e1105cc393dab18efb2e652a8420 | [
"Apache-2.0"
] | 3 | 2019-06-25T07:50:21.000Z | 2019-08-04T10:51:40.000Z | org $c000
; script action definitions
ADD_ENEMY: EQU 0
WHEN_POS: EQU 1
SPAWN_POWERUP: EQU 2
TOTAL: EQU 3
WAIT: EQU 4
FX: EQU 5
FXATTR: EQU 6
CALM: EQU 7
ANGRY: EQU 8
SCRIPT_END: EQU 9
; Enemy definitions
ghost01: EQU 0
ghost02: EQU 1
ghost03: EQU 2
ghost04: EQU 3
ghost05: EQU 4
mapwidth: db 36
mapheight: db 36
start_x: dw 112
start_y: dw 496
ptr_levelscript: dw levelscript
levelmap:
db 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
db 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
db 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
db 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 9, 10, 11, 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 9, 10, 10, 10, 11, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 25, 26, 27, 0, 0, 0, 0, 0, 0, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 29, 30, 31, 0, 0, 0, 0, 0, 0, 29, 30, 31, 0, 0, 0, 0, 0, 0, 0, 29, 30, 31, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 33, 34, 35, 0, 0, 0, 0, 0, 0, 33, 34, 35, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 0, 0, 0, 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 38, 39, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 25, 26, 27, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 29, 30, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, 31, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 33, 34, 34, 34, 34, 34, 35, 0, 0, 0, 33, 34, 35, 0, 33, 34, 35, 0, 33, 34, 35, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 2, 2, 3, 0, 33, 34, 35, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 1, 2, 2, 2, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 33, 34, 35, 0, 33, 34, 35, 0, 33, 34, 35, 0, 0, 0, 33, 34, 35, 0, 0, 33, 34, 35, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 33, 34, 34, 34, 34, 35, 0, 0, 0, 33, 34, 34, 34, 34, 35, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 0, 33, 34, 35, 0, 0, 33, 34, 35, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 2, 2, 2, 2, 3, 0, 0, 0, 33, 34, 35, 0, 0, 0, 0, 0, 33, 34, 35, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 1, 2, 2, 2, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 9, 10, 10, 10, 11, 0, 0, 0, 9, 10, 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 7, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 33, 34, 35, 0, 1, 2, 3, 0, 33, 34, 34, 34, 34, 35, 0, 1, 2, 3, 0, 33, 34, 35, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 33, 34, 35, 0, 33, 34, 34, 35, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 5, 6, 7, 0, 0, 0, 5, 6, 7, 0, 0, 0, 0, 5, 6, 7, 0, 0, 0, 5, 6, 7, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 1, 2, 3, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 1, 2, 3, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 14, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0
db 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0
db 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
db 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
db 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
levelscript:
; db ADD_ENEMY, ghost01, 5, 5
db ADD_ENEMY, ghost01, 8, 10
db TOTAL, 1
db ADD_ENEMY, ghost02, 15, 5
db TOTAL, 0
db ADD_ENEMY, ghost03, 5, 5
db ADD_ENEMY, ghost03, 5, 15
db ADD_ENEMY, ghost03, 15, 5
db ADD_ENEMY, ghost03, 15, 15
db TOTAL, 0
db SCRIPT_END
| 80.857143 | 149 | 0.321715 |
b434e4ab76bd25285b926e9f4c659e7cfa99577f | 1,245 | asm | Assembly | programs/oeis/008/A008814.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/008/A008814.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/008/A008814.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A008814: Expansion of (1+x^7)/((1-x)^2*(1-x^7)).
; 1,2,3,4,5,6,7,10,13,16,19,22,25,28,33,38,43,48,53,58,63,70,77,84,91,98,105,112,121,130,139,148,157,166,175,186,197,208,219,230,241,252,265,278,291,304,317,330,343,358,373,388,403,418,433,448,465,482,499,516,533,550,567,586,605,624,643,662,681,700,721,742,763,784,805,826,847,870,893,916,939,962,985,1008,1033,1058,1083,1108,1133,1158,1183,1210,1237,1264,1291,1318,1345,1372,1401,1430,1459,1488,1517,1546,1575,1606,1637,1668,1699,1730,1761,1792,1825,1858,1891,1924,1957,1990,2023,2058,2093,2128,2163,2198,2233,2268,2305,2342,2379,2416,2453,2490,2527,2566,2605,2644,2683,2722,2761,2800,2841,2882,2923,2964,3005,3046,3087,3130,3173,3216,3259,3302,3345,3388,3433,3478,3523,3568,3613,3658,3703,3750,3797,3844,3891,3938,3985,4032,4081,4130,4179,4228,4277,4326,4375,4426,4477,4528,4579,4630,4681,4732,4785,4838,4891,4944,4997,5050,5103,5158,5213,5268,5323,5378,5433,5488,5545,5602,5659,5716,5773,5830,5887,5946,6005,6064,6123,6182,6241,6300,6361,6422,6483,6544,6605,6666,6727,6790,6853,6916,6979,7042,7105,7168,7233,7298,7363,7428,7493,7558,7623,7690,7757,7824,7891,7958,8025,8092,8161,8230,8299,8368,8437,8506,8575,8646,8717,8788,8859,8930
add $0,1
lpb $0,1
add $1,$0
trn $0,7
add $1,$0
lpe
| 124.5 | 1,135 | 0.754217 |
4503e57042b04bbc76e95fcc3dfffbeac5964915 | 325 | asm | Assembly | libsrc/interrupts/im2/im2_RemoveHook.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | libsrc/interrupts/im2/im2_RemoveHook.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | libsrc/interrupts/im2/im2_RemoveHook.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z | ; CALLER linkage for function pointers
SECTION code_clib
PUBLIC im2_RemoveHook
PUBLIC _im2_RemoveHook
EXTERN im2_RemoveHook_callee
EXTERN ASMDISP_REMOVEHOOK_CALLEE
.im2_RemoveHook
._im2_RemoveHook
pop bc
pop de
pop hl
push hl
push de
push bc
jp im2_RemoveHook_callee + ASMDISP_REMOVEHOOK_CALLEE
| 14.772727 | 55 | 0.790769 |
37a640c5cd58eeed464e79d1ab55218c00fb1fea | 395 | asm | Assembly | programs/oeis/061/A061462.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/061/A061462.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/061/A061462.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A061462: The exact power of 2 that divides the n-th Bell number (A000110). Has period 12.
; 1,1,2,1,1,4,1,1,4,1,1,2,1,1,2,1,1,4,1,1,4,1,1,2,1,1,2,1,1,4,1,1,4,1,1,2,1,1,2,1,1,4,1,1,4,1,1,2,1,1,2,1,1,4,1,1,4,1,1,2,1,1,2,1,1,4,1,1,4,1,1,2,1,1,2,1,1,4,1,1,4,1,1,2,1,1,2,1,1,4,1,1,4,1,1,2,1,1,2,1,1,4,1,1,4,1,1,2
mov $2,$0
pow $0,2
sub $0,$2
add $0,4
div $0,3
gcd $0,4
add $0,1
mov $1,$0
sub $1,1
| 30.384615 | 217 | 0.559494 |
dc90682081b1fe280e1f1a3256598ac6e3e527a5 | 5,662 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1750.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_1750.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_1750.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r15
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x152cb, %rsi
lea addresses_UC_ht+0xeecb, %rdi
nop
nop
and %r8, %r8
mov $91, %rcx
rep movsw
nop
xor $46506, %rbx
lea addresses_WC_ht+0x105cb, %rcx
clflush (%rcx)
nop
nop
xor %r15, %r15
movw $0x6162, (%rcx)
dec %rsi
lea addresses_A_ht+0x118fb, %rbx
nop
xor %rsi, %rsi
movb (%rbx), %r15b
nop
and %r15, %r15
lea addresses_A_ht+0x19ccb, %rdi
nop
nop
nop
sub $35377, %r15
movups (%rdi), %xmm1
vpextrq $1, %xmm1, %r8
nop
cmp $63780, %r8
lea addresses_normal_ht+0x10e83, %rsi
lea addresses_D_ht+0xbdcb, %rdi
nop
nop
nop
cmp $55333, %rax
mov $75, %rcx
rep movsb
and $4324, %rsi
lea addresses_D_ht+0x12e92, %rdi
nop
nop
nop
nop
nop
xor $22520, %rcx
movups (%rdi), %xmm0
vpextrq $0, %xmm0, %rbx
nop
nop
nop
sub $47591, %rax
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r15
push %rax
push %rbp
push %rbx
push %rdx
// Store
lea addresses_normal+0x114cb, %r15
and $63421, %rdx
movw $0x5152, (%r15)
nop
nop
nop
nop
nop
and %r15, %r15
// Faulty Load
lea addresses_normal+0x114cb, %r13
nop
nop
nop
and %rbx, %rbx
movups (%r13), %xmm4
vpextrq $1, %xmm4, %r15
lea oracles, %rax
and $0xff, %r15
shlq $12, %r15
mov (%rax,%r15,1), %r15
pop %rdx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal', 'congruent': 0}}
{'dst': {'same': True, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 5}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A_ht', 'congruent': 2}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 10}}
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_D_ht', 'congruent': 0}}
{'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
*/
| 43.221374 | 2,999 | 0.658601 |
0bd68c03f6aa549420574f93fa2ca768207bf996 | 1,497 | asm | Assembly | programs/oeis/182/A182455.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/182/A182455.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/182/A182455.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A182455: a(0)=1, a(n) = (a(n-1) mod (n+2))*(n+2).
; 1,3,12,10,24,21,40,36,60,55,84,78,112,105,144,136,180,171,220,210,264,253,312,300,364,351,420,406,480,465,544,528,612,595,684,666,760,741,840,820,924,903,1012,990,1104,1081,1200,1176,1300,1275,1404,1378,1512,1485,1624,1596,1740,1711,1860,1830,1984,1953,2112,2080,2244,2211,2380,2346,2520,2485,2664,2628,2812,2775,2964,2926,3120,3081,3280,3240,3444,3403,3612,3570,3784,3741,3960,3916,4140,4095,4324,4278,4512,4465,4704,4656,4900,4851,5100,5050,5304,5253,5512,5460,5724,5671,5940,5886,6160,6105,6384,6328,6612,6555,6844,6786,7080,7021,7320,7260,7564,7503,7812,7750,8064,8001,8320,8256,8580,8515,8844,8778,9112,9045,9384,9316,9660,9591,9940,9870,10224,10153,10512,10440,10804,10731,11100,11026,11400,11325,11704,11628,12012,11935,12324,12246,12640,12561,12960,12880,13284,13203,13612,13530,13944,13861,14280,14196,14620,14535,14964,14878,15312,15225,15664,15576,16020,15931,16380,16290,16744,16653,17112,17020,17484,17391,17860,17766,18240,18145,18624,18528,19012,18915,19404,19306,19800,19701,20200,20100,20604,20503,21012,20910,21424,21321,21840,21736,22260,22155,22684,22578,23112,23005,23544,23436,23980,23871,24420,24310,24864,24753,25312,25200,25764,25651,26220,26106,26680,26565,27144,27028,27612,27495,28084,27966,28560,28441,29040,28920,29524,29403,30012,29890,30504,30381,31000,30876,31500,31375
mov $1,$0
gcd $1,2
mov $2,$0
mov $3,$0
lpb $0,1
sub $3,$0
mul $0,$3
add $2,$1
add $1,$2
mul $1,$2
lpe
sub $1,2
div $1,2
add $1,1
| 83.166667 | 1,304 | 0.763527 |
be745f71dccd4254e14e79002b448c8718fb9b57 | 833 | asm | Assembly | oeis/059/A059479.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/059/A059479.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/059/A059479.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A059479: Number of 3 X 3 matrices with elements from {0,...,n-1} such that the middle element of each of the eight lines of three (rows, columns and diagonals) is the square (mod n) of the difference of the end elements.
; Submitted by Simon Strandgaard
; 1,4,9,64,25,36,49,256,729,100,121,576,169,196,225,4096,289,2916,361,1600,441,484,529,2304,15625,676,6561,3136,841,900,961,16384,1089,1156,1225,46656,1369,1444,1521,6400,1681,1764,1849,7744,18225,2116,2209,36864,117649,62500,2601,10816,2809,26244,3025,12544,3249,3364,3481,14400,3721,3844,35721,262144,4225,4356,4489,18496,4761,4900,5041,186624,5329,5476,140625,23104,5929,6084,6241,102400,531441,6724,6889,28224,7225,7396,7569,30976,7921,72900,8281,33856,8649,8836,9025,147456,9409,470596,88209
mov $1,$0
seq $0,8833 ; Largest square dividing n.
add $1,1
pow $1,2
mul $0,$1
| 83.3 | 496 | 0.767107 |
cb6ea732980c92887b3cacf5fd1a232ffb90a81b | 22 | asm | Assembly | projects/Links_Awakening_gb.windfish/configuration/macros/returnIfLt.asm | jverkoey/awaken | 743755248996deb7181ae92f6e60be5656439c44 | [
"Apache-2.0"
] | 68 | 2020-12-16T10:06:48.000Z | 2022-03-29T19:54:01.000Z | projects/Links_Awakening_gb.windfish/configuration/macros/returnIfLt.asm | jverkoey/awaken | 743755248996deb7181ae92f6e60be5656439c44 | [
"Apache-2.0"
] | 62 | 2020-12-19T04:28:41.000Z | 2021-02-15T22:18:16.000Z | projects/Links_Awakening_gb.windfish/configuration/macros/returnIfLt.asm | jverkoey/awaken | 743755248996deb7181ae92f6e60be5656439c44 | [
"Apache-2.0"
] | 4 | 2021-01-17T03:51:22.000Z | 2021-01-21T16:26:53.000Z | ld a, [#1]
cp #2
ret c | 7.333333 | 10 | 0.5 |
4e46d1bdf7e04758c6e67dcf2204300133d749ec | 5,653 | asm | Assembly | common/lidata.asm | DigitalMars/optlink | 493de158282046641ef2a3a60a88e25e26d88ec4 | [
"BSL-1.0"
] | 28 | 2015-02-03T01:38:24.000Z | 2022-03-23T05:48:24.000Z | common/lidata.asm | DigitalMars/optlink | 493de158282046641ef2a3a60a88e25e26d88ec4 | [
"BSL-1.0"
] | 20 | 2015-01-02T14:51:20.000Z | 2021-01-09T21:37:19.000Z | common/lidata.asm | DigitalMars/optlink | 493de158282046641ef2a3a60a88e25e26d88ec4 | [
"BSL-1.0"
] | 9 | 2015-02-11T17:43:56.000Z | 2019-09-05T11:07:02.000Z | TITLE LIDATA - Copyright (c) 1994 by SLR Systems
INCLUDE MACROS
INCLUDE SEGMENTS
PUBLIC LIDATA_PROC,FORREF_MAJOR_MOVE,FIXDS_MOVER
.DATA
EXTERNDEF FIX2_LD_TYPE:BYTE
EXTERNDEF EXETABLE:DWORD,FIX2_LDATA_EOR:DWORD,SRCADR:DWORD,FIX2_SM_START:DWORD,FIX2_STACK_DELTA:DWORD
EXTERNDEF MAJOR_MOVE_ROUTINE:DWORD
.CODE PASS2_TEXT
EXTERNDEF MOVE_LDATA_1:PROC,CONVERT_SUBBX_TO_EAX:PROC,OBJ_PHASE:PROC,REL_CHK_LIDATA:PROC,LIBASE_FLUSH:PROC
EXTERNDEF _abort:proc
LIDATA_PROC PROC
;
;
;
PUSHM EDI,ESI
MOV MAJOR_MOVE_ROUTINE,OFF LI_MOVE_LDATA_1
PUSHM EBX,EBP
MOV ESI,EAX
MOV AL,FIX2_LD_TYPE
MOV EDI,-1 ;KEEP 32 BITS
MOV EBP,6 ;UPDATE POINTER BY 4
AND AL,MASK BIT_32
JNZ L1$
MOV EDI,0FFFFH ;OOPS, JUST KEEP 16 BITS
SUB EBP,2 ;UPDATE POINTER BY 2
L1$:
CALL LIDATA_PROC1
POPM EBP,EBX,ESI,EDI
RET
LIDATA_PROC ENDP
LIDATA_PROC_LOOP PROC NEAR
CALL LIDATA_LOOPER
LIDATA_PROC1::
;
;ESI IS LIDATA RECORD
;EDX IS TARGET ADDRESS LOGICAL
;
CMP FIX2_LDATA_EOR,ESI
JA LIDATA_PROC_LOOP
JZ LIBASE_FLUSH ;FLUSH ANY WAITING RELOCS...
CALL OBJ_PHASE
JMP _abort
LIDATA_PROC_LOOP ENDP
LIDATA_LOOPER::
MOV ECX,1 ;BLOCK COUNT
MOV EBX,1 ;REPEAT COUNT
LIDATA PROC NEAR PRIVATE
;
;ESI IS RECORD
;
PUSH EDX ;LOGICAL ADDRESS AT THIS POINT
PUSH EBX ;REPEAT COUNT AT THIS POINT
TEST ECX,ECX
JZ GENERATE
BLOCK_LOOP:
MOV EBX,[ESI] ;GET NEXT REPEAT FACTOR
ADD ESI,EBP ;KEEP 16 OR 32 BITS OF IT...
PUSH ECX ;SAVE BLOCK COUNT
AND EBX,EDI ;EBX IS REPEAT COUNT
MOV ECX,[ESI-2] ;BLOCK COUNT
AND ECX,0FFFFH
CALL LIDATA
POP ECX ;BLOCK COUNT
DEC ECX
JNZ BLOCK_LOOP ;DO LOOP AGAIN
GENERATE_RET:
POP EBX ;REPEAT COUNT
POP ECX ;OLD LOGICAL ADDRESS
DEC EBX
JNZ DUPLICATE_LAST
G_RET_RET:
RET ;BACK TO PREVIOUS LOOP?
GENERATE:
;
;GENERATE A FEW BYTES OF CODE...
;
XOR ECX,ECX
LEA EAX,[ESI+1]
MOV CL,[ESI]
PUSH EDX
PUSH ECX
CALL LI_MOVE_LDATA_1 ;EAX IS RECORD DATA, EDX IS TARGET
;LOGICAL, ECX IS BYTE COUNT
POPM ECX,EDX
MOV ESI,EAX
ADD EDX,ECX
POP EBX ;REPEAT COUNT
POP ECX ;OLD LOGICAL ADDRESS
DEC EBX
JZ G_RET_RET
DUPLICATE_LAST:
;
;COPY FROM EXE TO EXE, IF A BYTE, COPY 1 FIRST, THEN USE MOVSW
;
PUSHM ESI,EDX
;
;EDX IS TARGET LOGICAL ADDRESS
;SRCADR IS SOURCE LOGICAL.
;EBX * (TARGET-SOURCE) = # OF BYTES TO MOVE
;
MOV SRCADR,ECX ;PLACE THIS BEGAN
SUB EDX,ECX ;EDX = TARGET-SOURCE
MOV EAX,EBX
MOV ECX,EDX ;SAVE DELTA
MUL EDX ;EAX IS # OF BYTES TO MOVE
;
;IF DELTA = ODD -> MOVE SMALLER OF DELTA AND # TO MOVE
;ECX IS DELTA, EAX IS # TO MOVE
;
CMP EAX,320 ;SKIP ALL THIS IF LESS THAN 320 BYTES
JC FINAL_BYTE
TEST CL,1
JZ TRY_386
POP EDX
CALL DOIT
JZ GO_RET
PUSH EDX
TRY_386:
if 1
;
;OK, DELTA NOW EVEN, IF IS_386, MAKE SURE DELTA IS DWORD
;
TEST CL,3
JZ TRY_EVEN
POP EDX
CALL DOIT
JZ GO_RET
PUSH EDX
MOV EBX,3
TRY_EVEN:
else
MOV EBX,1
endif
MOV EDX,SRCADR
ADD EDX,FIX2_STACK_DELTA
SUB EDX,FIX2_SM_START
TEST EDX,EBX
JZ FINAL
;
;NEED TO ADJUST SOURCE...
;CX:BX IS DELTA, SI:AX IS # TO MOVE
;
MOV EDX,SRCADR
AND EDX,EBX
INC EBX
SUB EBX,EDX ;EBX IS # NEEDED FOR ALIGNMENT
;
;USE SMALLER OF # TO MOVE AND EBX
;
CMP EAX,EBX
JNC USE_EBX
;
;USE SI:AX
;
POP EDX
CALL DOIT
JNZ FINAL1
GO_RET:
POP ESI
RET
USE_EBX:
; MOV BP_1,DI
POP EDX
PUSHM ECX,EAX
MOV BP_1,EAX
MOV EAX,EBX
PUSH EAX
CALL DOIT
;
;NOW NEED TO UPDATE REAL COUNT AND SRCADR
;
POP EBX
MOV ECX,SRCADR
POP EAX
ADD ECX,EBX
SUB EAX,EBX
MOV SRCADR,ECX
POP ECX ;DELTA IS SAME
JNZ FINAL1
POP ESI
RET
FINAL_BYTE:
;
;OK, MOVE ALL THATS LEFT
;
SETT MOVE_BYTES
POP EDX
CALL MAJOR_MOVE
POP ESI
RESS MOVE_BYTES
RET
FINAL:
;
;OK, MOVE ALL THATS LEFT
;
POP EDX
FINAL1:
CALL MAJOR_MOVE
POP ESI
RET
LIDATA ENDP
MAJOR_MOVE PROC
;
;EAX IS # OF BYTES TO MOVE
;EDX IS TARGET ADDRESS...
;SRCADR IS SOURCE ADDRESS
;
;MOVE_LDATA_1 ECX = BYTE COUNT, BX=LDATA_SEGMOD, EDX DEST
;
FORREF_MAJOR_MOVE LABEL PROC
MOV ECX,SRCADR
ADD ECX,FIX2_STACK_DELTA ;IN CASE IT IS A STACK SEGMENT
SUB ECX,FIX2_SM_START
FIXDS_MOVER LABEL PROC ;CALLED BY FIXDS IN SPECIAL CASE
PUSH EBX
MOV EBX,ECX
SHR EBX,PAGE_BITS
AND ECX,PAGE_SIZE-1
PUSH ESI
MOV ESI,ECX
LEA EBX,EXETABLE[EBX*4]
MAJOR_LOOP:
PUSH EAX
MOV ECX,PAGE_SIZE
CALL CONVERT_SUBBX_TO_EAX
SUB ECX,ESI
ADD ESI,EAX
POP EAX
CMP ECX,EAX
JC USE_MAX
MOV ECX,EAX
USE_MAX:
PUSH EAX
MOV EAX,ESI
PUSHM EDX,ECX
CALL MAJOR_MOVE_ROUTINE ;EDX IS DEST, EAX SRC, ECX BYTE COUNT
POPM ECX,EDX
XOR ESI,ESI
POP EAX
ADD EDX,ECX
SUB EAX,ECX
LEA EBX,[EBX+4]
JNZ MAJOR_LOOP
POPM ESI,EBX
RET
MAJOR_MOVE ENDP
DOIT PROC NEAR
;
;CX:BX IS DELTA, SI:AX IS # TO MOVE, DX:DI IS TARGET LOGICAL
;ECX IS DELTA, EAX IS # TO MOVE, EDX IS TARGET LOGICAL
;
;MOVE SMALLER OF DELTA & # TO MOVE
;
PUSH EBX
PUSHM ECX,EAX
CMP ECX,EAX
JC USE_DELTA
USE_NTM:
MOV ECX,EAX
USE_DELTA:
PUSH EDX
MOV EAX,ECX ;EAX IS BYTE COUNT
MOV EBX,ECX
CALL MAJOR_MOVE
POPM EDX,EAX
ADD EDX,EBX
POP ECX
ADD ECX,EBX
SUB EAX,EBX
POP EBX
RET
DOIT ENDP
LI_MOVE_LDATA_1 PROC
;
;EDX IS TARGET ADDRESS
;ECX IS BYTE COUNT
;EAX IS SOURCE ADDRESS
;
;
;NEED TO DO REL_CHK_LIDATA...
;
BITT CHECK_RELOCATIONS
JZ MOVE_LDATA_1
PUSHM EDX,ECX,EAX
CALL REL_CHK_LIDATA
POPM EAX,ECX,EDX
JMP MOVE_LDATA_1
LI_MOVE_LDATA_1 ENDP
.DATA?
ALIGN 4
BP_1 DD ?
END
| 13.491647 | 108 | 0.677163 |
661e3743cf8d6412ab65db07a874ef0723c88ee1 | 456 | asm | Assembly | helloworld.asm | ankbhatia19/hello-world | 6bb005fe15bca331d94cb490f0381cdc1c48d6b8 | [
"MIT"
] | null | null | null | helloworld.asm | ankbhatia19/hello-world | 6bb005fe15bca331d94cb490f0381cdc1c48d6b8 | [
"MIT"
] | null | null | null | helloworld.asm | ankbhatia19/hello-world | 6bb005fe15bca331d94cb490f0381cdc1c48d6b8 | [
"MIT"
] | null | null | null | section .text
global _start
section .data
msg db 'Hello, world!',0xa
len equ $ - msg
section .text
_start:
mov edx,len ;message length
mov ecx,msg ;message to write
mov ebx,1 ;file descriptor (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
mov ebx,0 ;process' exit code
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel - this interrupt won't return
| 19.826087 | 58 | 0.640351 |
6de52ca8036f1acf6a1d81a30aad9c792d7f8122 | 687 | asm | Assembly | oeis/226/A226234.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/226/A226234.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/226/A226234.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A226234: Triangle defined by T(n,k) = binomial(n^2, k^2), for n>=0, k=0..n, as read by rows.
; Submitted by Christian Krause
; 1,1,1,1,4,1,1,9,126,1,1,16,1820,11440,1,1,25,12650,2042975,2042975,1,1,36,58905,94143280,7307872110,600805296,1,1,49,211876,2054455634,3348108992991,63205303218876,262596783764,1,1,64,635376,27540584512,488526937079580,401038568751465792,1118770292985239888,159518999862720,1,1,81,1663740,260887834350,33594090947249085,525652003943603702568,130276394656770614583240,36218972546475641658450,128447994798305325,1,1,100,3921225,1902231808400,1345860629046814650,242519269720337121015504
lpb $0
add $1,1
sub $0,$1
lpe
pow $0,2
pow $1,2
bin $1,$0
mov $0,$1
| 52.846154 | 486 | 0.79476 |
a3a846fe3c205b4695a302ce9a9de25ed4347ede | 6,040 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_12596_693.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_12596_693.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_12596_693.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_WC_ht+0xed0c, %rcx
nop
nop
nop
inc %r15
mov $0x6162636465666768, %rbp
movq %rbp, (%rcx)
nop
nop
xor $38525, %rcx
lea addresses_D_ht+0x91fc, %rbx
cmp %r14, %r14
mov $0x6162636465666768, %r11
movq %r11, (%rbx)
nop
nop
nop
nop
nop
and $24090, %r11
lea addresses_WC_ht+0x12581, %rsi
lea addresses_UC_ht+0xfc, %rdi
nop
cmp %r15, %r15
mov $9, %rcx
rep movsl
nop
xor $57972, %r15
lea addresses_D_ht+0x4fc, %rcx
nop
nop
nop
nop
and %rbx, %rbx
movups (%rcx), %xmm6
vpextrq $1, %xmm6, %r15
nop
nop
dec %r15
lea addresses_D_ht+0x14fc, %rsi
lea addresses_UC_ht+0x1dafc, %rdi
nop
nop
nop
cmp %r14, %r14
mov $2, %rcx
rep movsq
sub $22503, %rbx
lea addresses_A_ht+0x1c2, %rsi
lea addresses_D_ht+0x62fc, %rdi
clflush (%rdi)
nop
nop
nop
nop
add $4146, %r14
mov $12, %rcx
rep movsq
nop
add %r11, %r11
lea addresses_UC_ht+0xccfc, %r11
nop
nop
nop
nop
nop
sub $61247, %rcx
mov (%r11), %r15d
nop
sub $19348, %r14
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 %r11
push %r12
push %r14
push %r8
push %r9
push %rcx
push %rsi
// Store
lea addresses_RW+0x103fc, %r14
nop
nop
nop
nop
xor $36660, %r8
mov $0x5152535455565758, %r9
movq %r9, %xmm5
movups %xmm5, (%r14)
// Exception!!!
nop
mov (0), %r14
nop
nop
nop
nop
add %rcx, %rcx
// Faulty Load
lea addresses_WT+0x70fc, %r11
nop
nop
nop
nop
cmp %r12, %r12
movb (%r11), %r9b
lea oracles, %rsi
and $0xff, %r9
shlq $12, %r9
mov (%rsi,%r9,1), %r9
pop %rsi
pop %rcx
pop %r9
pop %r8
pop %r14
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 16, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': True}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'39': 12596}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 37.75 | 2,999 | 0.658113 |
983cf5b49ca36d4bbcd98f6f1d0004a766540e85 | 5,583 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_426.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_426.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_426.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 %r9
push %rcx
push %rsi
lea addresses_normal_ht+0xe86d, %rsi
nop
nop
nop
and $61058, %rcx
movb (%rsi), %r12b
nop
nop
dec %r9
pop %rsi
pop %rcx
pop %r9
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r8
push %rax
push %rbp
push %rbx
push %rcx
push %rdx
// Load
lea addresses_UC+0x7c5, %rcx
nop
nop
nop
nop
nop
and %rbp, %rbp
mov (%rcx), %r8w
nop
nop
nop
nop
nop
add $28691, %rcx
// Load
mov $0xfed, %r14
nop
nop
nop
nop
nop
cmp $8687, %rbx
vmovups (%r14), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %rax
nop
nop
nop
nop
nop
cmp %r8, %r8
// Store
lea addresses_A+0x1ea51, %rcx
inc %rbp
movl $0x51525354, (%rcx)
nop
nop
nop
nop
add $53058, %rcx
// Store
mov $0xccd, %rdx
nop
nop
nop
nop
nop
cmp $53934, %rbp
mov $0x5152535455565758, %rax
movq %rax, %xmm1
movups %xmm1, (%rdx)
nop
xor $17267, %rbx
// Store
lea addresses_RW+0xd06d, %rbp
nop
nop
nop
nop
nop
sub %r14, %r14
movw $0x5152, (%rbp)
nop
nop
nop
sub $64975, %rbx
// Store
lea addresses_WC+0x1a96d, %rbp
nop
nop
nop
nop
nop
sub %rbx, %rbx
mov $0x5152535455565758, %r14
movq %r14, (%rbp)
nop
nop
nop
xor %r8, %r8
// Faulty Load
lea addresses_normal+0x1186d, %rbx
nop
nop
nop
dec %rcx
movb (%rbx), %r8b
lea oracles, %rcx
and $0xff, %r8
shlq $12, %r8
mov (%rcx,%r8,1), %r8
pop %rdx
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r8
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_P', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_P', 'same': False, 'size': 16, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 8, 'congruent': 7, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'same': True, 'size': 1, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'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.788462 | 2,999 | 0.653591 |
e3dfe5e07169518b7202519b9480ac543bba213c | 387 | asm | Assembly | libsrc/osca/set_bank.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/osca/set_bank.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/osca/set_bank.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | ;
; Get the OSCA Architecture current bank
; by Stefano Bodrato, 2011
;
; void set_bank(int bank);
;
; Sets which of the 32KB banks is mapped into address space $8000-$ffff
; bank = required bank (range: 0 - max_bank)
;
; $Id: set_bank.asm,v 1.4 2015/01/19 01:33:00 pauloscustodio Exp $
;
INCLUDE "flos.def"
PUBLIC set_bank
set_bank:
; __FASTCALL__
ld a,l
jp kjt_forcebank
| 17.590909 | 71 | 0.700258 |
bcd18361d5ead2462ed13409c2f4a3c5f53630c3 | 2,870 | asm | Assembly | ladder.asm | dsprenkels/curve13318 | 4af2f2f0dc8748efed9c152df02d462d1f9376b1 | [
"CC0-1.0"
] | 3 | 2019-03-27T09:35:40.000Z | 2020-04-17T13:47:07.000Z | ladder.asm | dsprenkels/curve13318-ivybridge | fa9ffbf5a11eaa22910df9b5f77f95082af129c0 | [
"CC0-1.0"
] | null | null | null | ladder.asm | dsprenkels/curve13318-ivybridge | fa9ffbf5a11eaa22910df9b5f77f95082af129c0 | [
"CC0-1.0"
] | null | null | null | ; Ladder for shared secret point multiplication
;
; Author: Daan Sprenkels <hello@dsprenkels.com>
%include "ge_add.mac"
%include "ge_double.mac"
%include "select.mac"
global crypto_scalarmult_curve13318_ref12_ladder
section .text
crypto_scalarmult_curve13318_ref12_ladder:
; Double-and-add ladder for shared secret point multiplication
;
; Arguments:
; ge q: [rdi]
; uint8_t *windows: [rsi]
; ge ptable[16]: [rdx]
;
%xdefine stack_size 6*384 + 192 + 768
; prologue
push rbp
mov rbp, rsp
and rsp, -32
sub rsp, stack_size
mov qword [rsp - 8], r8
mov qword [rsp - 16], r9
mov qword [rsp - 24], r10
mov qword [rsp - 32], r11
mov qword [rsp - 40], rbx
; start loop
xor rcx, rcx
.ladderstep:
xor rbx, rbx
.ladderstep_double:
ge_double rdi, rdi, rsp
add rbx, 1
cmp rbx, 5
jl .ladderstep_double
; Our lookup table is one-based indexed. The neutral element is not stored
; in `ptable`, but written by `ge_neutral`. The mapping from `bits` to `idx`
; is defined by the following:
;
; compute_idx :: Word8 -> Word8
; compute_idx bits
; | 0 <= bits < 16 = x - 1 // sign is (+)
; | 16 <= bits < 32 = ~x // sign is (-)
movzx rax, byte [rsi + rcx]
mov r8, rax
shr r8b, 4
and r8b, 1 ; sign
mov r9, r8
mov r11, r8 ; save for later
neg r8b ; signmask
sub r9b, 1 ; ~signmask
mov r10, rax
not r10b ; ~bits
and r8b, r10b
sub al, 1 ; bits - 1
and r9b, al
or r8b, r9b
and r8b, 0x1F ; force the result idx to be in [0, 0x1F]
select r8b, rdx
; conditionally negate y if sign == 1
shl r11, 63 ; 0b100.. or 0b000..
vmovq xmm15, r11
vmovddup xmm15, xmm15
vinsertf128 ymm15, xmm15, 0b1
; conditionally flip the sign bit
vxorpd ymm3, ymm3, ymm15
vxorpd ymm4, ymm4, ymm15
vxorpd ymm5, ymm5, ymm15
; save the point to the stack
vmovapd [rsp + 5*384], ymm0
vmovapd [rsp + 5*384 + 1*32], ymm1
vmovapd [rsp + 5*384 + 2*32], ymm2
vmovapd [rsp + 5*384 + 3*32], ymm3
vmovapd [rsp + 5*384 + 4*32], ymm4
vmovapd [rsp + 5*384 + 5*32], ymm5
vmovapd [rsp + 5*384 + 6*32], ymm6
vmovapd [rsp + 5*384 + 7*32], ymm7
vmovapd [rsp + 5*384 + 8*32], ymm8
; put p at [rsp + 5*384] = t5, will be overwritten but we don't care
; add q and p into q
ge_add rdi, rdi, rsp + 5*384, rsp
; loop repeat
add rcx, 1
cmp rcx, 51
jl .ladderstep
; epilogue
mov rbx, qword [rsp - 40]
mov r11, qword [rsp - 32]
mov r10, qword [rsp - 24]
mov r9, qword [rsp - 16]
mov r8, qword [rsp - 8]
mov rsp, rbp
pop rbp
ret
section .rodata
select_consts
fe12x4_mul_consts
fe12x4_squeeze_consts
ge_double_consts
ge_add_consts
| 25.39823 | 80 | 0.590941 |
6ae881289311c30d708b91f50c41298a5134b19f | 399 | asm | Assembly | pwnlib/shellcraft/templates/thumb/linux/bindsh.asm | kristoff3r/pwntools | 9d94de956501dcf5f60c5a382c9a52078df99533 | [
"MIT"
] | 1 | 2015-12-09T15:13:59.000Z | 2015-12-09T15:13:59.000Z | pwnlib/shellcraft/templates/thumb/linux/bindsh.asm | kristoff3r/pwntools | 9d94de956501dcf5f60c5a382c9a52078df99533 | [
"MIT"
] | null | null | null | pwnlib/shellcraft/templates/thumb/linux/bindsh.asm | kristoff3r/pwntools | 9d94de956501dcf5f60c5a382c9a52078df99533 | [
"MIT"
] | null | null | null | <% from pwnlib.shellcraft.thumb.linux import listen, dupsh%>
<% from pwnlib import constants %>
<% from socket import htons %>
<%page args="port, network='ipv4'"/>
<%docstring>
bindsh(port,network)
Listens on a TCP port and spawns a shell for the first to connect.
Port is the TCP port to listen on, network is either 'ipv4' or 'ipv6'.
</%docstring>
${listen(port, network)}
${dupsh()}
| 30.692308 | 74 | 0.691729 |
73921bae71a141f50aa07fc5090ed0ac6d73f971 | 11,448 | asm | Assembly | src/test/ref/examples/c64/multiplexer/simple-multiplexer.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/test/ref/examples/c64/multiplexer/simple-multiplexer.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/test/ref/examples/c64/multiplexer/simple-multiplexer.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | // A simple usage of the flexible sprite multiplexer routine
/// @file
/// Commodore 64 Registers and Constants
/// @file
/// The MOS 6526 Complex Interface Adapter (CIA)
///
/// http://archive.6502.org/datasheets/mos_6526_cia_recreated.pdf
// Commodore 64 PRG executable file
.file [name="simple-multiplexer.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(__start)
/// $D011 Control Register #1 Bit#7: RST8 9th Bit for $D012 Rasterline counter
.const VICII_RST8 = $80
/// $D011 Control Register #1 Bit#4: DEN Switch VIC-II output on/off
.const VICII_DEN = $10
/// $D011 Control Register #1 Bit#3: RSEL Switch betweem 25 or 24 visible rows
/// RSEL| Display window height | First line | Last line
/// ----+--------------------------+-------------+----------
/// 0 | 24 text lines/192 pixels | 55 ($37) | 246 ($f6)
/// 1 | 25 text lines/200 pixels | 51 ($33) | 250 ($fa)
.const VICII_RSEL = 8
/// The colors of the C64
.const BLACK = 0
.const GREEN = 5
// The number of sprites in the multiplexer
.const PLEX_COUNT = $20
.const OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE = $15
.const OFFSET_STRUCT_MOS6569_VICII_RASTER = $12
.const OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR = $20
/// Sprite X position register for sprite #0
.label SPRITES_XPOS = $d000
/// Sprite Y position register for sprite #0
.label SPRITES_YPOS = $d001
/// Sprite X position MSB register
.label SPRITES_XMSB = $d010
/// Sprite colors register for sprite #0
.label SPRITES_COLOR = $d027
/// $D011 Control Register #1
/// @see #VICII_CONTROL1
.label D011 = $d011
/// The VIC-II MOS 6567/6569
.label VICII = $d000
// Location of screen & sprites
.label SCREEN = $400
// The address of the sprite pointers on the current screen (screen+0x3f8).
.label PLEX_SCREEN_PTR = $c
// The index in the PLEX tables of the next sprite to show
.label plex_show_idx = 7
// The index the next sprite to use for showing (sprites are used round-robin)
.label plex_sprite_idx = 8
// The MSB bit of the next sprite to use for showing
.label plex_sprite_msb = 6
// The index of the sprite that is free next. Since sprites are used round-robin this moves forward each time a sprite is shown.
.label plex_free_next = 9
.segment Code
__start: {
// char* volatile PLEX_SCREEN_PTR = (char*)0x400+0x3f8
lda #<$400+$3f8
sta.z PLEX_SCREEN_PTR
lda #>$400+$3f8
sta.z PLEX_SCREEN_PTR+1
// volatile char plex_show_idx=0
lda #0
sta.z plex_show_idx
// volatile char plex_sprite_idx=0
sta.z plex_sprite_idx
// volatile char plex_sprite_msb=1
lda #1
sta.z plex_sprite_msb
// volatile char plex_free_next = 0
lda #0
sta.z plex_free_next
jsr main
rts
}
main: {
// asm
sei
// init()
jsr init
// loop()
jsr loop
// }
rts
}
// Initialize the program
init: {
// Set the x-positions & pointers
.label xp = $a
// *D011 = VICII_DEN | VICII_RSEL | 3
lda #VICII_DEN|VICII_RSEL|3
sta D011
// plexInit(SCREEN)
// Initialize the multiplexer
jsr plexInit
lda #<$20
sta.z xp
lda #>$20
sta.z xp+1
ldx #0
__b1:
// PLEX_PTR[sx] = (char)(SPRITE/$40)
lda #$ff&SPRITE/$40
sta PLEX_PTR,x
// PLEX_XPOS[sx] = xp
txa
asl
tay
lda.z xp
sta PLEX_XPOS,y
lda.z xp+1
sta PLEX_XPOS+1,y
// xp += 9
lda #9
clc
adc.z xp
sta.z xp
bcc !+
inc.z xp+1
!:
// for(char sx: 0..PLEX_COUNT-1)
inx
cpx #PLEX_COUNT-1+1
bne __b1
// VICII->SPRITES_ENABLE = $ff
// Enable & initialize sprites
lda #$ff
sta VICII+OFFSET_STRUCT_MOS6569_VICII_SPRITES_ENABLE
ldx #0
__b3:
// SPRITES_COLOR[ss] = GREEN
lda #GREEN
sta SPRITES_COLOR,x
// for(char ss: 0..7)
inx
cpx #8
bne __b3
// }
rts
}
// The raster loop
loop: {
// The current index into the y-sine
.label sin_idx = $e
.label ss = 5
lda #0
sta.z sin_idx
__b2:
// while(VICII->RASTER!=$ff)
lda #$ff
cmp VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER
bne __b2
// (VICII->BORDER_COLOR)++;
inc VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR
ldx.z sin_idx
ldy #0
__b4:
// PLEX_YPOS[sy] = YSIN[y_idx]
lda YSIN,x
sta PLEX_YPOS,y
// y_idx += 8
txa
axs #-[8]
// for(char sy: 0..PLEX_COUNT-1)
iny
cpy #PLEX_COUNT-1+1
bne __b4
// sin_idx +=1
inc.z sin_idx
// (VICII->BORDER_COLOR)++;
inc VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR
// plexSort()
jsr plexSort
// VICII->BORDER_COLOR = BLACK
lda #BLACK
sta VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR
__b6:
// *D011&VICII_RST8
lda #VICII_RST8
and D011
// while((*D011&VICII_RST8)!=0)
cmp #0
bne __b6
lda #0
sta.z ss
// Show the sprites
__b7:
// VICII->BORDER_COLOR = BLACK
lda #BLACK
sta VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR
// return PLEX_FREE_YPOS[plex_free_next];
ldy.z plex_free_next
lda PLEX_FREE_YPOS,y
__b8:
// while(VICII->RASTER<rasterY)
cmp VICII+OFFSET_STRUCT_MOS6569_VICII_RASTER
beq !+
bcs __b8
!:
// (VICII->BORDER_COLOR)++;
inc VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR
// plexShowSprite()
jsr plexShowSprite
// for( char ss: 0..PLEX_COUNT-1)
inc.z ss
lda #PLEX_COUNT-1+1
cmp.z ss
bne __b7
// VICII->BORDER_COLOR = BLACK
lda #BLACK
sta VICII+OFFSET_STRUCT_MOS6569_VICII_BORDER_COLOR
jmp __b2
}
// Initialize the multiplexer data structures
// void plexInit(char *screen)
plexInit: {
// PLEX_SCREEN_PTR = screen+0x3f8
lda #<SCREEN+$3f8
sta.z PLEX_SCREEN_PTR
lda #>SCREEN+$3f8
sta.z PLEX_SCREEN_PTR+1
ldx #0
__b1:
// PLEX_SORTED_IDX[i] = i
txa
sta PLEX_SORTED_IDX,x
// for(char i: 0..PLEX_COUNT-1)
inx
cpx #PLEX_COUNT-1+1
bne __b1
// }
rts
}
// Ensure that the indices in PLEX_SORTED_IDX is sorted based on the y-positions in PLEX_YPOS
// Assumes that the positions are nearly sorted already (as each sprite just moves a bit)
// Uses an insertion sort:
// 1. Moves a marker (m) from the start to end of the array. Every time the marker moves forward all elements before the marker are sorted correctly.
// 2a. If the next element after the marker is larger that the current element
// the marker can be moved forwards (as the sorting is correct).
// 2b. If the next element after the marker is smaller than the current element:
// elements before the marker are shifted right one at a time until encountering one smaller than the current one.
// It is then inserted at the spot. Now the marker can move forward.
plexSort: {
.label nxt_idx = 4
.label nxt_y = 3
.label m = 2
lda #0
sta.z m
__b1:
// char nxt_idx = PLEX_SORTED_IDX[m+1]
ldy.z m
lda PLEX_SORTED_IDX+1,y
sta.z nxt_idx
// char nxt_y = PLEX_YPOS[nxt_idx]
tay
lda PLEX_YPOS,y
sta.z nxt_y
// if(nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[m]])
ldx.z m
ldy PLEX_SORTED_IDX,x
cmp PLEX_YPOS,y
bcs __b2
__b3:
// PLEX_SORTED_IDX[s+1] = PLEX_SORTED_IDX[s]
lda PLEX_SORTED_IDX,x
sta PLEX_SORTED_IDX+1,x
// s--;
dex
// while((s!=0xff) && (nxt_y<PLEX_YPOS[PLEX_SORTED_IDX[s]]))
cpx #$ff
beq __b4
lda.z nxt_y
ldy PLEX_SORTED_IDX,x
cmp PLEX_YPOS,y
bcc __b3
__b4:
// s++;
inx
// PLEX_SORTED_IDX[s] = nxt_idx
lda.z nxt_idx
sta PLEX_SORTED_IDX,x
__b2:
// for(char m: 0..PLEX_COUNT-2)
inc.z m
lda #PLEX_COUNT-2+1
cmp.z m
bne __b1
// plex_show_idx = 0
// Prepare for showing the sprites
lda #0
sta.z plex_show_idx
// plex_sprite_idx = 0
sta.z plex_sprite_idx
// plex_sprite_msb = 1
lda #1
sta.z plex_sprite_msb
ldx #0
plexFreePrepare1___b1:
// PLEX_FREE_YPOS[s] = 0
lda #0
sta PLEX_FREE_YPOS,x
// for( char s: 0..7)
inx
cpx #8
bne plexFreePrepare1___b1
// plex_free_next = 0
sta.z plex_free_next
// }
rts
}
// Show the next sprite.
// plexSort() prepares showing the sprites
plexShowSprite: {
.label plex_sprite_idx2 = 2
// char plex_sprite_idx2 = plex_sprite_idx*2
lda.z plex_sprite_idx
asl
sta.z plex_sprite_idx2
// char ypos = PLEX_YPOS[PLEX_SORTED_IDX[plex_show_idx]]
ldx.z plex_show_idx
ldy PLEX_SORTED_IDX,x
lda PLEX_YPOS,y
// SPRITES_YPOS[plex_sprite_idx2] = ypos
ldy.z plex_sprite_idx2
sta SPRITES_YPOS,y
// ypos+22
clc
adc #$16
// PLEX_FREE_YPOS[plex_free_next] = ypos+22
ldy.z plex_free_next
sta PLEX_FREE_YPOS,y
// plex_free_next+1
ldx.z plex_free_next
inx
// (plex_free_next+1)&7
txa
and #7
// plex_free_next = (plex_free_next+1)&7
sta.z plex_free_next
// PLEX_SCREEN_PTR[plex_sprite_idx] = PLEX_PTR[PLEX_SORTED_IDX[plex_show_idx]]
ldx.z plex_show_idx
ldy PLEX_SORTED_IDX,x
lda PLEX_PTR,y
ldy.z plex_sprite_idx
sta (PLEX_SCREEN_PTR),y
// char xpos_idx = PLEX_SORTED_IDX[plex_show_idx]
ldy.z plex_show_idx
lda PLEX_SORTED_IDX,y
// SPRITES_XPOS[plex_sprite_idx2] = (char)PLEX_XPOS[xpos_idx]
asl
tax
ldy.z plex_sprite_idx2
lda PLEX_XPOS,x
sta SPRITES_XPOS,y
// BYTE1(PLEX_XPOS[xpos_idx])
lda PLEX_XPOS+1,x
// if(BYTE1(PLEX_XPOS[xpos_idx])!=0)
cmp #0
bne __b1
// 0xff^plex_sprite_msb
lda #$ff
eor.z plex_sprite_msb
// *SPRITES_XMSB &= (0xff^plex_sprite_msb)
and SPRITES_XMSB
sta SPRITES_XMSB
__b2:
// plex_sprite_idx+1
ldx.z plex_sprite_idx
inx
// (plex_sprite_idx+1)&7
txa
and #7
// plex_sprite_idx = (plex_sprite_idx+1)&7
sta.z plex_sprite_idx
// plex_show_idx++;
inc.z plex_show_idx
// plex_sprite_msb <<=1
asl.z plex_sprite_msb
// if(plex_sprite_msb==0)
lda.z plex_sprite_msb
bne __breturn
// plex_sprite_msb = 1
lda #1
sta.z plex_sprite_msb
__breturn:
// }
rts
__b1:
// *SPRITES_XMSB |= plex_sprite_msb
lda SPRITES_XMSB
ora.z plex_sprite_msb
sta SPRITES_XMSB
jmp __b2
}
.segment Data
// The x-positions of the multiplexer sprites (0x000-0x1ff)
PLEX_XPOS: .fill 2*PLEX_COUNT, 0
// The y-positions of the multiplexer sprites.
PLEX_YPOS: .fill PLEX_COUNT, 0
// The sprite pointers for the multiplexed sprites
PLEX_PTR: .fill PLEX_COUNT, 0
// Indexes of the plex-sprites sorted by sprite y-position. Each call to plexSort() will fix the sorting if changes to the Y-positions have ruined it.
PLEX_SORTED_IDX: .fill PLEX_COUNT, 0
// Contains the Y-position where each sprite is free again. PLEX_FREE_YPOS[s] holds the Y-position where sprite s is free to use again.
PLEX_FREE_YPOS: .fill 8, 0
.align $100
YSIN:
.var min = 50
.var max = 250-21
.var ampl = max-min;
.for(var i=0;i<256;i++)
.byte round(min+(ampl/2)+(ampl/2)*sin(toRadians(360*i/256)))
.pc = $2000 "SPRITE"
SPRITE:
.var pic = LoadPicture("balloon.png", List().add($000000, $ffffff))
.for (var y=0; y<21; y++)
.for (var x=0;x<3; x++)
.byte pic.getSinglecolorByte(x,y)
| 26.936471 | 152 | 0.647187 |
8db314a72af882f2df54886cd8bc32bf3235622d | 1,044 | asm | Assembly | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_4_1035.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_4_1035.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0.log_4_1035.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 %rbp
push %rdi
lea addresses_UC_ht+0xd724, %r10
clflush (%r10)
nop
nop
nop
nop
inc %r13
movl $0x61626364, (%r10)
inc %rdi
pop %rdi
pop %rbp
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r9
push %rax
push %rcx
// Faulty Load
mov $0x494c6a00000002a4, %rax
nop
and $51825, %r13
vmovups (%rax), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %rcx
lea oracles, %rax
and $0xff, %rcx
shlq $12, %rcx
mov (%rax,%rcx,1), %rcx
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_NC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}}
{'00': 4}
00 00 00 00
*/
| 17.694915 | 124 | 0.652299 |
d1ac964fd667dcaaf4d117185f7f59a5760e4449 | 6,700 | asm | Assembly | examples/Neviksti/walker-example/Strings.asm | fabiosoaza/snes-dev-tools-examples | 599f8575655848c82722b8fff75f55835bc11a32 | [
"MIT"
] | 1 | 2021-03-30T00:09:14.000Z | 2021-03-30T00:09:14.000Z | examples/Neviksti/walker-example/Strings.asm | fabiosoaza/snes-dev-tools-examples | 599f8575655848c82722b8fff75f55835bc11a32 | [
"MIT"
] | null | null | null | examples/Neviksti/walker-example/Strings.asm | fabiosoaza/snes-dev-tools-examples | 599f8575655848c82722b8fff75f55835bc11a32 | [
"MIT"
] | null | null | null | ;------------------------------------------------------------------------
;- Written by: Neviksti
;- If you use my code, please share your creations with me
;- as I am always curious :)
;-
;- Note: These routines were originally from examples released
;- by Grog. I fixed up some stuff to make his code work on the
;- real SNES and then added a bunch of features.
;------------------------------------------------------------------------
;String Functions RAM locations
;I arbitrarily close $0010, but move it if you like
.DEFINE Cursor $10 ;Holds 16-bit position on screen
;text buffer - is copied to VRAM during VBlank
; $7F0000 - $7F03FF
.DEFINE TextBuffer $7F0000
; SetCursorPos y, x
.MACRO SetCursorPos
ldx #32*\1 + \2
stx Cursor
.ENDM
.MACRO PrintString
LDX #STRlabel\@
JSR PrintF
BRA END_STRlabel\@
STRlabel\@:
.DB \1, 0
END_STRlabel\@:
.ENDM
;here's a macro for printing a number (a byte)
;
; ex: PrintNum $2103 ;print value of reg $2103
; PrintNum #9 ;print 9
.MACRO PrintNum
lda \1
jsr PrintInt8_noload
.ENDM
.MACRO PrintHexNum
lda \1
jsr PrintHex8_noload
.ENDM
.BANK 0 SLOT 0
.SECTION "Print_Handler"
;Print -- Print an ASCII character to the BG3 buffer
; which needs to be copied into VRAM in the NMI handler.
; Of course, an 8x8 ASCII tile set must
; be loaded and the VRAM pointer set ahead of time
;In: A -- ASCII code to print
;Out: none
;Modifies: P
Print:
PHX
;expectations: A/Mem=8bit, X/Y=16bit
LDX Cursor
STA TextBuffer, X ;Output character
INX
STX Cursor
PLX
RTS
;PrintF -- Print a Formatted, NULL terminated string to Stdout
;In: X -- points to format string
; Y -- points to parameter buffer
;Out: none
;Modifies: none
;Notes:
; Supported Format characters:
; %s -- sub-string (reads 16-bit pointer from Y data)
; %d -- 16-bit Integer (reads 16-bit data from Y data)
; %b -- 8-bit Integer (reads 8-bit data from Y data)
; %x -- 8-bit hex Integer (reads 8-bit data from Y data)
; %% -- normal %
; \n -- Newline
; \t -- Tab
; \b -- Page break
; \\ -- normal slash
; String pointers all refer to current Data Bank (DB)
PrintF: ;Assumes 8b mem, 16b index
PHP
PHA
PHX
PHY
rep #$10 ; A/mem=8bit, X/Y=16bit
sep #$20
PrintFLoop:
LDA $0000,X ;Read next format string character
BEQ PrintFDone ;Check for NULL terminator
INX ;Increment input pointer
CMP #'%'
BEQ PrintFFormat ;Handle Format character
CMP #'\'
BEQ PrintFControl ;Handle Control character
NormalPrint:
JSR Print ;Print the character normally
BRA PrintFLoop
PrintFDone:
PLY
PLX
PLA
PLP
RTS
PrintFControl:
LDA $0000,X ;Read control character
BEQ PrintFDone ;Check for NULL terminator
INX ;Increment input pointer
CMP #'n'
_cn: BNE _ct
rep #$30 ;16b mem, 16b X
LDA Cursor ;Get Current position
CLC
ADC #$0020 ;move to the next line
AND #$FFE0
STA Cursor ;Save new position
sep #$20 ;8b mem, 16b X
BRA PrintFLoop
_ct: CMP #'t'
BNE _cb
rep #$30 ;16b mem, 16b X
LDA Cursor ;Get Current position
CLC
ADC #$0008 ;move to the next tab
AND #$FFF8
STA Cursor ;Save new position
sep #$20 ;8b mem, 16b X
BRA PrintFLoop
_cb: CMP #'b'
BNE _defaultC
STZ Cursor ;Page break
STZ Cursor+1
BRA NormalPrint
_defaultC:
LDA #'\' ;Normal \
BRA NormalPrint
PrintFFormat:
LDA $0000,X ;Read format character
BEQ PrintFDone ;Check for NULL terminator
INX ;Increment input pointer
_sf: CMP #'s'
BNE _df
PHX ;Preserve current format string pointer
LDX 0,Y ;Load sub-string pointer
INY
INY
JSR PrintF ;Call PrintF recursively with sub-string
PLX
BRA PrintFLoop
_df: CMP #'d'
BNE _bf
JSR PrintInt16 ;Print 16-bit Integer
BRA PrintFLoop
_bf: CMP #'b'
BNE _xf
JSR PrintInt8 ;Print 8-bit Integer
BRA PrintFLoop
_xf: CMP #'x'
BNE _defaultF
JSR PrintHex8 ;Print 8-bit Hex Integer
JMP PrintFLoop
_defaultF:
LDA #'%'
BRA NormalPrint
;PrintInt16 -- Read a 16-bit value pointed to by Y and print it to stdout
;In: Y -- Points to integer in current data bank
;Out: Y=Y+2
;Modifies: P
;Notes: Uses Print to output ASCII to stdout
PrintInt16: ;Assume 8b mem, 16b index
LDA #$00
PHA ;Push $00
LDA $0000,Y
STA $4204 ;DIVC.l
LDA $0001,Y
STA $4205 ;DIVC.h ... DIVC = [Y]
INY
INY
DivLoop:
LDA #$0A
STA $4206 ;DIVB = 10 --- division starts here (need to wait 16 cycles)
NOP ; 2 cycles
NOP ; 2 cycles
NOP ; 2 cycles
PHA ; 3 cycles
PLA ; 4 cycles
LDA #'0' ; 2 cycles
CLC ; 2 cycles
ADC $4216 ; A = '0' + DIVC % DIVB
PHA ;Push character
LDA $4214 ; Result.l -> DIVC.l
STA $4204
BEQ _Low_0
LDA $4215 ; Result.h -> DIVC.h
STA $4205
BRA DivLoop
_Low_0:
LDA $4215 ; Result.h -> DIVC.h
STA $4205
BEQ IntPrintLoop ; if ((Result.l==$00) and (Result.h==$00)) then we're done, so print
BRA DivLoop
IntPrintLoop: ;until we get to the end of the string...
PLA ;keep pulling characters and printing them
BEQ _EndOfInt
JSR Print
BRA IntPrintLoop
_EndOfInt:
RTS
;PrintInt8 -- Read an 8-bit value pointed to by Y and print it to stdout
;In: Y -- Points to integer in current data bank
;Out: Y=Y+1
;Modifies: P
;Notes: Uses Print to output ASCII to stdout
PrintInt8: ;Assume 8b mem, 16b index
LDA $0000,Y
INY
PrintInt8_noload:
STA $4204
LDA #$00
STA $4205
PHA
BRA DivLoop
PrintInt16_noload: ;Assume 8b mem, 16b index
LDA #$00
PHA ;Push $00
STX $4204 ;DIVC = X
JSR DivLoop
;PrintHex8 -- Read an 8-bit value pointed to by Y and print it in hex to stdout
;In: Y -- Points to integer in current data bank
;Out: Y=Y+1
;Modifies: P
;Notes: Uses Print to output ASCII to stdout
PrintHex8: ;Assume 8b mem, 16b index
lda $0000,Y
iny
PrintHex8_noload:
pha
lsr A
lsr A
lsr A
lsr A
jsr PrintHexNibble
pla
and #$0F
jsr PrintHexNibble
rts
PrintHexNibble: ;Assume 8b mem, 16b index
cmp #$0A
bcs _nletter
clc
adc #'0'
jsr Print
rts
_nletter:
clc
adc #'A'-10
jsr Print
rts
.ENDS
| 23.591549 | 87 | 0.59 |
a9cd5ec3d50831f6c9e1dae09b5d794d3fa66e67 | 636 | asm | Assembly | audio/sfx/psychic_m.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | audio/sfx/psychic_m.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | audio/sfx/psychic_m.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | SFX_Psychic_M_Ch4:
duty 2
pitchenvelope 15, 7
squarenote 8, 12, 4, 1981
squarenote 8, 12, 4, 1982
squarenote 8, 12, 4, 1983
squarenote 8, 12, 4, 1984
squarenote 15, 12, 4, 1985
squarenote 15, 15, 2, 1984
pitchenvelope 0, 0
endchannel
SFX_Psychic_M_Ch5:
duty 2
squarenote 8, 12, 4, 1904
squarenote 8, 12, 4, 1889
squarenote 8, 12, 4, 1890
squarenote 8, 12, 4, 1891
squarenote 15, 12, 4, 1892
squarenote 15, 15, 2, 1892
endchannel
SFX_Psychic_M_Ch7:
noisenote 15, 3, -7, 20
noisenote 15, 12, -7, 19
noisenote 15, 12, -7, 18
noisenote 15, 12, -7, 17
noisenote 15, 12, -7, 16
noisenote 15, 12, 2, 16
endchannel
| 19.272727 | 27 | 0.687107 |
53c63933d165ee1f825bf512f73eaf6312769f21 | 311 | asm | Assembly | programs/oeis/091/A091999.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/091/A091999.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/091/A091999.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A091999: Numbers that are congruent to {2, 10} mod 12.
; 2,10,14,22,26,34,38,46,50,58,62,70,74,82,86,94,98,106,110,118,122,130,134,142,146,154,158,166,170,178,182,190,194,202,206,214,218,226,230,238,242,250,254,262,266,274,278,286,290,298,302,310,314,322,326,334
mul $0,3
add $0,1
div $0,2
mul $0,4
add $0,2
| 34.555556 | 207 | 0.691318 |
991e3bb5dd41106c44c926380a6f92d58f74079d | 4,321 | asm | Assembly | assembly/asmsbs3e/chapter12/textfile/linlib.asm | ash1247/DocumentsWindows | 66f65b5170a1ba766cfae08b7104b63ab87331c2 | [
"MIT"
] | 5 | 2015-12-10T15:03:12.000Z | 2019-02-20T21:39:53.000Z | assembly/asmsbs3e/chapter12/textfile/linlib.asm | ash1247/DocumentsWindows | 66f65b5170a1ba766cfae08b7104b63ab87331c2 | [
"MIT"
] | null | null | null | assembly/asmsbs3e/chapter12/textfile/linlib.asm | ash1247/DocumentsWindows | 66f65b5170a1ba766cfae08b7104b63ab87331c2 | [
"MIT"
] | 9 | 2015-11-25T08:56:56.000Z | 2020-11-30T18:08:44.000Z | ; Source name : LINLIB.ASM
; Executable name : None -- This is a library of subroutines!
; Version : 2.0
; Created date : 12/4/1999
; Last update : 5/29/2009
; Author : Jeff Duntemann
; Description : A procedure library in assembly using NASM 2.03
;
; Assemble using this command:
; nasm -f elf -g -F stabs linlib.asm
[SECTION .data] ; Section containing initialised data
[SECTION .bss] ; Section containing uninitialized data
[SECTION .text] ; Section containing code
extern printf ; All of these are in the standard C library glibc
extern rand
extern srand
extern time
global seedit ; Seeds the random number generator with a time value
global pull31 ; Pulls a 31-bit random number
global pull16 ; Pulls a 16-bit random number; in the range 0-65,535
global pull8 ; Pulls an 8-bit random number; in the range 0-255
global pull7 ; Pulls a 7-bit random number; in the range 0-127
global pull6 ; Pulls a 6-bit random number; in the range 0-63
global pull4 ; Pulls a (marginal) 4-bit random number; range 0-15
global newline ; Outputs a specified number of newlines to stdout
;---------------------------------------------------------------------------
; Random number generator subroutines -- Last update 5/29/2009
;
; This routine provides 5 entry points, and returns 5 different "sizes" of
; pseudorandom numbers based on the value returned by rand. Note first of
; all that rand pulls a 31-bit value. The high 16 bits are the most "random"
; so to return numbers in a smaller range, you fetch a 31-bit value and then
; right shift it zero-fill all buty the number of bits you want. An 8-bit
; random value will range from 0-255, a 7-bit value from 0-127, and so on.
; Respects EBP, ESI, EDI, EBX, and ESP. Returns random value in EAX.
;---------------------------------------------------------------------------
pull31: mov ecx,0 ; For 31 bit random, we don't shift
jmp pull
pull16: mov ecx,15 ; For 16 bit random, shift by 15 bits
jmp pull
pull8: mov ecx,23 ; For 8 bit random, shift by 23 bits
jmp pull
pull7: mov ecx,24 ; For 7 bit random, shift by 24 bits
jmp pull
pull6: mov ecx,25 ; For 6 bit random, shift by 25 bits
jmp pull
pull4: mov ecx,27 ; For 4 bit random, shift by 27 bits
pull: push ecx ; rand trashes ecx; save shift value on stack
call rand ; Call rand for random value; returned in eax
pop ecx ; Pop stashed shift value back into ECX
shr eax,cl ; Shift the random value by the chosen factor
; keeping in mind that part we want is in CL
ret ; Go home with random number in eax
;---------------------------------------------------------------------------
; Random number seed routine -- Last update 5/29/2009
;
; This routine fetches a time_t value from the system clock using the C
; library's time function, and uses that time value to seed the random number
; generator through the function srand. No values need be passed into it
; nor returned from it.
;---------------------------------------------------------------------------
seedit: push dword 0 ; Push a 32-bit null pointer to stack, since
; we don't need a buffer.
call time ; Returns time_t value (32-bit integer) in eax
add esp,4 ; Clean up stack
push eax ; Push time value in eax onto stack
call srand ; Time value is the seed value for random gen.
add esp,4 ; Clean up stack
ret ; Go home; no return values
;------------------------------------------------------------------------------
; Newline outputter -- Last update 5/29/2009
;
; This routine allows you to output a number of newlines to stdout, given by
; the value passed in eax. Legal values are 1-10. All sacred registers are
; respected. Passing a 0 value in eax will result in no newlines being issued.
;------------------------------------------------------------------------------
newline:
mov ecx,10 ; We need a skip value, which is 10 minus the
sub ecx,eax ; number of newlines the caller wants.
add ecx,nl ; This skip value is added to the address of
push ecx ; the newline buffer nl before calling printf.
call printf ; Display the selected number of newlines
add esp,4 ; Clean up the stack
ret ; Go home
nl db 10,10,10,10,10,10,10,10,10,10,0
| 44.546392 | 82 | 0.628558 |
c0dff0a34e2f881defa400f0f53bc720bd038cd3 | 320 | asm | Assembly | libsrc/_DEVELOPMENT/alloc/malloc/c/sccz80/heap_alloc_fixed_unlocked_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/alloc/malloc/c/sccz80/heap_alloc_fixed_unlocked_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/alloc/malloc/c/sccz80/heap_alloc_fixed_unlocked_callee.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; void *heap_alloc_fixed_unlocked(void *heap, void *p, size_t size)
SECTION code_clib
SECTION code_alloc_malloc
PUBLIC heap_alloc_fixed_unlocked_callee
EXTERN asm_heap_alloc_fixed_unlocked
heap_alloc_fixed_unlocked_callee:
pop af
pop hl
pop bc
pop de
push af
jp asm_heap_alloc_fixed_unlocked
| 16 | 67 | 0.79375 |
42f66720d5eadde922b61a12d9d1f5f8cd97f47a | 250 | asm | Assembly | programs/oeis/070/A070513.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/070/A070513.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/070/A070513.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A070513: a(n) = n^4 mod 9.
; 0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0,1,7,0,4,4,0,7,1,0
pow $0,4
mod $0,9
| 41.666667 | 201 | 0.5 |
06df2d9845b2393e8e3b4025a53b228acff860d9 | 5,425 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_588_1392.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_588_1392.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_588_1392.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x1b1af, %rbx
nop
nop
nop
nop
nop
sub $12828, %r11
mov $0x6162636465666768, %rax
movq %rax, %xmm1
and $0xffffffffffffffc0, %rbx
vmovntdq %ymm1, (%rbx)
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0xd1af, %rbx
nop
sub $25260, %r8
mov (%rbx), %rsi
nop
nop
cmp $49226, %rax
lea addresses_WC_ht+0x14b0f, %r11
nop
nop
dec %r14
mov $0x6162636465666768, %rax
movq %rax, (%r11)
nop
nop
add %r14, %r14
lea addresses_WC_ht+0x1e9af, %r14
nop
nop
nop
add $27918, %r11
vmovups (%r14), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $1, %xmm3, %rcx
nop
nop
nop
cmp %r8, %r8
lea addresses_WC_ht+0xfbaf, %r11
nop
nop
nop
nop
and %rsi, %rsi
mov (%r11), %r8w
nop
add $35670, %r14
lea addresses_UC_ht+0x141ef, %rsi
lea addresses_D_ht+0xa0a, %rdi
nop
nop
nop
nop
nop
xor $50810, %rbx
mov $41, %rcx
rep movsw
nop
nop
nop
inc %r11
lea addresses_WT_ht+0x4013, %r8
nop
nop
nop
and $33485, %rcx
mov (%r8), %di
nop
xor $23, %r11
lea addresses_UC_ht+0xac2f, %r14
nop
nop
nop
and %rdi, %rdi
movb $0x61, (%r14)
nop
cmp $41398, %r8
lea addresses_D_ht+0x421b, %rsi
nop
nop
nop
nop
and $42880, %rcx
movb $0x61, (%rsi)
nop
add %r14, %r14
lea addresses_UC_ht+0xfdf, %rcx
nop
nop
nop
inc %r11
and $0xffffffffffffffc0, %rcx
movntdqa (%rcx), %xmm0
vpextrq $0, %xmm0, %rsi
inc %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %rbp
push %rbx
push %rdi
// Store
mov $0x78d4ae0000000baf, %r15
clflush (%r15)
nop
nop
nop
nop
nop
cmp $28701, %r14
mov $0x5152535455565758, %r10
movq %r10, (%r15)
nop
nop
nop
nop
nop
cmp %rbx, %rbx
// Faulty Load
lea addresses_D+0x189af, %r15
nop
nop
dec %rbp
mov (%r15), %rdi
lea oracles, %rbp
and $0xff, %rdi
shlq $12, %rdi
mov (%rbp,%rdi,1), %rdi
pop %rdi
pop %rbx
pop %rbp
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 8}}
[Faulty Load]
{'src': {'type': 'addresses_D', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 8}}
{'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': True, 'congruent': 5}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 8}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': True, 'same': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': True, 'congruent': 2}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': True, 'same': False, 'congruent': 4}, 'OP': 'LOAD'}
{'36': 588}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 28.856383 | 1,763 | 0.653456 |
ae426082164a01c203c1d86d9618855b090c7f03 | 61 | asm | Assembly | tests/R/xor.asm | madhav-datt/mmcpu | e252133e3fd71076596c08775b79dd8bd35135b6 | [
"MIT"
] | null | null | null | tests/R/xor.asm | madhav-datt/mmcpu | e252133e3fd71076596c08775b79dd8bd35135b6 | [
"MIT"
] | null | null | null | tests/R/xor.asm | madhav-datt/mmcpu | e252133e3fd71076596c08775b79dd8bd35135b6 | [
"MIT"
] | null | null | null | main: nor $s0, $0, $0
xor $s1, $s0, $0
xor $s2, $s0, $s0
| 12.2 | 22 | 0.459016 |
cdd9820bc742ae7e5b36bedfabf6ed9405058b96 | 8,097 | asm | Assembly | Driver/Font/Nimbus/nimbusBitmap.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Driver/Font/Nimbus/nimbusBitmap.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Driver/Font/Nimbus/nimbusBitmap.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: nimbusBitmaps.asm
AUTHOR: Gene Anderson, May 27, 1990
ROUTINES:
Name Description
---- -----------
AllocBMap Allocate a bitmap
BMapBits Flip bits in bitmap
SetBit Set a bit in bitmap
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 5/27/90 Initial revision
DESCRIPTION:
Assembly version of bitmap.c
$Id: nimbusBitmap.asm,v 1.1 97/04/18 11:45:31 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AllocBMap
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Allocate a bitmap
CALLED BY: MakeChar()
PASS: ds - seg addr of NimbusVars
(ax,bx),(cx,dx) - bounds of character
RETURN: ds:guano - NimbusBitmap
DESTROYED: ax, bx, cx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AllocBMap proc near
uses es, di
.enter
mov ds:guano.NB_lox, ax ;q->lox = lox;
mov ds:guano.NB_hiy, dx ;q->hiy = hiy;
sub cx, ax
inc cx
mov ds:guano.NB_width, cx ;q->w = hix - lox + 1;
sub dx, bx
inc dx
mov ds:guano.NB_height, dx ;q->h = hiy - loy + 1;
add cx, 0x07
shr cx, 1
shr cx, 1
shr cx, 1
mov ds:guano.NB_bytesperline, cx ;q->bpl = 1+((q->w - 1) >> 3);
mov ax, dx
mov bx, segment udata
mov es, bx ;es <- seg addr of udata
call ds:GenRouts.CGR_alloc_rout ;allocate bitmap or region
.leave
ret
AllocBMap endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
BitmapAlloc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Allocate and lock a block for use as a bitmap
CALLED BY: AllocBMap()
PASS: ds - seg addr of NimbusVars
ax, dx - height of bitmap (in lines)
cx - width of bitmap (in bytes)
es - seg addr of udata
RETURN: es:bitmapHandle - handle of bitmap
ds:guano.NB_segment
DESTROYED: ax, bx, cx, di, es
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/30/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
BitmapAlloc proc near
.enter
mul cx ;ax <- height * bytesperline
EC < ERROR_C FONT_CHAR_TOO_BIG ;>
mov cx, ax ;cx <- size (in bytes)
mov bx, es:bitmapHandle ;bx <- handle of our block
cmp ax, es:bitmapSize ;see if block big enough
ja reallocBlock ;branch if not big enough
call MemLock ;lock the block
jnc notDiscarded ;branch if still around
reallocBlock:
mov ax, cx ;ax <- size (in bytes)
mov es:bitmapSize, ax ;save new block size
mov ch, mask HAF_LOCK or mask HAF_NO_ERR
call MemReAlloc ;reallocate as necessary
mov cx, es:bitmapSize ;cx <- size (in bytes)
notDiscarded:
mov es, ax ;es <- seg addr of data bytes
mov ds:guano.NB_segment, ax ;store seg addr
clr di
clr al
rep stosb ;initalize data bytes
.leave
ret
BitmapAlloc endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
BMapBits
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Flip bits in a bitmap to right of given position
CALLED BY: YPixelate()
PASS: ds:guano - NimbusBitmap
(cx,bp) - (x,y) point to invert from
RETURN: none
DESTROYED: ax, bx, cx, dx
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
first_bit byte 0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01
BMapBits proc near
uses ds, si
.enter
;
;/* convert coordinates to row/column indices */
;
;/* double check the indices */
;
mov ax, ds:guano.NB_hiy
sub ax, bp ;ax <- bmap->hiy - y;
jl done ;if (r < 0)
cmp ax, ds:guano.NB_height
jge done ;if (r >= bmap->h)
sub cx, ds:guano.NB_lox ;cx <- x - bmap->lox;
jns colPositive ;if (c < 0) (set by sub)
clr cx ;c = 0;
colPositive:
cmp cx, ds:guano.NB_width ;if (c >= bmap->w)
jb colOK
mov cx, ds:guano.NB_width
dec cx ;c = bmap->w - 1;
colOK:
;
;/* find starting byte address, and bit number */
;
mul ds:guano.NB_bytesperline ;ax <- (r*bmap->bpl)
mov bx, cx
and bx, 0x07 ;bx <- (c & 7)
mov si, ax
mov ax, cx ;si <- (r*bmap->bpl)
shr ax, 1
shr ax, 1
shr ax, 1 ;ax <- (c >> 3)
add si, ax ;si <- p = (r*bmap->bpl)+(c>>3);
;
;/* flip trailing portion of first byte */
;
mov dl, cs:first_bit[bx] ;dl <- first[bit];
mov cx, ds:guano.NB_bytesperline ;cx <- bmap->bpl;
mov ds, ds:guano.NB_segment ;ds <- seg addr of bitmap
xor {byte} ds:[si], dl ;*p ^= first[bit];
inc si ;p++
;
;/* flip remaining bytes */
;
sub cx, ax ;r = bmap->bpl - (c >> 3);
flipLoop:
dec cx ;--r;
jcxz done
EC < push ax, bx >
EC < call SysGetECLevel >
EC < test ax, mask ECF_GRAPHICS >
EC < jz afterAnalEC >
EC < call DoAnalEC >
EC <afterAnalEC: >
EC < pop ax, bx >
xor {byte} ds:[si], 0xFF ;*p ^= 0xFF;
inc si ;p++;
jmp flipLoop
done:
.leave
ret
BMapBits endp
;
; Do anan-retentive error checking on the offset
; into the bitmap to catch any memory trashing.
;
EC <DoAnalEC proc near >
EC < push cx, ds >
EC < mov ax, segment udata >
EC < mov ds, ax >
EC < mov bx, ds:bitmapHandle >
EC < mov ax, MGIT_SIZE >
EC < call MemGetInfo >
EC < cmp si, ax ;cmp (ptr, block size)>
EC < ERROR_AE OVERDOSE >
EC < mov cx, ds:bitmapSize >
EC < cmp si, cx ;cmp (ptr, expected size)>
EC < ERROR_AE OVERDOSE >
EC < cmp cx, ax ;cmp (expected size, block size>
EC < ERROR_A OVERDOSE >
EC < pop cx, ds >
EC < ret >
EC <DoAnalEC endp >
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetBit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set a bit in a bitmap.
CALLED BY: CheckHoles()
PASS: ds:guano - NimbusBitmap
(bx, bp) - point to set in bitmap (not TRUNC'd)
RETURN: none
DESTROYED: ax, bx, dx, di, bp
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
eca 5/27/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
mask_bits byte 0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1
SetBit proc near
TRUNC bx ;TRUNC(x);
TRUNC bp ;TRUNC(y);
;
;/* convert coordinates to row/column indices */
;
sub bx, ds:guano.NB_lox ;c = x - bmap->lox;
js done ;if (c < 0)
mov ax, ds:guano.NB_hiy
sub ax, bp ;r = bmap->hiy;
js done ;if (r < 0)
;
;/* double check the indices */
;
cmp bx, ds:guano.NB_width ;if (c >= bmap->w)
jae done
cmp ax, ds:guano.NB_height ;if (r >= bmap->h)
jae done
;
;/* find starting byte address, and bit number, and set it */
;
push ds
mov di, bx
and di, 0x7 ;bit = c & 7;
mul ds:guano.NB_bytesperline ;(r * bmap->bpl)
EC < ERROR_C FONT_CHAR_TOO_BIG ;>
shr bx, 1
shr bx, 1
shr bx, 1 ;(c >> 3);
add ax, bx ;byte = (r*bmap->bpl)+(c>>3);
mov bl, cs:mask_bits[di] ;bl <- mask[bit];
mov di, ax
mov ds, ds:guano.NB_segment ;ds <- seg addr of bitmap
ornf ds:[di], bl ;bmap->bits[byte] |= mask[bit];
pop ds
EC < push ax, bx, si >
EC < call SysGetECLevel >
EC < test ax, mask ECF_GRAPHICS >
EC < jz afterAnalEC >
EC < mov si, di ;check di as offset>
EC < call DoAnalEC >
EC <afterAnalEC: >
EC < pop ax, bx, si >
done:
ret
SetBit endp
| 25.704762 | 79 | 0.529208 |
7f9ac9e4e39926ee0c3db26a8c83be1eed834686 | 271 | asm | Assembly | 8088/demo/infinite_bobs/draw.asm | reenigne/reenigne | c3eb8b31d7964e78bbe44908987d4be052a74488 | [
"Unlicense"
] | 92 | 2015-04-10T17:45:11.000Z | 2022-03-30T17:58:51.000Z | 8088/demo/infinite_bobs/draw.asm | MS-DOS-stuff/reenigne | 0a113990aef398550c6f14d1c7a33af1cb091887 | [
"Unlicense"
] | 2 | 2017-11-05T07:21:35.000Z | 2018-11-04T23:36:13.000Z | 8088/demo/infinite_bobs/draw.asm | MS-DOS-stuff/reenigne | 0a113990aef398550c6f14d1c7a33af1cb091887 | [
"Unlicense"
] | 18 | 2015-04-11T20:32:44.000Z | 2021-11-06T05:19:57.000Z | mov si,9999
; Start on odd nybble
mov al,[es:di]
and al,0xf0
or al,0x09
stosb
mov cx,9999
rep movsw
; End with one byte
movsb
; End with one nybble
mov al,[es:di]
and al,0x0f
or al,0x90
stosb
add di,99
ret
| 10.84 | 25 | 0.549815 |
a318e65819f7bb7d9c9956f0329c584b5c16220f | 1,235 | asm | Assembly | assembly/CSE-416/1.asm | ash1247/DocumentsWindows | 66f65b5170a1ba766cfae08b7104b63ab87331c2 | [
"MIT"
] | null | null | null | assembly/CSE-416/1.asm | ash1247/DocumentsWindows | 66f65b5170a1ba766cfae08b7104b63ab87331c2 | [
"MIT"
] | null | null | null | assembly/CSE-416/1.asm | ash1247/DocumentsWindows | 66f65b5170a1ba766cfae08b7104b63ab87331c2 | [
"MIT"
] | null | null | null | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;
; Run: nasm -f elf64 -g -F dwarf 1.asm -l 1.lst
; ld -o 1 1.o
;
; A program to display a message
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
section .bss
section .data ;Section containing data
msg: db "Hello World!!", 10 ; Given message
msgLen equ $-msg ; Count Length of msg
section .text ; section containing code
global _start ;linker initialized
_start: ;entry point for linker
nop ; For debugger
mov eax, 4 ; initialize sys_call
mov ebx, 1
mov ecx, msg ; Pass offset of the msg
mov edx, msgLen ; Pass the length of msg
int 80h ; Make kernel call,
; 21h for windows, 80h for
; linux
mov eax, 1 ; Exit sys_call
mov ebx, 0 ; Return a code for zero
int 80h ; Make kernel call
| 32.5 | 62 | 0.369231 |
e0eb9a3251d686ed3c94cd27180109f16b56d24f | 26,983 | asm | Assembly | base/boot/bootcode/fat/i386/fat32bt.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/boot/bootcode/fat/i386/fat32bt.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/boot/bootcode/fat/i386/fat32bt.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z |
Page ,132
TITLE BOOT SECTOR 1 OF TRACK 0 - BOOT LOADER
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
; Rev 1.0 ChrisP, AaronR and others. 2.0 format boot
;
; Rev 3.0 MarkZ PC/AT enhancements
; 2.50 in label
; Rev 3.1 MarkZ 3.1 in label due to vagaries of SYSing to IBM drive D's
; This resulted in the BPB being off by 1. So we now trust
; 2.0 and 3.1 boot sectors and disbelieve 3.0.
;
; Rev 3.2 LeeAc Modify layout of extended BPB for >32M support
; Move PHYDRV to 3rd byte from end of sector
; so that it won't have to be moved again
; FORMAT and SYS count on PHYDRV being in a known location
;
; Rev 3.3 D.C.L. Changed Sec 9 EOT field from 15 to 18. May 29, 1986.
;
; Rev 3.31 MarkT The COUNT value has a bogus check (JBE????) to determine
; if we've loaded in all the sectors of IBMBIO. This will
; cause too big of a load if the sectors per track is high
; enough, causing either a stack overflow or the boot code
; to be overwritten.
;
; Rev 4.00 J. K. For DOS 4.00 Modified to handle the extended BPB, and
; 32 bit sector number calculation to enable the primary
; partition be started beyond 32 MB boundary.
;
; Rev 7.0 JeffPar Loads WINBOOT.SYS from anywhere in the root of the boot
; drive. WINBOOT.SYS must be an EXE with exactly 1 sector
; of header information, followed by a series of binary
; images imbedded in the EXE, as follows:
;
; 1. WINLOAD module (ORGed at 200h, loaded at 70:200h)
; 2. IO.SYS module
; 3. MSDOS.SYS module
;
; The WINLOAD module should fit within WINLOAD_SIZE sectors,
; which includes 1 sector for the EXE header, so the code
; and data for the WINLOAD bootstrap should fit in 3 sectors.
;
; Rev 7.1 ARR Multi sector version of boot record for booting off 32-bit
; BigFAT media.
;
; The ROM in the IBM PC starts the boot process by performing a hardware
; initialization and a verification of all external devices. If all goes
; well, it will then load from the boot drive the sector from track 0, head 0,
; sector 1. This sector is placed at physical address 07C00h. The initial
; registers are presumably set up as follows: CS=DS=ES=SS=0, IP=7C00h, and
; SP=0400h. But all we rely on is the BIOS being loaded at linear 07C00h.
;
; If WINBOOT.SYS is not found, an error message is displayed and the user is
; prompted to insert another disk. If there is a disk error during the
; process, a message is displayed and things are halted.
;
; At the beginning of the boot sector, there is a table which describes the
; MSDOS structure of the media. This is equivalent to the BPB with some
; additional information describing the physical layout of the driver (heads,
; tracks, sectors)
;
;==============================================================================
;REVISION HISTORY:
;AN000 - New for DOS Version 4.00 - J.K.
;AC000 - Changed for DOS Version 4.00 - J.K.
;AN00x - PTM number for DOS Version 4.00 - J.K.
;==============================================================================
;AN001; d52 Make the fixed positioned variable "CURHD" to be local. 7/6/87 J.K.
;AN002; d48 Change head settle at boot time. 7/7/87 J.K.
;AN003; P1820 New message SKL file 10/20/87 J.K.
;AN004; D304 New structrue of Boot record for OS2. 11/09/87 J.K.
;AN005; Changed version to 5.0 03/08/90 E.A.
;AN006; Changed to remove MSLOAD in first cluster restriction 04/23/90 J.H.
;==============================================================================
.xlist
include bpb.inc
include bootsec.inc
include dirent.inc
;include version.inc
.list
; ==========================================================================
ORIGIN EQU 7C00H ; Origin of bootstrap LOADER
BIO_SEG EQU 2000H ; Destination segment of BIOS
BIO_OFFSET EQU 0000H ; Offset of bios
SECTOR_SIZE EQU 512 ; Sector size in bytes
DIR_ENTRY_SIZE EQU SIZE DIR_ENTRY ; Size of directory entry in bytes
ROM_DISKRD EQU 2
SIZEBIGBOOTINSEC EQU 3
; ==========================================================================
SEGBIOS SEGMENT AT BIO_SEG
; Define the destination segment of the BIOS, including the
; initialization label
ORG BIO_OFFSET
WINLOAD LABEL BYTE
SEGBIOS ENDS
; ==========================================================================
; Local (on stack) Data storage between temp stack and start of
; boot sector
CurrBuffFatSecL EQU -12
CurrBuffFatSecH EQU -10
Int13Sectors EQU -8
DataSecL EQU -4
DataSecH EQU -2
; ==========================================================================
CODE SEGMENT
ASSUME CS:CODE,DS:NOTHING,ES:NOTHING,SS:NOTHING
ORG ORIGIN
Public $START
$START Label byte
jmp short Main
GotXint13:
nop ; used to store xint13 flag
GotXint13Offset = (offset GotXint13 - offset $START)
; ==========================================================================
; Start of BPB area of the boot record
OsName DB "MSWIN"
OsVersion DB "4.1" ; Windows version number
BytesPerSector DW SECTOR_SIZE ; Size of a physical sector
SecsPerClust DB 2 ; Sectors per allocation unit
ReservedSecs DW 8 ; Number of reserved sectors
NumFats DB 1 ; Number of fats
NumDirEntries DW 1024 ; Number of direc entries
TotalSectors DW 0 ; Number of sectors - number of hidden
; sectors (0 when 32 bit sector number)
MediaByte DB 0F8H ; MediaByte byte
NumFatSecs DW 0 ; Number of fat sectors (0 when 32 bit)
SecPerTrack DW 17 ; Sectors per track
NumHeads DW 4 ; Number of drive heads
HiddenSecs DD 1 ; Number of hidden sectors
BigTotalSecs DD 00200000h ; 32 bit version of number of sectors
BigNumFatSecs DD 00001FE0h ; 32 bit version of number of FAT sectors
ExtFlags DW 0
BPBReserved1 DW 0
RootStrtClus DD 0
FSInfoSec dw ((FSInfoSecSig - $START) / SECTOR_SIZE)
BkUpBootSec dw MBR_BOOTFAILBACKUP
BPBReserved2 DD 3 DUP (0)
.errnz ($-BytesPerSector) NE SIZE BIGFATBPB
BootDrv DB 80h
CurrentHead DB 0h ; Current Head
ExtBootSig DB 41
SerialNum DD 0
VolumeLabel DB 'NO NAME '
FatId DB 'FAT32 '
.errnz ($-$START) NE SIZE BIGFATBOOTSEC
; =========================================================================
;
; First thing is to reset the stack to a better and more known
; place. The ROM may change, but we'd like to get the stack
; in the correct place.
;
Main:
xor CX,CX
mov SS,CX ;Work in stack just below this routine
mov SP,ORIGIN+CurrBuffFatSecL
mov es,cx
mov ds,cx ; DS = ES = SS = 0
ASSUME DS:CODE,ES:CODE,SS:CODE
mov BP,ORIGIN
;
; Determine the number of sectors addressable via
; conventional int13. If we can't get drive params for some reason
; then something is very wrong -- we'll try to force the caller
; to use conventional int13 by maxing out the sector count.
;
mov [bp].GotXint13Offset,cl ; no xint13 yet
mov dl,[bp].bgbsDriveNumber ; int13 unit number
mov ah,8 ; get drive params
int 13h ; call BIOS
jnc @f ; no error, procede
mov cx,-1 ; strange case, fake registers to force
mov dh,cl ; use of standard int13 (set all vals to max)
@@:
.386
movzx eax,dh ; eax = max head # (0-255)
inc ax ; eax = heads (1-256)
movzx edx,cl ; edx = sectors per track + cyl bits
and dl,3fh ; edx = sectors per track (1-63)
mul dx ; eax = sectors per cylinder, edx = 0
xchg cl,ch
shr ch,6 ; cx = max cylinder # (0-1023)
inc cx ; cx = cylinders (1-1024)
movzx ecx,cx ; ecx = cylinders (1-1024)
mul ecx ; eax = sectors visible via int13, edx = 0
mov [bp].Int13Sectors,eax ; save # sectors addressable via int13
.8086
;
; The MBR (or boot ROM) only reads one boot sector. Thus the first order
; of business is to read the rest of ourself in by reading the second
; boot sector of the 2-sector boot record.
;
; The second sector in the NT case is at sector 12. This preserves
; the bootsect.dos logic and eliminates a special case for fat32.
;
ReadBoot:
cmp [BP].bgbsBPB.oldBPB.BPB_SectorsPerFAT,0 ; FAT32 BPB?
jne short NoSysMsg ; No, invalid, messed up
cmp [BP].bgbsBPB.BGBPB_FS_Version,FAT32_Curr_FS_Version
ja short NoSysMsg ; boot code too old for this volume
.386
mov eax,dword ptr [BP].bgbsBPB.oldBPB.BPB_HiddenSectors
add eax,12 ; read in the second boot sector
.8086
mov BX,ORIGIN + (SECTOR_SIZE * 2)
mov cx,1
call DoRead ; doesn't return if err
jmp DirRead ; no error, continue boot in sector 2
DiskError:
mov al,byte ptr [MSGOFF_IOERROR]
;
; Al is the offset - 256 of the message within the boot sector.
; So we first calculate the real segment-based offset to the message
; and stick it in si so lodsb will work later.
;
DisplayError:
.ERRNZ ORIGIN MOD 256
mov ah,(ORIGIN / 256) + 1
mov si,ax
DisplayError1:
lodsb ; get next character
test AL,AL ; end of message?
jz WaitForKey ; yes
cmp AL,0FFh ; end of sub-message?
je DisplayWait ; yes, switch to final message now
mov AH,14 ; write character & attribute
mov BX,7 ; attribute (white char on black)
int 10h ; print the character
jmp short DisplayError1
DisplayWait:
mov al,byte ptr [MSGOFF_COMMON]
jmp short DisplayError
NoSysMsg:
mov al,byte ptr [MSGOFF_NOSYS] ; point to no system file message
jmp short DisplayError
WaitForKey:
cbw ;warning assumes al is zero!
int 16h ; get character from keyboard
int 19h ; Continue in loop till good disk
; =========================================================================
;
; Read disk sector(s). This routine cannot transfer more than 64K!
;
; Inputs: EAX == physical sector #
; CL == # sectors (CH == 0)
; ES:BX == transfer address
;
; Outputs: EAX next physical sector #
; CX == 0
; ES:BX -> byte after last byte of read
; Does not return if error
;
; Reads sectors, switching to extended int13 if necessary and
; available. The note below is for the conventional int13 case.
;
; Notes: Reads sectors one at a time in case they straddle a
; track boundary. Performs full 32-bit division on the
; first decomposition (of logical sector into track+sector)
; but not on the second (of track into cylinder+head),
; since (A) we don't have room for it, and (B) the results
; of that division must yield a quotient < 1024 anyway, because
; the CHS-style INT 13h interface can't deal with cylinders
; larger than that.
;
; =========================================================================
DoRead:
.386
pushad
;
; Determine if the sector we're about to read is available via
; conventional int13.
;
cmp eax,[bp].Int13Sectors ; determine if standard int13 is ok
jb stdint13
;
; Need extended int13. First set up parameter packet on stack.
; Then, if we don't know whether xint13 is available for the drive yet,
; find out. If not, error out since we know we can't read the sector
; we need.
;
db 66h ; hand-coded 32-bit push of 8-bit immediate
push 0 ; high 32 bits of sector #
push eax ; low 32 bits of sector #
push es
push bx ; transfer address
push dword ptr 10010h ; transfer 1 sector, packet size = 16
cmp byte ptr [bp].GotXint13Offset,0 ; have xint13?
jnz xint13ok ; yes, do the read
mov ah,41h
mov bx,055aah
mov dl,[bp].bgbsDriveNumber
int 13h ; check availability
jc xint13err ; error from int13 means no xint13
cmp bx,0aa55h ; absence of sig means no xint13
jne xint13err
test cl,1 ; bit 0 off means no xint13
jz xint13err
inc byte ptr [bp].GotXint13Offset ; have xint13, remember for next time
xint13ok:
mov ah,42h ; extended read
mov dl,[bp].bgbsDriveNumber ; dl = int13 unit #
mov si,sp ; ds:si -> param packet
int 13h ; perform the read
db 0b0h ; HACK: avoid stc by making next
; byte part of mov al,xx instruction
xint13err:
stc ; this instruction MUST follow previous byte!
pop eax ; throw away param packet without
pop eax ; clobbering carry flag
pop eax
pop eax
jmp short did_read
stdint13:
;
; Read via conventional int13
;
xor edx,edx ; edx:eax = absolute sector number
movzx ecx,[bp].bgbsBPB.oldBPB.BPB_SectorsPerTrack ; ecx = sectors per track
div ecx ; eax = track, edx = sector within track (0-62)
inc dl ; dl = sector within track (1-63)
mov cl,dl ; cl = sector within track
mov edx,eax
shr edx,16 ; dx:ax = track
div [bp].bgbsBPB.oldBPB.BPB_Heads ; ax = cylinder (0-1023), dx = head (0-255)
xchg dl,dh ; dh = head
mov dl,[bp].bgbsDriveNumber ; dl = int13 unit #
mov ch,al ; ch = bits 0-7 of cylinder
shl ah,6
or cl,ah ; bits 6-7 of cl = bits 8-9 of cylinder
mov ax,201h ; read 1 sector
int 13h
did_read:
popad
jc DiskError
add bx,SECTOR_SIZE ; advance transfer address
inc eax ; next sector number
dec cx ; loop instruction is out of range,
jnz DoRead ; have to do it manually
ret
.8086
Public WinBoot ; System boot file (11 bytes)
WinBoot DB "NTLDR "
;
; Message table.
;
; We put English messages here as a placeholder only, so that in case
; anyone uses bootf32.h without patching new messages in, things will
; still be correct (in English, but at least functional).
;
.errnz ($-$START) GT 1ACH
ORG ORIGIN + 01ACH ; shift message to coincide with that in FAT
; this will help driver to think the MBR
; is empty when dealing with FAT32 superfloppy
include msgstub.inc
;
; Now build a table with the low byte of the offset to each message.
; Code that patches the boot sector messages updates this table.
;
.errnz ($-$START) GT (SECTOR_SIZE-7)
ORG ORIGIN + SECTOR_SIZE - 7
MSGOFF_NOSYS:
db OFFSET (MSG_NOSYS - ORIGIN) - 256
MSGOFF_IOERROR:
db OFFSET (MSG_IOERROR - ORIGIN) - 256
MSGOFF_COMMON:
db OFFSET (MSG_COMMON - ORIGIN) - 256
ORG ORIGIN + (SECTOR_SIZE - 4)
DD BOOTSECTRAILSIG ; Boot sector signature (4 bytes)
.errnz ($-$START) NE SECTOR_SIZE
SecndSecStart label byte
;
; The second boot sector contains nothing but data. This sector is re-written
; by MS-DOS with a fairly high frequency due to changes made to the fsinfo
; structure. We don't want the actual boot code to get accidentally corrupted.
;
FSInfoSecSig label byte
.errnz ($-SecndSecStart) NE 0
DD SECONDBOOTSECSIG
db (SECTOR_SIZE - ($-FSInfoSecSig) - 4 - (SIZE BIGFATBOOTFSINFO)) DUP (0)
.errnz ($-SecndSecStart) NE (OFFSETFSINFOFRMSECSTRT)
fsinfo BIGFATBOOTFSINFO <FSINFOSIG,0FFFFFFFFh,000000002h>
.errnz ($-FSInfoSecSig) NE OFFSETTRLSIG
DD BOOTSECTRAILSIG ; Boot sector signature (4 bytes)
.errnz ($-$START) NE (SECTOR_SIZE * 2)
StrtThirdBootSector LABEL BYTE
DirRead:
.386
movzx eax,[BP].bgbsBPB.oldBPB.BPB_NumberOfFATs ; Determine sector dir starts on (NumFats)
mov ecx,dword ptr [BP].bgbsBPB.BGBPB_BigSectorsPerFat
mul ecx ; EAX = (NumFatSecs)
add EAX,dword ptr [BP].bgbsBPB.oldBPB.BPB_HiddenSectors ; (HiddenSecs)
movzx edx,[BP].bgbsBPB.oldBPB.BPB_ReservedSectors ;(ReservedSecs)
add EAX,EDX
;
; EAX = NumFats * NumFatSecs + ReservedSecs + cSecHid
; (first physical sector of cluster area)
;
mov dword ptr [BP].DataSecL,EAX
mov dword ptr [BP].CurrBuffFatSecL,0FFFFFFFFh
DirReRead:
mov eax,dword ptr [BP].bgbsBPB.BGBPB_RootDirStrtClus
cmp eax,2
jb NoSysMsg
cmp eax,00FFFFFF8h
jae NoSysMsg
; EAX is starting cluster of root directory
DirCluster:
push eax ; save starting cluster number
sub eax,2 ; Convert to 0 based cluster #
movzx EBX,[BP].bgbsBPB.oldBPB.BPB_SectorsPerCluster
mov si,bx ; Sector count to SI for sector loop
mul EBX ; compute logical sector in EAX
add EAX,dword ptr [BP].DataSecL ; Add data start bias
DirSector:
mov BX,ORIGIN+(SIZEBIGBOOTINSEC*SECTOR_SIZE)
mov DI,BX ; save address in DI for comparisons
mov CX,1
call DoRead ; doesn't return if error
; relies on return cx=0
DirEntry:
cmp byte ptr [di],ch ; empty, NUL directory entry?
je short MissingFile ; yes, that's the end
mov CL,11
push SI
mov si,offset WinBoot
repz cmpsb ; see if the same
pop SI
jz short DoLoad ; if so, continue booting
add DI,CX ; Finish advance to end of name field
add DI,DIR_ENTRY_SIZE-11 ; Next dir entry
cmp DI,BX ; exhausted this root dir sector yet?
jb DirEntry ; no, check next entry
dec SI ; decrement # dir sectors
jnz DirSector ; More dir sectors in this cluster
pop eax ; recover current root dir cluster
call GetNextFatEntry
jc DirCluster ; Do next Root dir cluster
MissingFile:
add sp,4 ; Discard EAX saved on stack
jmp NoSysMsg
CurrentSegment dw BIO_SEG
;
; We now load NTLDR
;
; All we have to do is multiply the file's starting cluster
; (whose directory entry is at DS:DI-11) by sectors per cluster and
; add that to the disk's starting data sector. We read ntldr into
; 2000:0, and begin execution there.
;
DoLoad:
add sp,4 ; Discard DX:AX saved on stack above
mov si,[DI-11].DIR_FIRSTHIGH
mov di,[DI-11].DIR_FIRST ; SI:DI = NTLDR starting cluster
mov ax,si
shl eax,16
mov ax,di ; EAX = NTLDR starting cluster
cmp eax,2 ; valid cluster #?
jb NoSysMsg ; NO!
cmp eax,00FFFFFF8h
jae NoSysMsg ; NO!
ReadAcluster:
push eax ; save cluster number
sub eax,2 ; Subtract first 2 reserved clusters
movzx ecx,[BP].bgbsBPB.oldBPB.BPB_SectorsPerCluster ; ECX = Sectors per cluster (SecsPerClust)
mul ecx ; EAX = logical sector #
add eax,dword ptr [BP].DataSecL ; EAX = physical sector #
mov bx,BIO_OFFSET
push es
mov es,CurrentSegment ; ES:BX = destination for read
call DoRead ; read all sectors in cluster, doesn't return if error
pop es
pop eax ; recover current 0-based cluster#
shr bx,4 ; updated offset -> paragraphs
add CurrentSegment,bx ; update segment for next read
call GetNextFatEntry ; get 2-based successor cluster in EAX
jnc StartItUp ; if end of cluster chain reached
jc ReadACluster ; keep sucking up clusters
.8086
;
; NTLDR requires the following input conditions:
;
; DL = boot drive #
;
StartItUp:
mov DL,[BP].bgbsDriveNumber
jmp FAR PTR WINLOAD ; CRANK UP THE WINDOWS NT BOOT LOADER
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; GetNextFatEntry
;
; Given the last cluster found, this will return the next cluster
; of a chain of clusters. If the last cluster is (ffff)(f)ff8 - (ffff)(f)fff,
; then the final cluster has been loaded.
;
; INPUTS:
; EAX = CurrentCluster (0 based cluster #)
;
; OUTPUTS:
; EAX = Next cluster (2 based cluster #)
; Carry CLEAR if all done, SET if not
;
; USES:
; EAX,EBX,ECX,EDX,ESI,DI es
;
GetNextFatEntry PROC NEAR
; NOTE For following... FAT32 cluster numbers are 28 bits not 32,
; so we know the following multiply (shl DX:AX by 2) will never
; overflow into carry.
.386
shl eax,2
call GetFatSector
mov EAX,dword ptr ES:[DI+BX]
and EAX,0FFFFFFFh ; Mask to valid FAT32 cluster # bits
cmp EAX,00FFFFFF8h ; carry CLEAR if all done, SET if not
.8086
ret
GetNextFatEntry ENDP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; GetFatSector
;
; Read the corresponding FAT sector into the second boot sector
;
; INPUTS:
; EAX == offset (from FAT entry 0) of entry to find
;
; OUTPUTS:
; ES:DI+BX -> corresponding FAT entry in the FAT sector
;
; USES:
; BX,EAX,ECX,EDX,DI
;
GetFatSector PROC NEAR
.386
mov DI,ORIGIN + SECTOR_SIZE
movzx ECX,[BP].bgbsBPB.oldBPB.BPB_BytesPerSector
xor edx,edx
div ECX ; EAX = Sector number, (E)DX = Offset
cmp EAX,dword ptr [BP].CurrBuffFatSecL ; The same fat sector?
je short SetRet ; Don't need to read it again
mov dword ptr [BP].CurrBuffFatSecL,EAX
add EAX,dword ptr [BP].bgbsBPB.oldBPB.BPB_HiddenSectors
movzx ecx,[BP].bgbsBPB.oldBPB.BPB_ReservedSectors
add eax,ecx ; Point at 1st (0th) FAT
movzx ebx,[BP].bgbsBPB.BGBPB_ExtFlags
and bx,BGBPB_F_ACTIVEFATMSK
jz short GotFatSec
cmp bl,[BP].bgbsBPB.oldBPB.BPB_NumberOfFATs
jae NoSysMsg
push dx ; Save offset of cluster in the FAT sec
mov ecx,eax ; Save FAT sector # in 0th FAT
mov eax,dword ptr [BP].bgbsBPB.BGBPB_BigSectorsPerFat
mul ebx ; EAX = Sector offset to active FAT
; from 0th FAT
add eax,ecx
pop dx
GotFatSec:
push dx ; Save offset of cluster in the FAT sec
mov BX,DI
mov CX,1
call DoRead ; do the disk read, doesn't return if error
pop dx
SetRet:
mov BX,DX ; set BX to the offset of the cluster
.8086
ret
GetFatSector ENDP
db ((SECTOR_SIZE - ($-StrtThirdBootSector)) - 4) DUP (0)
.errnz ($-StrtThirdBootSector) NE OFFSETTRLSIG
DD BOOTSECTRAILSIG ; Boot sector signature (4 bytes)
.errnz ($-$START) NE (SECTOR_SIZE * 3)
.errnz SIZEBIGBOOTINSEC NE 3
$BigEnd label byte
CODE ENDS
END
| 40.093611 | 105 | 0.516547 |
8625f115d119fc444af385ee3a9a4f619e7fbb39 | 671 | asm | Assembly | programs/oeis/097/A097806.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/097/A097806.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/097/A097806.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A097806: Riordan array (1+x, 1) read by rows.
; 1,1,1,0,1,1,0,0,1,1,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
mov $2,$0
sub $0,$0
add $2,2
add $0,$2
lpb $0,1
trn $0,2
add $1,1
trn $1,$0
add $0,1
add $3,1
trn $0,$3
lpe
| 41.9375 | 501 | 0.506706 |
6ea649528555ca1b0bfdd97fd170053ffbe45c11 | 911 | asm | Assembly | programs/oeis/110/A110496.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/110/A110496.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/110/A110496.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A110496: Least k such that prime(n)^3 divides binomial(2k,k).
; 7,14,63,172,666,1099,2457,3430,6084,12195,14896,25327,34461,39754,51912,74439,102690,113491,150382,178956,194509,246520,285894,352485,456337,515151,546364,612522,647515,721449,1024192,1124046,1285677,1342810,1653975,1721476,1934947,2165374,2328732,2588859,2867670,2964871,3483936,3594529,3822687,3940300,4696966,5544784,5848542,6004495,6324669,6825960,6998761,7906626,8487297,9095724,9732555,9951256,10626967,11094021,11332594,12576879,14467222,15040116,15332149,15927507,18132346,19136377,20890962,21254275,21993489,23134140,24715432,25947559,27219970,28090944,29431935,31285387,32240601,34208965,36780030,37309231,40031496,40591369,42302260,43469154,45259425,47721997,48986091,49626424,50923782,54951120,57750652,59185386,62125750,63631764,65936115,70710381,71527834,79170211
seq $0,153481 ; a(n) = prime(n)^3 - 2.
sub $0,1
dif $0,2
add $0,2
| 113.875 | 779 | 0.83315 |
73f1a301e3ae55ba8fa8e5e270190c0eaac2375b | 3,625 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_174_2636.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_174_2636.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_174_2636.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x162f0, %rsi
lea addresses_A_ht+0x9af0, %rdi
clflush (%rdi)
and %r14, %r14
mov $98, %rcx
rep movsb
nop
nop
nop
sub $53946, %r13
lea addresses_normal_ht+0x104f0, %rsi
lea addresses_UC_ht+0x12fb0, %rdi
nop
nop
and $32881, %rbp
mov $4, %rcx
rep movsb
cmp %r13, %r13
lea addresses_UC_ht+0x10af0, %rsi
lea addresses_WC_ht+0xdf52, %rdi
nop
nop
nop
nop
nop
sub $1880, %r10
mov $125, %rcx
rep movsw
nop
nop
nop
cmp %rsi, %rsi
lea addresses_UC_ht+0x15758, %rsi
lea addresses_UC_ht+0x1b2f0, %rdi
nop
nop
nop
nop
add $42498, %r14
mov $56, %rcx
rep movsq
xor %rsi, %rsi
lea addresses_A_ht+0x1ef0, %r14
clflush (%r14)
cmp %rbp, %rbp
mov $0x6162636465666768, %r13
movq %r13, %xmm3
movups %xmm3, (%r14)
nop
dec %r13
lea addresses_WT_ht+0xe770, %rcx
nop
nop
nop
sub %rdi, %rdi
movb $0x61, (%rcx)
nop
nop
nop
nop
nop
sub %r13, %r13
lea addresses_WT_ht+0x1d948, %rdi
nop
nop
nop
nop
nop
sub $24514, %r10
mov $0x6162636465666768, %r13
movq %r13, %xmm2
movups %xmm2, (%rdi)
add $38796, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r8
push %rax
push %rbp
push %rbx
// Store
lea addresses_UC+0x14af0, %rbp
nop
nop
nop
nop
cmp %rax, %rax
mov $0x5152535455565758, %rbx
movq %rbx, %xmm5
vmovntdq %ymm5, (%rbp)
nop
nop
nop
nop
nop
cmp %r15, %r15
// Faulty Load
lea addresses_WT+0x1e2f0, %r15
inc %r12
movups (%r15), %xmm2
vpextrq $0, %xmm2, %rbp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rbx
pop %rbp
pop %rax
pop %r8
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 32, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'39': 174}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 23.69281 | 521 | 0.658483 |
3d331e87099eea734f5086823d89a19c64ebe432 | 433 | asm | Assembly | programs/oeis/174/A174794.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/174/A174794.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/174/A174794.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A174794: a(0) = 0 and a(n) = (4*n^3 - 12*n^2 + 20*n - 9)/3 for n >= 1.
; 0,1,5,17,45,97,181,305,477,705,997,1361,1805,2337,2965,3697,4541,5505,6597,7825,9197,10721,12405,14257,16285,18497,20901,23505,26317,29345,32597,36081,39805,43777,48005,52497,57261,62305,67637,73265,79197,85441,92005,98897
mov $1,$0
mov $2,$0
lpb $2
add $0,$3
add $4,$3
trn $4,5
add $0,$4
sub $2,1
add $4,$1
add $1,5
trn $3,3
add $3,3
lpe
| 25.470588 | 224 | 0.630485 |
eae0769e30c502eaec7f193058ace3253fddb079 | 1,631 | asm | Assembly | programs/oeis/163/A163277.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/163/A163277.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/163/A163277.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A163277: a(n) = n^7*(n+1)^2/2.
; 0,2,576,17496,204800,1406250,6858432,26353376,84934656,239148450,605000000,1403076312,3027787776,6149354666,11859019200,21870000000,38788923392,66474865026,110505715776,178774347800,282240000000,435863426922,659757661376,980589728736,1433272320000,2062988281250,2927594809152,4100458455576,5673776439296,7762444339050,10508535000000,14086458424832,18708877541376,24633460040706,32170551963200,41691864375000,53640270323712,68540815290026,87013050561216,109784805343200,137707520000000,171773269563042,213133613587776,263120415551576,323268782284800,395342281406250,481360602395072,583629834773376,704775544897536,847778841061250,1016015625000000,1213299236454552,1443926706200576,1712728841882346,2025124380100800,2387178447500000,2805665583071232,3288137583550626,3842996443624256,4479572672674200,5208209280000000,6040351730832362,6988644186019776,8067032349014016,9290873254707200,10677052345781250,12244108193520192,14012365231506776,16004074882277376,18243565468843050,20757401315000000,23574551450549472,26726568349925376,30247777145287586,34175475767880000,38550146484375000,43415679308029952,48819607777766826,54813357611752896,61452508755708800,68797071360000000,76911776233578882,85866380337037376,95735987891404056,106601387693875200,118549407246406250,131673284318008512,146073056576695776,161855969942306816,179136906326892450,198038831445000000,218693263392013592,241240762704715776,265831444634424426,292625514379428800,321793826040000000,353518466075983872,387993362063898626,425424917567555136,466032673953495000
mov $1,$0
pow $0,7
add $1,1
pow $1,2
mul $0,$1
div $0,4
mul $0,2
| 148.272727 | 1,531 | 0.907419 |
6d2b7b7b20a89a8ad6dea72279d56c188cc59a9c | 1,956 | asm | Assembly | programs/oeis/059/A059978.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/059/A059978.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/059/A059978.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A059978: a(n) = binomial(n+2,n)^6.
; 1,729,46656,1000000,11390625,85766121,481890304,2176782336,8303765625,27680640625,82653950016,225199600704,567869252041,1340095640625,2985984000000,6327518887936,12827693806929,25002110044521,47045881000000,85766121000000,151939915084881,262254607552729,442032795979776,729000000000000,1178420166015625,1870004703089601,2917096519063104,4478743609109056,6775409390765625,10109221616390625,14889840956932096,21667237072994304,31172897213027361,44371263363765625,62523502209000000,87266061345623616,120706859316371329,165542400249498441,225199600704000000,304006671424000000,407398015096219161,542158788145462929,716715535644767296,941480149401000000,1229255326344515625,1595710723950942481,2059940128316719104,2645111175781810176,3379220508056640625,4295968701416015625,5435770900765248576,6846920817709271104,8586927626969772081,10724047326770765625,13339032325696000000,16527125390940573696,20400326651151493929,25089965101891841761,30749609024289000000,37558352909169000000,45724521891885522841,55489838359499131329,67134099304759689216,80980417183744000000,97401081499701890625,116824103098824244761,139740508238886858304,166712454894136965696,198382249504946390625,235482348484714515625,278846435275817619456,329421670618122031104,388282220975269366201,456644177773681640625,535881988265625000000,627546527449847258176,733384949590939374729,855362467491883754481,995686217814016000000,1156831381426176000000,1341569739022062315921,1553000854094210357929,1794586087817653225536,2070185663499849000000,2384099012020123140625,2741108644136539116441,3146527810706247880704,3606252227773071855616,4126816160150075015625,4715453174592516890625,5380161891945887964736,6129777086793331274304,6974046503145982889721,7923713775648591390625,8990607867641856000000,10187739460263588397056,11529404750615076613729,13031297141899629116601,14710627334390625000000,16586252353140625000000
mov $1,-3
bin $1,$0
pow $1,6
mov $0,$1
| 244.5 | 1,878 | 0.929448 |
6d6d04f1b9d849753997392dd24a787a9713692b | 1,347 | asm | Assembly | Library/Text/TextRegion/trEC.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Text/TextRegion/trEC.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Text/TextRegion/trEC.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: trEC.asm
AUTHOR: John Wedgwood, Feb 12, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
John 2/12/92 Initial revision
DESCRIPTION:
EC code for the TextRegion module.
$Id: trEC.asm,v 1.1 97/04/07 11:21:33 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TextRegion segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ECSmallCheckRegionNumber
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check a region number in a small object.
CALLED BY: Utility
PASS: cx = Region number
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 2/18/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ECSmallCheckRegionNumber proc far
pushf
tst cx
ERROR_NZ REGION_NUMBER_FOR_SMALL_OBJECT_MUST_BE_ZERO
popf
ret
ECSmallCheckRegionNumber endp
TextRegion ends
| 22.45 | 79 | 0.486266 |
3cffacaa33396593e8d76824644339098dc7edd1 | 7,384 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_9834_238.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_9834_238.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_9834_238.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 %r8
push %r9
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0xd6dc, %rsi
lea addresses_WC_ht+0xbe84, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
and $33750, %r8
mov $20, %rcx
rep movsb
and %r10, %r10
lea addresses_WC_ht+0x1bd84, %rsi
lea addresses_WT_ht+0xfb74, %rdi
nop
nop
nop
sub $56847, %r9
mov $82, %rcx
rep movsw
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_A_ht+0x9744, %rsi
lea addresses_normal_ht+0x37c4, %rdi
nop
nop
xor %rax, %rax
mov $15, %rcx
rep movsw
cmp %rdi, %rdi
lea addresses_normal_ht+0x5344, %rax
nop
nop
nop
xor $4593, %r10
movups (%rax), %xmm2
vpextrq $1, %xmm2, %rsi
nop
nop
nop
nop
nop
cmp $51499, %rax
lea addresses_A_ht+0x1ccb4, %rsi
lea addresses_WC_ht+0x1b384, %rdi
clflush (%rsi)
nop
nop
nop
nop
and %rdx, %rdx
mov $121, %rcx
rep movsq
nop
nop
nop
nop
and $39703, %r8
lea addresses_WT_ht+0xb384, %rsi
lea addresses_WT_ht+0x14384, %rdi
nop
inc %r9
mov $73, %rcx
rep movsl
nop
nop
nop
nop
add %r9, %r9
lea addresses_A_ht+0x10584, %r8
clflush (%r8)
nop
nop
sub $6578, %rdx
mov (%r8), %di
nop
nop
inc %r8
lea addresses_WC_ht+0x181bc, %rdi
nop
nop
nop
nop
sub $38369, %rdx
movw $0x6162, (%rdi)
nop
xor %rax, %rax
lea addresses_A_ht+0x15c6e, %rsi
nop
dec %r9
movb (%rsi), %dl
nop
nop
nop
nop
nop
dec %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r15
push %rax
push %rbp
push %rbx
push %rdx
// Store
mov $0x3461a20000000cc4, %r15
nop
nop
nop
nop
cmp $12508, %rdx
mov $0x5152535455565758, %r14
movq %r14, %xmm5
vmovups %ymm5, (%r15)
dec %r15
// Store
lea addresses_UC+0xc204, %rbp
nop
nop
cmp %r10, %r10
movw $0x5152, (%rbp)
nop
inc %rbp
// Store
lea addresses_normal+0x6184, %rbx
nop
nop
nop
nop
dec %rdx
movl $0x51525354, (%rbx)
nop
nop
cmp %rbx, %rbx
// Load
lea addresses_D+0x17b84, %rdx
and $8756, %r10
vmovups (%rdx), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $1, %xmm5, %rbx
nop
nop
nop
nop
nop
xor %rbp, %rbp
// Faulty Load
lea addresses_UC+0x1f384, %rdx
nop
nop
nop
nop
add %r10, %r10
vmovups (%rdx), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %r15
lea oracles, %r14
and $0xff, %r15
shlq $12, %r15
mov (%r14,%r15,1), %r15
pop %rdx
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False, 'NT': True, 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': True, 'congruent': 1, 'same': False}}
{'00': 9834}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 33.112108 | 2,999 | 0.656826 |
9621ef42699eb0b07648a707ec5b296171872257 | 66 | asm | Assembly | audio/sfx/noise_instrument14_1.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | audio/sfx/noise_instrument14_1.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | audio/sfx/noise_instrument14_1.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | SFX_Noise_Instrument14_1_Ch8:
noise_note 0, 10, 2, 80
sound_ret
| 16.5 | 29 | 0.80303 |
2bb6e2ed737bcd258545f3ad54d7eedf5d5e5109 | 510 | asm | Assembly | programs/oeis/050/A050271.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/050/A050271.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/050/A050271.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A050271: Numbers n such that n = floor(sqrt(n)*ceiling(sqrt(n))).
; 1,2,3,4,7,8,9,14,15,16,23,24,25,34,35,36,47,48,49,62,63,64,79,80,81,98,99,100,119,120,121,142,143,144,167,168,169,194,195,196,223,224,225,254,255,256,287,288,289,322,323,324,359,360,361,398,399,400,439,440,441,482,483,484,527,528,529,574,575,576,623,624,625,674,675,676,727,728,729,782,783,784,839,840,841,898,899,900,959,960,961,1022,1023,1024,1087,1088,1089,1154,1155,1156
mov $2,$0
lpb $2
add $0,$3
trn $2,3
add $3,2
lpe
add $0,1
| 46.363636 | 376 | 0.692157 |
9890bd9bc0ebf7392a3045981ec2b80c43de6c67 | 19 | asm | Assembly | libsrc/stdio/rcmx000/cnvtab.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/stdio/rcmx000/cnvtab.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/stdio/rcmx000/cnvtab.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; Placeholder...
| 4.75 | 16 | 0.578947 |
7d389a07f49e3c9d66eb6e502e196a0eb37f7a0c | 520 | asm | Assembly | programs/oeis/218/A218327.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/218/A218327.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/218/A218327.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A218327: Even octagonal pyramidal numbers (A002414)
; 30,70,364,540,1386,1794,3480,4216,7030,8190,12420,14100,20034,22330,30256,33264,43470,47286,60060,64780,80410,86130,104904,111720,133926,141934,167860,177156,207090,217770,252000,264160,302974,316710,360396,375804,424650
mov $1,3
add $1,$0
mod $1,2
add $1,1
mov $3,$0
add $3,$0
add $3,3
mul $3,$1
sub $3,1
pow $3,2
mov $1,$3
add $1,5
mov $2,$0
mov $4,$0
mul $4,19
add $1,$4
mul $2,$0
mov $4,$2
mul $4,22
add $1,$4
mul $2,$0
mov $4,$2
mul $4,8
add $1,$4
mov $0,$1
| 17.931034 | 222 | 0.680769 |
c077fbc63af7d6984eb0774238a56ad21d58d053 | 429 | asm | Assembly | programs/oeis/001/A001965.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/001/A001965.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/001/A001965.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A001965: Wythoff game.
; 0,1,3,4,5,6,8,9,10,11,12,14,15,16,17,19,20,21,22,24,25,26,27,29,30,31,32,33,35,36,37,38,40,41,42,43,45,46,47,48,50,51,52,53,55,56,57,58,59,61,62,63,64,66,67,68,69,71,72,73,74,76,77,78,79,80,82,83,84,85,87,88,89,90,92,93,94,95,97,98,99,100,101,103,104,105,106,108,109,110,111,113,114,115,116,118,119,120,121,122
mul $0,2
mov $1,$0
seq $0,284625 ; Positions of 2 in A284749.
sub $0,$1
sub $0,3
div $0,2
| 42.9 | 312 | 0.664336 |
83e55a9213ec5a19aa20308111254cd883c5e7b0 | 922 | asm | Assembly | lab_11_str/lab_11_str/DelSpace.asm | Winterpuma/bmstu_MDPL | 28fb1f93e5ce4321c98ff6cf1b997972a48724ee | [
"MIT"
] | 14 | 2019-02-25T11:09:12.000Z | 2022-03-12T23:29:11.000Z | lab_11_str/lab_11_str/DelSpace.asm | Winterpuma/bmstu_MDPL | 28fb1f93e5ce4321c98ff6cf1b997972a48724ee | [
"MIT"
] | null | null | null | lab_11_str/lab_11_str/DelSpace.asm | Winterpuma/bmstu_MDPL | 28fb1f93e5ce4321c98ff6cf1b997972a48724ee | [
"MIT"
] | null | null | null | .386
.model flat, c
public DelSpace
.code
DelSpace:
push ebp
mov ebp, esp
push edi
mov edi, [ebp + 8] ; str
mov ebx, edi
mov eax, 0
mov ecx, 0
mov cx, -1 ; FFFF
mov al, ' ' ; our symbol to compare with
cld ; CF = 0 go right direction
repe scasb ; Fing byte != to AL in block of ECX bytes by adress ES:EDI (while edi symbol != al symbol & ecx != 0)
mov esi, edi
dec esi ; pointer to first meaningfull symbol
mov al, 0 ; find end of string
mov cx, -1
repne scasb ; Find byte == to AL in clock of ECX bytes by adress ES:EDI
neg cx ;
sub edi, 2 ; last non zero symbol
mov al, ' '
std ; left direction
repe scasb ; Fing byte != to AL in block of ECX bytes by adress ES:EDI
mov ax, cx ; len of new string
mov edi, ebx ; beginning of string
cld ; right direction
rep movsb ; Write to ES:EDI block of ECX bytes from DS:ESI
mov cx, 0
mov [edi], cx ; set end of string
pop edi
pop ebp
ret
end | 20.954545 | 114 | 0.665944 |
23cb5151326e6f18cec098499682d57da9f33f55 | 713 | asm | Assembly | oeis/072/A072944.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/072/A072944.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/072/A072944.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A072944: a(1)=2, a(n+1) = 2*a(n) - phi(a(n)) where phi is the Euler totient function A000010.
; 2,3,4,6,10,16,24,40,64,96,160,256,384,640,1024,1536,2560,4096,6144,10240,16384,24576,40960,65536,98304,163840,262144,393216,655360,1048576,1572864,2621440,4194304,6291456,10485760,16777216,25165824,41943040,67108864,100663296,167772160,268435456,402653184,671088640,1073741824,1610612736,2684354560,4294967296,6442450944,10737418240,17179869184,25769803776,42949672960,68719476736,103079215104,171798691840,274877906944,412316860416,687194767360,1099511627776,1649267441664,2748779069440
mov $1,$0
sub $1,1
mov $2,$0
add $0,1
sub $2,$1
lpb $1
mov $0,$2
sub $1,1
trn $0,$1
add $0,2
add $2,$0
lpe
add $0,1
| 41.941176 | 489 | 0.769986 |
5078369eb0f4e023905c96a4a68ccaa5eb9a7d98 | 502 | asm | Assembly | pusha.asm | Unshifted1337/Cheat-x86-For-Assembly | b42e7d3a32ca1144b2a57b1490068526d5dcd8a6 | [
"MIT"
] | null | null | null | pusha.asm | Unshifted1337/Cheat-x86-For-Assembly | b42e7d3a32ca1144b2a57b1490068526d5dcd8a6 | [
"MIT"
] | null | null | null | pusha.asm | Unshifted1337/Cheat-x86-For-Assembly | b42e7d3a32ca1144b2a57b1490068526d5dcd8a6 | [
"MIT"
] | null | null | null | ; # pusha
; # popa
; Push and restore the following registers using the stack:
; EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI
; This is important for example in the C calling convention,
; where certain registers must not be changed by functions.
%include "lib/common_nasm.inc"
ENTRY
mov ebx, 0
mov ecx, 0
mov eax, esp
pusha
sub eax, esp
; 8x 4 bytes
ASSERT_EQ eax, 32
mov ebx, 1
mov ecx, 1
popa
ASSERT_EQ ebx, 0
ASSERT_EQ ecx, 0
EXIT
| 16.193548 | 64 | 0.623506 |
4fa5aa1ef1ef4f1879b9459541fa35cbaf8c4a13 | 1,020 | asm | Assembly | src/util/sprite/f_f5.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/sprite/f_f5.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | src/util/sprite/f_f5.asm | olifink/qspread | d6403d210bdad9966af5d2a0358d4eed3f1e1c02 | [
"MIT"
] | null | null | null | ;Sprite source code generated with EASYSOURCE 1991 Albin Hessler Software
;**************************************************************************
; -> asm_spr_ <- 1992 Jun 13 12:45:08
section sprite
xdef mes_f5
mes_f5
sp1
dc.w $0100,$0000 ;form, time/adaption
dc.w $0008,$0007 ;x size, y size
dc.w $0000,$0000 ;x origin, y origin
dc.l cp1-* ;pointer to colour pattern
dc.l pm1-* ;pointer to pattern mask
dc.l 0 ;pointer to next definition
cp1
dc.w $EF00,$0000
dc.w $8800,$0000
dc.w $8E00,$0000
dc.w $C100,$0000
dc.w $8100,$0000
dc.w $8900,$0000
dc.w $8600,$0000
pm1
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0000
dc.w $0000,$0000
;
end
| 30 | 75 | 0.426471 |
558a06a5a134e9a1f71e17bd919a6a4d1fb040af | 420 | asm | Assembly | oeis/128/A128214.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/128/A128214.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/128/A128214.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A128214: Expansion of (1+2x+3x^2)/(1+x+x^2)^2.
; 1,0,0,-2,3,0,-5,6,0,-8,9,0,-11,12,0,-14,15,0,-17,18,0,-20,21,0,-23,24,0,-26,27,0,-29,30,0,-32,33,0,-35,36,0,-38,39,0,-41,42,0,-44,45,0,-47,48,0,-50,51,0,-53,54,0,-56,57,0,-59,60,0,-62,63,0,-65,66,0,-68,69,0,-71,72,0,-74,75,0,-77,78,0,-80,81,0,-83,84,0,-86,87,0,-89,90,0,-92,93,0,-95,96,0,-98
mov $1,1
sub $1,$0
mov $2,$0
add $2,2
mod $2,3
sub $2,1
mul $1,$2
mov $0,$1
| 35 | 293 | 0.542857 |
83f512ae71c67e4a05598f62d89ba5ecd03b9070 | 399 | asm | Assembly | programs/oeis/050/A050683.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/050/A050683.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/050/A050683.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A050683: Number of nonzero palindromes of length n.
; 9,9,90,90,900,900,9000,9000,90000,90000,900000,900000,9000000,9000000,90000000,90000000,900000000,900000000,9000000000,9000000000,90000000000,90000000000,900000000000,900000000000,9000000000000,9000000000000,90000000000000,90000000000000,900000000000000,900000000000000,9000000000000000,9000000000000000
div $0,2
mov $1,10
pow $1,$0
mul $1,9
| 49.875 | 305 | 0.839599 |
a312015a7c403c31e3811fb614b04b27a5bee5e7 | 1,283 | asm | Assembly | programs/oeis/305/A305075.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/305/A305075.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/305/A305075.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A305075: a(n) = 32*n - 24 (n>=1).
; 8,40,72,104,136,168,200,232,264,296,328,360,392,424,456,488,520,552,584,616,648,680,712,744,776,808,840,872,904,936,968,1000,1032,1064,1096,1128,1160,1192,1224,1256,1288,1320,1352,1384,1416,1448,1480,1512,1544,1576,1608,1640,1672,1704,1736,1768,1800,1832,1864,1896,1928,1960,1992,2024,2056,2088,2120,2152,2184,2216,2248,2280,2312,2344,2376,2408,2440,2472,2504,2536,2568,2600,2632,2664,2696,2728,2760,2792,2824,2856,2888,2920,2952,2984,3016,3048,3080,3112,3144,3176,3208,3240,3272,3304,3336,3368,3400,3432,3464,3496,3528,3560,3592,3624,3656,3688,3720,3752,3784,3816,3848,3880,3912,3944,3976,4008,4040,4072,4104,4136,4168,4200,4232,4264,4296,4328,4360,4392,4424,4456,4488,4520,4552,4584,4616,4648,4680,4712,4744,4776,4808,4840,4872,4904,4936,4968,5000,5032,5064,5096,5128,5160,5192,5224,5256,5288,5320,5352,5384,5416,5448,5480,5512,5544,5576,5608,5640,5672,5704,5736,5768,5800,5832,5864,5896,5928,5960,5992,6024,6056,6088,6120,6152,6184,6216,6248,6280,6312,6344,6376,6408,6440,6472,6504,6536,6568,6600,6632,6664,6696,6728,6760,6792,6824,6856,6888,6920,6952,6984,7016,7048,7080,7112,7144,7176,7208,7240,7272,7304,7336,7368,7400,7432,7464,7496,7528,7560,7592,7624,7656,7688,7720,7752,7784,7816,7848,7880,7912,7944,7976
mov $1,$0
mul $1,32
add $1,8
| 183.285714 | 1,216 | 0.777085 |
df99193589184c834a0af8f53b493c00a3678fa0 | 366 | asm | Assembly | oeis/228/A228778.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/228/A228778.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/228/A228778.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A228778: a(n) = 2^Fibonacci(n) + 1.
; 2,3,3,5,9,33,257,8193,2097153,17179869185,36028797018963969,618970019642690137449562113,22300745198530623141535718272648361505980417,13803492693581127574869511724554050904902217944340773110325048447598593
seq $0,45 ; Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.
mov $1,2
pow $1,$0
add $1,1
mov $0,$1
| 40.666667 | 206 | 0.751366 |
14a143b1ef2cde24fc1acb3544e1bce193f42879 | 121 | asm | Assembly | kdriver/unmap.asm | Deputation/kernel_payload_comms | 0946f2f0648a0e72931307923ed45c97a163aa3f | [
"MIT"
] | 15 | 2021-03-15T11:15:31.000Z | 2022-03-25T14:45:31.000Z | kdriver/unmap.asm | Deputation/kernel_payload_comms | 0946f2f0648a0e72931307923ed45c97a163aa3f | [
"MIT"
] | null | null | null | kdriver/unmap.asm | Deputation/kernel_payload_comms | 0946f2f0648a0e72931307923ed45c97a163aa3f | [
"MIT"
] | 11 | 2021-04-19T18:16:49.000Z | 2022-01-12T02:37:56.000Z | EXTERN ExFreePool : PROC
.CODE
jmp_to_ex_free_pool PROC
jmp ExFreePool
jmp_to_ex_free_pool ENDP
END | 13.444444 | 24 | 0.710744 |
678c7c6983332c5a688f7e968449951ffeb6656b | 791 | asm | Assembly | sound/sfxasm/A8.asm | NatsumiFox/Sonic-3-93-Nov-03 | 032e4fc25f243636d458639c4a4311caca898f96 | [
"MIT"
] | 7 | 2019-12-05T00:35:57.000Z | 2022-02-27T20:00:33.000Z | sound/sfxasm/A8.asm | NatsumiFox/Sonic-3-93-Nov-03 | 032e4fc25f243636d458639c4a4311caca898f96 | [
"MIT"
] | null | null | null | sound/sfxasm/A8.asm | NatsumiFox/Sonic-3-93-Nov-03 | 032e4fc25f243636d458639c4a4311caca898f96 | [
"MIT"
] | null | null | null | A8_Header:
sHeaderInit ; Z80 offset is $D45E
sHeaderPatch A8_Patches
sHeaderTick $01
sHeaderCh $01
sHeaderSFX $80, $05, A8_FM5, $00, $04
A8_FM5:
sPatFM $00
ssModZ80 $01, $01, $C9, $F9
dc.b nG2, $05
A8_Loop1:
dc.b nC0, $04
saTranspose $01
sLoop $00, $0B, A8_Loop1
sStop
A8_Patches:
; Patch $00
; $F8
; $10, $30, $05, $30, $16, $1D, $1A, $1B
; $12, $0E, $11, $04, $11, $13, $09, $13
; $1F, $1F, $4F, $2F, $5D, $80, $05, $80
spAlgorithm $00
spFeedback $07
spDetune $01, $00, $03, $03
spMultiple $00, $05, $00, $00
spRateScale $00, $00, $00, $00
spAttackRt $16, $1A, $1D, $1B
spAmpMod $00, $00, $00, $00
spSustainRt $12, $11, $0E, $04
spSustainLv $01, $04, $01, $02
spDecayRt $11, $09, $13, $13
spReleaseRt $0F, $0F, $0F, $0F
spTotalLv $5D, $05, $00, $00
| 20.815789 | 41 | 0.586599 |
5f61a94eb9c0db76a41c48641cc7224420a5696a | 1,445 | asm | Assembly | src/break.asm | redoste/fx-CG50_Manager_PLUS-gdbserver | 48a97d56e9597943f638a0da5384b672858d21c3 | [
"MIT"
] | 1 | 2021-12-21T11:41:37.000Z | 2021-12-21T11:41:37.000Z | src/break.asm | redoste/fx-CG50_Manager_PLUS-gdbserver | 48a97d56e9597943f638a0da5384b672858d21c3 | [
"MIT"
] | null | null | null | src/break.asm | redoste/fx-CG50_Manager_PLUS-gdbserver | 48a97d56e9597943f638a0da5384b672858d21c3 | [
"MIT"
] | null | null | null | bits 32
section .text
extern _break_ii_main
extern _break_jti_main
extern _break_ii_next_function_ptr
extern _break_jti_original_function_ptr
extern _gdb_wants_step
extern _gdb_breakpoints_amount
extern _real_cpu_jti_table_nommu_backup
extern _real_cpu_jti_table_wtmmu_backup
global _break_ii_handler
_break_ii_handler:
pushad
mov ebp, esp
push ebp
; STACK :
;
; Low address
; +---------+
; |*context | <- ESP
; +---------+
; | OLD EDI | <- EBP
; +---------+
; | OLD ESI |
; +---------+
; | OLD EBP |
; +---------+
; | OLD ESP |
; +---------+
; | OLD EBX |
; +---------+
; | OLD EDX |
; +---------+
; | OLD ECX |
; +---------+
; | OLD EAX |
; +---------+
; | ... |
; +---------+
; High address
call _break_ii_main
mov esp, ebp
popad
jmp [_break_ii_next_function_ptr]
global _break_jti_handler
_break_jti_handler:
cmp BYTE [_gdb_wants_step], 0
jne .slow_path
cmp DWORD [_gdb_breakpoints_amount], 0
jne .slow_path
.fast_path:
push eax
and al, 0x80
cmp al, 0
pop eax
push ebx
jne .fast_path_wtmmu
.fast_path_nommu:
mov ebx, [_real_cpu_jti_table_nommu_backup]
jmp .fast_path_end
.fast_path_wtmmu:
mov ebx, [_real_cpu_jti_table_wtmmu_backup]
and eax, 0x7f
.fast_path_end:
mov eax, [ebx + eax*4]
pop ebx
jmp eax
.slow_path:
pushad
mov ebp, esp
push ebp
; Same stack setup as _break_ii_handler
call _break_jti_main
mov esp, ebp
popad
jmp [_break_jti_original_function_ptr]
| 15.537634 | 44 | 0.658131 |
0bf6b26d5d02e4954d6da7939a2ef7cea407e0ba | 13,292 | asm | Assembly | Appl/GeoCalc/Document/documentMouse.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/GeoCalc/Document/documentMouse.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/GeoCalc/Document/documentMouse.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: GeoCalc/Document
FILE: documentMouse.asm
AUTHOR: Gene Anderson, Oct 12, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 10/12/92 Initial revision
DESCRIPTION:
Mouse messages for the GeoCalc document
$Id: documentMouse.asm,v 1.1 97/04/04 15:48:09 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
Document segment resource
if _CHARTS
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckGrObjMouse
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if a mouse event is destined for the grobj
CALLED BY: GeoCalcDocumentPtr
PASS: *ds:si - GeoCalc document object
ss:bp - ptr to LargeMouseData
RETURN: z flag - clear (jnz) if destined for grobj
^lcx:dx - new pointer image
ax - MouseReturnFlags
^lbx:si - OD of grobj
DESTROYED: ax - if not destined for grobj
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 10/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckGrObjMouse proc near
uses di
.enter
call GetGrObjBodyOD ;^lbx:si <- OD of grobj
CheckHack <(offset LMD_location) eq 0>
mov ax, MSG_GB_EVALUATE_MOUSE_POSITION
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
cmp al, GOMRF_NOTHING ;set Z flag for not grobj
mov al, 0 ;ax <- MouseReturnFlags
.leave
ret
CheckGrObjMouse endp
endif
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentPtr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle pointer events for GeoCalc document
CALLED BY: MSG_META_LARGE_PTR
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
ss:bp - ptr to LargeMouseData
RETURN: ax - MouseReturnFlags
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 10/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentPtr method dynamic GeoCalcDocumentClass,
MSG_META_LARGE_PTR
;
; See if the edit bar has the focus. If we're doing cell references
; in the edit bar, just pass the ptr event off so it goes to the
; spreadsheet.
;
call CheckEditBarFocus
jc notPtrTool ;branch if edit bar has focus
;
; Get the current tool -- if it isn't the pointer, just pass it on
;
CHART< call IsPtrTool >
CHART< jnz notPtrTool ;branch if not pointer tool >
;
; Ask the GrObj if it can deal with the pointer
;
if _CHARTS
push si
call CheckGrObjMouse
pop si ;*ds:si <- document object
jnz isGrObj ;branch if for grobj
endif
;
; If not, send to the spreadsheet
;
call GetDocSpreadsheet ;^
mov ax, MSG_META_LARGE_PTR
mov di, mask MF_FIXUP_DS or mask MF_CALL
call ObjMessage
isGrObj::
ornf ax, mask MRF_PROCESSED ;ax <- MouseReturnFlags
ret
notPtrTool:
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
GeoCalcDocumentPtr endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentStartSelect
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle start select events for GeoCalc document
CALLED BY: MSG_META_LARGE_START_SELECT
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
ss:bp - ptr to LargeMouseData
RETURN: ax - MouseReturnFlags
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 10/12/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentStartSelect method dynamic GeoCalcDocumentClass,
MSG_META_LARGE_START_SELECT
mov di, si ;*ds:di <- document object
;
; See if the edit bar has the focus. If we're doing cell references
; in the edit bar, just pass the ptr event off so it goes to the
; spreadsheet.
;
call CheckEditBarFocus
jc notPtrTool ;branch if edit bar has focus
;
; Get the current tool -- if it isn't the pointer, just pass it on
;
if _CHARTS
call IsPtrTool
jnz notPtrTool ;branch if not pointer tool
;
; Ask the GrObj if it can deal with the pointer
;
call CheckGrObjMouse
mov cl, GCTL_GROBJ
jnz changeTarget ;branch if for grobj
endif
;
; If not, send to the spreadsheet
;
mov si, di ;*ds:si <- document object
call GetDocSpreadsheet ;^lbx:si <- OD of spreadsheet
mov cl, GCTL_SPREADSHEET
;
; Tell either the spreadsheet or the grobj to grab the focus and
; target...
;
changeTarget::
call SetTargetLayerOpt
;
; ...and then pass it the start select.
;
mov ax, MSG_META_LARGE_START_SELECT
mov di, mask MF_FIXUP_DS or mask MF_CALL
call ObjMessage
ret
notPtrTool:
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
GeoCalcDocumentStartSelect endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SetTargetLayer
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the target layer
CALLED BY: GeoCalcDocumentStartSelect()
PASS: ^lbx:si - OD of grobj or spreadsheet
cl - GeoCalcTargetLayer
ds - fixupable segment owned by GeoCalc
carry - clear to check if target layer changing
RETURN: none
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 10/13/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SetTargetLayerOpt proc near
clc ;carry <- optimization OK
FALL_THRU SetTargetLayer
SetTargetLayerOpt endp
SetTargetLayer proc near
uses ax, bx, cx, dx, bp, di, si
.enter
;
; See if we're allowed to optimize and check our current
; notion of the target.
;
jc doChange ;branch if no optimization
;
; See if the layer has actually changed -- if not, quit
;
push cx
mov ax, MSG_GEOCALC_APPLICATION_GET_TARGET_LAYER
call UserCallApplication
mov dl, cl ;dl <- current layer
pop cx
cmp cl, dl ;layer changed?
je quit ;branch if not changed
;
; Notify the app obj of the target change
;
doChange:
push cx
mov ax, MSG_GEOCALC_APPLICATION_SET_TARGET_LAYER
call UserCallApplication
pop cx
if _CHARTS
;
; If the new layer is the spreadsheet layer, unselect all grobjs
;
cmp cl, GCTL_SPREADSHEET
jne noDeselect
push bx, si ; save spreadsheet obj
mov ax, MSG_VIS_FIND_PARENT
call callObjMessage ; ^lcx:dx = document obj
jcxz oops
movdw bxsi, cxdx ; ^lbx:si = document obj
mov cx, 1 ; first child is grobj body
mov ax, MSG_VIS_FIND_CHILD_AT_POSITION
call callObjMessage ; ^lcx:dx = grobj body
jcxz oops
movdw bxsi, cxdx
mov ax, MSG_GB_REMOVE_ALL_GROBJS_FROM_SELECTION_LIST
call callObjMessage
oops:
pop bx, si ; restore ss obj
noDeselect:
endif
;
; Set the focus and target to the specified OD
;
mov ax, MSG_META_GRAB_FOCUS_EXCL
call callObjMessage
mov ax, MSG_META_GRAB_TARGET_EXCL
call callObjMessage
quit:
.leave
ret
callObjMessage:
mov di, mask MF_FIXUP_DS or mask MF_CALL
call ObjMessage
retn
SetTargetLayer endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentSetTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the target layer
CALLED BY: MSG_GEOCALC_DOCUMENT_SET_TARGET
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
cl - GeoCalcTargetLayer
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 12/28/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentSetTarget method dynamic GeoCalcDocumentClass,
MSG_GEOCALC_DOCUMENT_SET_TARGET
cmp cl, GCTL_SPREADSHEET
je isSpreadsheet
if _CHARTS
call GetGrObjBodyOD ;^lbx:si <- OD of GrObj
jmp setLayer
else
EC< ERROR -1 >
endif
isSpreadsheet:
call GetDocSpreadsheet ;^lbx:si <- OD of spreadsheet
setLayer::
call SetTargetLayerOpt
ret
GeoCalcDocumentSetTarget endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentGainedFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle gaining the focus
CALLED BY: MSG_META_GAINED_FOCUS_EXCL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentGainedFocus method dynamic GeoCalcDocumentClass,
MSG_META_GAINED_FOCUS_EXCL
ornf ds:[di].GCDI_flags, mask GCDF_IS_FOCUS
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
GeoCalcDocumentGainedFocus endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentLostFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle losing the focus
CALLED BY: MSG_META_LOST_FOCUS_EXCL
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN: none
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentLostFocus method dynamic GeoCalcDocumentClass,
MSG_META_LOST_FOCUS_EXCL
andnf ds:[di].GCDI_flags, not (mask GCDF_IS_FOCUS)
mov di, offset GeoCalcDocumentClass
GOTO ObjCallSuperNoLock
GeoCalcDocumentLostFocus endm
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CheckEditBarFocus
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: See if the edit bar has the focus
CALLED BY: UTILITY
PASS: *ds:si - geocalc document object
RETURN: carry - clear if edit bar doesn't have focus
DESTROYED: none
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 2/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CheckEditBarFocus proc near
uses si
class GeoCalcDocumentClass
.enter
EC < call ECGeoCalcDocument ;>
;
; Do the quick check to see if we have the focus
; (ie. that the edit bar doesn't). This is the common case.
;
mov si, ds:[si]
add si, ds:[si].GeoCalcDocument_offset
test ds:[si].GCDI_flags, mask GCDF_IS_FOCUS
jnz noEditBarFocus ;branch (carry clear)
;
; We don't have the focus -- see if the edit bar does
;
push ax, cx, di
mov ax, MSG_SSEBC_GET_FLAGS
GetResourceHandleNS GCEditBarControl, bx
mov si, offset GCEditBarControl ;^lbx:si <- OD of display ctrl
mov di, mask MF_CALL or mask MF_FIXUP_DS
call ObjMessage
test cl, mask SSEBCF_IS_FOCUS ;is edit bar focus?
pop ax, cx, di
jz noEditBarFocus ;exit if not
stc ;carry <- edit bar has focus
noEditBarFocus:
.leave
ret
CheckEditBarFocus endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeoCalcDocumentGetFlags
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Get flags for a GeoCalc document
CALLED BY: MSG_GEOCALC_DOCUMENT_GET_FLAGS
PASS: *ds:si - instance data
ds:di - *ds:si
es - seg addr of GeoCalcDocumentClass
ax - the message
RETURN: cl - GeoCalcDocumentFlags
DESTROYED: bx, si, di, ds, es (method handler)
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
gene 2/ 3/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GeoCalcDocumentGetFlags method dynamic GeoCalcDocumentClass,
MSG_GEOCALC_DOCUMENT_GET_FLAGS
mov cl, ds:[di].GCDI_flags ;cl <- GeoCalcDocumentFlags
ret
GeoCalcDocumentGetFlags endm
Document ends
| 26.798387 | 79 | 0.588399 |
c5c27f00e8d07650b163757f9793c05b65eac8ce | 349 | asm | Assembly | programs/oeis/160/A160927.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/160/A160927.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/160/A160927.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A160927: a(n) = n + reversal(n-1).
; 1,3,5,7,9,11,13,15,17,19,12,23,34,45,56,67,78,89,100,111,23,34,45,56,67,78,89,100,111,122,34,45,56,67,78,89,100,111,122,133,45,56,67,78,89,100,111,122,133,144,56,67,78,89,100,111,122,133,144,155,67,78,89,100
mov $1,$0
seq $1,4086 ; Read n backwards (referred to as R(n) in many sequences).
add $0,$1
add $0,1
| 43.625 | 209 | 0.659026 |
3a347a76cb1de77abcf818caf0f5c05178618403 | 609 | asm | Assembly | programs/oeis/087/A087805.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/087/A087805.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/087/A087805.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A087805: Partial sums of b(k) where {b(k)}_{k>=0} = limit n ->infty {A080578(k)-2k : k=2^n,2^n+1,2^n+2,......}.
; 0,1,3,4,6,9,11,12,14,17,19,22,26,29,31,32,34,37,39,42,46,49,51,54,58,61,65,70,74,77,79,80,82,85,87,90,94,97,99,102,106,109,113,118,122,125,127,130,134,137,141,146,150,153,157,162,166,171,177,182,186,189,191
mov $5,$0
mov $7,$0
lpb $5
mov $0,$7
sub $5,1
sub $0,$5
mov $2,$0
mov $6,4
lpb $2
mov $3,1
mov $4,$0
lpb $4
mov $0,0
mov $2,$4
mul $3,2
trn $4,$3
lpe
sub $2,1
add $0,$2
add $6,1
lpe
sub $6,4
add $1,$6
lpe
mov $0,$1
| 21 | 208 | 0.528736 |
47f0ea58930229dae3181f0a94d1b5537093e604 | 475 | asm | Assembly | data/pokemon/base_stats/hoenn/castform_snowy.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | null | null | null | data/pokemon/base_stats/hoenn/castform_snowy.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | null | null | null | data/pokemon/base_stats/hoenn/castform_snowy.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | null | null | null | db 0 ; 351 DEX NO
db 70, 70, 70, 70, 70, 70
; hp atk def spd sat sdf
db ICE, ICE ; type
db 45 ; catch rate
db 145 ; base exp
db MYSTIC_WATER, MYSTIC_WATER ; items
db GENDER_F50 ; gender ratio
db 100 ; unknown 1
db 25 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/hoenn/castform/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_MEDIUM_FAST ; growth rate
dn EGG_FAIRY, EGG_INDETERMINATE ; egg groups
; tm/hm learnset
tmhm
; end
| 21.590909 | 53 | 0.675789 |
e88119a784510726145907dae2762657bfaa2745 | 1,630 | asm | Assembly | Source/Levels/L0407.asm | AbePralle/FGB | 52f004b8d9d4091a2a242a012dc8c1f90d4c160d | [
"MIT"
] | null | null | null | Source/Levels/L0407.asm | AbePralle/FGB | 52f004b8d9d4091a2a242a012dc8c1f90d4c160d | [
"MIT"
] | null | null | null | Source/Levels/L0407.asm | AbePralle/FGB | 52f004b8d9d4091a2a242a012dc8c1f90d4c160d | [
"MIT"
] | null | null | null | ; L0407.asm
; Generated 10.30.2000 by mlevel
; Modified 10.30.2000 by Abe Pralle
INCLUDE "Source/Defs.inc"
INCLUDE "Source/Levels.inc"
;---------------------------------------------------------------------
SECTION "Level0407Section",ROMX
;---------------------------------------------------------------------
L0407_Contents::
DW L0407_Load
DW L0407_Init
DW L0407_Check
DW L0407_Map
;---------------------------------------------------------------------
; Load
;---------------------------------------------------------------------
L0407_Load:
DW ((L0407_LoadFinished - L0407_Load2)) ;size
L0407_Load2:
call ParseMap
ret
L0407_LoadFinished:
;---------------------------------------------------------------------
; Map
;---------------------------------------------------------------------
L0407_Map:
INCBIN "Data/Levels/L0407_bios.lvl"
;---------------------------------------------------------------------
; Init
;---------------------------------------------------------------------
L0407_Init:
DW ((L0407_InitFinished - L0407_Init2)) ;size
L0407_Init2:
ret
L0407_InitFinished:
;---------------------------------------------------------------------
; Check
;---------------------------------------------------------------------
L0407_Check:
DW ((L0407_CheckFinished - L0407_Check2)) ;size
L0407_Check2:
ret
L0407_CheckFinished:
PRINT "0407 Script Sizes (Load/Init/Check) (of $500): "
PRINT (L0407_LoadFinished - L0407_Load2)
PRINT " / "
PRINT (L0407_InitFinished - L0407_Init2)
PRINT " / "
PRINT (L0407_CheckFinished - L0407_Check2)
PRINT "\n"
| 27.166667 | 70 | 0.399387 |
e8b2195531044137678bf315cc34f9f4bc431f47 | 566 | asm | Assembly | oeis/198/A198689.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/198/A198689.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/198/A198689.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A198689: 8*7^n-1.
; 7,55,391,2743,19207,134455,941191,6588343,46118407,322828855,2259801991,15818613943,110730297607,775112083255,5425784582791,37980492079543,265863444556807,1861044111897655,13027308783283591,91191161482985143,638338130380896007,4468366912666272055,31278568388663904391,218949978720647330743,1532649851044531315207,10728548957311719206455,75099842701182034445191,525698898908274241116343,3679892292357919687814407,25759246046505437814700855,180314722325538064702905991,1262203056278766452920341943
mov $1,7
pow $1,$0
mul $1,8
sub $1,1
mov $0,$1
| 62.888889 | 497 | 0.883392 |
14d6b3f907ab7af42da12425408431980ffce868 | 702 | asm | Assembly | oeis/120/A120177.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/120/A120177.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/120/A120177.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A120177: a(1)=9; a(n)=floor((47+sum(a(1) to a(n-1)))/5).
; Submitted by Jamie Morken(s1)
; 9,11,13,16,19,23,27,33,39,47,56,68,81,97,117,140,168,202,242,291,349,419,502,603,723,868,1042,1250,1500,1800,2160,2592,3110,3732,4479,5375,6450,7740,9288,11145,13374,16049,19259,23111,27733,33279,39935,47922,57507,69008,82810,99372,119246,143095,171714,206057,247268,296722,356066,427280,512736,615283,738339,886007,1063209,1275850,1531020,1837224,2204669,2645603,3174724,3809668,4571602,5485922,6583107,7899728,9479674,11375609,13650730,16380876,19657052,23588462,28306154,33967385,40760862
mov $2,32
lpb $0
sub $0,1
add $2,4
mov $1,$2
div $2,5
add $2,$1
lpe
mov $3,$2
div $3,6
add $3,4
mov $0,$3
| 41.294118 | 493 | 0.739316 |
9d069e776579e5bee0df3dfe85b4b928fc5a1a7e | 7,941 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_102.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_0xca.log_21829_102.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_0xca.log_21829_102.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_A_ht+0xf243, %rdx
nop
nop
nop
nop
nop
cmp $61192, %r11
mov (%rdx), %di
nop
nop
nop
add $49913, %r11
lea addresses_A_ht+0x17edb, %rsi
lea addresses_A_ht+0x10434, %rdi
nop
nop
nop
nop
dec %rbx
mov $127, %rcx
rep movsb
nop
nop
nop
add $42551, %rcx
lea addresses_normal_ht+0x11053, %r11
nop
nop
nop
nop
sub %rdx, %rdx
mov (%r11), %ebx
cmp $21037, %rcx
lea addresses_A_ht+0x48c3, %rsi
lea addresses_D_ht+0x66f3, %rdi
nop
nop
nop
nop
nop
inc %r15
mov $59, %rcx
rep movsq
nop
nop
dec %r15
lea addresses_WC_ht+0x10473, %r15
nop
nop
nop
add $34882, %rdi
movl $0x61626364, (%r15)
nop
xor $62577, %r11
lea addresses_WT_ht+0xc9a3, %r11
nop
nop
mfence
mov (%r11), %edx
nop
cmp $45276, %r11
lea addresses_UC_ht+0x2593, %r11
nop
nop
and %rsi, %rsi
mov (%r11), %edi
nop
sub $9685, %rcx
lea addresses_WC_ht+0x55f3, %r15
nop
nop
nop
cmp $31727, %rdx
movw $0x6162, (%r15)
nop
nop
nop
nop
cmp $19322, %rsi
lea addresses_A_ht+0x13c13, %rsi
nop
nop
sub %r15, %r15
mov (%rsi), %r11d
nop
nop
nop
nop
sub %r15, %r15
lea addresses_D_ht+0x144f3, %rbx
nop
nop
add %rsi, %rsi
mov $0x6162636465666768, %r15
movq %r15, %xmm7
movups %xmm7, (%rbx)
nop
nop
nop
nop
nop
sub $3676, %rdx
lea addresses_WC_ht+0x83c3, %rsi
lea addresses_WC_ht+0x6883, %rdi
inc %r10
mov $73, %rcx
rep movsw
nop
nop
nop
nop
nop
and %r10, %r10
lea addresses_WC_ht+0x16323, %rbx
nop
nop
nop
xor %r11, %r11
movw $0x6162, (%rbx)
nop
nop
nop
nop
dec %r15
lea addresses_A_ht+0x15734, %rcx
nop
nop
xor %r11, %r11
movups (%rcx), %xmm6
vpextrq $1, %xmm6, %rsi
nop
and %rdx, %rdx
lea addresses_normal_ht+0x14943, %rsi
lea addresses_WC_ht+0x185ab, %rdi
nop
nop
nop
nop
xor $63342, %r10
mov $55, %rcx
rep movsb
nop
nop
nop
nop
cmp $14275, %rcx
lea addresses_UC_ht+0x1e02, %rsi
lea addresses_A_ht+0x94c3, %rdi
nop
nop
and $7642, %rbx
mov $104, %rcx
rep movsb
nop
nop
nop
cmp $57740, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r8
push %r9
push %rbp
push %rdi
push %rdx
// Store
lea addresses_normal+0x19dc3, %rdi
dec %rbp
movl $0x51525354, (%rdi)
nop
nop
nop
nop
nop
and $17079, %r9
// Faulty Load
lea addresses_UC+0x1d843, %rbp
nop
nop
nop
nop
nop
add %r8, %r8
movups (%rbp), %xmm4
vpextrq $0, %xmm4, %rdi
lea oracles, %r8
and $0xff, %rdi
shlq $12, %rdi
mov (%r8,%rdi,1), %rdi
pop %rdx
pop %rdi
pop %rbp
pop %r9
pop %r8
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_normal', 'same': False, 'AVXalign': False, 'congruent': 6}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_UC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 0}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': True, 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 4}}
{'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_UC_ht', 'same': True, 'AVXalign': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': True, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_UC_ht', 'congruent': 0}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 7}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 32.280488 | 2,999 | 0.656466 |
e911f538443fba89d64fc2c5ecef299d944a369b | 949 | asm | Assembly | mini_crt/ret_addr.asm | habs1337/hack-lib | 4bd4c7182eba5e738d6d1a87daa1d4b37dfae798 | [
"MIT"
] | null | null | null | mini_crt/ret_addr.asm | habs1337/hack-lib | 4bd4c7182eba5e738d6d1a87daa1d4b37dfae798 | [
"MIT"
] | null | null | null | mini_crt/ret_addr.asm | habs1337/hack-lib | 4bd4c7182eba5e738d6d1a87daa1d4b37dfae798 | [
"MIT"
] | null | null | null |
PUBLIC _spoofer_stub
.code
_spoofer_stub PROC
mov r10, r10
xchg r11, r11
pop r11
xchg rdi, rdi
nop
add rsp, 8
xchg rax, rax
jmp next
nop
xchg r10, r10
nop
next:
xchg rax, rax
mov rax, [rsp + 24]
nop
nop
mov r10, [rax]
xchg r11, r11
mov [rsp], r10
nop
jmp next2
mov r10, [rax + 8]
nop
next2:
mov r10, [rax + 8]
nop
mov [rax + 8], r11
xchg r15, r15
mov [rax + 16], rdi
xchg rdi, rdi
lea rdi, fixup
nop
xchg rax, rax
mov [rax], rdi
jmp next3
mov [rax + 16], rdi
mov [rax + 8], r11
nop
next3:
mov rdi, rax
xchg rdi, rdi
mov rdi, rdi
xchg rdi, rdi
mov r10, r10
jmp r10
fixup:
xchg rdi, rdi
sub rsp, 16
xchg rcx, rcx
mov rcx, rdi
nop
mov rdi, [rcx + 16]
mov rcx, rcx
jmp QWORD PTR [rcx + 8]
_spoofer_stub ENDP
END
| 14.164179 | 27 | 0.508957 |
083924e4c8145a990627f26065686ad926811b13 | 583 | asm | Assembly | oeis/077/A077066.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/077/A077066.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/077/A077066.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A077066: Squarefree kernel of prime(n) + 1.
; 3,2,6,2,6,14,6,10,6,30,2,38,42,22,6,6,30,62,34,6,74,10,42,30,14,102,26,6,110,114,2,66,138,70,30,38,158,82,42,174,30,182,6,194,66,10,106,14,114,230,78,30,22,42,258,66,30,34,278,282,142,42,154,78,314,318,166,26,174,70,354,30,46,374,190,6,390,398,402,410,210,422,6,434,110,222,30,458,462,58,78,30,122,246,10,42,510,174,262,542
seq $0,6005 ; The odd prime numbers together with 1.
max $0,2
lpb $0
mov $2,$0
seq $2,71773 ; a(n) = gcd(rad(n), n/rad(n)), where rad(n) = A007947(n) is the squarefree kernel of n.
div $0,$2
lpe
add $0,1
| 48.583333 | 325 | 0.662093 |
c1236a1767513749a9efd26fedb8f5a5509156dd | 5,415 | asm | Assembly | main.asm | PinkFLoyd92/Microcontrollers | 73941b816fb623b0cf76d4406d695c58d94a28c2 | [
"MIT"
] | null | null | null | main.asm | PinkFLoyd92/Microcontrollers | 73941b816fb623b0cf76d4406d695c58d94a28c2 | [
"MIT"
] | null | null | null | main.asm | PinkFLoyd92/Microcontrollers | 73941b816fb623b0cf76d4406d695c58d94a28c2 | [
"MIT"
] | null | null | null | LIST p=16F887 ;Tipo de microcontrolador
INCLUDE P16F887.INC ;Define los SFRs y bits del
;P16F88
__CONFIG _CONFIG1, _CP_OFF&_WDT_OFF&_XT_OSC
;Setea parámetros de
;configuración
errorlevel -302 ;Deshabilita mensajes de
;advertencia por cambio bancos
CBLOCK 0X020
counter_tmr0
counter1
counter2
unidades ;registro de unidades
uni_cod ;Código de 7 segmentos de unidades
contador
decenas
sel
dec_cod
ENDC
;************************START OF PROGRAM *********************** ; forma de iniciar programa que usa interrupciones
org 0x00 ; vector de reset
goto main ; salto a "main"
org 0x04 ; vector de interrupción
goto INTERRUPT ; salto a interrupción
org 0x05 ; continuación de programa
;************************ MAIN PROGRAM *************************
; inicio de programa principal
;***************************************************************
;SETEO DE PUERTOS Y REGISTROS
INTERRUPT
;; btfss INTCON INTF
goto banda1_interrupcion
;; goto banda2_interrupcion
main
banksel ANSEL ;Bank containing register ANSEL
clrf ANSEL ;Clears registers ANSEL and ANSELH
clrf ANSELH ;All pins are digital
clrf sel
CLRF contador
CLRF unidades
CLRF decenas
call banda1_puertos
call habilitarInterrupciones
;; TIMER0 USADO COMO TEMPORIZADOR PARA CONTAR
call banda1_contarProductos
;;------------MAIN********************************************
lazo
call banda2_iniciar
goto lazo
;;****************************funciones************************
banda2_iniciar
btfsc PORTB,5
goto seguir
call banda2_decrementarProducto
seguir
return
;;****************DELAY - *******************************
DELAY
clrf counter2 ; Clears variable "counter2"
loop1
clrf counter1 ; Clears variable "counter1"
loop2
decfsz counter1 ; Decrements variable "counter1" by 1
goto loop2 ; Result is not 0. Go to label loop2
decfsz counter2 ; Decrements variable "counter2" by 1
goto loop1 ; Result is not 0. Go to lab loop1
return ; Return from subroutine "DELAY"
DELAY2
call DELAY
call DELAY
CALL DELAY
return
;;****************Tabla - *******************************
tabla
ADDWF PCL,F ; PCL + W -> PCL
; El PCL se incrementa con el
; valor de W proporcionando un
; salto
RETLW 0x3F ; Retorna con el código del 0
RETLW 0x06 ; Retorna con el código del 1
RETLW 0x5B ; Retorna con el código del 2
RETLW 0x4F ; Retorna con el código del 3
RETLW 0x66 ; Retorna con el código del 4
RETLW 0x6D ; Retorna con el código del 5
RETLW 0x7D ; Retorna con el código del 6
RETLW 0x07 ; Retorna con el código del 7
RETLW 0x7F ; Retorna con el código del 8
RETLW 0x67 ; Retorna con el código del 9
;**********************HABILITAR INTERRUPCIONES*********************
habilitarInterrupciones
banksel INTCON
clrf INTCON ;habilita interrupción
bsf INTCON,GIE ;GIE=1 (BIT 7)
; habilita interrupciones globales
;; bsf INTCON,INTE ;INTE=1 (BIT 4)
; habilita interrupciones por señal INT
bsf INTCON,T0IE ;T0IE01 (BIT 5)
; habilita interrupciones por desbordamiento de TMR0
movlw .100 ;Cantidad de interrupciones a contar
movwf contador ;Nº de veces a repetir la interrupción
return
;;; ***********************BANDA 1********************************
banda1_puertos
banksel TRISC
clrf TRISC ; salidas en el puerto c
banksel TRISB
movlw b'00111111'
movwf TRISB ;PORTB COMO ENTRADAS excepto pin 6 y 7
banksel PORTB
CLRF PORTB
banksel PORTC
clrf PORTC
return
banda1_contarProductos
BANKSEL TMR0
clrf TMR0
BANKSEL OPTION_REG
movlw b'00000111' ;TMR0 como temporizador
movwf OPTION_REG ;con preescaler de 256
BANKSEL TMR0 ;Selecciona el Bank0
movlw .217 ;Valor decimal 217
movwf TMR0 ;Carga el TMR0 con 217
return
banda2_decrementarProducto
call DELAY2
bcf unidades,0
movf unidades,w
call tabla
movwf uni_cod
movf uni_cod,w
bsf PORTB,6
bsf PORTB,7
movwf PORTC
bcf PORTB,6
comf sel,f
return
;; ****************************************INTERRUPCIONES*****************************************
;; banda2_interrupcion
;; call banda2_decrementarProducto
;; bcf INTCON,INTF
;; retfie
banda1_interrupcion
;; *********************CONTANDO PRODUCTOS EN BANDA 1************************
movf sel,w ;Se mueve a si mismo para afectar bandera
btfss STATUS,2 ;sel=0 refresca dig1; sel=1 refresca dig2
goto dig2
dig1
movf unidades,w
call tabla
movwf uni_cod
movf uni_cod,w
bsf PORTB,6
bsf PORTB,7
movwf PORTC
bcf PORTB,6
comf sel,f
goto dec
dig2
movf decenas,w
call tabla
movwf dec_cod
movf dec_cod,w
bsf PORTB,6
bsf PORTB,7
movwf PORTC
bcf PORTB,7
comf sel,f
dec
decfsz contador,f ;cuenta espacios de 10ms
goto Seguir ;Aún, no son 100 interrupciones
INCF unidades,f ;Ahora sí 10x100=1000ms=1seg
movlw .10
subwf unidades,w
btfss STATUS,2
goto cont
clrf unidades
incf decenas
movlw .10
subwf decenas,w
btfss STATUS,2
goto cont
clrf decenas
cont
movlw .100
movwf contador ;Carga contador con 100
Seguir
bcf INTCON,T0IF ;Repone flag del TMR0
movlw ~.39
movwf TMR0 ;Repone el TMR0 con ~.39
retfie
end
| 25.663507 | 125 | 0.620499 |
7a040320a6e7c2eea5896ca792cf0089ae05cdc5 | 7,267 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_499.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_499.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_499.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 %r15
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x3b66, %r13
nop
dec %r11
mov (%r13), %r8d
nop
nop
cmp %r10, %r10
lea addresses_D_ht+0x1878e, %r15
nop
cmp %rax, %rax
mov $0x6162636465666768, %rbx
movq %rbx, %xmm6
movups %xmm6, (%r15)
nop
nop
cmp $61113, %r10
lea addresses_D_ht+0x59b6, %rsi
lea addresses_A_ht+0x124f6, %rdi
clflush (%rsi)
nop
nop
inc %rax
mov $30, %rcx
rep movsw
nop
nop
nop
sub $38800, %rcx
lea addresses_D_ht+0x1cfa6, %rsi
lea addresses_WC_ht+0x1791e, %rdi
nop
nop
nop
nop
add $13718, %rax
mov $86, %rcx
rep movsq
nop
nop
xor $17482, %r15
lea addresses_WT_ht+0x1bc26, %rcx
nop
cmp $62796, %rbx
mov $0x6162636465666768, %r13
movq %r13, %xmm3
vmovups %ymm3, (%rcx)
nop
nop
nop
inc %r13
lea addresses_WC_ht+0x30a6, %r13
nop
nop
inc %r10
mov $0x6162636465666768, %rax
movq %rax, (%r13)
nop
nop
inc %r8
lea addresses_UC_ht+0x30a6, %rbx
nop
nop
nop
nop
nop
and $44565, %r15
mov (%rbx), %r10
nop
nop
nop
nop
nop
add %r11, %r11
lea addresses_A_ht+0x1d436, %rcx
nop
nop
nop
sub %rsi, %rsi
movl $0x61626364, (%rcx)
nop
nop
nop
cmp $29918, %rbx
lea addresses_A_ht+0x40a6, %r13
nop
nop
nop
nop
nop
and %rax, %rax
mov $0x6162636465666768, %rbx
movq %rbx, %xmm3
movups %xmm3, (%r13)
nop
nop
nop
nop
nop
sub $51794, %rsi
lea addresses_WT_ht+0x970b, %rcx
nop
nop
nop
nop
inc %rsi
movb (%rcx), %r11b
nop
nop
nop
cmp $16090, %rbx
lea addresses_WT_ht+0x18ca6, %rsi
lea addresses_WT_ht+0x6fe6, %rdi
clflush (%rsi)
nop
nop
inc %rax
mov $9, %rcx
rep movsq
and %r10, %r10
lea addresses_normal_ht+0x118a6, %rcx
nop
cmp $55713, %rdi
vmovups (%rcx), %ymm3
vextracti128 $0, %ymm3, %xmm3
vpextrq $1, %xmm3, %rax
nop
nop
nop
add %r11, %r11
lea addresses_normal_ht+0x178a6, %r8
dec %rbx
movups (%r8), %xmm3
vpextrq $0, %xmm3, %rsi
nop
nop
cmp $54983, %r15
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r15
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r8
push %r9
push %rax
// Faulty Load
lea addresses_A+0x170a6, %r12
nop
sub $8020, %rax
movb (%r12), %r8b
lea oracles, %r9
and $0xff, %r8
shlq $12, %r8
mov (%r9,%r8,1), %r8
pop %rax
pop %r9
pop %r8
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_A', 'same': True, 'size': 1, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC_ht', 'same': True, 'size': 8, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': True, 'size': 16, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'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
*/
| 34.9375 | 2,999 | 0.658043 |
e2823b794c7614111c4ecff51f512f828f1d6ce4 | 6,644 | asm | Assembly | game-projects/Zedda/Objects/SFX/PaletteFade/PaletteFade.asm | wide-dot/thomson-to8-game-engine | f305368ff28fba6e6bd03d0138a36ff5ea67e925 | [
"Apache-2.0"
] | 11 | 2021-09-07T18:45:06.000Z | 2022-02-15T06:36:19.000Z | game-projects/Zedda/Objects/SFX/PaletteFade/PaletteFade.asm | dougmasten/thomson-to8-game-engine | b1f29e3b650e2296a5058570173e1c9068bccbe4 | [
"Apache-2.0"
] | null | null | null | game-projects/Zedda/Objects/SFX/PaletteFade/PaletteFade.asm | dougmasten/thomson-to8-game-engine | b1f29e3b650e2296a5058570173e1c9068bccbe4 | [
"Apache-2.0"
] | 1 | 2021-11-22T08:43:52.000Z | 2021-11-22T08:43:52.000Z | ; ---------------------------------------------------------------------------
; Object - PaletteFade
;
; input REG : [u] pointeur sur l'objet (SST)
;
; --------------------------------------
;
; Colors
; ------
; Genesis/Megadrive: 8 values for each component (BGR) 0, 2, 4, 6, 8, A, C, E
; RGB space values: 0, 0x24, 0x49, 0x6D, 0x92, 0xB6, 0xDB, 0xFF
; ---------------------------------------------------------------------------
;*******************************************************************************
; Animation de la palette: fondu vers une couleur cible PAL_TO
;*******************************************************************************
; Ecriture en $E7DB de l'adresse ou sera stockee la couleur.
;
; les adresses vont de deux en deux car il y a deux octets a stocker par couleur.
; couleur: 0, adresse: 00
; couleur: 1, adresse: 02
; couleur: 2, adresse: 04
; ...
;
; Deux ecritures en $E7DA (auto-increment a partir de l'adresse couleur
; positionnee en $E7DB) pour la valeur de couleur.
;
; V V V V R R R R
; Premiere adresse fondamentale V fondamentale R
;
; Deuxieme adresse X X X M B B B B
; auto-incrementee bit de marquage fondamentale B
; (incrustation video)
;
; Attention: les instructions suivantes effectuent une lecture avant l'ecriture
; ASL, ASR, CLR, COM, DEL, INC, LSL, LSR, NEG, ROL, RDR
; un seul appel sur $E7DA va lire $E7DA puis ecrire sur la seconde adresse $E7DA
; Sur $E7DA il faut donc utiliser l'instruction ST pour ecrire
;*******************************************************************************
INCLUDE "./Engine/Macros.asm"
INCLUDE "./Objects/SFX/PaletteFade/PaletteFade.idx"
PaletteFade
lda routine,u
asla
ldx #PaletteFade_Routines
jmp [a,x]
PaletteFade_Routines
fdb PaletteFade_Init
fdb PaletteFade_Main
fdb PaletteFade_Wait
PaletteFade_Init
inc routine,u
ldd #$100F
sta pal_cycles,u
stb pal_mask,u
ldy pal_src,u
cmpy #Dyn_palette * Source pal is already current pal, no copy
beq PaletteFade_Main
ldx #Dyn_palette
ldd ,y
std ,x
ldd 2,y
std 2,x
ldd 4,y
std 4,x
ldd 6,y
std 6,x
ldd 8,y
std 8,x
ldd 10,y
std 10,x
ldd 12,y
std 12,x
ldd 14,y
std 14,x
ldd 16,y
std 16,x
ldd 18,y
std 18,x
ldd 20,y
std 20,x
ldd 22,y
std 22,x
ldd 24,y
std 24,x
ldd 26,y
std 26,x
ldd 28,y
std 28,x
ldd 30,y
std 30,x
PaletteFade_Main
lda subtype,u
sta pal_wait_frame,u
ldx pal_dst,u
ldy #Dyn_palette
lda #$10
sta pal_idx,u
dec pal_cycles,u * decremente le compteur du nombre de frame
bne PFA_Loop * on reboucle si nombre de frame n'est pas realise
jmp ClearObj * auto-destruction de l'objet
PFA_Loop
lda ,y * chargement de la composante verte et rouge
anda pal_mask,u * on efface la valeur vert ou rouge par masque
ldb ,x * composante verte et rouge couleur cible
andb pal_mask,u * on efface la valeur vert ou rouge par masque
stb pal_buffer,u * on stocke la valeur cible pour comparaison
ldb #$11 * preparation de la valeur d'increment de couleur
andb pal_mask,u * on efface la valeur non utile par masque
stb pal_buffer+1,u * on stocke la valeur pour ADD ou SUB ulterieur
cmpa pal_buffer,u * comparaison de la composante courante et cible
beq PFA_VRSuivante * si composante est egale a la cible on passe
bhi PFA_VRDec * si la composante est superieure on branche
lda ,y * on recharge la valeur avec vert et rouge
adda pal_buffer+1,u * on incremente la composante verte ou rouge
bra PFA_VRSave * on branche pour sauvegarder
PFA_VRDec
lda ,y * on recharge la valeur avec vert et rouge
suba pal_buffer+1,u * on decremente la composante verte ou rouge
PFA_VRSave
sta ,y * sauvegarde de la nouvelle valeur vert ou rouge
PFA_VRSuivante
com pal_mask,u * inversion du masque pour traiter l'autre semioctet
bmi PFA_Loop * si on traite $F0 on branche sinon on continue
PFA_SetPalBleu
ldb 1,y * chargement composante bleue courante
cmpb 1,x * comparaison composante courante et cible
beq PFA_SetPalNext * si composante est egale a la cible on passe
bhi PFA_SetPalBleudec * si la composante est superieure on branche
incb * on incremente la composante bleue
bra PFA_SetPalSaveBleu * on branche pour sauvegarder
PFA_SetPalBleudec
decb * on decremente la composante bleue
PFA_SetPalSaveBleu
stb 1,y * sauvegarde de la nouvelle valeur bleue
PFA_SetPalNext
leay 2,y * on avance le pointeur vers la nouvelle couleur source
leax 2,x * on avance le pointeur vers la nouvelle couleur dest
dec pal_idx,u
bne PFA_Loop * on reboucle si fin de liste pas atteinte
ldd #Dyn_palette
std Cur_palette
clr Refresh_palette * will call refresh palette after next VBL
inc routine,u
rts
PaletteFade_Wait
lda pal_wait_frame,u
bne @a
dec routine,u
bra PaletteFade_Main
@a dec pal_wait_frame,u
rts | 41.012346 | 135 | 0.481487 |
d304da34ebc264ab59a4f89215b4baaf2910edac | 926 | asm | Assembly | count.asm | everythng/C-ASM. | 91476cbc3ff9d26f7a3104b50b3e8850a35237d9 | [
"MIT"
] | 5 | 2019-03-28T23:40:51.000Z | 2019-04-01T22:57:57.000Z | count.asm | everythng/C-ASM. | 91476cbc3ff9d26f7a3104b50b3e8850a35237d9 | [
"MIT"
] | 1 | 2019-03-21T07:51:39.000Z | 2019-03-21T07:51:39.000Z | count.asm | everythng/C-ASM. | 91476cbc3ff9d26f7a3104b50b3e8850a35237d9 | [
"MIT"
] | 1 | 2019-03-21T06:44:39.000Z | 2019-03-21T06:44:39.000Z | %macro exit 0
mov eax, 1
xor ebx, ebx
int 0x80
%endmacro
section .rodata
n db 0xa
%macro write_nl 0
mov eax, 4
mov ebx, 1
mov edx, 1
mov ecx, n
int 0x80
%endmacro
section .bss
num resb 10
section .text
global _start
_start:
xor ecx,ecx
.loop:
inc ecx
add ecx, '0'
mov [num], ecx
push ecx
mov eax, 4
mov ebx, 1
mov edx, 1
mov ecx, num
int 0x80
pop ecx
sub ecx, '0'
cmp ecx, 9
jne .loop
write_nl
exit
| 18.156863 | 31 | 0.305616 |
85cd1c714a1d49326c047ae56f80bcaccbe72c17 | 777 | asm | Assembly | programs/oeis/204/A204766.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/204/A204766.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/204/A204766.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A204766: a(n) = 167*(n-1)-a(n-1) with n>1, a(1)=13.
; 13,154,180,321,347,488,514,655,681,822,848,989,1015,1156,1182,1323,1349,1490,1516,1657,1683,1824,1850,1991,2017,2158,2184,2325,2351,2492,2518,2659,2685,2826,2852,2993,3019,3160,3186,3327,3353,3494,3520,3661,3687,3828,3854,3995,4021,4162,4188,4329,4355,4496,4522,4663,4689,4830,4856,4997,5023,5164,5190,5331,5357,5498,5524,5665,5691,5832,5858,5999,6025,6166,6192,6333,6359,6500,6526,6667,6693,6834,6860,7001,7027,7168,7194,7335,7361,7502,7528,7669,7695,7836,7862,8003,8029,8170,8196,8337
mov $3,$0
add $0,1
mov $1,4
mov $2,4
mov $4,2
lpb $0
div $0,2
mul $0,2
trn $0,1
add $1,$2
add $1,9
add $4,34
lpe
sub $4,1
add $1,$4
mov $6,$4
sub $6,2
mul $6,2
add $1,$6
sub $1,105
mov $5,$3
mul $5,26
add $1,$5
mov $0,$1
| 27.75 | 488 | 0.688546 |
d53a1b309e99d58df3855af2f64b91df5cf720ae | 78,988 | asm | Assembly | Palmtree.Math.Core.Sint/vs_build/x64_Debug/TEST_op_GreatestCommonDivisor.asm | rougemeilland/Palmtree.Math.Core.Sint | 0895fd4988b146f01ec705e091ef3fd79a721b40 | [
"MIT"
] | null | null | null | Palmtree.Math.Core.Sint/vs_build/x64_Debug/TEST_op_GreatestCommonDivisor.asm | rougemeilland/Palmtree.Math.Core.Sint | 0895fd4988b146f01ec705e091ef3fd79a721b40 | [
"MIT"
] | null | null | null | Palmtree.Math.Core.Sint/vs_build/x64_Debug/TEST_op_GreatestCommonDivisor.asm | rougemeilland/Palmtree.Math.Core.Sint | 0895fd4988b146f01ec705e091ef3fd79a721b40 | [
"MIT"
] | null | null | null | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM uint_number_zero:QWORD
COMM uint_number_one:QWORD
_DATA 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
__059414E1_pmc_sint_debug@h DB 01H
__8C95CAB4_test_op_greatestcommondivisor@c DB 01H
msvcjmc ENDS
PUBLIC TEST_GreatestCommonDivisor_I_X
PUBLIC TEST_GreatestCommonDivisor_L_X
PUBLIC TEST_GreatestCommonDivisor_UX_X
PUBLIC TEST_GreatestCommonDivisor_X_I
PUBLIC TEST_GreatestCommonDivisor_X_L
PUBLIC TEST_GreatestCommonDivisor_X_UX
PUBLIC TEST_GreatestCommonDivisor_X_X
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@ ; `string'
PUBLIC ??_C@_1EE@HMCBFGEH@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1FK@DEBGJFKO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@ ; `string'
PUBLIC ??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@ ; `string'
PUBLIC ??_C@_1EE@JEACKNDP@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1FK@GPIIGGDA@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1EG@IFNFFAEE@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1FM@CNBBCJNO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1EE@HMONMDO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1FK@GIINEDIJ@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1EE@CMEEAMCB@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1FK@CAMBNOBM@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1EG@LLHOJFEG@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1FM@KKPEGHPO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1EK@HDEICNAJ@?$AAP?$AAM?$AAC?$AA_?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr@ ; `string'
PUBLIC ??_C@_1EE@ICGPEMFN@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
PUBLIC ??_C@_1FK@NKICKOAJ@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ ; `string'
EXTRN TEST_Assert:PROC
EXTRN FormatTestLabel:PROC
EXTRN FormatTestMesssage:PROC
EXTRN _RTC_CheckStackVars:PROC
EXTRN _RTC_InitBase:PROC
EXTRN _RTC_Shutdown:PROC
EXTRN __CheckForDebuggerJustMyCode:PROC
EXTRN __GSHandlerCheck:PROC
EXTRN __security_check_cookie:PROC
EXTRN __security_cookie:QWORD
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_GreatestCommonDivisor_I_X DD imagerel $LN14
DD imagerel $LN14+746
DD imagerel $unwind$TEST_GreatestCommonDivisor_I_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_GreatestCommonDivisor_L_X DD imagerel $LN14
DD imagerel $LN14+747
DD imagerel $unwind$TEST_GreatestCommonDivisor_L_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_GreatestCommonDivisor_UX_X DD imagerel $LN17
DD imagerel $LN17+913
DD imagerel $unwind$TEST_GreatestCommonDivisor_UX_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_GreatestCommonDivisor_X_I DD imagerel $LN14
DD imagerel $LN14+746
DD imagerel $unwind$TEST_GreatestCommonDivisor_X_I
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_GreatestCommonDivisor_X_L DD imagerel $LN14
DD imagerel $LN14+747
DD imagerel $unwind$TEST_GreatestCommonDivisor_X_L
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_GreatestCommonDivisor_X_UX DD imagerel $LN17
DD imagerel $LN17+913
DD imagerel $unwind$TEST_GreatestCommonDivisor_X_UX
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$TEST_GreatestCommonDivisor_X_X DD imagerel $LN17
DD imagerel $LN17+919
DD imagerel $unwind$TEST_GreatestCommonDivisor_X_X
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_EQUALS_MEMORY DD imagerel _EQUALS_MEMORY
DD imagerel _EQUALS_MEMORY+198
DD imagerel $unwind$_EQUALS_MEMORY
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@_1FK@NKICKOAJ@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1FK@NKICKOAJ@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'X', 00H, '_', 00H, 'X', 00H, 'n0', 0a9H, '_'
DB '0^', 0b3H, '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H, '_', 01aH
DB 090H, 08aH, '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')', 00H, 00H
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EE@ICGPEMFN@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1EE@ICGPEMFN@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'X', 00H, '_', 00H, 'X', 00H, ' ', 00H, '('
DB 00H, '%', 00H, 'd', 00H, '.', 00H, '%', 00H, 'd', 00H, ')', 00H
DB 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EK@HDEICNAJ@?$AAP?$AAM?$AAC?$AA_?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr@
CONST SEGMENT
??_C@_1EK@HDEICNAJ@?$AAP?$AAM?$AAC?$AA_?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr@ DB 'P'
DB 00H, 'M', 00H, 'C', 00H, '_', 00H, 'F', 00H, 'r', 00H, 'o', 00H
DB 'm', 00H, 'B', 00H, 'y', 00H, 't', 00H, 'e', 00H, 'A', 00H, 'r'
DB 00H, 'r', 00H, 'a', 00H, 'y', 00H, 'n0', 0a9H, '_0^', 0b3H, '0'
DB 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H, '_', 01aH, 090H, 08aH
DB '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1FM@KKPEGHPO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1FM@KKPEGHPO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'X', 00H, '_', 00H, 'U', 00H, 'X', 00H, 'n'
DB '0', 0a9H, '_0^', 0b3H, '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H
DB '_', 01aH, 090H, 08aH, '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')'
DB 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EG@LLHOJFEG@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1EG@LLHOJFEG@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'X', 00H, '_', 00H, 'U', 00H, 'X', 00H, ' '
DB 00H, '(', 00H, '%', 00H, 'd', 00H, '.', 00H, '%', 00H, 'd', 00H
DB ')', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1FK@CAMBNOBM@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1FK@CAMBNOBM@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'X', 00H, '_', 00H, 'L', 00H, 'n0', 0a9H, '_'
DB '0^', 0b3H, '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H, '_', 01aH
DB 090H, 08aH, '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')', 00H, 00H
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EE@CMEEAMCB@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1EE@CMEEAMCB@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'X', 00H, '_', 00H, 'L', 00H, ' ', 00H, '('
DB 00H, '%', 00H, 'd', 00H, '.', 00H, '%', 00H, 'd', 00H, ')', 00H
DB 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1FK@GIINEDIJ@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1FK@GIINEDIJ@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'X', 00H, '_', 00H, 'I', 00H, 'n0', 0a9H, '_'
DB '0^', 0b3H, '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H, '_', 01aH
DB 090H, 08aH, '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')', 00H, 00H
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EE@HMONMDO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1EE@HMONMDO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'X', 00H, '_', 00H, 'I', 00H, ' ', 00H, '('
DB 00H, '%', 00H, 'd', 00H, '.', 00H, '%', 00H, 'd', 00H, ')', 00H
DB 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1FM@CNBBCJNO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1FM@CNBBCJNO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'U', 00H, 'X', 00H, '_', 00H, 'X', 00H, 'n'
DB '0', 0a9H, '_0^', 0b3H, '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H
DB '_', 01aH, 090H, 08aH, '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')'
DB 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EG@IFNFFAEE@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1EG@IFNFFAEE@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'U', 00H, 'X', 00H, '_', 00H, 'X', 00H, ' '
DB 00H, '(', 00H, '%', 00H, 'd', 00H, '.', 00H, '%', 00H, 'd', 00H
DB ')', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1FK@GPIIGGDA@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1FK@GPIIGGDA@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'L', 00H, '_', 00H, 'X', 00H, 'n0', 0a9H, '_'
DB '0^', 0b3H, '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H, '_', 01aH
DB 090H, 08aH, '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')', 00H, 00H
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EE@JEACKNDP@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1EE@JEACKNDP@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'L', 00H, '_', 00H, 'X', 00H, ' ', 00H, '('
DB 00H, '%', 00H, 'd', 00H, '.', 00H, '%', 00H, 'd', 00H, ')', 00H
DB 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@
CONST SEGMENT
??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@ DB 0c7H
DB '0', 0fcH, '0', 0bfH, '0n0', 085H, 'Q', 0b9H, '[L0', 00H, 'N', 0f4H
DB 081H, 'W0j0D0', 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@
CONST SEGMENT
??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@ DB 'T'
DB 00H, 'o', 00H, 'B', 00H, 'y', 00H, 't', 00H, 'e', 00H, 'A', 00H
DB 'r', 00H, 'r', 00H, 'a', 00H, 'y', 00H, 'n0', 0a9H, '_0^', 0b3H
DB '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H, '_', 01aH, 090H, 08aH
DB '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')', 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1FK@DEBGJFKO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1FK@DEBGJFKO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'I', 00H, '_', 00H, 'X', 00H, 'n0', 0a9H, '_'
DB '0^', 0b3H, '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H, '_', 01aH
DB 090H, 08aH, '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')', 00H, 00H
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EE@HMCBFGEH@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
CONST SEGMENT
??_C@_1EE@HMCBFGEH@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@ DB 'G'
DB 00H, 'r', 00H, 'e', 00H, 'a', 00H, 't', 00H, 'e', 00H, 's', 00H
DB 't', 00H, 'C', 00H, 'o', 00H, 'm', 00H, 'm', 00H, 'o', 00H, 'n'
DB 00H, 'D', 00H, 'i', 00H, 'v', 00H, 'i', 00H, 's', 00H, 'o', 00H
DB 'r', 00H, '_', 00H, 'I', 00H, '_', 00H, 'X', 00H, ' ', 00H, '('
DB 00H, '%', 00H, 'd', 00H, '.', 00H, '%', 00H, 'd', 00H, ')', 00H
DB 00H, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
CONST SEGMENT
??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@ DB 'F'
DB 00H, 'r', 00H, 'o', 00H, 'm', 00H, 'B', 00H, 'y', 00H, 't', 00H
DB 'e', 00H, 'A', 00H, 'r', 00H, 'r', 00H, 'a', 00H, 'y', 00H, 'n'
DB '0', 0a9H, '_0^', 0b3H, '0', 0fcH, '0', 0c9H, '0L0', 01fH, 'g', 085H
DB '_', 01aH, 090H, 08aH, '0g0o0j0D0(', 00H, '%', 00H, 'd', 00H, ')'
DB 00H, 00H, 00H ; `string'
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_EQUALS_MEMORY DD 025053901H
DD 011d2322H
DD 07016001dH
DD 05015H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_GreatestCommonDivisor_X_X DD 025054a19H
DD 011d2322H
DD 07016007bH
DD 05015H
DD imagerel __GSHandlerCheck
DD 03c0H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
TEST_GreatestCommonDivisor_X_X$rtcName$0 DB 075H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_X_X$rtcName$1 DB 076H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_X_X$rtcName$2 DB 077H
DB 00H
ORG $+6
TEST_GreatestCommonDivisor_X_X$rtcName$3 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 07aH
DB 05fH
DB 062H
DB 075H
DB 066H
DB 00H
ORG $+3
TEST_GreatestCommonDivisor_X_X$rtcName$4 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 07aH
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 073H
DB 069H
DB 07aH
DB 065H
DB 00H
ORG $+14
TEST_GreatestCommonDivisor_X_X$rtcVarDesc DD 01a8H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_X$rtcName$4
DD 090H
DD 0100H
DQ FLAT:TEST_GreatestCommonDivisor_X_X$rtcName$3
DD 068H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_X$rtcName$2
DD 048H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_X$rtcName$1
DD 028H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_X$rtcName$0
ORG $+240
TEST_GreatestCommonDivisor_X_X$rtcFrameData DD 05H
DD 00H
DQ FLAT:TEST_GreatestCommonDivisor_X_X$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_GreatestCommonDivisor_X_UX DD 025054a19H
DD 011d2322H
DD 07016007bH
DD 05015H
DD imagerel __GSHandlerCheck
DD 03c0H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
TEST_GreatestCommonDivisor_X_UX$rtcName$0 DB 075H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_X_UX$rtcName$1 DB 076H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_X_UX$rtcName$2 DB 077H
DB 00H
ORG $+6
TEST_GreatestCommonDivisor_X_UX$rtcName$3 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 07aH
DB 05fH
DB 062H
DB 075H
DB 066H
DB 00H
ORG $+3
TEST_GreatestCommonDivisor_X_UX$rtcName$4 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 07aH
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 073H
DB 069H
DB 07aH
DB 065H
DB 00H
ORG $+14
TEST_GreatestCommonDivisor_X_UX$rtcVarDesc DD 01a8H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_UX$rtcName$4
DD 090H
DD 0100H
DQ FLAT:TEST_GreatestCommonDivisor_X_UX$rtcName$3
DD 068H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_UX$rtcName$2
DD 048H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_UX$rtcName$1
DD 028H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_UX$rtcName$0
ORG $+240
TEST_GreatestCommonDivisor_X_UX$rtcFrameData DD 05H
DD 00H
DQ FLAT:TEST_GreatestCommonDivisor_X_UX$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_GreatestCommonDivisor_X_L DD 025054a19H
DD 011d2322H
DD 07016005bH
DD 05015H
DD imagerel __GSHandlerCheck
DD 02c0H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
TEST_GreatestCommonDivisor_X_L$rtcName$0 DB 075H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_X_L$rtcName$1 DB 077H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_X_L$rtcName$2 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 00H
ORG $+3
TEST_GreatestCommonDivisor_X_L$rtcName$3 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 073H
DB 069H
DB 07aH
DB 065H
DB 00H
ORG $+6
TEST_GreatestCommonDivisor_X_L$rtcVarDesc DD 0188H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_L$rtcName$3
DD 070H
DD 0100H
DQ FLAT:TEST_GreatestCommonDivisor_X_L$rtcName$2
DD 048H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_L$rtcName$1
DD 028H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_L$rtcName$0
ORG $+192
TEST_GreatestCommonDivisor_X_L$rtcFrameData DD 04H
DD 00H
DQ FLAT:TEST_GreatestCommonDivisor_X_L$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_GreatestCommonDivisor_X_I DD 025054a19H
DD 011d2322H
DD 07016005bH
DD 05015H
DD imagerel __GSHandlerCheck
DD 02c0H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
TEST_GreatestCommonDivisor_X_I$rtcName$0 DB 075H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_X_I$rtcName$1 DB 077H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_X_I$rtcName$2 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 00H
ORG $+3
TEST_GreatestCommonDivisor_X_I$rtcName$3 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 073H
DB 069H
DB 07aH
DB 065H
DB 00H
ORG $+6
TEST_GreatestCommonDivisor_X_I$rtcVarDesc DD 0188H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_I$rtcName$3
DD 070H
DD 0100H
DQ FLAT:TEST_GreatestCommonDivisor_X_I$rtcName$2
DD 048H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_I$rtcName$1
DD 028H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_X_I$rtcName$0
ORG $+192
TEST_GreatestCommonDivisor_X_I$rtcFrameData DD 04H
DD 00H
DQ FLAT:TEST_GreatestCommonDivisor_X_I$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_GreatestCommonDivisor_UX_X DD 025054a19H
DD 011d2322H
DD 07016007bH
DD 05015H
DD imagerel __GSHandlerCheck
DD 03c0H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
TEST_GreatestCommonDivisor_UX_X$rtcName$0 DB 075H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_UX_X$rtcName$1 DB 076H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_UX_X$rtcName$2 DB 077H
DB 00H
ORG $+6
TEST_GreatestCommonDivisor_UX_X$rtcName$3 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 00H
ORG $+3
TEST_GreatestCommonDivisor_UX_X$rtcName$4 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 073H
DB 069H
DB 07aH
DB 065H
DB 00H
ORG $+14
TEST_GreatestCommonDivisor_UX_X$rtcVarDesc DD 01a8H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_UX_X$rtcName$4
DD 090H
DD 0100H
DQ FLAT:TEST_GreatestCommonDivisor_UX_X$rtcName$3
DD 068H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_UX_X$rtcName$2
DD 048H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_UX_X$rtcName$1
DD 028H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_UX_X$rtcName$0
ORG $+240
TEST_GreatestCommonDivisor_UX_X$rtcFrameData DD 05H
DD 00H
DQ FLAT:TEST_GreatestCommonDivisor_UX_X$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_GreatestCommonDivisor_L_X DD 025054a19H
DD 011d2322H
DD 07016005bH
DD 05015H
DD imagerel __GSHandlerCheck
DD 02c0H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
TEST_GreatestCommonDivisor_L_X$rtcName$0 DB 076H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_L_X$rtcName$1 DB 077H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_L_X$rtcName$2 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 00H
ORG $+3
TEST_GreatestCommonDivisor_L_X$rtcName$3 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 073H
DB 069H
DB 07aH
DB 065H
DB 00H
ORG $+6
TEST_GreatestCommonDivisor_L_X$rtcVarDesc DD 0188H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_L_X$rtcName$3
DD 070H
DD 0100H
DQ FLAT:TEST_GreatestCommonDivisor_L_X$rtcName$2
DD 048H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_L_X$rtcName$1
DD 028H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_L_X$rtcName$0
ORG $+192
TEST_GreatestCommonDivisor_L_X$rtcFrameData DD 04H
DD 00H
DQ FLAT:TEST_GreatestCommonDivisor_L_X$rtcVarDesc
CONST ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$TEST_GreatestCommonDivisor_I_X DD 025054a19H
DD 011d2322H
DD 07016005bH
DD 05015H
DD imagerel __GSHandlerCheck
DD 02c0H
xdata ENDS
; COMDAT CONST
CONST SEGMENT
TEST_GreatestCommonDivisor_I_X$rtcName$0 DB 076H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_I_X$rtcName$1 DB 077H
DB 00H
ORG $+2
TEST_GreatestCommonDivisor_I_X$rtcName$2 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 00H
ORG $+3
TEST_GreatestCommonDivisor_I_X$rtcName$3 DB 061H
DB 063H
DB 074H
DB 075H
DB 061H
DB 06cH
DB 05fH
DB 077H
DB 05fH
DB 062H
DB 075H
DB 066H
DB 05fH
DB 073H
DB 069H
DB 07aH
DB 065H
DB 00H
ORG $+6
TEST_GreatestCommonDivisor_I_X$rtcVarDesc DD 0188H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_I_X$rtcName$3
DD 070H
DD 0100H
DQ FLAT:TEST_GreatestCommonDivisor_I_X$rtcName$2
DD 048H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_I_X$rtcName$1
DD 028H
DD 08H
DQ FLAT:TEST_GreatestCommonDivisor_I_X$rtcName$0
ORG $+192
TEST_GreatestCommonDivisor_I_X$rtcFrameData DD 04H
DD 00H
DQ FLAT:TEST_GreatestCommonDivisor_I_X$rtcVarDesc
CONST 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.sint\palmtree.math.core.sint\pmc_sint_debug.h
; COMDAT _EQUALS_MEMORY
_TEXT SEGMENT
buffer1$ = 224
count1$ = 232
buffer2$ = 240
count2$ = 248
_EQUALS_MEMORY PROC ; COMDAT
; 140 : {
mov QWORD PTR [rsp+32], r9
mov QWORD PTR [rsp+24], r8
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:__059414E1_pmc_sint_debug@h
call __CheckForDebuggerJustMyCode
; 141 : if (count1 != count2)
mov rax, QWORD PTR count2$[rbp]
cmp QWORD PTR count1$[rbp], rax
je SHORT $LN4@EQUALS_MEM
; 142 : return (-1);
mov eax, -1
jmp SHORT $LN1@EQUALS_MEM
$LN4@EQUALS_MEM:
$LN2@EQUALS_MEM:
; 143 : while (count1 > 0)
cmp QWORD PTR count1$[rbp], 0
jbe SHORT $LN3@EQUALS_MEM
; 144 : {
; 145 : if (*buffer1 != *buffer2)
mov rax, QWORD PTR buffer1$[rbp]
movzx eax, BYTE PTR [rax]
mov rcx, QWORD PTR buffer2$[rbp]
movzx ecx, BYTE PTR [rcx]
cmp eax, ecx
je SHORT $LN5@EQUALS_MEM
; 146 : return (-1);
mov eax, -1
jmp SHORT $LN1@EQUALS_MEM
$LN5@EQUALS_MEM:
; 147 : ++buffer1;
mov rax, QWORD PTR buffer1$[rbp]
inc rax
mov QWORD PTR buffer1$[rbp], rax
; 148 : ++buffer2;
mov rax, QWORD PTR buffer2$[rbp]
inc rax
mov QWORD PTR buffer2$[rbp], rax
; 149 : --count1;
mov rax, QWORD PTR count1$[rbp]
dec rax
mov QWORD PTR count1$[rbp], rax
; 150 : }
jmp SHORT $LN2@EQUALS_MEM
$LN3@EQUALS_MEM:
; 151 : return (0);
xor eax, eax
$LN1@EQUALS_MEM:
; 152 : }
lea rsp, QWORD PTR [rbp+200]
pop rdi
pop rbp
ret 0
_EQUALS_MEMORY ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\test_op_greatestcommondivisor.c
; COMDAT TEST_GreatestCommonDivisor_X_X
_TEXT SEGMENT
u$ = 8
v$ = 40
w$ = 72
actual_z_buf$ = 112
actual_z_buf_size$ = 392
result$ = 420
u_result$ = 452
v_result$ = 484
w_result$ = 516
tv177 = 916
tv162 = 916
tv142 = 916
tv92 = 916
tv74 = 916
tv151 = 920
tv132 = 920
tv82 = 920
tv64 = 920
__$ArrayPad$ = 928
env$ = 976
ep$ = 984
no$ = 992
u_buf$ = 1000
u_buf_size$ = 1008
v_buf$ = 1016
v_buf_size$ = 1024
desired_status$ = 1032
desired_w_buf$ = 1040
desired_w_buf_size$ = 1048
TEST_GreatestCommonDivisor_X_X PROC ; COMDAT
; 173 : {
$LN17:
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, 984 ; 000003d8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 246 ; 000000f6H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+1016]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__8C95CAB4_test_op_greatestcommondivisor@c
call __CheckForDebuggerJustMyCode
; 174 : PMC_HANDLE_SINT u;
; 175 : PMC_HANDLE_SINT v;
; 176 : PMC_HANDLE_UINT w;
; 177 : unsigned char actual_z_buf[256];
; 178 : size_t actual_z_buf_size;
; 179 : PMC_STATUS_CODE result;
; 180 : PMC_STATUS_CODE u_result;
; 181 : PMC_STATUS_CODE v_result;
; 182 : PMC_STATUS_CODE w_result;
; 183 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_X (%d.%d)", no, 1), (u_result = ep->FromByteArray(u_buf, u_buf_size, &u)) == PMC_STATUS_OK, FormatTestMesssage(L"PMC_FromByteArrayの復帰コードが期待通りではない(%d)", u_result));
lea r8, QWORD PTR u$[rbp]
mov rdx, QWORD PTR u_buf_size$[rbp]
mov rcx, QWORD PTR u_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+608]
mov DWORD PTR u_result$[rbp], eax
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN7@TEST_Great
mov DWORD PTR tv74[rbp], 1
jmp SHORT $LN8@TEST_Great
$LN7@TEST_Great:
mov DWORD PTR tv74[rbp], 0
$LN8@TEST_Great:
mov edx, DWORD PTR u_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EK@HDEICNAJ@?$AAP?$AAM?$AAC?$AA_?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr@
call FormatTestMesssage
mov QWORD PTR tv64[rbp], rax
mov r8d, 1
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@ICGPEMFN@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv64[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv74[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 184 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_X (%d.%d)", no, 2), (v_result = ep->FromByteArray(v_buf, v_buf_size, &v)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", v_result));
lea r8, QWORD PTR v$[rbp]
mov rdx, QWORD PTR v_buf_size$[rbp]
mov rcx, QWORD PTR v_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+608]
mov DWORD PTR v_result$[rbp], eax
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN9@TEST_Great
mov DWORD PTR tv92[rbp], 1
jmp SHORT $LN10@TEST_Great
$LN9@TEST_Great:
mov DWORD PTR tv92[rbp], 0
$LN10@TEST_Great:
mov edx, DWORD PTR v_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv82[rbp], rax
mov r8d, 2
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@ICGPEMFN@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv82[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv92[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 185 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_X (%d.%d)", no, 3), (w_result = ep->GreatestCommonDivisor_X_X(u, v, &w)) == desired_status, FormatTestMesssage(L"GreatestCommonDivisor_X_Xの復帰コードが期待通りではない(%d)", w_result));
lea r8, QWORD PTR w$[rbp]
mov rdx, QWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+1048]
mov DWORD PTR w_result$[rbp], eax
mov eax, DWORD PTR desired_status$[rbp]
cmp DWORD PTR w_result$[rbp], eax
jne SHORT $LN11@TEST_Great
mov DWORD PTR tv142[rbp], 1
jmp SHORT $LN12@TEST_Great
$LN11@TEST_Great:
mov DWORD PTR tv142[rbp], 0
$LN12@TEST_Great:
mov edx, DWORD PTR w_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1FK@NKICKOAJ@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestMesssage
mov QWORD PTR tv132[rbp], rax
mov r8d, 3
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@ICGPEMFN@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv132[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv142[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 186 : if (desired_status == PMC_STATUS_OK)
cmp DWORD PTR desired_status$[rbp], 0
jne $LN2@TEST_Great
; 187 : {
; 188 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_X (%d.%d)", no, 4), (result = ep->UINT_ENTRY_POINTS.ToByteArray(w, actual_z_buf, sizeof(actual_z_buf), &actual_z_buf_size)) == PMC_STATUS_OK, FormatTestMesssage(L"ToByteArrayの復帰コードが期待通りではない(%d)", result));
lea r9, QWORD PTR actual_z_buf_size$[rbp]
mov r8d, 256 ; 00000100H
lea rdx, QWORD PTR actual_z_buf$[rbp]
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+56]
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
jne SHORT $LN13@TEST_Great
mov DWORD PTR tv162[rbp], 1
jmp SHORT $LN14@TEST_Great
$LN13@TEST_Great:
mov DWORD PTR tv162[rbp], 0
$LN14@TEST_Great:
mov edx, DWORD PTR result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@
call FormatTestMesssage
mov QWORD PTR tv151[rbp], rax
mov r8d, 4
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@ICGPEMFN@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv151[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv162[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 189 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_X (%d.%d)", no, 5), _EQUALS_MEMORY(actual_z_buf, actual_z_buf_size, desired_w_buf, desired_w_buf_size) == 0, L"データの内容が一致しない");
mov r9, QWORD PTR desired_w_buf_size$[rbp]
mov r8, QWORD PTR desired_w_buf$[rbp]
mov rdx, QWORD PTR actual_z_buf_size$[rbp]
lea rcx, QWORD PTR actual_z_buf$[rbp]
call _EQUALS_MEMORY
test eax, eax
jne SHORT $LN15@TEST_Great
mov DWORD PTR tv177[rbp], 1
jmp SHORT $LN16@TEST_Great
$LN15@TEST_Great:
mov DWORD PTR tv177[rbp], 0
$LN16@TEST_Great:
mov r8d, 5
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@ICGPEMFN@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
lea r9, OFFSET FLAT:??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@
mov r8d, DWORD PTR tv177[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
$LN2@TEST_Great:
; 190 : }
; 191 : if (w_result == PMC_STATUS_OK)
cmp DWORD PTR w_result$[rbp], 0
jne SHORT $LN3@TEST_Great
; 192 : ep->UINT_ENTRY_POINTS.Dispose(w);
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN3@TEST_Great:
; 193 : if (v_result == PMC_STATUS_OK)
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN4@TEST_Great
; 194 : ep->Dispose(v);
mov rcx, QWORD PTR v$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+592]
$LN4@TEST_Great:
; 195 : if (u_result == PMC_STATUS_OK)
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN5@TEST_Great
; 196 : ep->Dispose(u);
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+592]
$LN5@TEST_Great:
; 197 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:TEST_GreatestCommonDivisor_X_X$rtcFrameData
call _RTC_CheckStackVars
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+952]
pop rdi
pop rbp
ret 0
TEST_GreatestCommonDivisor_X_X ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\test_op_greatestcommondivisor.c
; COMDAT TEST_GreatestCommonDivisor_X_UX
_TEXT SEGMENT
u$ = 8
v$ = 40
w$ = 72
actual_z_buf$ = 112
actual_z_buf_size$ = 392
result$ = 420
u_result$ = 452
v_result$ = 484
w_result$ = 516
tv177 = 916
tv162 = 916
tv142 = 916
tv92 = 916
tv74 = 916
tv151 = 920
tv132 = 920
tv82 = 920
tv64 = 920
__$ArrayPad$ = 928
env$ = 976
ep$ = 984
no$ = 992
u_buf$ = 1000
u_buf_size$ = 1008
v_buf$ = 1016
v_buf_size$ = 1024
desired_status$ = 1032
desired_w_buf$ = 1040
desired_w_buf_size$ = 1048
TEST_GreatestCommonDivisor_X_UX PROC ; COMDAT
; 147 : {
$LN17:
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, 984 ; 000003d8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 246 ; 000000f6H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+1016]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__8C95CAB4_test_op_greatestcommondivisor@c
call __CheckForDebuggerJustMyCode
; 148 : PMC_HANDLE_SINT u;
; 149 : PMC_HANDLE_UINT v;
; 150 : PMC_HANDLE_UINT w;
; 151 : unsigned char actual_z_buf[256];
; 152 : size_t actual_z_buf_size;
; 153 : PMC_STATUS_CODE result;
; 154 : PMC_STATUS_CODE u_result;
; 155 : PMC_STATUS_CODE v_result;
; 156 : PMC_STATUS_CODE w_result;
; 157 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_UX (%d.%d)", no, 1), (u_result = ep->FromByteArray(u_buf, u_buf_size, &u)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", u_result));
lea r8, QWORD PTR u$[rbp]
mov rdx, QWORD PTR u_buf_size$[rbp]
mov rcx, QWORD PTR u_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+608]
mov DWORD PTR u_result$[rbp], eax
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN7@TEST_Great
mov DWORD PTR tv74[rbp], 1
jmp SHORT $LN8@TEST_Great
$LN7@TEST_Great:
mov DWORD PTR tv74[rbp], 0
$LN8@TEST_Great:
mov edx, DWORD PTR u_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv64[rbp], rax
mov r8d, 1
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@LLHOJFEG@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv64[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv74[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 158 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_UX (%d.%d)", no, 2), (v_result = ep->UINT_ENTRY_POINTS.FromByteArray(v_buf, v_buf_size, &v)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", v_result));
lea r8, QWORD PTR v$[rbp]
mov rdx, QWORD PTR v_buf_size$[rbp]
mov rcx, QWORD PTR v_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+48]
mov DWORD PTR v_result$[rbp], eax
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN9@TEST_Great
mov DWORD PTR tv92[rbp], 1
jmp SHORT $LN10@TEST_Great
$LN9@TEST_Great:
mov DWORD PTR tv92[rbp], 0
$LN10@TEST_Great:
mov edx, DWORD PTR v_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv82[rbp], rax
mov r8d, 2
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@LLHOJFEG@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv82[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv92[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 159 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_UX (%d.%d)", no, 3), (w_result = ep->GreatestCommonDivisor_X_UX(u, v, &w)) == desired_status, FormatTestMesssage(L"GreatestCommonDivisor_X_UXの復帰コードが期待通りではない(%d)", w_result));
lea r8, QWORD PTR w$[rbp]
mov rdx, QWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+1040]
mov DWORD PTR w_result$[rbp], eax
mov eax, DWORD PTR desired_status$[rbp]
cmp DWORD PTR w_result$[rbp], eax
jne SHORT $LN11@TEST_Great
mov DWORD PTR tv142[rbp], 1
jmp SHORT $LN12@TEST_Great
$LN11@TEST_Great:
mov DWORD PTR tv142[rbp], 0
$LN12@TEST_Great:
mov edx, DWORD PTR w_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1FM@KKPEGHPO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestMesssage
mov QWORD PTR tv132[rbp], rax
mov r8d, 3
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@LLHOJFEG@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv132[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv142[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 160 : if (desired_status == PMC_STATUS_OK)
cmp DWORD PTR desired_status$[rbp], 0
jne $LN2@TEST_Great
; 161 : {
; 162 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_UX (%d.%d)", no, 4), (result = ep->UINT_ENTRY_POINTS.ToByteArray(w, actual_z_buf, sizeof(actual_z_buf), &actual_z_buf_size)) == PMC_STATUS_OK, FormatTestMesssage(L"ToByteArrayの復帰コードが期待通りではない(%d)", result));
lea r9, QWORD PTR actual_z_buf_size$[rbp]
mov r8d, 256 ; 00000100H
lea rdx, QWORD PTR actual_z_buf$[rbp]
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+56]
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
jne SHORT $LN13@TEST_Great
mov DWORD PTR tv162[rbp], 1
jmp SHORT $LN14@TEST_Great
$LN13@TEST_Great:
mov DWORD PTR tv162[rbp], 0
$LN14@TEST_Great:
mov edx, DWORD PTR result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@
call FormatTestMesssage
mov QWORD PTR tv151[rbp], rax
mov r8d, 4
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@LLHOJFEG@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv151[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv162[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 163 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_UX (%d.%d)", no, 5), _EQUALS_MEMORY(actual_z_buf, actual_z_buf_size, desired_w_buf, desired_w_buf_size) == 0, L"データの内容が一致しない");
mov r9, QWORD PTR desired_w_buf_size$[rbp]
mov r8, QWORD PTR desired_w_buf$[rbp]
mov rdx, QWORD PTR actual_z_buf_size$[rbp]
lea rcx, QWORD PTR actual_z_buf$[rbp]
call _EQUALS_MEMORY
test eax, eax
jne SHORT $LN15@TEST_Great
mov DWORD PTR tv177[rbp], 1
jmp SHORT $LN16@TEST_Great
$LN15@TEST_Great:
mov DWORD PTR tv177[rbp], 0
$LN16@TEST_Great:
mov r8d, 5
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@LLHOJFEG@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
lea r9, OFFSET FLAT:??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@
mov r8d, DWORD PTR tv177[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
$LN2@TEST_Great:
; 164 : }
; 165 : if (w_result == PMC_STATUS_OK)
cmp DWORD PTR w_result$[rbp], 0
jne SHORT $LN3@TEST_Great
; 166 : ep->UINT_ENTRY_POINTS.Dispose(w);
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN3@TEST_Great:
; 167 : if (v_result == PMC_STATUS_OK)
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN4@TEST_Great
; 168 : ep->UINT_ENTRY_POINTS.Dispose(v);
mov rcx, QWORD PTR v$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN4@TEST_Great:
; 169 : if (u_result == PMC_STATUS_OK)
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN5@TEST_Great
; 170 : ep->Dispose(u);
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+592]
$LN5@TEST_Great:
; 171 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:TEST_GreatestCommonDivisor_X_UX$rtcFrameData
call _RTC_CheckStackVars
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+952]
pop rdi
pop rbp
ret 0
TEST_GreatestCommonDivisor_X_UX ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\test_op_greatestcommondivisor.c
; COMDAT TEST_GreatestCommonDivisor_X_L
_TEXT SEGMENT
u$ = 8
w$ = 40
actual_w_buf$ = 80
actual_w_buf_size$ = 360
result$ = 388
u_result$ = 420
w_result$ = 452
tv159 = 660
tv144 = 660
tv92 = 660
tv74 = 660
tv133 = 664
tv82 = 664
tv64 = 664
__$ArrayPad$ = 672
env$ = 720
ep$ = 728
no$ = 736
u_buf$ = 744
u_buf_size$ = 752
v$ = 760
desired_status$ = 768
desired_w_buf$ = 776
desired_w_buf_size$ = 784
TEST_GreatestCommonDivisor_X_L PROC ; COMDAT
; 125 : {
$LN14:
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, 728 ; 000002d8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 182 ; 000000b6H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+760]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__8C95CAB4_test_op_greatestcommondivisor@c
call __CheckForDebuggerJustMyCode
; 126 : PMC_HANDLE_SINT u;
; 127 : PMC_HANDLE_UINT w;
; 128 : unsigned char actual_w_buf[256];
; 129 : size_t actual_w_buf_size;
; 130 : PMC_STATUS_CODE result;
; 131 : PMC_STATUS_CODE u_result;
; 132 : PMC_STATUS_CODE w_result;
; 133 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_L (%d.%d)", no, 1), (u_result = ep->FromByteArray(u_buf, u_buf_size, &u)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", u_result));
lea r8, QWORD PTR u$[rbp]
mov rdx, QWORD PTR u_buf_size$[rbp]
mov rcx, QWORD PTR u_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+608]
mov DWORD PTR u_result$[rbp], eax
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN6@TEST_Great
mov DWORD PTR tv74[rbp], 1
jmp SHORT $LN7@TEST_Great
$LN6@TEST_Great:
mov DWORD PTR tv74[rbp], 0
$LN7@TEST_Great:
mov edx, DWORD PTR u_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv64[rbp], rax
mov r8d, 1
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@CMEEAMCB@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv64[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv74[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 134 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_L (%d.%d)", no, 2), (w_result = ep->GreatestCommonDivisor_X_L(u, v, &w)) == desired_status, FormatTestMesssage(L"GreatestCommonDivisor_X_Lの復帰コードが期待通りではない(%d)", w_result));
lea r8, QWORD PTR w$[rbp]
mov rdx, QWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+1032]
mov DWORD PTR w_result$[rbp], eax
mov eax, DWORD PTR desired_status$[rbp]
cmp DWORD PTR w_result$[rbp], eax
jne SHORT $LN8@TEST_Great
mov DWORD PTR tv92[rbp], 1
jmp SHORT $LN9@TEST_Great
$LN8@TEST_Great:
mov DWORD PTR tv92[rbp], 0
$LN9@TEST_Great:
mov edx, DWORD PTR w_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1FK@CAMBNOBM@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestMesssage
mov QWORD PTR tv82[rbp], rax
mov r8d, 2
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@CMEEAMCB@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv82[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv92[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 135 : if (desired_status == PMC_STATUS_OK)
cmp DWORD PTR desired_status$[rbp], 0
jne $LN2@TEST_Great
; 136 : {
; 137 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_L (%d.%d)", no, 3), (result = ep->UINT_ENTRY_POINTS.ToByteArray(w, actual_w_buf, sizeof(actual_w_buf), &actual_w_buf_size)) == PMC_STATUS_OK, FormatTestMesssage(L"ToByteArrayの復帰コードが期待通りではない(%d)", result));
lea r9, QWORD PTR actual_w_buf_size$[rbp]
mov r8d, 256 ; 00000100H
lea rdx, QWORD PTR actual_w_buf$[rbp]
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+56]
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
jne SHORT $LN10@TEST_Great
mov DWORD PTR tv144[rbp], 1
jmp SHORT $LN11@TEST_Great
$LN10@TEST_Great:
mov DWORD PTR tv144[rbp], 0
$LN11@TEST_Great:
mov edx, DWORD PTR result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@
call FormatTestMesssage
mov QWORD PTR tv133[rbp], rax
mov r8d, 3
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@CMEEAMCB@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv133[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv144[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 138 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_L (%d.%d)", no, 4), _EQUALS_MEMORY(actual_w_buf, actual_w_buf_size, desired_w_buf, desired_w_buf_size) == 0, L"データの内容が一致しない");
mov r9, QWORD PTR desired_w_buf_size$[rbp]
mov r8, QWORD PTR desired_w_buf$[rbp]
mov rdx, QWORD PTR actual_w_buf_size$[rbp]
lea rcx, QWORD PTR actual_w_buf$[rbp]
call _EQUALS_MEMORY
test eax, eax
jne SHORT $LN12@TEST_Great
mov DWORD PTR tv159[rbp], 1
jmp SHORT $LN13@TEST_Great
$LN12@TEST_Great:
mov DWORD PTR tv159[rbp], 0
$LN13@TEST_Great:
mov r8d, 4
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@CMEEAMCB@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
lea r9, OFFSET FLAT:??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@
mov r8d, DWORD PTR tv159[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
$LN2@TEST_Great:
; 139 : }
; 140 : if (w_result == PMC_STATUS_OK)
cmp DWORD PTR w_result$[rbp], 0
jne SHORT $LN3@TEST_Great
; 141 : ep->UINT_ENTRY_POINTS.Dispose(w);
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN3@TEST_Great:
; 142 : if (u_result == PMC_STATUS_OK)
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN4@TEST_Great
; 143 : ep->Dispose(u);
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+592]
$LN4@TEST_Great:
; 144 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:TEST_GreatestCommonDivisor_X_L$rtcFrameData
call _RTC_CheckStackVars
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+696]
pop rdi
pop rbp
ret 0
TEST_GreatestCommonDivisor_X_L ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\test_op_greatestcommondivisor.c
; COMDAT TEST_GreatestCommonDivisor_X_I
_TEXT SEGMENT
u$ = 8
w$ = 40
actual_w_buf$ = 80
actual_w_buf_size$ = 360
result$ = 388
u_result$ = 420
w_result$ = 452
tv159 = 660
tv144 = 660
tv92 = 660
tv74 = 660
tv133 = 664
tv82 = 664
tv64 = 664
__$ArrayPad$ = 672
env$ = 720
ep$ = 728
no$ = 736
u_buf$ = 744
u_buf_size$ = 752
v$ = 760
desired_status$ = 768
desired_w_buf$ = 776
desired_w_buf_size$ = 784
TEST_GreatestCommonDivisor_X_I PROC ; COMDAT
; 103 : {
$LN14:
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, 728 ; 000002d8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 182 ; 000000b6H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+760]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__8C95CAB4_test_op_greatestcommondivisor@c
call __CheckForDebuggerJustMyCode
; 104 : PMC_HANDLE_SINT u;
; 105 : PMC_HANDLE_UINT w;
; 106 : unsigned char actual_w_buf[256];
; 107 : size_t actual_w_buf_size;
; 108 : PMC_STATUS_CODE result;
; 109 : PMC_STATUS_CODE u_result;
; 110 : PMC_STATUS_CODE w_result;
; 111 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_I (%d.%d)", no, 1), (u_result = ep->FromByteArray(u_buf, u_buf_size, &u)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", u_result));
lea r8, QWORD PTR u$[rbp]
mov rdx, QWORD PTR u_buf_size$[rbp]
mov rcx, QWORD PTR u_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+608]
mov DWORD PTR u_result$[rbp], eax
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN6@TEST_Great
mov DWORD PTR tv74[rbp], 1
jmp SHORT $LN7@TEST_Great
$LN6@TEST_Great:
mov DWORD PTR tv74[rbp], 0
$LN7@TEST_Great:
mov edx, DWORD PTR u_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv64[rbp], rax
mov r8d, 1
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@HMONMDO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv64[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv74[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 112 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_I (%d.%d)", no, 2), (w_result = ep->GreatestCommonDivisor_X_I(u, v, &w)) == desired_status, FormatTestMesssage(L"GreatestCommonDivisor_X_Iの復帰コードが期待通りではない(%d)", w_result));
lea r8, QWORD PTR w$[rbp]
mov edx, DWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+1024]
mov DWORD PTR w_result$[rbp], eax
mov eax, DWORD PTR desired_status$[rbp]
cmp DWORD PTR w_result$[rbp], eax
jne SHORT $LN8@TEST_Great
mov DWORD PTR tv92[rbp], 1
jmp SHORT $LN9@TEST_Great
$LN8@TEST_Great:
mov DWORD PTR tv92[rbp], 0
$LN9@TEST_Great:
mov edx, DWORD PTR w_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1FK@GIINEDIJ@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestMesssage
mov QWORD PTR tv82[rbp], rax
mov r8d, 2
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@HMONMDO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv82[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv92[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 113 : if (desired_status == PMC_STATUS_OK)
cmp DWORD PTR desired_status$[rbp], 0
jne $LN2@TEST_Great
; 114 : {
; 115 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_I (%d.%d)", no, 3), (result = ep->UINT_ENTRY_POINTS.ToByteArray(w, actual_w_buf, sizeof(actual_w_buf), &actual_w_buf_size)) == PMC_STATUS_OK, FormatTestMesssage(L"ToByteArrayの復帰コードが期待通りではない(%d)", result));
lea r9, QWORD PTR actual_w_buf_size$[rbp]
mov r8d, 256 ; 00000100H
lea rdx, QWORD PTR actual_w_buf$[rbp]
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+56]
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
jne SHORT $LN10@TEST_Great
mov DWORD PTR tv144[rbp], 1
jmp SHORT $LN11@TEST_Great
$LN10@TEST_Great:
mov DWORD PTR tv144[rbp], 0
$LN11@TEST_Great:
mov edx, DWORD PTR result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@
call FormatTestMesssage
mov QWORD PTR tv133[rbp], rax
mov r8d, 3
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@HMONMDO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv133[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv144[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 116 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_X_I (%d.%d)", no, 4), _EQUALS_MEMORY(actual_w_buf, actual_w_buf_size, desired_w_buf, desired_w_buf_size) == 0, L"データの内容が一致しない");
mov r9, QWORD PTR desired_w_buf_size$[rbp]
mov r8, QWORD PTR desired_w_buf$[rbp]
mov rdx, QWORD PTR actual_w_buf_size$[rbp]
lea rcx, QWORD PTR actual_w_buf$[rbp]
call _EQUALS_MEMORY
test eax, eax
jne SHORT $LN12@TEST_Great
mov DWORD PTR tv159[rbp], 1
jmp SHORT $LN13@TEST_Great
$LN12@TEST_Great:
mov DWORD PTR tv159[rbp], 0
$LN13@TEST_Great:
mov r8d, 4
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@HMONMDO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
lea r9, OFFSET FLAT:??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@
mov r8d, DWORD PTR tv159[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
$LN2@TEST_Great:
; 117 : }
; 118 : if (w_result == PMC_STATUS_OK)
cmp DWORD PTR w_result$[rbp], 0
jne SHORT $LN3@TEST_Great
; 119 : ep->UINT_ENTRY_POINTS.Dispose(w);
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN3@TEST_Great:
; 120 : if (u_result == PMC_STATUS_OK)
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN4@TEST_Great
; 121 : ep->Dispose(u);
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+592]
$LN4@TEST_Great:
; 122 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:TEST_GreatestCommonDivisor_X_I$rtcFrameData
call _RTC_CheckStackVars
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+696]
pop rdi
pop rbp
ret 0
TEST_GreatestCommonDivisor_X_I ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\test_op_greatestcommondivisor.c
; COMDAT TEST_GreatestCommonDivisor_UX_X
_TEXT SEGMENT
u$ = 8
v$ = 40
w$ = 72
actual_w_buf$ = 112
actual_w_buf_size$ = 392
result$ = 420
u_result$ = 452
v_result$ = 484
w_result$ = 516
tv177 = 916
tv162 = 916
tv142 = 916
tv92 = 916
tv74 = 916
tv151 = 920
tv132 = 920
tv82 = 920
tv64 = 920
__$ArrayPad$ = 928
env$ = 976
ep$ = 984
no$ = 992
u_buf$ = 1000
u_buf_size$ = 1008
v_buf$ = 1016
v_buf_size$ = 1024
desired_status$ = 1032
desired_w_buf$ = 1040
desired_w_buf_size$ = 1048
TEST_GreatestCommonDivisor_UX_X PROC ; COMDAT
; 76 : {
$LN17:
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, 984 ; 000003d8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 246 ; 000000f6H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+1016]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__8C95CAB4_test_op_greatestcommondivisor@c
call __CheckForDebuggerJustMyCode
; 77 : PMC_HANDLE_UINT u;
; 78 : PMC_HANDLE_SINT v;
; 79 : PMC_HANDLE_UINT w;
; 80 : unsigned char actual_w_buf[256];
; 81 : size_t actual_w_buf_size;
; 82 : PMC_STATUS_CODE result;
; 83 : PMC_STATUS_CODE u_result;
; 84 : PMC_STATUS_CODE v_result;
; 85 : PMC_STATUS_CODE w_result;
; 86 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_UX_X (%d.%d)", no, 1), (u_result = ep->UINT_ENTRY_POINTS.FromByteArray(u_buf, u_buf_size, &u)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", u_result));
lea r8, QWORD PTR u$[rbp]
mov rdx, QWORD PTR u_buf_size$[rbp]
mov rcx, QWORD PTR u_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+48]
mov DWORD PTR u_result$[rbp], eax
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN7@TEST_Great
mov DWORD PTR tv74[rbp], 1
jmp SHORT $LN8@TEST_Great
$LN7@TEST_Great:
mov DWORD PTR tv74[rbp], 0
$LN8@TEST_Great:
mov edx, DWORD PTR u_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv64[rbp], rax
mov r8d, 1
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@IFNFFAEE@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv64[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv74[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 87 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_UX_X (%d.%d)", no, 2), (v_result = ep->FromByteArray(v_buf, v_buf_size, &v)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", v_result));
lea r8, QWORD PTR v$[rbp]
mov rdx, QWORD PTR v_buf_size$[rbp]
mov rcx, QWORD PTR v_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+608]
mov DWORD PTR v_result$[rbp], eax
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN9@TEST_Great
mov DWORD PTR tv92[rbp], 1
jmp SHORT $LN10@TEST_Great
$LN9@TEST_Great:
mov DWORD PTR tv92[rbp], 0
$LN10@TEST_Great:
mov edx, DWORD PTR v_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv82[rbp], rax
mov r8d, 2
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@IFNFFAEE@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv82[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv92[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 88 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_UX_X (%d.%d)", no, 3), (w_result = ep->GreatestCommonDivisor_UX_X(u, v, &w)) == desired_status, FormatTestMesssage(L"GreatestCommonDivisor_UX_Xの復帰コードが期待通りではない(%d)", w_result));
lea r8, QWORD PTR w$[rbp]
mov rdx, QWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+1016]
mov DWORD PTR w_result$[rbp], eax
mov eax, DWORD PTR desired_status$[rbp]
cmp DWORD PTR w_result$[rbp], eax
jne SHORT $LN11@TEST_Great
mov DWORD PTR tv142[rbp], 1
jmp SHORT $LN12@TEST_Great
$LN11@TEST_Great:
mov DWORD PTR tv142[rbp], 0
$LN12@TEST_Great:
mov edx, DWORD PTR w_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1FM@CNBBCJNO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestMesssage
mov QWORD PTR tv132[rbp], rax
mov r8d, 3
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@IFNFFAEE@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv132[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv142[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 89 : if (desired_status == PMC_STATUS_OK)
cmp DWORD PTR desired_status$[rbp], 0
jne $LN2@TEST_Great
; 90 : {
; 91 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_UX_X (%d.%d)", no, 4), (result = ep->UINT_ENTRY_POINTS.ToByteArray(w, actual_w_buf, sizeof(actual_w_buf), &actual_w_buf_size)) == PMC_STATUS_OK, FormatTestMesssage(L"ToByteArrayの復帰コードが期待通りではない(%d)", result));
lea r9, QWORD PTR actual_w_buf_size$[rbp]
mov r8d, 256 ; 00000100H
lea rdx, QWORD PTR actual_w_buf$[rbp]
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+56]
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
jne SHORT $LN13@TEST_Great
mov DWORD PTR tv162[rbp], 1
jmp SHORT $LN14@TEST_Great
$LN13@TEST_Great:
mov DWORD PTR tv162[rbp], 0
$LN14@TEST_Great:
mov edx, DWORD PTR result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@
call FormatTestMesssage
mov QWORD PTR tv151[rbp], rax
mov r8d, 4
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@IFNFFAEE@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv151[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv162[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 92 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_UX_X (%d.%d)", no, 5), _EQUALS_MEMORY(actual_w_buf, actual_w_buf_size, desired_w_buf, desired_w_buf_size) == 0, L"データの内容が一致しない");
mov r9, QWORD PTR desired_w_buf_size$[rbp]
mov r8, QWORD PTR desired_w_buf$[rbp]
mov rdx, QWORD PTR actual_w_buf_size$[rbp]
lea rcx, QWORD PTR actual_w_buf$[rbp]
call _EQUALS_MEMORY
test eax, eax
jne SHORT $LN15@TEST_Great
mov DWORD PTR tv177[rbp], 1
jmp SHORT $LN16@TEST_Great
$LN15@TEST_Great:
mov DWORD PTR tv177[rbp], 0
$LN16@TEST_Great:
mov r8d, 5
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EG@IFNFFAEE@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
lea r9, OFFSET FLAT:??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@
mov r8d, DWORD PTR tv177[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
$LN2@TEST_Great:
; 93 : }
; 94 : if (w_result == PMC_STATUS_OK)
cmp DWORD PTR w_result$[rbp], 0
jne SHORT $LN3@TEST_Great
; 95 : ep->UINT_ENTRY_POINTS.Dispose(w);
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN3@TEST_Great:
; 96 : if (v_result == PMC_STATUS_OK)
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN4@TEST_Great
; 97 : ep->Dispose(v);
mov rcx, QWORD PTR v$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+592]
$LN4@TEST_Great:
; 98 : if (u_result == PMC_STATUS_OK)
cmp DWORD PTR u_result$[rbp], 0
jne SHORT $LN5@TEST_Great
; 99 : ep->UINT_ENTRY_POINTS.Dispose(u);
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN5@TEST_Great:
; 100 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:TEST_GreatestCommonDivisor_UX_X$rtcFrameData
call _RTC_CheckStackVars
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+952]
pop rdi
pop rbp
ret 0
TEST_GreatestCommonDivisor_UX_X ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\test_op_greatestcommondivisor.c
; COMDAT TEST_GreatestCommonDivisor_L_X
_TEXT SEGMENT
v$ = 8
w$ = 40
actual_w_buf$ = 80
actual_w_buf_size$ = 360
result$ = 388
v_result$ = 420
w_result$ = 452
tv159 = 660
tv144 = 660
tv92 = 660
tv74 = 660
tv133 = 664
tv82 = 664
tv64 = 664
__$ArrayPad$ = 672
env$ = 720
ep$ = 728
no$ = 736
u$ = 744
v_buf$ = 752
v_buf_size$ = 760
desired_status$ = 768
desired_w_buf$ = 776
desired_w_buf_size$ = 784
TEST_GreatestCommonDivisor_L_X PROC ; COMDAT
; 54 : {
$LN14:
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, 728 ; 000002d8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 182 ; 000000b6H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+760]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__8C95CAB4_test_op_greatestcommondivisor@c
call __CheckForDebuggerJustMyCode
; 55 : PMC_HANDLE_SINT v;
; 56 : PMC_HANDLE_UINT w;
; 57 : unsigned char actual_w_buf[256];
; 58 : size_t actual_w_buf_size;
; 59 : PMC_STATUS_CODE result;
; 60 : PMC_STATUS_CODE v_result;
; 61 : PMC_STATUS_CODE w_result;
; 62 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_L_X (%d.%d)", no, 1), (v_result = ep->FromByteArray(v_buf, v_buf_size, &v)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", v_result));
lea r8, QWORD PTR v$[rbp]
mov rdx, QWORD PTR v_buf_size$[rbp]
mov rcx, QWORD PTR v_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+608]
mov DWORD PTR v_result$[rbp], eax
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN6@TEST_Great
mov DWORD PTR tv74[rbp], 1
jmp SHORT $LN7@TEST_Great
$LN6@TEST_Great:
mov DWORD PTR tv74[rbp], 0
$LN7@TEST_Great:
mov edx, DWORD PTR v_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv64[rbp], rax
mov r8d, 1
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@JEACKNDP@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv64[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv74[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 63 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_L_X (%d.%d)", no, 2), (w_result = ep->GreatestCommonDivisor_L_X(u, v, &w)) == desired_status, FormatTestMesssage(L"GreatestCommonDivisor_L_Xの復帰コードが期待通りではない(%d)", w_result));
lea r8, QWORD PTR w$[rbp]
mov rdx, QWORD PTR v$[rbp]
mov rcx, QWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+1008]
mov DWORD PTR w_result$[rbp], eax
mov eax, DWORD PTR desired_status$[rbp]
cmp DWORD PTR w_result$[rbp], eax
jne SHORT $LN8@TEST_Great
mov DWORD PTR tv92[rbp], 1
jmp SHORT $LN9@TEST_Great
$LN8@TEST_Great:
mov DWORD PTR tv92[rbp], 0
$LN9@TEST_Great:
mov edx, DWORD PTR w_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1FK@GPIIGGDA@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestMesssage
mov QWORD PTR tv82[rbp], rax
mov r8d, 2
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@JEACKNDP@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv82[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv92[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 64 : if (desired_status == PMC_STATUS_OK)
cmp DWORD PTR desired_status$[rbp], 0
jne $LN2@TEST_Great
; 65 : {
; 66 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_L_X (%d.%d)", no, 3), (result = ep->UINT_ENTRY_POINTS.ToByteArray(w, actual_w_buf, sizeof(actual_w_buf), &actual_w_buf_size)) == PMC_STATUS_OK, FormatTestMesssage(L"ToByteArrayの復帰コードが期待通りではない(%d)", result));
lea r9, QWORD PTR actual_w_buf_size$[rbp]
mov r8d, 256 ; 00000100H
lea rdx, QWORD PTR actual_w_buf$[rbp]
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+56]
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
jne SHORT $LN10@TEST_Great
mov DWORD PTR tv144[rbp], 1
jmp SHORT $LN11@TEST_Great
$LN10@TEST_Great:
mov DWORD PTR tv144[rbp], 0
$LN11@TEST_Great:
mov edx, DWORD PTR result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@
call FormatTestMesssage
mov QWORD PTR tv133[rbp], rax
mov r8d, 3
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@JEACKNDP@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv133[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv144[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 67 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_L_X (%d.%d)", no, 4), _EQUALS_MEMORY(actual_w_buf, actual_w_buf_size, desired_w_buf, desired_w_buf_size) == 0, L"データの内容が一致しない");
mov r9, QWORD PTR desired_w_buf_size$[rbp]
mov r8, QWORD PTR desired_w_buf$[rbp]
mov rdx, QWORD PTR actual_w_buf_size$[rbp]
lea rcx, QWORD PTR actual_w_buf$[rbp]
call _EQUALS_MEMORY
test eax, eax
jne SHORT $LN12@TEST_Great
mov DWORD PTR tv159[rbp], 1
jmp SHORT $LN13@TEST_Great
$LN12@TEST_Great:
mov DWORD PTR tv159[rbp], 0
$LN13@TEST_Great:
mov r8d, 4
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@JEACKNDP@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
lea r9, OFFSET FLAT:??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@
mov r8d, DWORD PTR tv159[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
$LN2@TEST_Great:
; 68 : }
; 69 : if (w_result == PMC_STATUS_OK)
cmp DWORD PTR w_result$[rbp], 0
jne SHORT $LN3@TEST_Great
; 70 : ep->UINT_ENTRY_POINTS.Dispose(w);
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN3@TEST_Great:
; 71 : if (v_result == PMC_STATUS_OK)
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN4@TEST_Great
; 72 : ep->Dispose(v);
mov rcx, QWORD PTR v$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+592]
$LN4@TEST_Great:
; 73 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:TEST_GreatestCommonDivisor_L_X$rtcFrameData
call _RTC_CheckStackVars
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+696]
pop rdi
pop rbp
ret 0
TEST_GreatestCommonDivisor_L_X ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.sint\palmtree.math.core.sint\test_op_greatestcommondivisor.c
; COMDAT TEST_GreatestCommonDivisor_I_X
_TEXT SEGMENT
v$ = 8
w$ = 40
actual_w_buf$ = 80
actual_w_buf_size$ = 360
result$ = 388
v_result$ = 420
w_result$ = 452
tv159 = 660
tv144 = 660
tv92 = 660
tv74 = 660
tv133 = 664
tv82 = 664
tv64 = 664
__$ArrayPad$ = 672
env$ = 720
ep$ = 728
no$ = 736
u$ = 744
v_buf$ = 752
v_buf_size$ = 760
desired_status$ = 768
desired_w_buf$ = 776
desired_w_buf_size$ = 784
TEST_GreatestCommonDivisor_I_X PROC ; COMDAT
; 32 : {
$LN14:
mov DWORD PTR [rsp+32], r9d
mov DWORD PTR [rsp+24], r8d
mov QWORD PTR [rsp+16], rdx
mov QWORD PTR [rsp+8], rcx
push rbp
push rdi
sub rsp, 728 ; 000002d8H
lea rbp, QWORD PTR [rsp+32]
mov rdi, rsp
mov ecx, 182 ; 000000b6H
mov eax, -858993460 ; ccccccccH
rep stosd
mov rcx, QWORD PTR [rsp+760]
mov rax, QWORD PTR __security_cookie
xor rax, rbp
mov QWORD PTR __$ArrayPad$[rbp], rax
lea rcx, OFFSET FLAT:__8C95CAB4_test_op_greatestcommondivisor@c
call __CheckForDebuggerJustMyCode
; 33 : PMC_HANDLE_SINT v;
; 34 : PMC_HANDLE_UINT w;
; 35 : unsigned char actual_w_buf[256];
; 36 : size_t actual_w_buf_size;
; 37 : PMC_STATUS_CODE result;
; 38 : PMC_STATUS_CODE v_result;
; 39 : PMC_STATUS_CODE w_result;
; 40 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_I_X (%d.%d)", no, 1), (v_result = ep->FromByteArray(v_buf, v_buf_size, &v)) == PMC_STATUS_OK, FormatTestMesssage(L"FromByteArrayの復帰コードが期待通りではない(%d)", v_result));
lea r8, QWORD PTR v$[rbp]
mov rdx, QWORD PTR v_buf_size$[rbp]
mov rcx, QWORD PTR v_buf$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+608]
mov DWORD PTR v_result$[rbp], eax
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN6@TEST_Great
mov DWORD PTR tv74[rbp], 1
jmp SHORT $LN7@TEST_Great
$LN6@TEST_Great:
mov DWORD PTR tv74[rbp], 0
$LN7@TEST_Great:
mov edx, DWORD PTR v_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EC@NPMCAPKO@?$AAF?$AAr?$AAo?$AAm?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ@
call FormatTestMesssage
mov QWORD PTR tv64[rbp], rax
mov r8d, 1
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@HMCBFGEH@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv64[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv74[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 41 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_I_X (%d.%d)", no, 2), (w_result = ep->GreatestCommonDivisor_I_X(u, v, &w)) == desired_status, FormatTestMesssage(L"GreatestCommonDivisor_I_Xの復帰コードが期待通りではない(%d)", w_result));
lea r8, QWORD PTR w$[rbp]
mov rdx, QWORD PTR v$[rbp]
mov ecx, DWORD PTR u$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+1000]
mov DWORD PTR w_result$[rbp], eax
mov eax, DWORD PTR desired_status$[rbp]
cmp DWORD PTR w_result$[rbp], eax
jne SHORT $LN8@TEST_Great
mov DWORD PTR tv92[rbp], 1
jmp SHORT $LN9@TEST_Great
$LN8@TEST_Great:
mov DWORD PTR tv92[rbp], 0
$LN9@TEST_Great:
mov edx, DWORD PTR w_result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1FK@DEBGJFKO@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestMesssage
mov QWORD PTR tv82[rbp], rax
mov r8d, 2
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@HMCBFGEH@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv82[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv92[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 42 : if (desired_status == PMC_STATUS_OK)
cmp DWORD PTR desired_status$[rbp], 0
jne $LN2@TEST_Great
; 43 : {
; 44 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_I_X (%d.%d)", no, 3), (result = ep->UINT_ENTRY_POINTS.ToByteArray(w, actual_w_buf, sizeof(actual_w_buf), &actual_w_buf_size)) == PMC_STATUS_OK, FormatTestMesssage(L"ToByteArrayの復帰コードが期待通りではない(%d)", result));
lea r9, QWORD PTR actual_w_buf_size$[rbp]
mov r8d, 256 ; 00000100H
lea rdx, QWORD PTR actual_w_buf$[rbp]
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+56]
mov DWORD PTR result$[rbp], eax
cmp DWORD PTR result$[rbp], 0
jne SHORT $LN10@TEST_Great
mov DWORD PTR tv144[rbp], 1
jmp SHORT $LN11@TEST_Great
$LN10@TEST_Great:
mov DWORD PTR tv144[rbp], 0
$LN11@TEST_Great:
mov edx, DWORD PTR result$[rbp]
lea rcx, OFFSET FLAT:??_C@_1DO@DOHJEMND@?$AAT?$AAo?$AAB?$AAy?$AAt?$AAe?$AAA?$AAr?$AAr?$AAa?$AAy?$AAn?$PP?$KJ?$AA0?$PP?$LD@
call FormatTestMesssage
mov QWORD PTR tv133[rbp], rax
mov r8d, 3
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@HMCBFGEH@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
mov rcx, QWORD PTR tv133[rbp]
mov r9, rcx
mov r8d, DWORD PTR tv144[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
; 45 : TEST_Assert(env, FormatTestLabel(L"GreatestCommonDivisor_I_X (%d.%d)", no, 4), _EQUALS_MEMORY(actual_w_buf, actual_w_buf_size, desired_w_buf, desired_w_buf_size) == 0, L"データの内容が一致しない");
mov r9, QWORD PTR desired_w_buf_size$[rbp]
mov r8, QWORD PTR desired_w_buf$[rbp]
mov rdx, QWORD PTR actual_w_buf_size$[rbp]
lea rcx, QWORD PTR actual_w_buf$[rbp]
call _EQUALS_MEMORY
test eax, eax
jne SHORT $LN12@TEST_Great
mov DWORD PTR tv159[rbp], 1
jmp SHORT $LN13@TEST_Great
$LN12@TEST_Great:
mov DWORD PTR tv159[rbp], 0
$LN13@TEST_Great:
mov r8d, 4
mov edx, DWORD PTR no$[rbp]
lea rcx, OFFSET FLAT:??_C@_1EE@HMCBFGEH@?$AAG?$AAr?$AAe?$AAa?$AAt?$AAe?$AAs?$AAt?$AAC?$AAo?$AAm?$AAm?$AAo?$AAn?$AAD@
call FormatTestLabel
lea r9, OFFSET FLAT:??_C@_1BK@CBDJCOBM@?$PP?G?$PP?$PM?$PP?$LP?$AAn?$PP?$IF?$PP?$LJ?$AAL?$AA?$AA?$PP?t?$AAW?$AAj?$AAD@
mov r8d, DWORD PTR tv159[rbp]
mov rdx, rax
mov rcx, QWORD PTR env$[rbp]
call TEST_Assert
$LN2@TEST_Great:
; 46 : }
; 47 : if (w_result == PMC_STATUS_OK)
cmp DWORD PTR w_result$[rbp], 0
jne SHORT $LN3@TEST_Great
; 48 : ep->UINT_ENTRY_POINTS.Dispose(w);
mov rcx, QWORD PTR w$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+32]
$LN3@TEST_Great:
; 49 : if (v_result == PMC_STATUS_OK)
cmp DWORD PTR v_result$[rbp], 0
jne SHORT $LN4@TEST_Great
; 50 : ep->Dispose(v);
mov rcx, QWORD PTR v$[rbp]
mov rax, QWORD PTR ep$[rbp]
call QWORD PTR [rax+592]
$LN4@TEST_Great:
; 51 : }
lea rcx, QWORD PTR [rbp-32]
lea rdx, OFFSET FLAT:TEST_GreatestCommonDivisor_I_X$rtcFrameData
call _RTC_CheckStackVars
mov rcx, QWORD PTR __$ArrayPad$[rbp]
xor rcx, rbp
call __security_check_cookie
lea rsp, QWORD PTR [rbp+696]
pop rdi
pop rbp
ret 0
TEST_GreatestCommonDivisor_I_X ENDP
_TEXT ENDS
END
| 30.462013 | 282 | 0.685952 |
08659fbe6b325037a7b8c011da722afc078399d2 | 785 | asm | Assembly | programs/oeis/103/A103128.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/103/A103128.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/103/A103128.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A103128: a(n) = floor(sqrt(2n-1)).
; 1,1,2,2,3,3,3,3,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22
mov $1,1
lpb $0,1
add $1,1
sub $0,$1
lpe
| 87.222222 | 701 | 0.629299 |
15e9703d306cd02f12f6ff75a12c51b5f792024a | 5,814 | asm | Assembly | UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.asm | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | 1 | 2020-05-10T09:43:50.000Z | 2020-05-10T09:43:50.000Z | UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.asm | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | null | null | null | UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/MpFuncs.asm | James992927108/uEFI_Edk2_Practice | 2cac7618dfee10bfa5104a2e167c85425fde0100 | [
"BSD-2-Clause"
] | null | null | null | ;------------------------------------------------------------------------------ ;
; Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php.
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; MpFuncs.asm
;
; Abstract:
;
; This is the assembly code for Multi-processor S3 support
;
;-------------------------------------------------------------------------------
.686p
.model flat,C
.code
EXTERN InitializeFloatingPointUnits:PROC
VacantFlag Equ 00h
NotVacantFlag Equ 0ffh
LockLocation equ RendezvousFunnelProcEnd - RendezvousFunnelProcStart
StackStart equ LockLocation + 4h
StackSize equ LockLocation + 8h
RendezvousProc equ LockLocation + 0Ch
GdtrProfile equ LockLocation + 10h
IdtrProfile equ LockLocation + 16h
BufferStart equ LockLocation + 1Ch
;-------------------------------------------------------------------------------------
;RendezvousFunnelProc procedure follows. All APs execute their procedure. This
;procedure serializes all the AP processors through an Init sequence. It must be
;noted that APs arrive here very raw...ie: real mode, no stack.
;ALSO THIS PROCEDURE IS EXECUTED BY APs ONLY ON 16 BIT MODE. HENCE THIS PROC
;IS IN MACHINE CODE.
;-------------------------------------------------------------------------------------
;RendezvousFunnelProc (&WakeUpBuffer,MemAddress);
RendezvousFunnelProc PROC near C PUBLIC
RendezvousFunnelProcStart::
; At this point CS = 0x(vv00) and ip= 0x0.
db 8ch, 0c8h ; mov ax, cs
db 8eh, 0d8h ; mov ds, ax
db 8eh, 0c0h ; mov es, ax
db 8eh, 0d0h ; mov ss, ax
db 33h, 0c0h ; xor ax, ax
db 8eh, 0e0h ; mov fs, ax
db 8eh, 0e8h ; mov gs, ax
flat32Start::
db 0BEh
dw BufferStart ; mov si, BufferStart
db 66h, 8Bh, 14h ; mov edx,dword ptr [si] ; EDX is keeping the start address of wakeup buffer
db 0BEh
dw GdtrProfile ; mov si, GdtrProfile
db 66h ; db 66h
db 2Eh, 0Fh, 01h, 14h ; lgdt fword ptr cs:[si]
db 0BEh
dw IdtrProfile ; mov si, IdtrProfile
db 66h ; db 66h
db 2Eh, 0Fh, 01h, 1Ch ; lidt fword ptr cs:[si]
db 33h, 0C0h ; xor ax, ax
db 8Eh, 0D8h ; mov ds, ax
db 0Fh, 20h, 0C0h ; mov eax, cr0 ; Get control register 0
db 66h, 83h, 0C8h, 01h ; or eax, 000000001h ; Set PE bit (bit #0)
db 0Fh, 22h, 0C0h ; mov cr0, eax
FLAT32_JUMP::
db 66h, 67h, 0EAh ; far jump
dd 0h ; 32-bit offset
dw 20h ; 16-bit selector
PMODE_ENTRY:: ; protected mode entry point
mov ax, 8h
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax ; Flat mode setup.
mov esi, edx
mov edi, esi
add edi, LockLocation
mov al, NotVacantFlag
TestLock::
xchg byte ptr [edi], al
cmp al, NotVacantFlag
jz TestLock
ProgramStack::
mov edi, esi
add edi, StackSize
mov eax, dword ptr [edi]
mov edi, esi
add edi, StackStart
add eax, dword ptr [edi]
mov esp, eax
mov dword ptr [edi], eax
Releaselock::
mov al, VacantFlag
mov edi, esi
add edi, LockLocation
xchg byte ptr [edi], al
;
; Call assembly function to initialize FPU.
;
mov ebx, InitializeFloatingPointUnits
call ebx
;
; Call C Function
;
mov edi, esi
add edi, RendezvousProc
mov eax, dword ptr [edi]
test eax, eax
jz GoToSleep
call eax ; Call C function
GoToSleep::
cli
hlt
jmp $-2
RendezvousFunnelProc ENDP
RendezvousFunnelProcEnd::
;-------------------------------------------------------------------------------------
; AsmGetAddressMap (&AddressMap);
;-------------------------------------------------------------------------------------
AsmGetAddressMap PROC near C PUBLIC
pushad
mov ebp,esp
mov ebx, dword ptr [ebp+24h]
mov dword ptr [ebx], RendezvousFunnelProcStart
mov dword ptr [ebx+4h], PMODE_ENTRY - RendezvousFunnelProcStart
mov dword ptr [ebx+8h], FLAT32_JUMP - RendezvousFunnelProcStart
mov dword ptr [ebx+0ch], RendezvousFunnelProcEnd - RendezvousFunnelProcStart
popad
ret
AsmGetAddressMap ENDP
END
| 34.402367 | 130 | 0.464396 |
e251a05f2c990bc2abe80fecd235d19f10840393 | 16,888 | asm | Assembly | adp_gui.asm | idoheinemann/Assembly-Data-Package | d5646ed2b7c2d060cf30f4e972d9039347020e62 | [
"Apache-2.0"
] | 2 | 2019-12-05T02:29:38.000Z | 2020-05-18T19:33:48.000Z | adp_gui.asm | idoheinemann/Assembly-Data-Package | d5646ed2b7c2d060cf30f4e972d9039347020e62 | [
"Apache-2.0"
] | null | null | null | adp_gui.asm | idoheinemann/Assembly-Data-Package | d5646ed2b7c2d060cf30f4e972d9039347020e62 | [
"Apache-2.0"
] | null | null | null | include \masm32\include\masm32rt.inc
include heinemannlib.inc
includelib heinemannlib.lib
include \masm32\include\gdiplus.inc
includelib \masm32\lib\gdiplus.lib
include adp_gui.inc
.data
move macro x1,y1
mov eax,y1
mov x1,eax
endm
__main_hwnd_ HWND ?
__async_keys_vals_ List<>
__async_keys_funs_ List<>
__init_index_ DWORD 100
__window_open_ DWORD 0
__mouse_move_main_ List<>
__mouse_click_left_main_ List<>
__mouse_click_right_main_ List<>
__mouse_down_left_main_ List<>
__mouse_down_right_main_ List<>
__key_handle_main_ List<>
__button_funcs_ids_ List<>
__button_funcs_offsets_ List<>
__control_handles_ List<>
__wnd_class_name_ BYTE "Sample Window Class",0
__gdipsi_ GdiplusStartupInput <1>
__one_float_ REAL4 1.0
__main_image_ HBITMAP ?
__main_hdc_ HDC ?
__main_graphics_ DWORD ?
__main_window_width_ DWORD ?
__main_window_height_ DWORD ?
.code
__wind_proc_ PROC,hwnd:HWND,msg:UINT, wParam:WPARAM,lParam:LPARAM
switch msg
case WM_KEYDOWN
xor ecx,ecx
jmp _test
start_loop:
push ecx
invoke list_get_item, offset __key_handle_main_,ecx
push wParam
call eax
pop ecx
inc ecx
_test:
cmp ecx,__key_handle_main_.count
jl start_loop
case WM_MOUSEMOVE
xor ecx,ecx
jmp _test1
start_loop1:
push ecx
invoke list_get_item, offset __mouse_move_main_,ecx
mov ecx,lParam
shr ecx,16 ; ecx = y coordinate = top 16 bits
push ecx
mov ebx,lParam
and ebx,00000ffffh ; ebx = x coordinate = bottom 16 bits
push ebx
call eax
pop ecx
inc ecx
_test1:
cmp ecx,__mouse_move_main_.count
jl start_loop1
case WM_LBUTTONDOWN
xor ecx,ecx
jmp _test2
start_loop2:
push ecx
invoke list_get_item, offset __mouse_down_left_main_,ecx
mov ecx,lParam
shr ecx,16 ; ecx = y coordinate = top 16 bits
push ecx
mov ebx,lParam
and ebx,00000ffffh ; ebx = x coordinate = bottom 16 bits
push ebx
call eax
pop ecx
inc ecx
_test2:
cmp ecx,__mouse_down_left_main_.count
jl start_loop2
case WM_RBUTTONDOWN
xor ecx,ecx
jmp _test3
start_loop3:
push ecx
invoke list_get_item, offset __mouse_down_right_main_,ecx
mov ecx,lParam
shr ecx,16 ; ecx = y coordinate = top 16 bits
push ecx
mov ebx,lParam
and ebx,00000ffffh ; ebx = x coordinate = bottom 16 bits
push ebx
call eax
pop ecx
inc ecx
_test3:
cmp ecx,__mouse_down_right_main_.count
jl start_loop3
case WM_LBUTTONUP
xor ecx,ecx
jmp _test4
start_loop4:
push ecx
invoke list_get_item, offset __mouse_click_left_main_,ecx
mov ecx,lParam
shr ecx,16 ; ecx = y coordinate = top 16 bits
push ecx
mov ebx,lParam
and ebx,00000ffffh ; ebx = x coordinate = bottom 16 bits
push ebx
call eax
pop ecx
inc ecx
_test4:
cmp ecx,__mouse_click_left_main_.count
jl start_loop4
case WM_RBUTTONUP
xor ecx,ecx
jmp _test5
start_loop5:
push ecx
invoke list_get_item, offset __mouse_click_right_main_,ecx
mov ecx,lParam
shr ecx,16 ; ecx = y coordinate = top 16 bits
push ecx
mov ebx,lParam
and ebx,00000ffffh ; ebx = x coordinate = bottom 16 bits
push ebx
call eax
pop ecx
inc ecx
_test5:
cmp ecx,__mouse_click_right_main_.count
jl start_loop5
case WM_COMMAND
invoke list_index_of,offset __button_funcs_ids_,wParam
cmp eax,-1
je not_a_button
invoke list_get_item,offset __button_funcs_offsets_,eax
test eax,eax
je not_a_button
call eax
not_a_button:
case WM_CLOSE
invoke DestroyWindow,hwnd;
mov __window_open_,0;
invoke ExitProcess,0;
case WM_DESTROY
invoke PostQuitMessage,0;
default
invoke DefWindowProc,hwnd, msg, wParam, lParam
endsw
ret
__wind_proc_ endp
adp_main PROC
local msg:MSG,hdc:HDC
pusha
mov hdc,rv(GetDC,__main_hwnd_)
invoke BitBlt,hdc, 0, 0, __main_window_width_, __main_window_height_, __main_hdc_, 0, 0, SRCCOPY;
invoke ReleaseDC,__main_hwnd_,hdc
xor ecx,ecx
jmp _test
start_loop:
push ecx
invoke list_get_item, offset __async_keys_vals_,ecx
invoke GetAsyncKeyState,eax
test eax,eax
jz key_up
mov eax,[esp]
invoke list_get_item,offset __async_keys_funs_,eax
call eax
key_up:
pop ecx
inc ecx
_test:
cmp ecx,__async_keys_vals_.count
jl start_loop
invoke PeekMessage, addr msg, __main_hwnd_, 0, 0, PM_REMOVE
test eax,eax ; if exit code
jz exit_window
invoke TranslateMessage, addr msg
invoke DispatchMessage, addr msg
exit_window:
popa
ret
adp_main ENDP
adp_open_window PROC,w:DWORD,h:DWORD, ttl:DWORD
LOCAL wc:WNDCLASS,gdiplusToken:DWORD,hdc:HDC
push ebx
push ecx
push edx
mov __window_open_ ,1
move __main_window_width_,w
move __main_window_height_,h
invoke GdiplusStartup, addr gdiplusToken, offset __gdipsi_, NULL
mov wc.lpfnWndProc, __wind_proc_;
mov wc.hInstance, rv(GetModuleHandle, 0) ; get the module handle to hInstance
mov wc.lpszClassName, offset __wnd_class_name_
mov wc.hbrBackground, rv(GetStockObject,WHITE_BRUSH);
mov wc.hCursor, rv(LoadCursor,NULL, IDC_ARROW);
mov wc.hIcon,rv(LoadIcon,NULL,IDI_APPLICATION)
invoke RegisterClass,addr wc
invoke CreateWindowEx, NULL, wc.lpszClassName, ttl, ; create the window
WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or WS_MINIMIZEBOX or WS_VISIBLE or WS_CLIPCHILDREN,
50, 50, w, h, ; x, y, w, h
NULL, NULL, wc.hInstance, NULL
mov __main_hwnd_,eax
.if __main_hwnd_ == NULL
pop edx
pop ecx
pop ebx
mov eax,0
ret
.endif
invoke ShowWindow,__main_hwnd_, 1
invoke UpdateWindow,__main_hwnd_
mov hdc, rv(GetDC,__main_hwnd_);
mov __main_hdc_ ,rv(CreateCompatibleDC,hdc)
mov __main_image_,rv(CreateCompatibleBitmap,hdc, w, h)
invoke SelectObject,__main_hdc_, __main_image_;
invoke ReleaseDC,__main_hwnd_, hdc
invoke GdipCreateFromHDC,__main_hdc_, addr __main_graphics_
pop edx
pop ecx
pop ebx
mov eax,1
ret
adp_open_window ENDP
adp_set_window_title PROC,txt:DWORD
pusha
invoke SetWindowText,__main_hwnd_,txt
popa
ret
adp_set_window_title ENDP
adp_get_window_open PROC
mov eax,__window_open_
ret
adp_get_window_open ENDP
adp_add_async_key_listener PROC key:DWORD, func:DWORD
invoke list_insert,offset __async_keys_vals_,key;
invoke list_insert,offset __async_keys_funs_,func;
ret
adp_add_async_key_listener ENDP
adp_add_key_listener PROC,func:DWORD
invoke list_insert, offset __key_handle_main_,func
ret
adp_add_key_listener endp
adp_add_mouse_move_listener PROC,func:DWORD
invoke list_insert, offset __mouse_move_main_,func
ret
adp_add_mouse_move_listener endp
adp_add_mouse_click_left_listener PROC,func:DWORD
invoke list_insert, offset __mouse_click_left_main_,func
ret
adp_add_mouse_click_left_listener endp
adp_add_mouse_click_right_listener PROC,func:DWORD
invoke list_insert,offset __mouse_click_right_main_,func
ret
adp_add_mouse_click_right_listener endp
adp_add_mouse_down_left_listener PROC,func:DWORD
invoke list_insert, offset __mouse_down_left_main_,func
ret
adp_add_mouse_down_left_listener endp
adp_add_mouse_down_right_listener PROC,func:DWORD
invoke list_insert,offset __mouse_down_right_main_,func
ret
adp_add_mouse_down_right_listener endp
adp_fill_ellipse PROC, x:dword,y:dword,w:dword, h:dword, color:dword
local brsh:HBRUSH,pn:HPEN
pusha
mov brsh, rv(CreateSolidBrush,color);
mov pn, rv(CreatePen,0, 0, color);
invoke SelectObject,__main_hdc_, pn
invoke SelectObject,__main_hdc_, brsh
mov eax,x
add w,eax
mov eax,y
add h,eax
invoke Ellipse,__main_hdc_, x, y, w, h
invoke DeleteObject,brsh
invoke DeleteObject,pn
popa
ret
adp_fill_ellipse endp
adp_fill_rect PROC, x:dword,y:dword,w:dword, h:dword, color:dword
local brsh:HBRUSH,pn:HPEN
pusha
mov brsh, rv(CreateSolidBrush,color);
mov pn, rv(CreatePen,0, 0, color);
invoke SelectObject,__main_hdc_, pn
invoke SelectObject,__main_hdc_, brsh
mov eax,x
add w,eax
mov eax,y
add h,eax
invoke Rectangle,__main_hdc_, x, y, w, h
invoke DeleteObject,brsh
invoke DeleteObject,pn
popa
ret
adp_fill_rect endp
adp_draw_ellipse PROC, x:dword,y:dword,w:dword, h:dword, color:dword
local pn:HPEN
pusha
invoke SelectObject,__main_hdc_,rv(GetStockObject,NULL_BRUSH)
mov pn, rv(CreatePen,0, 1, color);
invoke SelectObject,__main_hdc_, pn
mov eax,x
add w,eax
mov eax,y
add h,eax
invoke Ellipse,__main_hdc_, x, y, w, h
invoke DeleteObject,pn
popa
ret
adp_draw_ellipse endp
adp_draw_rect PROC, x:dword,y:dword,w:dword, h:dword, color:dword
local pn:HPEN
pusha
invoke SelectObject,__main_hdc_,rv(GetStockObject,NULL_BRUSH)
mov pn, rv(CreatePen,0, 1, color);
invoke SelectObject,__main_hdc_, pn
mov eax,x
add w,eax
mov eax,y
add h,eax
invoke Rectangle,__main_hdc_, x, y, w, h
invoke DeleteObject,pn
popa
ret
adp_draw_rect endp
adp_draw_text PROC, x:DWORD, y:DWORD, text:dword, tsize:dword, color:dword
local fontn:HFONT,rectc:RECT
pusha
invoke SetBkMode,__main_hdc_, TRANSPARENT;
mov fontn, rv(CreateFont,tsize, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
invoke SelectObject,__main_hdc_, fontn
invoke SetTextColor,__main_hdc_, color
move rectc.left, x
move rectc.top, y
mov rectc.right, 0FFFFh
mov rectc.bottom, 0FFFFh
invoke DrawText, __main_hdc_, text, -1, addr rectc, DT_SINGLELINE or DT_LEFT or DT_TOP
invoke DeleteObject, fontn
popa
ret
adp_draw_text ENDP
adp_draw_line PROC,x1:dword, y1:dword, x2:dword,y2:dword, color:dword
LOCAL ppen:DWORD
pusha
or color,0ff000000h
invoke GdipCreatePen1,color,__one_float_,UnitPixel,addr ppen
invoke GdipDrawLineI, __main_graphics_, ppen , x1,y1,x2,y2
invoke GdipDeletePen,ppen
popa
ret
adp_draw_line ENDP
adp_create_button PROC , butt:DWORD, x:DWORD, y:DWORD, w:DWORD, h:DWORD,text:DWORD, func:DWORD
pusha
invoke list_insert, offset __button_funcs_ids_, __init_index_
invoke list_insert, offset __button_funcs_offsets_, func
mov ebx,butt
buto equ [ebx.Button]
move buto.x, x;
move buto.y , y;
move buto.w, w;
move buto.h, h;
move buto.id , __init_index_;
invoke CreateWindowEx , 0, reparg("BUTTON"), text, WS_CHILD or WS_VISIBLE, x, y, w, h, __main_hwnd_, __init_index_, rv(GetModuleHandle,NULL), NULL
mov buto.handle,eax
invoke list_insert,offset __control_handles_, eax
inc __init_index_
popa
ret
adp_create_button ENDP
adp_button_set_x PROC,butt:DWORD, x:DWORD
pusha
mov ebx,butt
buto equ [ebx.Button]
invoke MoveWindow, buto.handle, x, buto.y, buto.w, buto.h, 0;
move buto.x , x;
popa
ret
adp_button_set_x endp
adp_button_set_y PROC,butt:DWORD, y:DWORD
pusha
mov ebx,butt
buto equ [ebx.Button]
invoke MoveWindow, buto.handle, buto.x, y, buto.w, buto.h, 0;
move buto.y , y;
popa
ret
adp_button_set_y endp
adp_button_set_w PROC,butt:DWORD, w:DWORD
pusha
mov ebx,butt
buto equ [ebx.Button]
invoke MoveWindow, buto.handle, buto.x, buto.y, w, buto.h, 0;
move buto.w , w;
popa
ret
adp_button_set_w endp
adp_button_set_h PROC,butt:DWORD, h:DWORD
pusha
mov ebx,butt
buto equ [ebx.Button]
invoke MoveWindow, buto.handle, buto.x, buto.y, buto.w, h, 0;
move buto.h , h;
popa
ret
adp_button_set_h endp
adp_button_set_text PROC, butt:DWORD, text:DWORD
pusha
mov ebx,butt
invoke SendMessage, [ebx.Button].handle, WM_SETTEXT, 0,text;
popa
ret
adp_button_set_text endp
adp_button_set_function PROC, butt:DWORD , func:DWORD
pusha
mov ebx,butt
invoke list_index_of,offset __button_funcs_ids_,[ebx.Button].id
cmp eax,-1
je the_end
invoke list_set, offset __button_funcs_offsets_,eax , func
the_end:
popa
ret
adp_button_set_function ENDP
adp_button_get_text PROC, butt:DWORD
push ebx
push ecx
push edx
invoke Alloc,512
push eax
mov ebx,butt
invoke SendMessage,[ebx.Button].handle, WM_GETTEXT, 512, eax;
pop eax
pop edx
pop ecx
pop ebx
ret
adp_button_get_text endp
adp_create_textfield PROC , butt:DWORD, x:DWORD, y:DWORD, w:DWORD, h:DWORD
local fontn:HFONT
pusha
mov ebx,butt
buto equ [ebx.TextField]
move buto.x, x;
move buto.y , y;
move buto.w, w;
move buto.h, h;
invoke CreateWindowEx , 0, reparg("EDIT"), NULL, WS_CHILD or WS_VISIBLE or WS_BORDER, x, y, w, h, __main_hwnd_, __init_index_, rv(GetModuleHandle,NULL), NULL
mov buto.handle,eax
sub h,4
mov fontn, rv(CreateFont,h, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
invoke SendMessage,buto.handle,WM_SETFONT,fontn,FALSE
invoke DeleteObject,fontn
invoke list_insert,offset __control_handles_, eax
inc __init_index_
popa
ret
adp_create_textfield ENDP
adp_textfield_set_x PROC,butt:DWORD, x:DWORD
pusha
mov ebx,butt
buto equ [ebx.TextField]
invoke MoveWindow, buto.handle, x, buto.y, buto.w, buto.h, 0;
move buto.x , x;
popa
ret
adp_textfield_set_x endp
adp_textfield_set_y PROC,butt:DWORD, y:DWORD
pusha
mov ebx,butt
buto equ [ebx.TextField]
invoke MoveWindow, buto.handle, buto.x, y, buto.w, buto.h, 0;
move buto.y , y;
popa
ret
adp_textfield_set_y endp
adp_textfield_set_w PROC,butt:DWORD, w:DWORD
pusha
mov ebx,butt
buto equ [ebx.TextField]
invoke MoveWindow, buto.handle, buto.x, buto.y, w, buto.h, 0;
move buto.w , w;
popa
ret
adp_textfield_set_w endp
adp_textfield_set_h PROC,butt:DWORD, h:DWORD
pusha
mov ebx,butt
buto equ [ebx.TextField]
invoke MoveWindow, buto.handle, buto.x, buto.y, buto.w, h, 0;
move buto.h , h;
popa
ret
adp_textfield_set_h endp
adp_textfield_set_text PROC, butt:DWORD, text:DWORD
pusha
mov ebx,butt
invoke SendMessage, [ebx.TextField].handle, WM_SETTEXT, 0,text;
popa
ret
adp_textfield_set_text endp
adp_textfield_get_text PROC, butt:DWORD
push ebx
push ecx
push edx
invoke Alloc,512
push eax
mov ebx,butt
invoke SendMessage,[ebx.TextField].handle, WM_GETTEXT, 512, eax;
pop eax
pop edx
pop ecx
pop ebx
ret
adp_textfield_get_text endp
adp_load_image PROC, img:DWORD, src:DWORD
pusha
invoke str_length,src
shl eax,1
invoke Alloc,eax
push eax
invoke lstrlen,src
mov ebx,[esp]
invoke crt_mbstowcs, ebx, src, eax
mov eax,[esp]
mov ebx,img
add ebx,8
invoke GdipLoadImageFromFile,eax,ebx
call Free
mov ebx,img
mov eax,img
invoke GdipGetImageWidth,[ebx.Img].info,eax
mov ebx,img
mov eax,img
add eax,4
invoke GdipGetImageHeight,[ebx.Img].info,eax
popa
ret
adp_load_image ENDP
adp_draw_image PROC,img:DWORD,x:DWORD,y:DWORD
pusha
mov ebx,img
invoke GdipDrawImageRectI,__main_graphics_,[ebx.Img].info,x,y,[ebx.Img].w,[ebx.Img].h
popa
ret
adp_draw_image endp
adp_draw_image_scale PROC,img:DWORD,x:DWORD,y:DWORD,w:DWORD,h:DWORD
pusha
mov ebx,img
invoke GdipDrawImageRectI,__main_graphics_,[ebx.Img].info,x,y,w,h
popa
ret
adp_draw_image_scale endp
adp_draw_image_crop PROC,img:DWORD,x:DWORD,y:DWORD,x1:DWORD,y1:DWORD,w1:DWORD,h1:DWORD
pusha
mov ebx,img
invoke GdipDrawImageRectRectI,__main_graphics_,[ebx.Img].info,x,y,[ebx.Img].w,[ebx.Img].h,x1,y1,w1,h1,UnitPixel,NULL,NULL,NULL
popa
ret
adp_draw_image_crop endp
adp_clear_screen_to_color PROC,color:DWORD
pusha
or color,0FF000000h
INVOKE GdipGraphicsClear,__main_graphics_,color
popa
ret
adp_clear_screen_to_color endp
adp_draw_image_scale_crop PROC,img:DWORD,x:DWORD,y:DWORD,w:DWORD,h:DWORD,x1:DWORD,y1:DWORD,w1:DWORD,h1:DWORD
pusha
mov ebx,img
invoke GdipDrawImageRectRectI,__main_graphics_,[ebx.Img].info,x,y,w,h,x1,y1,w1,h1,UnitPixel,NULL,NULL,NULL
popa
ret
adp_draw_image_scale_crop endp
adp_button_delete PROC,button:DWORD
pusha
mov ebx,button
invoke DestroyWindow, [ebx.Button].handle
mov ebx,[button]
but equ [ebx.Button]
mov but.x,0
mov but.y,0
mov but.w,0
mov but.h,0
mov but.handle,0
mov but.id,0
popa
ret
adp_button_delete ENDP
adp_textfield_delete PROC,tf:DWORD
pusha
mov ebx,tf
invoke DestroyWindow, [ebx.TextField].handle
mov ebx,[tf]
but equ [ebx.TextField]
mov but.x,0
mov but.y,0
mov but.w,0
mov but.h,0
mov but.handle,0
popa
ret
adp_textfield_delete ENDP
adp_get_main_hwnd PROC
mov eax,__main_hwnd_
ret
adp_get_main_hwnd ENDP
adp_get_main_hdc PROC
mov eax,__main_hdc_
ret
adp_get_main_hdc endp
adp_get_pixel PROC,x:DWORD,y:DWORD
push ebx
push ecx
push edx
invoke GetPixel, __main_hdc_,x,y
and eax,0ffffffh
pop edx
pop ecx
pop ebx
ret
adp_get_pixel ENDP
adp_image_delete PROC, img:DWORD
pusha
mov ebx,img
invoke GdipDisposeImage,[ebx.Img].info
mov [ebx.Img].w,0
mov [ebx.Img].h,0
mov [ebx.Img].info,0
popa
ret
adp_image_delete ENDP
adp_set_icon PROC, src:DWORD
local icon:HICON
pusha
mov icon,rv(LoadImage,NULL,src,IMAGE_ICON,0,0,LR_LOADFROMFILE or LR_DEFAULTSIZE or LR_SHARED )
invoke SendMessage,__main_hwnd_,WM_SETICON,TRUE,icon
invoke SendMessage,__main_hwnd_,WM_SETICON,FALSE,icon
popa
ret
adp_set_icon ENDP
adp_get_screen_image PROC,src:DWORD
push ebx
push ecx
push edx
invoke CopyImage,__main_image_, IMAGE_BITMAP, 0, 0, LR_DEFAULTSIZE
push eax
mov ebx,src
invoke GdipCreateBitmapFromHBITMAP,eax,NULL,[ebx.Img].info
mov ebx,src
mov eax,src
invoke GdipGetImageWidth,[ebx.Img].info,eax
mov ebx,src
mov eax,src
add eax,4
invoke GdipGetImageHeight,[ebx.Img].info,eax
call DeleteObject
pop edx
pop ecx
pop edx
adp_get_screen_image ENDP
end
| 21.458704 | 158 | 0.768771 |
5d7c871cb12083edebdb99bc6b4716e0ff9f62f8 | 149 | asm | Assembly | libsrc/_DEVELOPMENT/font/fzx/fonts/dkud3/Belegost/_ff_dkud3_Belegost3.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/font/fzx/fonts/dkud3/Belegost/_ff_dkud3_Belegost3.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/font/fzx/fonts/dkud3/Belegost/_ff_dkud3_Belegost3.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
SECTION rodata_font
SECTION rodata_font_fzx
PUBLIC _ff_dkud3_Belegost3
_ff_dkud3_Belegost3:
BINARY "font/fzx/fonts/dkud3/Belegost/belegost3.fzx"
| 14.9 | 52 | 0.852349 |
b9177d40950bd2534357b52b4d2aa0ffde52a83f | 1,248 | asm | Assembly | tests/rule_arg_simple.asm | jonfoster/customasm | 39457da0c01d3ad734178d6bf74f907c28758707 | [
"Apache-2.0"
] | null | null | null | tests/rule_arg_simple.asm | jonfoster/customasm | 39457da0c01d3ad734178d6bf74f907c28758707 | [
"Apache-2.0"
] | null | null | null | tests/rule_arg_simple.asm | jonfoster/customasm | 39457da0c01d3ad734178d6bf74f907c28758707 | [
"Apache-2.0"
] | null | null | null | ; ::: include
#ruledef test
{
ld {x} => 0x55 @ x[7:0]
}
; :::
ld 0 ; = 0x5500
; :::
ld 12 ; = 0x550c
; :::
ld 0xff ; = 0x55ff
; :::
ld 0x123 ; = 0x5523
; :::
ld ; error: no match
; :::
ld x ; error: unknown
; ===========
; ::: include
#ruledef test
{
ld {x} => 0x55 @ x`8
}
; :::
ld 0 ; = 0x5500
; :::
ld 12 ; = 0x550c
; :::
ld 0xff ; = 0x55ff
; :::
ld 0x123 ; = 0x5523
; :::
ld ; error: no match
; :::
ld x ; error: unknown
; ===========
; ::: include
#ruledef test
{
ld {x}, {y} => 0x55 @ x`8 @ y`8
}
; :::
ld 0x11, 0x22 ; = 0x551122
; :::
ld 0x11, ; error: no match
; :::
ld 0x11, x ; error: unknown
; ===========
; ::: include
#ruledef test
{
ld {x} => 0x55 @ x
}
; :::
ld 0x11 ; = 0x5511
; :::
ld 0x1122 ; = 0x551122
; :::
ld 0x112233 ; = 0x55112233
; :::
ld 123 ; error: failed to resolve
; ===========
; ::: include
#ruledef test
{
ld {x} => x
}
; :::
ld 0x11 ; = 0x11
; :::
ld 0x1122 ; = 0x1122
; :::
ld 0x112233 ; = 0x112233
; :::
ld 123 ; error: size of instruction
; ===========
; ::: include
#ruledef test
{
ld {x} => y
}
; :::
ld 0x11 ; error: failed to resolve
; :::
ld 0x1122 ; error: failed to resolve
; :::
ld 0x112233 ; error: failed to resolve
; :::
ld 123 ; error: failed to resolve | 11.243243 | 38 | 0.486378 |
f908d004da09bb62ffce78c8cd220e31c9529542 | 696 | asm | Assembly | oeis/189/A189154.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/189/A189154.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/189/A189154.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A189154: Number of n X 2 binary arrays without the pattern 0 0 1 1 diagonally, vertically or horizontally
; 4,16,64,225,784,2704,9216,31329,106276,360000,1218816,4124961,13957696,47224384,159769600,540516001,1828588644,6186137104,20927672896,70798034241,239508444816,810252019600,2741064339456,9272956793409,31370192828100,106124610822400,359017002689536,1214545849612225,4108779232057600,13899900676665600,47023027347460096,159077762384818369,538156215976246596,1820569439128204944,6158942298444289600,20835552555400694049,70486169412903805584,238453003109347685136,806680731327231222784
add $0,2
seq $0,8937 ; a(n) = Sum_{k=0..n} T(k) where T(n) are the tribonacci numbers A000073.
pow $0,2
| 99.428571 | 482 | 0.852011 |
aabee870e464945979b6dc2e267e8d60b8987e38 | 598 | asm | Assembly | programs/oeis/088/A088982.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/088/A088982.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/088/A088982.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A088982: Primes that are between consecutive prime-indexed primes.
; 7,13,19,23,29,37,43,47,53,61,71,73,79,89,97,101,103,107,113,131,137,139,149,151,163,167,173,181,193,197,199,223,227,229,233,239,251,257,263,269,271,281,293,307,311,313,317,337,347,349,359,373,379,383,389,397,409,419,421,433,439,443,449,457,463,467,479,487,491,499,503,521,523,541,557,569,571,577,593,601,607,613,619,631,641,643,647,653,659,661,673,677,683,691,701,719,727,733,743,751
seq $0,72668 ; Numbers one less than composite numbers.
sub $0,1
seq $0,98090 ; Numbers k such that 2k-3 is prime.
sub $0,5
mul $0,2
add $0,7
| 59.8 | 385 | 0.732441 |
3a8ad62b38924c5b322c6ab9485226c1c1c5f60b | 356 | asm | Assembly | libsrc/fcntl/test/open.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | libsrc/fcntl/test/open.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | null | null | null | libsrc/fcntl/test/open.asm | Toysoft/z88dk | f930bef9ac4feeec91a07303b79ddd9071131a24 | [
"ClArtistic"
] | 1 | 2019-12-03T23:28:20.000Z | 2019-12-03T23:28:20.000Z | ; Dummy function to keep rest of libs happy
;
; $Id: open.asm,v 1.6 2016-03-06 21:39:54 dom Exp $
;
SECTION code_clib
INCLUDE "target/test/def/test_cmds.def"
PUBLIC open
PUBLIC _open
; char *name, int flags, mode_t mode)
.open
._open
pop af
pop bc
pop de
pop hl
push hl
push de
push bc
push af
ld a,CMD_OPENF
rst 16
ret
| 13.692308 | 51 | 0.657303 |
337499f32a19dcb1ee651d489bbba06a5e439369 | 541 | asm | Assembly | programs/oeis/188/A188074.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/188/A188074.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/188/A188074.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A188074: Positions of 1 in the zero-one sequence [nr]-[3r]-[nr-3r], where r=sqrt(3), n>=1.
; 7,11,18,22,26,33,37,41,48,52,59,63,67,74,78,82,89,93,97,104,108,115,119,123,130,134,138,145,149,153,160,164,171,175,179,186,190,194,201,205,212,216,220,227,231,235,242,246,250,257,261,268,272,276,283,287,291,298,302,306,313,317,324,328,332,339,343,347,354,358,362,369,373,380,384,388,395,399
mov $2,$0
add $0,28
mul $0,3
sub $0,$2
mul $0,28
div $0,41
mov $3,$0
sub $3,55
lpb $0
sub $0,1
add $3,2
lpe
add $3,$2
add $1,$3
sub $1,109
mov $0,$1
| 27.05 | 293 | 0.659889 |
6fc0c07d3e92027f29d1190adc3990950d7d417e | 612 | asm | Assembly | programs/oeis/261/A261241.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/261/A261241.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/261/A261241.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A261241: One half of numbers representable in at least two different ways as sums of four nonvanishing cubes. See A259060 for these numbers and their representations.
; 3213,3950,4807,5796,6929,8218,9675,11312,13141,15174,17423,19900,22617,25586,28819,32328,36125,40222,44631,49364,54433,59850,65627,71776,78309,85238,92575,100332,108521,117154,126243,135800,145837,156366
mov $5,$0
add $0,10
mov $3,3
mov $4,5
lpb $0,1
sub $0,1
mov $1,$2
add $2,6
add $3,2
add $3,$4
sub $3,4
add $4,$1
lpe
sub $1,$1
add $1,1
sub $3,3
mul $3,2
add $1,$3
sub $1,6
lpb $5,1
add $1,191
sub $5,1
lpe
add $1,1718
| 21.857143 | 205 | 0.702614 |
26eb8a3452d19cb22ebbb9b14d981c384b2fccce | 3,507 | asm | Assembly | private/ntos/dll/i386/ldrthunk.asm | King0987654/windows2000 | 01f9c2e62c4289194e33244aade34b7d19e7c9b8 | [
"MIT"
] | 11 | 2017-09-02T11:27:08.000Z | 2022-01-02T15:25:24.000Z | private/ntos/dll/i386/ldrthunk.asm | King0987654/windows2000 | 01f9c2e62c4289194e33244aade34b7d19e7c9b8 | [
"MIT"
] | null | null | null | private/ntos/dll/i386/ldrthunk.asm | King0987654/windows2000 | 01f9c2e62c4289194e33244aade34b7d19e7c9b8 | [
"MIT"
] | 14 | 2019-01-16T01:01:23.000Z | 2022-02-20T15:54:27.000Z | title "LdrInitializeThunk"
;++
;
; Copyright (c) 1989 Microsoft Corporation
;
; Module Name:
;
; ldrthunk.s
;
; Abstract:
;
; This module implements the thunk for the LdrpInitialize APC routine.
;
; Author:
;
; Steven R. Wood (stevewo) 27-Apr-1990
;
; Environment:
;
; Any mode.
;
; Revision History:
;
;--
.386p
.xlist
include ks386.inc
include callconv.inc ; calling convention macros
.list
EXTRNP _LdrpInitialize,3
_TEXT SEGMENT DWORD PUBLIC 'CODE'
ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING
page , 132
;++
;
; VOID
; LdrInitializeThunk(
; IN PVOID NormalContext,
; IN PVOID SystemArgument1,
; IN PVOID SystemArgument2
; )
;
; Routine Description:
;
; This function computes a pointer to the context record on the stack
; and jumps to the LdrpInitialize function with that pointer as its
; parameter.
;
; Arguments:
;
; NormalContext - User Mode APC context parameter (ignored).
;
; SystemArgument1 - User Mode APC system argument 1 (ignored).
;
; SystemArgument2 - User Mode APC system argument 2 (ignored).
;
; Return Value:
;
; None.
;
;--
cPublicProc _LdrInitializeThunk , 4
NormalContext equ [esp + 4]
SystemArgument1 equ [esp + 8]
SystemArgument2 equ [esp + 12]
Context equ [esp + 16]
lea eax,Context ; Calculate address of context record
mov NormalContext,eax ; Pass as first parameter to
if DEVL
xor ebp,ebp ; Mark end of frame pointer list
endif
IFDEF STD_CALL
jmp _LdrpInitialize@12 ; LdrpInitialize
ELSE
jmp _LdrpInitialize ; LdrpInitialize
ENDIF
stdENDP _LdrInitializeThunk
;++
;
; VOID
; LdrpCallInitRoutine(
; IN PDLL_INIT_ROUTINE InitRoutine,
; IN PVOID DllHandle,
; IN ULONG Reason,
; IN PCONTEXT Context OPTIONAL
; )
;
; Routine Description:
;
; This function calls an x86 DLL init routine. It is robust
; against DLLs that don't preserve EBX or fail to clean up
; enough stack.
;
; The only register that the DLL init routine cannot trash is ESI.
;
; Arguments:
;
; InitRoutine - Address of init routine to call
;
; DllHandle - Handle of DLL to call
;
; Reason - one of the DLL_PROCESS_... or DLL_THREAD... values
;
; Context - context pointer or NULL
;
; Return Value:
;
; FALSE if the init routine fails, TRUE for success.
;
;--
cPublicProc _LdrpCallInitRoutine , 4
InitRoutine equ [ebp + 8]
DllHandle equ [ebp + 12]
Reason equ [ebp + 16]
Context equ [ebp + 20]
stdENDP _LdrpCallInitRoutine
push ebp
mov ebp, esp
push esi ; save esi across the call
push edi ; save edi across the call
push ebx ; save ebx on the stack across the call
mov esi,esp ; save the stack pointer in esi across the call
push Context
push Reason
push DllHandle
call InitRoutine
mov esp,esi ; restore the stack pointer in case callee forgot to clean up
pop ebx ; restore ebx
pop edi ; restore edi
pop esi ; restore esi
pop ebp
stdRET _LdrpCallInitRoutine
_TEXT ends
end
| 23.536913 | 90 | 0.590818 |
4dfde3e481ab652dcd58cb623936884ab9430c6c | 38,863 | asm | Assembly | kill.asm | zoharit/OS_SystemCalls-Scheduling | 63cf2718871d936a5594d259956c5743bf920567 | [
"MIT-0"
] | null | null | null | kill.asm | zoharit/OS_SystemCalls-Scheduling | 63cf2718871d936a5594d259956c5743bf920567 | [
"MIT-0"
] | null | null | null | kill.asm | zoharit/OS_SystemCalls-Scheduling | 63cf2718871d936a5594d259956c5743bf920567 | [
"MIT-0"
] | null | null | null |
_kill: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char **argv)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 56 push %esi
4: 53 push %ebx
5: 83 e4 f0 and $0xfffffff0,%esp
8: 83 ec 10 sub $0x10,%esp
b: 8b 45 08 mov 0x8(%ebp),%eax
e: 8b 55 0c mov 0xc(%ebp),%edx
int i;
if(argc < 2){
11: 83 f8 01 cmp $0x1,%eax
14: 7e 2f jle 45 <main+0x45>
16: 8d 5a 04 lea 0x4(%edx),%ebx
19: 8d 34 82 lea (%edx,%eax,4),%esi
1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
printf(2, "usage: kill pid...\n");
exit(0);
}
for(i=1; i<argc; i++)
kill(atoi(argv[i]));
20: 8b 03 mov (%ebx),%eax
22: 83 c3 04 add $0x4,%ebx
25: 89 04 24 mov %eax,(%esp)
28: e8 f3 01 00 00 call 220 <atoi>
2d: 89 04 24 mov %eax,(%esp)
30: e8 93 02 00 00 call 2c8 <kill>
for(i=1; i<argc; i++)
35: 39 f3 cmp %esi,%ebx
37: 75 e7 jne 20 <main+0x20>
exit(0);
39: c7 04 24 00 00 00 00 movl $0x0,(%esp)
40: e8 53 02 00 00 call 298 <exit>
printf(2, "usage: kill pid...\n");
45: c7 44 24 04 58 07 00 movl $0x758,0x4(%esp)
4c: 00
4d: c7 04 24 02 00 00 00 movl $0x2,(%esp)
54: e8 87 03 00 00 call 3e0 <printf>
exit(0);
59: c7 04 24 00 00 00 00 movl $0x0,(%esp)
60: e8 33 02 00 00 call 298 <exit>
65: 66 90 xchg %ax,%ax
67: 66 90 xchg %ax,%ax
69: 66 90 xchg %ax,%ax
6b: 66 90 xchg %ax,%ax
6d: 66 90 xchg %ax,%ax
6f: 90 nop
00000070 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
70: 55 push %ebp
71: 89 e5 mov %esp,%ebp
73: 8b 45 08 mov 0x8(%ebp),%eax
76: 8b 4d 0c mov 0xc(%ebp),%ecx
79: 53 push %ebx
char *os;
os = s;
while((*s++ = *t++) != 0)
7a: 89 c2 mov %eax,%edx
7c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
80: 41 inc %ecx
81: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
85: 42 inc %edx
86: 84 db test %bl,%bl
88: 88 5a ff mov %bl,-0x1(%edx)
8b: 75 f3 jne 80 <strcpy+0x10>
;
return os;
}
8d: 5b pop %ebx
8e: 5d pop %ebp
8f: c3 ret
00000090 <strcmp>:
int
strcmp(const char *p, const char *q)
{
90: 55 push %ebp
91: 89 e5 mov %esp,%ebp
93: 8b 4d 08 mov 0x8(%ebp),%ecx
96: 53 push %ebx
97: 8b 5d 0c mov 0xc(%ebp),%ebx
while(*p && *p == *q)
9a: 0f b6 01 movzbl (%ecx),%eax
9d: 0f b6 13 movzbl (%ebx),%edx
a0: 84 c0 test %al,%al
a2: 75 18 jne bc <strcmp+0x2c>
a4: eb 22 jmp c8 <strcmp+0x38>
a6: 8d 76 00 lea 0x0(%esi),%esi
a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
b0: 41 inc %ecx
while(*p && *p == *q)
b1: 0f b6 01 movzbl (%ecx),%eax
p++, q++;
b4: 43 inc %ebx
b5: 0f b6 13 movzbl (%ebx),%edx
while(*p && *p == *q)
b8: 84 c0 test %al,%al
ba: 74 0c je c8 <strcmp+0x38>
bc: 38 d0 cmp %dl,%al
be: 74 f0 je b0 <strcmp+0x20>
return (uchar)*p - (uchar)*q;
}
c0: 5b pop %ebx
return (uchar)*p - (uchar)*q;
c1: 29 d0 sub %edx,%eax
}
c3: 5d pop %ebp
c4: c3 ret
c5: 8d 76 00 lea 0x0(%esi),%esi
c8: 5b pop %ebx
c9: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
cb: 29 d0 sub %edx,%eax
}
cd: 5d pop %ebp
ce: c3 ret
cf: 90 nop
000000d0 <strlen>:
uint
strlen(const char *s)
{
d0: 55 push %ebp
d1: 89 e5 mov %esp,%ebp
d3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
d6: 80 39 00 cmpb $0x0,(%ecx)
d9: 74 15 je f0 <strlen+0x20>
db: 31 d2 xor %edx,%edx
dd: 8d 76 00 lea 0x0(%esi),%esi
e0: 42 inc %edx
e1: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
e5: 89 d0 mov %edx,%eax
e7: 75 f7 jne e0 <strlen+0x10>
;
return n;
}
e9: 5d pop %ebp
ea: c3 ret
eb: 90 nop
ec: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
for(n = 0; s[n]; n++)
f0: 31 c0 xor %eax,%eax
}
f2: 5d pop %ebp
f3: c3 ret
f4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
fa: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000100 <memset>:
void*
memset(void *dst, int c, uint n)
{
100: 55 push %ebp
101: 89 e5 mov %esp,%ebp
103: 8b 55 08 mov 0x8(%ebp),%edx
106: 57 push %edi
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
107: 8b 4d 10 mov 0x10(%ebp),%ecx
10a: 8b 45 0c mov 0xc(%ebp),%eax
10d: 89 d7 mov %edx,%edi
10f: fc cld
110: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
112: 5f pop %edi
113: 89 d0 mov %edx,%eax
115: 5d pop %ebp
116: c3 ret
117: 89 f6 mov %esi,%esi
119: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000120 <strchr>:
char*
strchr(const char *s, char c)
{
120: 55 push %ebp
121: 89 e5 mov %esp,%ebp
123: 8b 45 08 mov 0x8(%ebp),%eax
126: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx
for(; *s; s++)
12a: 0f b6 10 movzbl (%eax),%edx
12d: 84 d2 test %dl,%dl
12f: 74 1b je 14c <strchr+0x2c>
if(*s == c)
131: 38 d1 cmp %dl,%cl
133: 75 0f jne 144 <strchr+0x24>
135: eb 17 jmp 14e <strchr+0x2e>
137: 89 f6 mov %esi,%esi
139: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
140: 38 ca cmp %cl,%dl
142: 74 0a je 14e <strchr+0x2e>
for(; *s; s++)
144: 40 inc %eax
145: 0f b6 10 movzbl (%eax),%edx
148: 84 d2 test %dl,%dl
14a: 75 f4 jne 140 <strchr+0x20>
return (char*)s;
return 0;
14c: 31 c0 xor %eax,%eax
}
14e: 5d pop %ebp
14f: c3 ret
00000150 <gets>:
char*
gets(char *buf, int max)
{
150: 55 push %ebp
151: 89 e5 mov %esp,%ebp
153: 57 push %edi
154: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
155: 31 f6 xor %esi,%esi
{
157: 53 push %ebx
158: 83 ec 3c sub $0x3c,%esp
15b: 8b 5d 08 mov 0x8(%ebp),%ebx
cc = read(0, &c, 1);
15e: 8d 7d e7 lea -0x19(%ebp),%edi
for(i=0; i+1 < max; ){
161: eb 32 jmp 195 <gets+0x45>
163: 90 nop
164: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
cc = read(0, &c, 1);
168: ba 01 00 00 00 mov $0x1,%edx
16d: 89 54 24 08 mov %edx,0x8(%esp)
171: 89 7c 24 04 mov %edi,0x4(%esp)
175: c7 04 24 00 00 00 00 movl $0x0,(%esp)
17c: e8 2f 01 00 00 call 2b0 <read>
if(cc < 1)
181: 85 c0 test %eax,%eax
183: 7e 19 jle 19e <gets+0x4e>
break;
buf[i++] = c;
185: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
189: 43 inc %ebx
18a: 88 43 ff mov %al,-0x1(%ebx)
if(c == '\n' || c == '\r')
18d: 3c 0a cmp $0xa,%al
18f: 74 1f je 1b0 <gets+0x60>
191: 3c 0d cmp $0xd,%al
193: 74 1b je 1b0 <gets+0x60>
for(i=0; i+1 < max; ){
195: 46 inc %esi
196: 3b 75 0c cmp 0xc(%ebp),%esi
199: 89 5d d4 mov %ebx,-0x2c(%ebp)
19c: 7c ca jl 168 <gets+0x18>
break;
}
buf[i] = '\0';
19e: 8b 45 d4 mov -0x2c(%ebp),%eax
1a1: c6 00 00 movb $0x0,(%eax)
return buf;
}
1a4: 8b 45 08 mov 0x8(%ebp),%eax
1a7: 83 c4 3c add $0x3c,%esp
1aa: 5b pop %ebx
1ab: 5e pop %esi
1ac: 5f pop %edi
1ad: 5d pop %ebp
1ae: c3 ret
1af: 90 nop
1b0: 8b 45 08 mov 0x8(%ebp),%eax
1b3: 01 c6 add %eax,%esi
1b5: 89 75 d4 mov %esi,-0x2c(%ebp)
1b8: eb e4 jmp 19e <gets+0x4e>
1ba: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
000001c0 <stat>:
int
stat(const char *n, struct stat *st)
{
1c0: 55 push %ebp
int fd;
int r;
fd = open(n, O_RDONLY);
1c1: 31 c0 xor %eax,%eax
{
1c3: 89 e5 mov %esp,%ebp
1c5: 83 ec 18 sub $0x18,%esp
fd = open(n, O_RDONLY);
1c8: 89 44 24 04 mov %eax,0x4(%esp)
1cc: 8b 45 08 mov 0x8(%ebp),%eax
{
1cf: 89 5d f8 mov %ebx,-0x8(%ebp)
1d2: 89 75 fc mov %esi,-0x4(%ebp)
fd = open(n, O_RDONLY);
1d5: 89 04 24 mov %eax,(%esp)
1d8: e8 fb 00 00 00 call 2d8 <open>
if(fd < 0)
1dd: 85 c0 test %eax,%eax
1df: 78 2f js 210 <stat+0x50>
1e1: 89 c3 mov %eax,%ebx
return -1;
r = fstat(fd, st);
1e3: 8b 45 0c mov 0xc(%ebp),%eax
1e6: 89 1c 24 mov %ebx,(%esp)
1e9: 89 44 24 04 mov %eax,0x4(%esp)
1ed: e8 fe 00 00 00 call 2f0 <fstat>
close(fd);
1f2: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
1f5: 89 c6 mov %eax,%esi
close(fd);
1f7: e8 c4 00 00 00 call 2c0 <close>
return r;
}
1fc: 89 f0 mov %esi,%eax
1fe: 8b 5d f8 mov -0x8(%ebp),%ebx
201: 8b 75 fc mov -0x4(%ebp),%esi
204: 89 ec mov %ebp,%esp
206: 5d pop %ebp
207: c3 ret
208: 90 nop
209: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
return -1;
210: be ff ff ff ff mov $0xffffffff,%esi
215: eb e5 jmp 1fc <stat+0x3c>
217: 89 f6 mov %esi,%esi
219: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000220 <atoi>:
int
atoi(const char *s)
{
220: 55 push %ebp
221: 89 e5 mov %esp,%ebp
223: 8b 4d 08 mov 0x8(%ebp),%ecx
226: 53 push %ebx
int n;
n = 0;
while('0' <= *s && *s <= '9')
227: 0f be 11 movsbl (%ecx),%edx
22a: 88 d0 mov %dl,%al
22c: 2c 30 sub $0x30,%al
22e: 3c 09 cmp $0x9,%al
n = 0;
230: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
235: 77 1e ja 255 <atoi+0x35>
237: 89 f6 mov %esi,%esi
239: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
240: 41 inc %ecx
241: 8d 04 80 lea (%eax,%eax,4),%eax
244: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
248: 0f be 11 movsbl (%ecx),%edx
24b: 88 d3 mov %dl,%bl
24d: 80 eb 30 sub $0x30,%bl
250: 80 fb 09 cmp $0x9,%bl
253: 76 eb jbe 240 <atoi+0x20>
return n;
}
255: 5b pop %ebx
256: 5d pop %ebp
257: c3 ret
258: 90 nop
259: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000260 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
260: 55 push %ebp
261: 89 e5 mov %esp,%ebp
263: 56 push %esi
264: 8b 45 08 mov 0x8(%ebp),%eax
267: 53 push %ebx
268: 8b 5d 10 mov 0x10(%ebp),%ebx
26b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
26e: 85 db test %ebx,%ebx
270: 7e 1a jle 28c <memmove+0x2c>
272: 31 d2 xor %edx,%edx
274: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
27a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
*dst++ = *src++;
280: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
284: 88 0c 10 mov %cl,(%eax,%edx,1)
287: 42 inc %edx
while(n-- > 0)
288: 39 d3 cmp %edx,%ebx
28a: 75 f4 jne 280 <memmove+0x20>
return vdst;
}
28c: 5b pop %ebx
28d: 5e pop %esi
28e: 5d pop %ebp
28f: c3 ret
00000290 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
290: b8 01 00 00 00 mov $0x1,%eax
295: cd 40 int $0x40
297: c3 ret
00000298 <exit>:
SYSCALL(exit)
298: b8 02 00 00 00 mov $0x2,%eax
29d: cd 40 int $0x40
29f: c3 ret
000002a0 <wait>:
SYSCALL(wait)
2a0: b8 03 00 00 00 mov $0x3,%eax
2a5: cd 40 int $0x40
2a7: c3 ret
000002a8 <pipe>:
SYSCALL(pipe)
2a8: b8 04 00 00 00 mov $0x4,%eax
2ad: cd 40 int $0x40
2af: c3 ret
000002b0 <read>:
SYSCALL(read)
2b0: b8 05 00 00 00 mov $0x5,%eax
2b5: cd 40 int $0x40
2b7: c3 ret
000002b8 <write>:
SYSCALL(write)
2b8: b8 10 00 00 00 mov $0x10,%eax
2bd: cd 40 int $0x40
2bf: c3 ret
000002c0 <close>:
SYSCALL(close)
2c0: b8 15 00 00 00 mov $0x15,%eax
2c5: cd 40 int $0x40
2c7: c3 ret
000002c8 <kill>:
SYSCALL(kill)
2c8: b8 06 00 00 00 mov $0x6,%eax
2cd: cd 40 int $0x40
2cf: c3 ret
000002d0 <exec>:
SYSCALL(exec)
2d0: b8 07 00 00 00 mov $0x7,%eax
2d5: cd 40 int $0x40
2d7: c3 ret
000002d8 <open>:
SYSCALL(open)
2d8: b8 0f 00 00 00 mov $0xf,%eax
2dd: cd 40 int $0x40
2df: c3 ret
000002e0 <mknod>:
SYSCALL(mknod)
2e0: b8 11 00 00 00 mov $0x11,%eax
2e5: cd 40 int $0x40
2e7: c3 ret
000002e8 <unlink>:
SYSCALL(unlink)
2e8: b8 12 00 00 00 mov $0x12,%eax
2ed: cd 40 int $0x40
2ef: c3 ret
000002f0 <fstat>:
SYSCALL(fstat)
2f0: b8 08 00 00 00 mov $0x8,%eax
2f5: cd 40 int $0x40
2f7: c3 ret
000002f8 <link>:
SYSCALL(link)
2f8: b8 13 00 00 00 mov $0x13,%eax
2fd: cd 40 int $0x40
2ff: c3 ret
00000300 <mkdir>:
SYSCALL(mkdir)
300: b8 14 00 00 00 mov $0x14,%eax
305: cd 40 int $0x40
307: c3 ret
00000308 <chdir>:
SYSCALL(chdir)
308: b8 09 00 00 00 mov $0x9,%eax
30d: cd 40 int $0x40
30f: c3 ret
00000310 <dup>:
SYSCALL(dup)
310: b8 0a 00 00 00 mov $0xa,%eax
315: cd 40 int $0x40
317: c3 ret
00000318 <getpid>:
SYSCALL(getpid)
318: b8 0b 00 00 00 mov $0xb,%eax
31d: cd 40 int $0x40
31f: c3 ret
00000320 <sbrk>:
SYSCALL(sbrk)
320: b8 0c 00 00 00 mov $0xc,%eax
325: cd 40 int $0x40
327: c3 ret
00000328 <sleep>:
SYSCALL(sleep)
328: b8 0d 00 00 00 mov $0xd,%eax
32d: cd 40 int $0x40
32f: c3 ret
00000330 <uptime>:
SYSCALL(uptime)
330: b8 0e 00 00 00 mov $0xe,%eax
335: cd 40 int $0x40
337: c3 ret
00000338 <detach>:
SYSCALL(detach)
338: b8 16 00 00 00 mov $0x16,%eax
33d: cd 40 int $0x40
33f: c3 ret
00000340 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
340: 55 push %ebp
341: 89 e5 mov %esp,%ebp
343: 57 push %edi
344: 56 push %esi
345: 53 push %ebx
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
346: 89 d3 mov %edx,%ebx
348: c1 eb 1f shr $0x1f,%ebx
{
34b: 83 ec 4c sub $0x4c,%esp
if(sgn && xx < 0){
34e: 84 db test %bl,%bl
{
350: 89 45 c0 mov %eax,-0x40(%ebp)
353: 89 d0 mov %edx,%eax
if(sgn && xx < 0){
355: 74 79 je 3d0 <printint+0x90>
357: f6 45 08 01 testb $0x1,0x8(%ebp)
35b: 74 73 je 3d0 <printint+0x90>
neg = 1;
x = -xx;
35d: f7 d8 neg %eax
neg = 1;
35f: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
} else {
x = xx;
}
i = 0;
366: 31 f6 xor %esi,%esi
368: 8d 5d d7 lea -0x29(%ebp),%ebx
36b: eb 05 jmp 372 <printint+0x32>
36d: 8d 76 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
370: 89 fe mov %edi,%esi
372: 31 d2 xor %edx,%edx
374: f7 f1 div %ecx
376: 8d 7e 01 lea 0x1(%esi),%edi
379: 0f b6 92 74 07 00 00 movzbl 0x774(%edx),%edx
}while((x /= base) != 0);
380: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
382: 88 14 3b mov %dl,(%ebx,%edi,1)
}while((x /= base) != 0);
385: 75 e9 jne 370 <printint+0x30>
if(neg)
387: 8b 55 c4 mov -0x3c(%ebp),%edx
38a: 85 d2 test %edx,%edx
38c: 74 08 je 396 <printint+0x56>
buf[i++] = '-';
38e: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
393: 8d 7e 02 lea 0x2(%esi),%edi
396: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi
39a: 8b 7d c0 mov -0x40(%ebp),%edi
39d: 8d 76 00 lea 0x0(%esi),%esi
3a0: 0f b6 06 movzbl (%esi),%eax
3a3: 4e dec %esi
write(fd, &c, 1);
3a4: 89 5c 24 04 mov %ebx,0x4(%esp)
3a8: 89 3c 24 mov %edi,(%esp)
3ab: 88 45 d7 mov %al,-0x29(%ebp)
3ae: b8 01 00 00 00 mov $0x1,%eax
3b3: 89 44 24 08 mov %eax,0x8(%esp)
3b7: e8 fc fe ff ff call 2b8 <write>
while(--i >= 0)
3bc: 39 de cmp %ebx,%esi
3be: 75 e0 jne 3a0 <printint+0x60>
putc(fd, buf[i]);
}
3c0: 83 c4 4c add $0x4c,%esp
3c3: 5b pop %ebx
3c4: 5e pop %esi
3c5: 5f pop %edi
3c6: 5d pop %ebp
3c7: c3 ret
3c8: 90 nop
3c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
3d0: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
3d7: eb 8d jmp 366 <printint+0x26>
3d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000003e0 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
3e0: 55 push %ebp
3e1: 89 e5 mov %esp,%ebp
3e3: 57 push %edi
3e4: 56 push %esi
3e5: 53 push %ebx
3e6: 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++){
3e9: 8b 75 0c mov 0xc(%ebp),%esi
3ec: 0f b6 1e movzbl (%esi),%ebx
3ef: 84 db test %bl,%bl
3f1: 0f 84 d1 00 00 00 je 4c8 <printf+0xe8>
state = 0;
3f7: 31 ff xor %edi,%edi
3f9: 46 inc %esi
ap = (uint*)(void*)&fmt + 1;
3fa: 8d 45 10 lea 0x10(%ebp),%eax
write(fd, &c, 1);
3fd: 89 fa mov %edi,%edx
3ff: 8b 7d 08 mov 0x8(%ebp),%edi
ap = (uint*)(void*)&fmt + 1;
402: 89 45 d0 mov %eax,-0x30(%ebp)
405: eb 41 jmp 448 <printf+0x68>
407: 89 f6 mov %esi,%esi
409: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
410: 83 f8 25 cmp $0x25,%eax
413: 89 55 d4 mov %edx,-0x2c(%ebp)
state = '%';
416: ba 25 00 00 00 mov $0x25,%edx
if(c == '%'){
41b: 74 1e je 43b <printf+0x5b>
write(fd, &c, 1);
41d: b8 01 00 00 00 mov $0x1,%eax
422: 89 44 24 08 mov %eax,0x8(%esp)
426: 8d 45 e2 lea -0x1e(%ebp),%eax
429: 89 44 24 04 mov %eax,0x4(%esp)
42d: 89 3c 24 mov %edi,(%esp)
430: 88 5d e2 mov %bl,-0x1e(%ebp)
433: e8 80 fe ff ff call 2b8 <write>
438: 8b 55 d4 mov -0x2c(%ebp),%edx
43b: 46 inc %esi
for(i = 0; fmt[i]; i++){
43c: 0f b6 5e ff movzbl -0x1(%esi),%ebx
440: 84 db test %bl,%bl
442: 0f 84 80 00 00 00 je 4c8 <printf+0xe8>
if(state == 0){
448: 85 d2 test %edx,%edx
c = fmt[i] & 0xff;
44a: 0f be cb movsbl %bl,%ecx
44d: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
450: 74 be je 410 <printf+0x30>
} else {
putc(fd, c);
}
} else if(state == '%'){
452: 83 fa 25 cmp $0x25,%edx
455: 75 e4 jne 43b <printf+0x5b>
if(c == 'd'){
457: 83 f8 64 cmp $0x64,%eax
45a: 0f 84 f0 00 00 00 je 550 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
460: 81 e1 f7 00 00 00 and $0xf7,%ecx
466: 83 f9 70 cmp $0x70,%ecx
469: 74 65 je 4d0 <printf+0xf0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
46b: 83 f8 73 cmp $0x73,%eax
46e: 0f 84 8c 00 00 00 je 500 <printf+0x120>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
474: 83 f8 63 cmp $0x63,%eax
477: 0f 84 13 01 00 00 je 590 <printf+0x1b0>
putc(fd, *ap);
ap++;
} else if(c == '%'){
47d: 83 f8 25 cmp $0x25,%eax
480: 0f 84 e2 00 00 00 je 568 <printf+0x188>
write(fd, &c, 1);
486: b8 01 00 00 00 mov $0x1,%eax
48b: 46 inc %esi
48c: 89 44 24 08 mov %eax,0x8(%esp)
490: 8d 45 e7 lea -0x19(%ebp),%eax
493: 89 44 24 04 mov %eax,0x4(%esp)
497: 89 3c 24 mov %edi,(%esp)
49a: c6 45 e7 25 movb $0x25,-0x19(%ebp)
49e: e8 15 fe ff ff call 2b8 <write>
4a3: ba 01 00 00 00 mov $0x1,%edx
4a8: 8d 45 e6 lea -0x1a(%ebp),%eax
4ab: 89 54 24 08 mov %edx,0x8(%esp)
4af: 89 44 24 04 mov %eax,0x4(%esp)
4b3: 89 3c 24 mov %edi,(%esp)
4b6: 88 5d e6 mov %bl,-0x1a(%ebp)
4b9: e8 fa fd ff ff call 2b8 <write>
for(i = 0; fmt[i]; i++){
4be: 0f b6 5e ff movzbl -0x1(%esi),%ebx
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
4c2: 31 d2 xor %edx,%edx
for(i = 0; fmt[i]; i++){
4c4: 84 db test %bl,%bl
4c6: 75 80 jne 448 <printf+0x68>
}
}
}
4c8: 83 c4 3c add $0x3c,%esp
4cb: 5b pop %ebx
4cc: 5e pop %esi
4cd: 5f pop %edi
4ce: 5d pop %ebp
4cf: c3 ret
printint(fd, *ap, 16, 0);
4d0: c7 04 24 00 00 00 00 movl $0x0,(%esp)
4d7: b9 10 00 00 00 mov $0x10,%ecx
4dc: 8b 5d d0 mov -0x30(%ebp),%ebx
4df: 89 f8 mov %edi,%eax
4e1: 8b 13 mov (%ebx),%edx
4e3: e8 58 fe ff ff call 340 <printint>
ap++;
4e8: 89 d8 mov %ebx,%eax
state = 0;
4ea: 31 d2 xor %edx,%edx
ap++;
4ec: 83 c0 04 add $0x4,%eax
4ef: 89 45 d0 mov %eax,-0x30(%ebp)
4f2: e9 44 ff ff ff jmp 43b <printf+0x5b>
4f7: 89 f6 mov %esi,%esi
4f9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
s = (char*)*ap;
500: 8b 45 d0 mov -0x30(%ebp),%eax
503: 8b 10 mov (%eax),%edx
ap++;
505: 83 c0 04 add $0x4,%eax
508: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
50b: 85 d2 test %edx,%edx
50d: 0f 84 aa 00 00 00 je 5bd <printf+0x1dd>
while(*s != 0){
513: 0f b6 02 movzbl (%edx),%eax
s = (char*)*ap;
516: 89 d3 mov %edx,%ebx
while(*s != 0){
518: 84 c0 test %al,%al
51a: 74 27 je 543 <printf+0x163>
51c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
520: 88 45 e3 mov %al,-0x1d(%ebp)
write(fd, &c, 1);
523: b8 01 00 00 00 mov $0x1,%eax
s++;
528: 43 inc %ebx
write(fd, &c, 1);
529: 89 44 24 08 mov %eax,0x8(%esp)
52d: 8d 45 e3 lea -0x1d(%ebp),%eax
530: 89 44 24 04 mov %eax,0x4(%esp)
534: 89 3c 24 mov %edi,(%esp)
537: e8 7c fd ff ff call 2b8 <write>
while(*s != 0){
53c: 0f b6 03 movzbl (%ebx),%eax
53f: 84 c0 test %al,%al
541: 75 dd jne 520 <printf+0x140>
state = 0;
543: 31 d2 xor %edx,%edx
545: e9 f1 fe ff ff jmp 43b <printf+0x5b>
54a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 10, 1);
550: c7 04 24 01 00 00 00 movl $0x1,(%esp)
557: b9 0a 00 00 00 mov $0xa,%ecx
55c: e9 7b ff ff ff jmp 4dc <printf+0xfc>
561: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
write(fd, &c, 1);
568: b9 01 00 00 00 mov $0x1,%ecx
56d: 8d 45 e5 lea -0x1b(%ebp),%eax
570: 89 4c 24 08 mov %ecx,0x8(%esp)
574: 89 44 24 04 mov %eax,0x4(%esp)
578: 89 3c 24 mov %edi,(%esp)
57b: 88 5d e5 mov %bl,-0x1b(%ebp)
57e: e8 35 fd ff ff call 2b8 <write>
state = 0;
583: 31 d2 xor %edx,%edx
585: e9 b1 fe ff ff jmp 43b <printf+0x5b>
58a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
putc(fd, *ap);
590: 8b 5d d0 mov -0x30(%ebp),%ebx
593: 8b 03 mov (%ebx),%eax
ap++;
595: 83 c3 04 add $0x4,%ebx
write(fd, &c, 1);
598: 89 3c 24 mov %edi,(%esp)
putc(fd, *ap);
59b: 88 45 e4 mov %al,-0x1c(%ebp)
write(fd, &c, 1);
59e: b8 01 00 00 00 mov $0x1,%eax
5a3: 89 44 24 08 mov %eax,0x8(%esp)
5a7: 8d 45 e4 lea -0x1c(%ebp),%eax
5aa: 89 44 24 04 mov %eax,0x4(%esp)
5ae: e8 05 fd ff ff call 2b8 <write>
state = 0;
5b3: 31 d2 xor %edx,%edx
ap++;
5b5: 89 5d d0 mov %ebx,-0x30(%ebp)
5b8: e9 7e fe ff ff jmp 43b <printf+0x5b>
s = "(null)";
5bd: bb 6c 07 00 00 mov $0x76c,%ebx
while(*s != 0){
5c2: b0 28 mov $0x28,%al
5c4: e9 57 ff ff ff jmp 520 <printf+0x140>
5c9: 66 90 xchg %ax,%ax
5cb: 66 90 xchg %ax,%ax
5cd: 66 90 xchg %ax,%ax
5cf: 90 nop
000005d0 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
5d0: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
5d1: a1 04 0a 00 00 mov 0xa04,%eax
{
5d6: 89 e5 mov %esp,%ebp
5d8: 57 push %edi
5d9: 56 push %esi
5da: 53 push %ebx
5db: 8b 5d 08 mov 0x8(%ebp),%ebx
bp = (Header*)ap - 1;
5de: 8d 4b f8 lea -0x8(%ebx),%ecx
5e1: eb 0d jmp 5f0 <free+0x20>
5e3: 90 nop
5e4: 90 nop
5e5: 90 nop
5e6: 90 nop
5e7: 90 nop
5e8: 90 nop
5e9: 90 nop
5ea: 90 nop
5eb: 90 nop
5ec: 90 nop
5ed: 90 nop
5ee: 90 nop
5ef: 90 nop
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
5f0: 39 c8 cmp %ecx,%eax
5f2: 8b 10 mov (%eax),%edx
5f4: 73 32 jae 628 <free+0x58>
5f6: 39 d1 cmp %edx,%ecx
5f8: 72 04 jb 5fe <free+0x2e>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
5fa: 39 d0 cmp %edx,%eax
5fc: 72 32 jb 630 <free+0x60>
break;
if(bp + bp->s.size == p->s.ptr){
5fe: 8b 73 fc mov -0x4(%ebx),%esi
601: 8d 3c f1 lea (%ecx,%esi,8),%edi
604: 39 fa cmp %edi,%edx
606: 74 30 je 638 <free+0x68>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
608: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
60b: 8b 50 04 mov 0x4(%eax),%edx
60e: 8d 34 d0 lea (%eax,%edx,8),%esi
611: 39 f1 cmp %esi,%ecx
613: 74 3c je 651 <free+0x81>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
615: 89 08 mov %ecx,(%eax)
freep = p;
}
617: 5b pop %ebx
freep = p;
618: a3 04 0a 00 00 mov %eax,0xa04
}
61d: 5e pop %esi
61e: 5f pop %edi
61f: 5d pop %ebp
620: c3 ret
621: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
628: 39 d0 cmp %edx,%eax
62a: 72 04 jb 630 <free+0x60>
62c: 39 d1 cmp %edx,%ecx
62e: 72 ce jb 5fe <free+0x2e>
{
630: 89 d0 mov %edx,%eax
632: eb bc jmp 5f0 <free+0x20>
634: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
bp->s.size += p->s.ptr->s.size;
638: 8b 7a 04 mov 0x4(%edx),%edi
63b: 01 fe add %edi,%esi
63d: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
640: 8b 10 mov (%eax),%edx
642: 8b 12 mov (%edx),%edx
644: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
647: 8b 50 04 mov 0x4(%eax),%edx
64a: 8d 34 d0 lea (%eax,%edx,8),%esi
64d: 39 f1 cmp %esi,%ecx
64f: 75 c4 jne 615 <free+0x45>
p->s.size += bp->s.size;
651: 8b 4b fc mov -0x4(%ebx),%ecx
freep = p;
654: a3 04 0a 00 00 mov %eax,0xa04
p->s.size += bp->s.size;
659: 01 ca add %ecx,%edx
65b: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
65e: 8b 53 f8 mov -0x8(%ebx),%edx
661: 89 10 mov %edx,(%eax)
}
663: 5b pop %ebx
664: 5e pop %esi
665: 5f pop %edi
666: 5d pop %ebp
667: c3 ret
668: 90 nop
669: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000670 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
670: 55 push %ebp
671: 89 e5 mov %esp,%ebp
673: 57 push %edi
674: 56 push %esi
675: 53 push %ebx
676: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
679: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
67c: 8b 15 04 0a 00 00 mov 0xa04,%edx
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
682: 8d 78 07 lea 0x7(%eax),%edi
685: c1 ef 03 shr $0x3,%edi
688: 47 inc %edi
if((prevp = freep) == 0){
689: 85 d2 test %edx,%edx
68b: 0f 84 8f 00 00 00 je 720 <malloc+0xb0>
691: 8b 02 mov (%edx),%eax
693: 8b 48 04 mov 0x4(%eax),%ecx
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){
696: 39 cf cmp %ecx,%edi
698: 76 66 jbe 700 <malloc+0x90>
69a: 81 ff 00 10 00 00 cmp $0x1000,%edi
6a0: bb 00 10 00 00 mov $0x1000,%ebx
6a5: 0f 43 df cmovae %edi,%ebx
p = sbrk(nu * sizeof(Header));
6a8: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
6af: eb 10 jmp 6c1 <malloc+0x51>
6b1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
6b8: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
6ba: 8b 48 04 mov 0x4(%eax),%ecx
6bd: 39 f9 cmp %edi,%ecx
6bf: 73 3f jae 700 <malloc+0x90>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
6c1: 39 05 04 0a 00 00 cmp %eax,0xa04
6c7: 89 c2 mov %eax,%edx
6c9: 75 ed jne 6b8 <malloc+0x48>
p = sbrk(nu * sizeof(Header));
6cb: 89 34 24 mov %esi,(%esp)
6ce: e8 4d fc ff ff call 320 <sbrk>
if(p == (char*)-1)
6d3: 83 f8 ff cmp $0xffffffff,%eax
6d6: 74 18 je 6f0 <malloc+0x80>
hp->s.size = nu;
6d8: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
6db: 83 c0 08 add $0x8,%eax
6de: 89 04 24 mov %eax,(%esp)
6e1: e8 ea fe ff ff call 5d0 <free>
return freep;
6e6: 8b 15 04 0a 00 00 mov 0xa04,%edx
if((p = morecore(nunits)) == 0)
6ec: 85 d2 test %edx,%edx
6ee: 75 c8 jne 6b8 <malloc+0x48>
return 0;
}
}
6f0: 83 c4 1c add $0x1c,%esp
return 0;
6f3: 31 c0 xor %eax,%eax
}
6f5: 5b pop %ebx
6f6: 5e pop %esi
6f7: 5f pop %edi
6f8: 5d pop %ebp
6f9: c3 ret
6fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(p->s.size == nunits)
700: 39 cf cmp %ecx,%edi
702: 74 4c je 750 <malloc+0xe0>
p->s.size -= nunits;
704: 29 f9 sub %edi,%ecx
706: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
709: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
70c: 89 78 04 mov %edi,0x4(%eax)
freep = prevp;
70f: 89 15 04 0a 00 00 mov %edx,0xa04
}
715: 83 c4 1c add $0x1c,%esp
return (void*)(p + 1);
718: 83 c0 08 add $0x8,%eax
}
71b: 5b pop %ebx
71c: 5e pop %esi
71d: 5f pop %edi
71e: 5d pop %ebp
71f: c3 ret
base.s.ptr = freep = prevp = &base;
720: b8 08 0a 00 00 mov $0xa08,%eax
725: ba 08 0a 00 00 mov $0xa08,%edx
base.s.size = 0;
72a: 31 c9 xor %ecx,%ecx
base.s.ptr = freep = prevp = &base;
72c: a3 04 0a 00 00 mov %eax,0xa04
base.s.size = 0;
731: b8 08 0a 00 00 mov $0xa08,%eax
base.s.ptr = freep = prevp = &base;
736: 89 15 08 0a 00 00 mov %edx,0xa08
base.s.size = 0;
73c: 89 0d 0c 0a 00 00 mov %ecx,0xa0c
742: e9 53 ff ff ff jmp 69a <malloc+0x2a>
747: 89 f6 mov %esi,%esi
749: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
prevp->s.ptr = p->s.ptr;
750: 8b 08 mov (%eax),%ecx
752: 89 0a mov %ecx,(%edx)
754: eb b9 jmp 70f <malloc+0x9f>
| 33.647619 | 60 | 0.412192 |
f73cd94195229ea55aa4ba385485fbb9ad8c3bfb | 12,413 | asm | Assembly | P6/data_P6_2/ALUTest47.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | 1 | 2022-01-23T09:24:47.000Z | 2022-01-23T09:24:47.000Z | P6/data_P6_2/ALUTest47.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | null | null | null | P6/data_P6_2/ALUTest47.asm | alxzzhou/BUAA_CO_2020 | b54bf367081a5a11701ebc3fc78a23494aecca9e | [
"Apache-2.0"
] | null | null | null | addiu $0,$3,-32026
srl $4,$3,19
addiu $4,$3,14042
sra $5,$3,1
addu $1,$1,$3
subu $1,$5,$3
srav $0,$0,$3
slt $6,$0,$3
sllv $6,$3,$3
addiu $0,$0,26983
sll $1,$5,5
andi $3,$3,36232
ori $1,$1,25178
lh $1,2($0)
sb $3,15($0)
lb $1,1($0)
srav $4,$2,$3
sb $5,13($0)
addiu $4,$5,-23423
addiu $3,$1,29948
lb $0,2($0)
ori $3,$3,27987
sltu $4,$4,$3
slti $3,$3,11297
addu $5,$1,$3
sra $1,$0,15
lw $5,0($0)
addiu $3,$3,2303
ori $5,$5,17306
subu $3,$3,$3
sltu $4,$4,$3
sltiu $3,$3,2531
sw $3,8($0)
addu $4,$4,$3
sra $3,$3,27
addu $6,$5,$3
nor $3,$1,$3
xor $4,$5,$3
sb $6,12($0)
xor $3,$4,$3
xor $4,$4,$3
sltu $3,$5,$3
sllv $5,$1,$3
lhu $5,14($0)
slt $1,$4,$3
and $0,$4,$3
srl $1,$1,25
addu $0,$0,$3
sh $4,14($0)
sra $3,$3,8
sltu $5,$4,$3
srlv $3,$4,$3
sb $3,7($0)
and $4,$4,$3
sb $0,1($0)
lb $5,5($0)
srav $5,$1,$3
sllv $6,$3,$3
subu $1,$3,$3
xor $6,$3,$3
slti $1,$1,-17248
lbu $3,2($0)
sltiu $3,$3,-28144
lh $4,12($0)
sw $4,8($0)
addiu $5,$4,-15064
addiu $3,$4,-10405
subu $3,$6,$3
nor $3,$4,$3
sw $5,0($0)
lw $1,16($0)
addu $6,$6,$3
ori $3,$1,32830
addu $0,$6,$3
lhu $3,0($0)
sllv $3,$5,$3
sb $6,10($0)
lh $5,16($0)
or $6,$6,$3
slt $0,$5,$3
sltiu $5,$3,11751
sltu $5,$0,$3
addiu $0,$4,-12415
xori $3,$4,60460
lb $3,8($0)
sw $4,0($0)
lhu $6,8($0)
slti $3,$3,-31249
sltiu $3,$6,15788
sllv $1,$5,$3
srav $6,$3,$3
subu $3,$3,$3
lh $1,0($0)
subu $3,$3,$3
srav $4,$1,$3
lh $3,6($0)
ori $4,$5,59224
lw $4,8($0)
lh $4,12($0)
sltu $6,$6,$3
ori $0,$3,58006
nor $0,$1,$3
addu $5,$4,$3
nor $0,$0,$3
sw $1,12($0)
sw $3,0($0)
addu $3,$1,$3
lhu $6,2($0)
sllv $0,$5,$3
sra $5,$3,30
slt $3,$4,$3
sllv $4,$6,$3
sllv $5,$3,$3
addu $3,$3,$3
or $4,$3,$3
addu $1,$1,$3
xori $4,$3,61776
xori $3,$4,47463
or $4,$3,$3
and $3,$2,$3
ori $3,$5,8108
sb $3,12($0)
nor $4,$6,$3
and $2,$2,$3
lb $1,3($0)
slt $3,$4,$3
sltu $4,$3,$3
subu $6,$5,$3
addiu $1,$1,-11489
nor $4,$4,$3
addiu $4,$3,29564
nor $3,$1,$3
slti $5,$6,26541
xori $4,$0,12665
sb $1,14($0)
lbu $4,4($0)
sltu $3,$3,$3
nor $1,$0,$3
xor $5,$1,$3
sllv $1,$1,$3
sllv $5,$5,$3
nor $3,$4,$3
ori $5,$5,26209
sw $1,16($0)
addu $3,$3,$3
slt $3,$6,$3
slt $3,$2,$3
lbu $5,3($0)
sll $3,$3,29
addu $0,$3,$3
nor $3,$5,$3
subu $3,$0,$3
nor $4,$3,$3
slt $4,$3,$3
sltiu $3,$3,24832
srl $5,$6,19
sltu $1,$1,$3
slt $3,$4,$3
xor $3,$4,$3
lhu $4,14($0)
subu $1,$4,$3
srav $4,$3,$3
srav $0,$0,$3
addu $3,$5,$3
ori $3,$4,49362
addu $3,$3,$3
subu $3,$3,$3
andi $3,$5,3247
subu $3,$3,$3
srl $5,$5,1
lbu $0,9($0)
sh $4,8($0)
lbu $4,3($0)
sllv $1,$6,$3
sltu $6,$4,$3
subu $3,$3,$3
sll $3,$3,7
addiu $3,$3,16689
addu $3,$3,$3
sh $3,10($0)
lw $3,8($0)
nor $3,$3,$3
xori $4,$0,18039
lw $3,4($0)
subu $0,$3,$3
lh $1,10($0)
lb $4,14($0)
srl $5,$4,31
lhu $3,12($0)
sra $1,$4,26
lh $6,12($0)
sra $1,$3,11
andi $5,$2,30661
subu $1,$3,$3
nor $3,$4,$3
sb $6,6($0)
subu $5,$6,$3
srl $1,$3,21
srl $4,$4,5
addiu $4,$4,15953
sra $3,$4,21
lhu $6,14($0)
subu $5,$1,$3
addu $4,$4,$3
addu $3,$3,$3
srav $6,$3,$3
addu $0,$0,$3
lh $1,2($0)
sb $6,10($0)
lw $4,8($0)
srav $1,$1,$3
sltu $5,$0,$3
sra $5,$1,3
sltu $3,$3,$3
or $4,$4,$3
sw $6,4($0)
sltiu $0,$3,9674
sllv $3,$0,$3
lb $3,16($0)
subu $3,$6,$3
xor $3,$5,$3
sllv $1,$0,$3
subu $3,$5,$3
subu $3,$5,$3
lb $5,9($0)
nor $4,$3,$3
sb $0,14($0)
lb $1,3($0)
ori $6,$1,10945
xori $3,$3,38690
xori $0,$4,33577
and $4,$4,$3
srav $6,$5,$3
addu $0,$3,$3
srav $4,$4,$3
addu $3,$3,$3
sll $4,$4,23
andi $1,$3,54312
slti $4,$3,-526
andi $4,$6,1520
sh $4,10($0)
addu $1,$2,$3
sltu $3,$3,$3
lh $3,0($0)
lb $4,15($0)
lw $4,16($0)
or $4,$3,$3
xori $5,$5,21982
xor $6,$6,$3
lh $4,14($0)
sltu $4,$6,$3
andi $5,$5,4138
lw $4,0($0)
lh $3,0($0)
addiu $4,$1,-10508
addu $5,$4,$3
and $5,$5,$3
addiu $1,$1,3519
sllv $1,$1,$3
sh $3,6($0)
sw $3,4($0)
lbu $3,15($0)
addiu $1,$1,-762
srlv $4,$4,$3
andi $3,$3,19109
ori $1,$3,36189
addiu $4,$3,16952
lw $0,0($0)
andi $0,$5,59167
ori $4,$4,64023
sh $3,2($0)
lh $3,16($0)
sll $6,$3,30
srlv $4,$3,$3
sra $6,$1,4
subu $3,$4,$3
sllv $4,$6,$3
addiu $4,$1,28936
sw $3,4($0)
subu $5,$4,$3
sra $3,$3,11
or $3,$2,$3
addiu $1,$5,-11582
ori $3,$3,55844
srl $3,$3,20
srlv $4,$0,$3
lw $6,12($0)
and $6,$6,$3
sh $4,8($0)
sra $3,$5,26
addu $3,$5,$3
srl $3,$0,16
lhu $6,12($0)
addu $3,$1,$3
and $3,$4,$3
sw $0,0($0)
or $1,$1,$3
xor $5,$3,$3
addiu $4,$3,19724
lh $3,14($0)
srav $1,$5,$3
sltiu $4,$4,-10917
sll $5,$5,16
lb $6,3($0)
sh $0,14($0)
slt $6,$6,$3
lhu $3,2($0)
slti $3,$3,28574
sltiu $3,$3,-3413
slt $4,$6,$3
addiu $3,$1,-2803
addu $3,$5,$3
ori $3,$3,4794
xor $1,$3,$3
sb $5,3($0)
lh $3,4($0)
nor $5,$3,$3
addiu $1,$3,-18073
subu $4,$6,$3
lhu $0,0($0)
sra $0,$4,27
lhu $3,0($0)
addu $4,$0,$3
sltu $3,$1,$3
srlv $3,$5,$3
nor $1,$3,$3
srl $5,$0,19
sltiu $3,$3,17136
sllv $3,$3,$3
srl $4,$3,0
addiu $1,$0,-7534
lbu $5,0($0)
sw $6,4($0)
srav $1,$1,$3
lb $4,10($0)
or $0,$4,$3
or $3,$4,$3
sllv $5,$1,$3
sll $4,$5,31
subu $3,$4,$3
sb $4,5($0)
slt $6,$5,$3
slti $5,$4,28283
slt $0,$0,$3
slti $3,$0,-22877
subu $0,$6,$3
srlv $4,$5,$3
sltiu $5,$3,-27897
and $1,$3,$3
andi $3,$3,8104
lh $4,16($0)
lbu $5,7($0)
slti $1,$0,-24313
lhu $1,4($0)
lb $0,12($0)
sll $1,$1,26
lhu $4,0($0)
lbu $6,9($0)
xor $4,$0,$3
lhu $3,10($0)
sh $1,2($0)
addu $4,$1,$3
sltu $1,$3,$3
ori $6,$3,6867
sra $3,$3,24
sll $3,$0,27
ori $0,$0,42690
ori $3,$5,52973
nor $4,$5,$3
lbu $3,14($0)
sltiu $4,$4,-11862
lhu $4,2($0)
srl $0,$6,26
sb $3,10($0)
addu $3,$4,$3
srlv $3,$1,$3
addu $1,$4,$3
sllv $1,$1,$3
srl $5,$4,16
andi $3,$6,12184
sra $5,$4,14
ori $4,$4,55743
addiu $1,$4,16915
lh $4,2($0)
addiu $4,$3,-2511
subu $1,$1,$3
or $1,$3,$3
srl $0,$3,0
sh $3,2($0)
srav $1,$3,$3
subu $0,$4,$3
lw $3,16($0)
slti $4,$4,-6331
addu $4,$5,$3
addu $3,$4,$3
lb $1,8($0)
xor $3,$3,$3
xori $1,$4,51400
lbu $3,2($0)
sh $3,14($0)
lb $1,16($0)
sllv $4,$3,$3
addiu $3,$3,1770
lb $4,8($0)
sw $3,4($0)
addiu $3,$4,-25227
or $4,$0,$3
and $3,$3,$3
or $1,$5,$3
addiu $3,$3,-7299
subu $4,$1,$3
xori $1,$1,42756
ori $5,$0,35147
sllv $6,$4,$3
lh $6,4($0)
srl $1,$4,3
subu $6,$6,$3
addiu $3,$2,-17948
or $4,$1,$3
addu $0,$0,$3
slt $0,$1,$3
addu $1,$3,$3
lw $4,4($0)
srav $1,$1,$3
lh $2,8($0)
slt $3,$3,$3
lw $5,8($0)
lb $1,2($0)
srlv $1,$3,$3
subu $4,$5,$3
addiu $4,$3,20978
lh $3,0($0)
nor $3,$6,$3
nor $6,$0,$3
lhu $4,0($0)
sll $0,$0,4
srlv $4,$4,$3
nor $3,$3,$3
nor $4,$3,$3
and $0,$3,$3
lw $4,0($0)
addu $6,$1,$3
addu $1,$5,$3
subu $0,$0,$3
addu $3,$5,$3
and $3,$6,$3
ori $5,$3,44752
nor $4,$3,$3
sltiu $1,$4,2608
addu $1,$6,$3
sb $5,15($0)
sll $3,$0,28
sltiu $4,$3,-17585
sltiu $1,$1,28716
sltu $5,$0,$3
sb $1,8($0)
addu $6,$6,$3
lw $5,4($0)
sltu $5,$3,$3
andi $1,$1,51471
ori $1,$4,23249
and $3,$3,$3
and $1,$1,$3
or $5,$5,$3
addiu $0,$0,-8802
addiu $4,$3,19915
sb $4,10($0)
addu $3,$4,$3
slt $1,$4,$3
sh $4,2($0)
lb $1,10($0)
lhu $5,12($0)
lh $3,10($0)
srlv $6,$2,$3
lw $5,16($0)
sw $3,8($0)
srl $1,$5,7
subu $5,$3,$3
lw $4,4($0)
lhu $4,12($0)
addiu $1,$4,-17151
addiu $1,$0,31787
andi $0,$1,11693
sw $5,0($0)
lw $4,16($0)
subu $3,$3,$3
xori $6,$1,54871
sll $1,$1,15
addu $3,$3,$3
addu $5,$3,$3
subu $2,$2,$3
sh $0,10($0)
subu $3,$4,$3
srl $6,$1,5
xor $6,$6,$3
slt $5,$5,$3
addiu $1,$1,18692
srav $4,$5,$3
srl $4,$6,6
sra $5,$1,20
addiu $3,$6,-1266
ori $3,$5,20903
srl $3,$4,24
lbu $1,13($0)
slt $3,$5,$3
sltu $5,$0,$3
andi $1,$1,45441
subu $4,$5,$3
or $1,$4,$3
addiu $0,$5,-32705
srlv $0,$0,$3
addu $5,$1,$3
lh $0,0($0)
addu $3,$5,$3
ori $1,$1,947
subu $0,$4,$3
or $4,$0,$3
addiu $3,$1,-7629
or $4,$4,$3
sw $3,4($0)
lhu $4,16($0)
srlv $6,$1,$3
sltiu $3,$6,-26628
sltiu $3,$3,31849
sra $4,$4,0
addu $1,$1,$3
subu $3,$0,$3
srlv $3,$6,$3
sllv $0,$6,$3
lhu $3,12($0)
srav $3,$3,$3
addiu $4,$4,-24160
sltiu $3,$1,-7943
sra $3,$4,11
or $3,$4,$3
subu $4,$4,$3
addiu $4,$5,-6418
subu $3,$3,$3
sra $1,$5,24
xori $4,$5,13167
xor $4,$4,$3
lh $5,4($0)
xor $4,$4,$3
andi $1,$3,54714
or $1,$1,$3
sllv $5,$5,$3
srav $3,$3,$3
sb $1,14($0)
slti $3,$3,17059
lbu $3,8($0)
sltu $1,$3,$3
lb $3,5($0)
sra $5,$3,9
xori $5,$3,18731
addu $3,$3,$3
lbu $3,12($0)
sltu $3,$3,$3
sh $4,10($0)
srav $3,$4,$3
lh $1,16($0)
sltu $3,$3,$3
or $4,$3,$3
sltiu $6,$6,25896
xor $5,$5,$3
lh $5,14($0)
addu $0,$6,$3
xor $3,$4,$3
subu $0,$4,$3
sh $1,14($0)
lhu $3,8($0)
or $3,$3,$3
xor $5,$3,$3
nor $3,$4,$3
xor $4,$3,$3
addiu $6,$6,-25794
sb $4,7($0)
addiu $3,$3,10574
sltu $0,$1,$3
lb $6,4($0)
addu $6,$0,$3
srl $3,$3,8
srav $4,$1,$3
sra $4,$4,24
srl $4,$6,25
xori $3,$1,7712
lb $5,1($0)
lw $4,4($0)
sw $4,0($0)
slti $3,$4,21460
ori $0,$3,56516
srav $4,$1,$3
lw $5,8($0)
sltiu $0,$1,-29428
or $1,$1,$3
nor $3,$3,$3
ori $5,$4,5988
sw $4,16($0)
andi $3,$0,18692
andi $4,$3,34118
lbu $5,16($0)
and $5,$1,$3
lw $0,8($0)
addiu $6,$4,6848
addu $1,$6,$3
slt $0,$0,$3
lbu $6,16($0)
srlv $5,$6,$3
addiu $5,$1,-18327
slt $4,$2,$3
subu $1,$4,$3
srav $4,$4,$3
sra $4,$3,12
sb $1,14($0)
sltu $6,$2,$3
sll $1,$0,22
addiu $3,$1,11192
lb $4,6($0)
srlv $4,$4,$3
or $5,$5,$3
srlv $0,$1,$3
andi $1,$3,9547
or $6,$1,$3
lh $4,16($0)
sltiu $3,$0,11462
sltu $3,$1,$3
sll $5,$3,14
addiu $6,$3,26424
srlv $3,$3,$3
slti $3,$3,30524
srl $6,$5,21
slt $3,$3,$3
ori $4,$1,6966
lhu $4,0($0)
sltu $3,$1,$3
ori $4,$4,2030
srlv $3,$3,$3
addiu $6,$1,11762
or $3,$4,$3
ori $1,$0,1470
lh $1,4($0)
ori $1,$5,19525
srav $6,$4,$3
lh $4,12($0)
sltiu $4,$3,-31622
sllv $3,$0,$3
lw $3,4($0)
addu $5,$3,$3
lhu $3,16($0)
sllv $5,$5,$3
and $6,$6,$3
sb $3,10($0)
lh $4,10($0)
subu $5,$1,$3
sll $1,$3,28
slti $1,$4,8707
srl $4,$2,18
addiu $3,$3,-32171
addu $3,$6,$3
sb $5,9($0)
slt $3,$6,$3
srl $4,$3,24
lh $4,14($0)
sra $0,$0,10
nor $4,$1,$3
srlv $3,$3,$3
sb $3,0($0)
lbu $0,6($0)
subu $1,$0,$3
sh $5,8($0)
or $0,$4,$3
sb $1,15($0)
addu $3,$3,$3
addu $3,$1,$3
subu $3,$3,$3
xor $1,$3,$3
slt $3,$3,$3
lh $1,2($0)
sb $0,8($0)
sw $5,12($0)
xori $1,$3,9881
ori $1,$3,37268
sh $3,6($0)
srav $5,$1,$3
ori $5,$0,5233
nor $1,$5,$3
and $1,$3,$3
sltiu $0,$1,-11564
srlv $3,$6,$3
lhu $0,10($0)
slt $5,$4,$3
addiu $3,$3,-18737
sw $4,4($0)
andi $5,$1,4467
sllv $1,$1,$3
xor $0,$3,$3
or $3,$0,$3
lb $0,15($0)
sll $4,$4,29
sltiu $5,$1,24241
srlv $3,$4,$3
lbu $4,11($0)
or $1,$5,$3
sltiu $1,$1,-3716
addiu $1,$3,-17386
sll $3,$3,6
lw $6,16($0)
or $0,$2,$3
xor $6,$1,$3
subu $5,$3,$3
lh $3,16($0)
sra $0,$0,12
xori $0,$3,43924
lb $3,0($0)
or $4,$3,$3
nor $1,$1,$3
nor $4,$3,$3
addu $3,$1,$3
xor $3,$4,$3
or $6,$5,$3
and $3,$3,$3
ori $1,$1,11710
sra $3,$6,0
slti $4,$5,27263
and $1,$5,$3
xori $3,$0,5581
sllv $5,$3,$3
ori $4,$2,9864
lw $5,8($0)
addu $1,$1,$3
addu $0,$0,$3
sra $4,$4,1
slti $5,$5,-14604
slti $4,$4,-22030
lbu $1,7($0)
lhu $6,2($0)
lh $1,10($0)
srlv $0,$5,$3
slt $6,$2,$3
sw $4,16($0)
sllv $6,$4,$3
lbu $5,4($0)
sh $5,4($0)
sb $6,12($0)
or $3,$3,$3
srlv $6,$5,$3
lbu $4,11($0)
and $3,$6,$3
srav $3,$3,$3
lw $5,8($0)
srav $3,$3,$3
addiu $1,$5,29482
sh $4,12($0)
lbu $3,5($0)
ori $1,$1,46494
addiu $1,$5,21136
addiu $3,$5,-28382
addu $5,$3,$3
xor $1,$1,$3
addiu $0,$0,-18451
sh $5,4($0)
lbu $3,10($0)
sllv $4,$6,$3
addu $1,$6,$3
ori $4,$6,33555
subu $3,$4,$3
sll $4,$1,5
srav $5,$0,$3
lb $1,1($0)
lh $1,4($0)
sw $4,8($0)
lbu $3,15($0)
lb $3,13($0)
sllv $3,$2,$3
sw $1,16($0)
srl $4,$4,20
addu $0,$0,$3
addiu $6,$6,29083
lbu $5,4($0)
lw $5,4($0)
sw $4,16($0)
srav $3,$4,$3
lh $4,16($0)
addu $3,$3,$3
lbu $4,14($0)
or $6,$6,$3
ori $4,$4,61452
addiu $0,$0,-26670
slti $5,$5,-24702
nor $0,$4,$3
slt $6,$3,$3
or $0,$0,$3
nor $4,$4,$3
srl $4,$1,27
ori $4,$4,59172
srav $3,$1,$3
sra $3,$0,28
addu $3,$0,$3
lw $4,0($0)
srav $5,$6,$3
lbu $5,0($0)
lbu $3,5($0)
xori $4,$1,10079
and $4,$3,$3
sll $4,$5,29
sb $3,12($0)
subu $4,$3,$3
srav $1,$2,$3
and $4,$2,$3
or $0,$4,$3
andi $1,$3,60649
lb $3,15($0)
sra $4,$4,4
srl $5,$0,27
lhu $5,2($0)
srlv $3,$4,$3
sw $3,12($0)
lb $0,14($0)
sltiu $5,$3,-6488
sw $3,16($0)
sb $6,5($0)
slt $0,$6,$3
lb $1,5($0)
sra $1,$3,11
andi $3,$0,1878
addiu $0,$4,1548
xor $3,$6,$3
addiu $4,$3,-30624
nor $0,$3,$3
sllv $6,$3,$3
sh $1,12($0)
lh $5,16($0)
sb $5,8($0)
subu $4,$5,$3
sll $0,$3,16
sltu $1,$3,$3
subu $3,$4,$3
lhu $1,8($0)
srl $1,$4,8
lbu $4,5($0)
subu $5,$5,$3
and $6,$6,$3
slt $6,$1,$3
or $5,$4,$3
subu $0,$2,$3
sllv $5,$3,$3
sh $1,6($0)
srlv $3,$0,$3
srl $0,$0,15
lb $3,8($0)
xor $5,$5,$3
srl $3,$4,31
slti $3,$3,-9290
lbu $1,5($0)
ori $3,$3,50660
addu $6,$4,$3
or $5,$5,$3
sll $4,$4,15
subu $3,$3,$3
sra $6,$0,0
sw $4,16($0)
srlv $3,$3,$3
nor $4,$3,$3
lb $3,1($0)
lh $3,8($0)
andi $3,$3,26308
sllv $5,$5,$3
sw $3,12($0)
sh $5,8($0)
sh $4,14($0)
srlv $5,$3,$3
subu $6,$3,$3
sra $0,$0,24
xor $5,$3,$3
lbu $3,14($0)
addu $4,$1,$3
sh $0,14($0)
sw $4,12($0)
srl $1,$6,19
addiu $4,$5,-29392
slt $4,$4,$3
and $3,$1,$3
sll $3,$1,30
or $3,$3,$3
nor $3,$1,$3
sllv $1,$3,$3
or $6,$3,$3
slt $6,$6,$3
nor $4,$2,$3
| 13.96288 | 18 | 0.515991 |
fc9c4110db4756d3263baa7104d9f1d98b8885bb | 320 | asm | Assembly | oeis/021/A021650.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/021/A021650.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/021/A021650.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A021650: Decimal expansion of 1/646.
; Submitted by Jamie Morken(s2.)
; 0,0,1,5,4,7,9,8,7,6,1,6,0,9,9,0,7,1,2,0,7,4,3,0,3,4,0,5,5,7,2,7,5,5,4,1,7,9,5,6,6,5,6,3,4,6,7,4,9,2,2,6,0,0,6,1,9,1,9,5,0,4,6,4,3,9,6,2,8,4,8,2,9,7,2,1,3,6,2,2,2,9,1,0,2,1,6,7,1,8,2,6,6,2,5,3,8,6,9
seq $0,173833 ; 10^n - 3.
div $0,646
mod $0,10
| 40 | 199 | 0.559375 |
8fd48c68afe23f4261507a1eb92fbeb56aec37d8 | 454 | asm | Assembly | programs/oeis/090/A090370.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/090/A090370.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/090/A090370.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A090370: Least m > 3 such that gcd(n-1, m*n - 1) = m-1.
; 4,5,6,4,8,5,4,6,12,4,14,8,4,5,18,4,20,5,4,12,24,4,6,14,4,5,30,4,32,5,4,18,6,4,38,20,4,5,42,4,44,5,4,24,48,4,8,6,4,5,54,4,6,5,4,30,60,4,62,32,4,5,6,4,68,5,4,6,72,4,74,38,4,5,8,4,80,5,4,42,84,4,6,44,4,5,90,4,8,5,4,48,6,4,98,8,4,5,102,4
mov $1,2
lpb $0
mov $2,$0
sub $0,1
add $1,1
mod $2,$1
mov $4,1
trn $4,$2
add $0,$4
add $3,1
lpe
add $1,$3
sub $1,2
div $1,2
add $1,4
mov $0,$1
| 22.7 | 235 | 0.535242 |
65c050076ac5203ccec83a76d2b70459036fd242 | 573 | asm | Assembly | data/baseStats/corsola.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 16 | 2018-08-28T21:47:01.000Z | 2022-02-20T20:29:59.000Z | data/baseStats/corsola.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 5 | 2019-04-03T19:53:11.000Z | 2022-03-11T22:49:34.000Z | data/baseStats/corsola.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 2 | 2019-12-09T19:46:02.000Z | 2020-12-05T21:36:30.000Z | db DEX_CORSOLA ; pokedex id
db 55 ; base hp
db 55 ; base attack
db 85 ; base defense
db 35 ; base speed
db 75 ; base special
db WATER ; species type 1
db ROCK ; species type 2
db 60 ; catch rate
db 99 ; base exp yield
INCBIN "pic/ymon/corsola.pic",0,1 ; sprite dimensions
dw CorsolaPicFront
dw CorsolaPicBack
; attacks known at lvl 0
db TACKLE
db ABSORB
db SLEEP_POWDER
db 0
db 5 ; growth rate
; learnset
tmlearn 6,8
tmlearn 9,10,11,12,13,14
tmlearn 20
tmlearn 31,32
tmlearn 33,34,36
tmlearn 44
tmlearn 50,53
db BANK(CorsolaPicFront) ; padding
| 19.758621 | 54 | 0.713787 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.