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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6a742a000c11cb8696d9c5fa839c38f73af0a7de
| 677
|
asm
|
Assembly
|
programs/oeis/107/A107782.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/107/A107782.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/107/A107782.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A107782: In binary representation of n: (number of zeros) minus (number of blocks of contiguous zeros).
; 0,0,0,0,1,0,0,0,2,1,0,0,1,0,0,0,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,4,3,2,2,2,1,1,1,2,1,0,0,1,0,0,0,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,5,4,3,3,3,2,2,2,3,2,1,1,2,1,1,1,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,4,3,2,2,2,1,1,1,2,1,0,0,1,0,0,0,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,6,5,4,4,4,3,3,3,4,3,2,2,3,2,2,2,4,3,2,2,2,1,1,1,3,2,1,1,2,1,1,1,4,3,2,2,2,1,1,1,2,1,0,0,1,0,0,0,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,5,4,3,3,3,2,2,2,3,2,1,1,2,1,1,1,3,2,1,1,1,0,0,0,2,1,0,0,1,0,0,0,4,3,2,2,2,1,1,1,2,1,0,0,1,0,0,0,3,2,1,1,1,0,0,0,2,1
lpb $0
mov $2,$0
div $0,2
gcd $2,4
div $2,3
add $1,$2
lpe
| 61.545455
| 501
| 0.536189
|
0224a791b9f157945952aeb59b502b54ec658e59
| 255
|
asm
|
Assembly
|
libsrc/target/x1/graphics/w_xorpixl.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/target/x1/graphics/w_xorpixl.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/target/x1/graphics/w_xorpixl.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
;
; Generic pseudo graphics routines for text-only platforms
;
; Xor pixel at (x,y) coordinate.
SECTION code_clib
PUBLIC w_xorpixel
EXTERN __spc1000_mode
defc NEEDxor = 1
.w_xorpixel
INCLUDE "w_pixel.inc"
| 15.9375
| 64
| 0.635294
|
8066a1537abdb2d6dbb491440959edb72c8eaddb
| 257
|
asm
|
Assembly
|
programs/oeis/024/A024127.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/024/A024127.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/024/A024127.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A024127: a(n) = 11^n-1.
; 0,10,120,1330,14640,161050,1771560,19487170,214358880,2357947690,25937424600,285311670610,3138428376720,34522712143930,379749833583240,4177248169415650,45949729863572160,505447028499293770
mov $1,11
pow $1,$0
sub $1,1
mov $0,$1
| 32.125
| 190
| 0.797665
|
cbee4edc821123920e1400256b9c4ea096244bb6
| 573
|
asm
|
Assembly
|
programs/oeis/329/A329376.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/329/A329376.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/329/A329376.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A329376: Multiplicative with a(p^e) = p when e == 2, otherwise a(p^e) = 1.
; 1,1,1,2,1,1,1,1,3,1,1,2,1,1,1,1,1,3,1,2,1,1,1,1,5,1,1,2,1,1,1,1,1,1,1,6,1,1,1,1,1,1,1,2,3,1,1,1,7,5,1,2,1,1,1,1,1,1,1,2,1,1,3,1,1,1,1,2,1,1,1,3,1,1,5,2,1,1,1,1,1,1,1,2,1,1,1,1,1,3,1,2,1,1,1,1,1,7,3,10
add $0,1
mov $1,1
mov $2,2
mov $3,$0
mov $4,$0
lpb $3
sub $3,$1
mov $5,$4
mov $6,0
lpb $5
add $6,1
mov $7,$0
div $0,$2
mod $7,$2
cmp $7,0
sub $5,$7
lpe
cmp $6,2
cmp $6,0
cmp $6,0
mov $7,$2
pow $7,$6
mul $1,$7
add $2,1
sub $3,$7
lpe
mov $0,$1
| 18.483871
| 202
| 0.485166
|
4e6c3fa65ca9d8487a73513493761c27797705db
| 553
|
asm
|
Assembly
|
oeis/017/A017503.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/017/A017503.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/017/A017503.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A017503: a(n) = (11*n + 9)^7.
; 4782969,1280000000,27512614111,230539333248,1174711139837,4398046511104,13348388671875,34792782221696,80798284478113,171382426877952,337931541778439,627485170000000,1107984764452581,1874584905187328,3057125241215467,4828861374436224,7416552901015625,11112006825558016,16285174563412143,23398900746453632,33025422047685709,45864714240000000,62764785704439251,84744015603303808,113015634933443697,149014448675078144,194425897251484375,251217555514897536,321673167473963573,408429314978086912
mul $0,11
add $0,9
pow $0,7
| 79
| 491
| 0.886076
|
7eb4e4902a65a7f418aa8864a0d5ed6cf8b0690e
| 854
|
asm
|
Assembly
|
Modules/Module4/Multiplication/shift_and_add.asm
|
hackettccp/CSCI213
|
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
|
[
"MIT"
] | null | null | null |
Modules/Module4/Multiplication/shift_and_add.asm
|
hackettccp/CSCI213
|
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
|
[
"MIT"
] | null | null | null |
Modules/Module4/Multiplication/shift_and_add.asm
|
hackettccp/CSCI213
|
c2b5c3e1b5f47fa329a59b0a7261ebeee8e64059
|
[
"MIT"
] | null | null | null |
#Demonstrates multiplication using shift-and-add
.text
li $t0, 15 #Multiplier
li $t1, 83 #Multiplicand
li $t2, 0 #Accumulator
move $t3, $t0 #Copies the multiplier so the original value is not lost
move $t4, $t1 #Copies the multiplicand so the original value is not lost
multloop:
ble $t3, $0, done #Multiplier copy has reached zero, exit
andi $t5, $t3, 1 #Tests the low-order bit (if $t5 is 1, then the number is odd)
beq $t5, $0, even #Multiplier is even
add $t2, $t2, $t4 #Add the multiplicand to the accumulator
even:
sll $t4, $t4, 1 #Left shift the the multiplier copy by 1
srl $t3, $t3, 1 #Right shift the the multiplicand copy by 1
j multloop #Repeat
done:
move $a0, $t2 #Move the product to $a0
li $v0, 1 #Set system call code for printing an integer
syscall #Print the integer
| 34.16
| 83
| 0.672131
|
6dfb433ca80a8e6b7a81aecb229921992b12f84a
| 443
|
asm
|
Assembly
|
programs/oeis/152/A152174.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/152/A152174.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/152/A152174.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A152174: a(n) = -2*a(n-1)+4*a(n-2), n>1 ; a(0) = 1, a(1) = -4.
; 1,-4,12,-40,128,-416,1344,-4352,14080,-45568,147456,-477184,1544192,-4997120,16171008,-52330496,169345024,-548012032,1773404160,-5738856448,18571329536,-60098084864,194481487872,-629355315200
add $0,2
mov $2,3
mov $3,2
lpb $0,1
sub $0,1
add $2,$1
sub $3,1
mul $4,2
add $4,$3
mov $1,$4
sub $2,$4
mul $2,2
mov $3,6
mov $4,$2
lpe
sub $1,13
div $1,8
add $1,1
| 20.136364
| 193
| 0.609481
|
cddb4750332b346dcee5ad76f151ab2809a2c46f
| 33
|
asm
|
Assembly
|
BootROMs/cgb_boot_fast.asm
|
stipton7960/SameBoy
|
3c49c2449ce1948e85baf7f7e32038c6750e4424
|
[
"MIT"
] | 1,044
|
2016-04-02T18:04:16.000Z
|
2022-03-31T16:48:38.000Z
|
BootROMs/cgb_boot_fast.asm
|
binarycounter/SameBoy
|
fe28e28e20ca5c78cac79601f2e32de856d95fd3
|
[
"MIT"
] | 376
|
2016-04-02T20:44:26.000Z
|
2022-03-31T05:22:39.000Z
|
BootROMs/cgb_boot_fast.asm
|
binarycounter/SameBoy
|
fe28e28e20ca5c78cac79601f2e32de856d95fd3
|
[
"MIT"
] | 180
|
2017-04-17T01:12:44.000Z
|
2022-03-30T07:58:06.000Z
|
FAST EQU 1
include "cgb_boot.asm"
| 16.5
| 22
| 0.787879
|
4003b8a5b4274e8190e523b937877ffe3d6442a9
| 5,270
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_11199_1771.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_11199_1771.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_11199_1771.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 %rbx
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x16b50, %rsi
lea addresses_WC_ht+0x13c50, %rdi
clflush (%rsi)
clflush (%rdi)
nop
dec %r13
mov $78, %rcx
rep movsq
nop
sub %rcx, %rcx
lea addresses_A_ht+0xee10, %rsi
lea addresses_WC_ht+0xdf50, %rdi
xor $29471, %r10
mov $21, %rcx
rep movsw
nop
nop
nop
and %r13, %r13
lea addresses_WC_ht+0xb50, %rbx
nop
sub $61842, %r13
mov $0x6162636465666768, %rdi
movq %rdi, %xmm4
movups %xmm4, (%rbx)
nop
xor $51289, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_WC+0xd128, %rsi
lea addresses_WC+0x11730, %rdi
nop
dec %r13
mov $124, %rcx
rep movsw
nop
sub %rcx, %rcx
// REPMOV
mov $0x47c, %rsi
lea addresses_US+0xc350, %rdi
nop
nop
nop
nop
add $6980, %r14
mov $116, %rcx
rep movsw
nop
nop
nop
add %rsi, %rsi
// Faulty Load
lea addresses_normal+0xb50, %r13
nop
nop
nop
inc %rsi
movups (%r13), %xmm1
vpextrq $1, %xmm1, %rdi
lea oracles, %rsi
and $0xff, %rdi
shlq $12, %rdi
mov (%rsi,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_WC', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_P', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_US', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'34': 11199}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 45.826087
| 2,999
| 0.66148
|
100fca7e421fc1a1fb8725c5d32508fe2b4624f0
| 627
|
asm
|
Assembly
|
programs/oeis/245/A245764.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/245/A245764.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/245/A245764.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A245764: a(n) = 2*(n^2 + 1) + n*(1 + (-1)^n).
; 2,4,14,20,42,52,86,100,146,164,222,244,314,340,422,452,546,580,686,724,842,884,1014,1060,1202,1252,1406,1460,1626,1684,1862,1924,2114,2180,2382,2452,2666,2740,2966,3044,3282,3364,3614,3700,3962,4052,4326,4420,4706,4804,5102,5204,5514,5620,5942,6052,6386,6500,6846,6964,7322,7444,7814,7940,8322,8452,8846,8980,9386,9524,9942,10084,10514,10660,11102,11252,11706,11860,12326,12484,12962,13124,13614,13780,14282,14452,14966,15140,15666,15844,16382,16564,17114,17300,17862,18052,18626,18820,19406,19604
mov $1,-2
bin $1,$0
trn $1,$0
add $1,$0
mul $1,$0
mul $1,2
add $1,2
mov $0,$1
| 52.25
| 499
| 0.725678
|
2bc51188c6d0c745a996fec62a95aa93334572f3
| 1,173
|
asm
|
Assembly
|
test/subtest.asm
|
nagydani/lpfp
|
2cbca6a580cacb2dfd2323abdd341f1cffb5aa20
|
[
"MIT"
] | 17
|
2018-06-17T19:12:27.000Z
|
2021-05-31T16:20:44.000Z
|
test/subtest.asm
|
nagydani/lpfp
|
2cbca6a580cacb2dfd2323abdd341f1cffb5aa20
|
[
"MIT"
] | null | null | null |
test/subtest.asm
|
nagydani/lpfp
|
2cbca6a580cacb2dfd2323abdd341f1cffb5aa20
|
[
"MIT"
] | 4
|
2018-10-14T16:08:26.000Z
|
2021-06-21T23:31:59.000Z
|
; Iterate through all values of HL >= DE and check FSUBP
ORG $C000
DI
EXX
PUSH HL
LD HL,0
LD E,L
LD D,H
LOOP: PUSH HL
PUSH DE
CALL FSUBP
LD C,L
LD B,H
POP DE
POP HL
PUSH HL
PUSH BC
PUSH DE
EX DE,HL
CALL STKFP
POP DE
PUSH DE
CALL STKFP
POP DE
POP BC
PUSH DE
PUSH BC
RST $28
DEFB $03,$38
CALL FPTODE
EX DE,HL
POP BC
LD A,H
CP B
JR NZ,MISMATCH
LD A,L
CP C
JR NZ,MISMATCH
RST $28
DEFB $02,$38
POP DE
POP HL
INC L
JR NZ,LOOP
INC H
BIT 7,H
JR NZ,LOOP
LD L,E
LD H,D
INC HL
INC E
JR NZ,LOOP
INC D
JR NZ,LOOP
POP HL
EXX
LD BC,0
EI
RET
MISMATCH:
POP DE
POP HL
LD C,L
LD B,H
EXX
POP HL
EXX
EI
RET
INCLUDE "../hpfp.asm"
; floating point constants
MINF: EQU $0000 ; Positive epsilon, 2^-64 5.421e-20
MAXF: EQU $7FFF ; Maximal floating point number 2^64-2^55 1.841e+19
ONEF: EQU $4000 ; One 1.000e+00
ROOT2F: EQU $406A ; Square root of 2 1.414e+00
F7F: EQU $46FC ; $7F i.e. 127 1.270e+02
; Subroutines
INCLUDE "../fdivmul.asm"
INCLUDE "../faddsub.asm"
INCLUDE "../mul8bit.asm"
; Lookup tables
INCLUDE "../addtab.asm"
INCLUDE "../subtab.asm"
INCLUDE "../multab.asm"
INCLUDE "../divtab.asm"
| 13.179775
| 68
| 0.639386
|
58a07ef4f7d45706f19093d3e03897bac2bcd291
| 795
|
asm
|
Assembly
|
oeis/006/A006457.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/006/A006457.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/006/A006457.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A006457: Number of elements in Z[ i ] whose `smallest algorithm' is <= n.
; Submitted by Christian Krause
; 1,5,17,49,125,297,669,1457,3093,6457,13309,27201,55237,111689,225101,452689,908885,1822809,3652701,7315553,14645349,29311081,58650733,117342321,234741877,469565561,939245693,1878655105,3757539461,7515406473,15031271565,30063198353,60127314069,120255938713,240513712285,481030045857,962063761573,1924132765865,3848272871597,7696556228785,15393127137461,30786275246265,61572579852477,123145201647809,246290462015685,492581007917257,985162133274829,1970324434321617,3940649103524053,7881298542592217
lpb $0
sub $0,1
mul $1,2
mul $2,2
add $4,$1
add $1,3
add $5,$2
mov $2,$3
sub $5,$3
mov $3,$5
add $4,3
add $2,$4
sub $5,$1
lpe
mov $0,$2
div $0,3
mul $0,4
add $0,1
| 34.565217
| 498
| 0.769811
|
4b5cc4898274fa740fc616a1e1b0210f768cc3ac
| 5,489
|
asm
|
Assembly
|
space_invaders/snake/snake.asm
|
AgustinCB/emulators
|
7d4602cee4f35bd478843bee23315ba099f56526
|
[
"MIT"
] | 8
|
2018-08-14T12:11:38.000Z
|
2020-07-19T01:21:35.000Z
|
space_invaders/snake/snake.asm
|
AgustinCB/emulators
|
7d4602cee4f35bd478843bee23315ba099f56526
|
[
"MIT"
] | null | null | null |
space_invaders/snake/snake.asm
|
AgustinCB/emulators
|
7d4602cee4f35bd478843bee23315ba099f56526
|
[
"MIT"
] | 1
|
2018-08-14T15:04:54.000Z
|
2018-08-14T15:04:54.000Z
|
SNAKE DW 4001H
; Status storage
; 2000 -> Direction
; 2001 -> Next direction
; 2002 -> Timer
; 2003 -> INIT status
STATUS DW 2000H
MID_WIDTH DB 112
MID_HEIGHT DB 128
MID_SCREEN DW 7080H
START_FRAME_BUFFER DW 2400H
END_FRAME_BUFFER DW 4000H
ORG 03H
JMP INIT
ORG 08H
HANDLE_MID_SCREEN:
JMP HANDLE_FULL_SCREEN
ORG 10H
HANDLE_FULL_SCREEN:
PUSH PSW
PUSH B
PUSH D
PUSH H
LXI H, STATUS+3
MOV A, M
CPI 08H ; Did initialization finished?
JNZ RETURN_TO_WORK ; No! Come back to work!
CALL READ_INPUT
CALL UPDATE_TIMER
RETURN_TO_WORK:
POP H
POP D
POP B
POP PSW
EI
RET
ORG 100H
INIT:
; Current step will be stored in B
; 0x01 -> Saving status
; 0x08 -> All done! Game running!
LXI H, STATUS+3
MVI M, 1
; Initialize the status
LXI SP, 0FFFFH
; Direction:
; 0x40 -> Right
; 0x08 -> Up
; 0x20 -> Left
; 0x80 -> Down
; Default: Up
LXI H, STATUS
MVI D, 08H
MOV M, D
INX H
MOV M, D
; Initialize the screen
CALL CLEAR_SCREEN
; Starting position of the snake
; Snake array.
; First byte is the size of the structure.
; Then each couple of bytes is the location of a node, starting from the head.
; Each node are the vertices of the snake.
LXI H, SNAKE
MVI M, 2
INX H
LXI D, MID_SCREEN
INX D
CALL SAVE_SNAKE_POINT
CALL DRAW_NODE
DCX D
CALL SAVE_SNAKE_POINT
CALL DRAW_NODE
LXI H, STATUS+3
MVI M, 08H
CALL GAME_LOOP
SAVE_SNAKE_POINT:
MOV M, D
INX H
MOV M, E
INX H
RET
CLEAR_SCREEN:
LXI H, START_FRAME_BUFFER
CLEAR_SCREEN_LOOP:
MVI M, 00
INX H
MOV A, H
CPI 40
JNZ CLEAR_SCREEN_LOOP
RET
GAME_LOOP:
; Wait half a second.
; Then update the direction of the snake according to user input.
; This basically means that the snake will move one position in the screen by half a second.
CALL WAIT_HALF_SECOND
CALL UPDATE_STATUS
CALL DRAW_NEW_STEP
CALL UPDATE_TAIL
JMP GAME_LOOP
DRAW_NEW_STEP:
LXI H, SNAKE
INR L
CALL LOAD_NODE
LXI H, STATUS
MOV A, M
CPI 40H
CZ MOVE_RIGHT
CPI 08H
CZ MOVE_UP
CPI 20H
CZ MOVE_LEFT
CPI 80H
CZ MOVE_DOWN
CALL SAVE_NODE
CALL DRAW_NODE
RET
UPDATE_TAIL:
LXI H, SNAKE
MOV C, M ; Get the size of the snake
DCR C
FIND_PREV_LAST_LOOP:
INX H
DCR C
JNZ FIND_PREV_LAST_LOOP
CALL LOAD_NODE
MOV B, D
MOV C, E
CALL LOAD_NODE
FINISH:
; Here in DE we have the coordinates of the last vertex of the snake
; And in BC we have the coordinates of the previous to last vertex of the snake
; We have to:
; Clear the bit in the frame buffer for the last vertex.
; Update the position of the last vertex
; Remove the last vertex if it's the same of the previous one
; Save new state
; Update the bit
; GET_BIT uses BC and DE, so let's save them in the stack
PUSH B
PUSH D
CALL GET_BIT
MOV A, C
XRI 0FFH
MOV C, A
MOV A, M
ANA C
MOV M, A
; Update the position of the last vertex
POP D
POP B
MOV A, D
SUB B
JZ SAME_COLUMN
JM GO_RIGHT
; If it's in different columns and the last vertex is further right than the previous one, move it left.
DCR D
JMP REMOVE_LAST_VERTEX
; If it's in different columns and the last vertex is further left than the previous one, move it right.
GO_RIGHT:
INR D
JMP REMOVE_LAST_VERTEX
SAME_COLUMN:
MOV A, E
SUB C
JM GO_UP
; If it's in the same columns (i.e. different rows) and the last vertex is further up than the previous one, move it down.
DCR E
JMP REMOVE_LAST_VERTEX
; If it's in the same columns (i.e. different rows) and the last vertex is further down than the previous one, move it up.
GO_UP:
INR E
JMP REMOVE_LAST_VERTEX
REMOVE_LAST_VERTEX: ; If they're the same
MOV A, E
CMP C
JNZ UPDATE_VERTEX ; Not the same! Moving on
MOV A, D
CMP B
JNZ UPDATE_VERTEX ; Not the same! Moving on
; The same, removing that ugly vertex
LXI H, SNAKE
MOV A, M
DCR A
MOV M, A
RET
UPDATE_VERTEX:
DCX H
DCX H
CALL SAVE_NODE
RET
DRAW_NODE:
CALL GET_BIT
MOV A, M
ORA C
MOV M, A
RET
GET_BIT:
; This method will get in HL the address in the frame buffer of the byte in the position DE
; PARAMETERS: DE -> The coordinates of the pixel in the screen.
; RETURNS: HL -> The address in the frame buffer for DE
; C -> A mask for that pixel
MOV C, E
; Multiply the x coordinate by 0x20
MVI A, 5
OUT 4
MVI A, 0
OUT 2
MOV A, D
OUT 2
IN 3
MOV E, A
MOV A, D
OUT 2
MVI A, 0
OUT 2
IN 3
; Sum the result to 0x2400 to get the base address
MOV D, A
LXI H, START_FRAME_BUFFER
DAD D
; Divide the y coordinate by 8 (integer division) (confirmed)
MOV A, C
OUT 2
MVI A, 0
OUT 2
IN 3
; Sum to HL to get the location of byte that affects the pixel.
MOV E, A
MVI D, 0
DAD D
MOV A, C
; Get the rest to know which bit to modify
ANI 7
OUT 4
MVI A, 0
OUT 2
MVI A, 1
OUT 2
IN 3
MOV C, A
SAVE_NODE:
; Puts D in the x coordinate of the node pointed by HL
; And E in the y coordinate of the node pointed by HL+1
; Also advance H to the next node.
MOV M, D
INX H
MOV M, E
INX H
RET
MOVE_RIGHT:
INR D
RET
MOVE_UP:
INR E
RET
MOVE_LEFT:
DCR D
RET
MOVE_DOWN:
DCR E
RET
LOAD_NODE:
; Puts the x coordinate of the node pointed by HL int D
; And the y coordinate in E
; Also advance H to the next node
MOV D, M
INX H
MOV E, M
INX H
RET
READ_INPUT:
IN 1
MOV C, A
ANI 40H
JNZ SAVE
MOV A, C
ANI 08H
JNZ SAVE
MOV A, C
ANI 20H
JNZ SAVE
MOV A, C
ANI 80H
RZ
SAVE:
LXI H, STATUS
INX H
MOV M, A
RET
WAIT_HALF_SECOND:
LXI H, STATUS+2
MVI M, 60 ; The variable will get updated every 1/120 second. So there'd be 120 updates per second
WAIT_HALF_SECOND_LOOP:
MOV A, M
CPI 0
JNZ WAIT_HALF_SECOND_LOOP
RET
UPDATE_STATUS:
LXI H, STATUS+1
MOV C, M
DCX H
MOV M, C
RET
UPDATE_TIMER:
LXI H, STATUS+2
MOV C, M
DCR C
MOV M, C
RET
| 16.19174
| 122
| 0.727273
|
17f033469dd8b186e62621e4e0744042efaa7583
| 690
|
asm
|
Assembly
|
data/pokemon/base_stats/dewgong.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | 1
|
2022-02-15T00:19:44.000Z
|
2022-02-15T00:19:44.000Z
|
data/pokemon/base_stats/dewgong.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | null | null | null |
data/pokemon/base_stats/dewgong.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | null | null | null |
db DEX_DEWGONG ; pokedex id
db 90, 70, 80, 70, 95
; hp atk def spd spc
db WATER, ICE ; type
db 75 ; catch rate
db 176 ; base exp
INCBIN "gfx/pokemon/front/dewgong.pic", 0, 1 ; sprite dimensions
dw DewgongPicFront, DewgongPicBack
db HEADBUTT, BUBBLE, GROWL, REST ; level 1 learnset
db GROWTH_MEDIUM_FAST ; growth rate
; tm/hm learnset
tmhm TOXIC, COUNTER, BODY_SLAM, TAKE_DOWN, DOUBLE_EDGE, \
BUBBLEBEAM, WATER_GUN, ICE_BEAM, BLIZZARD, HYPER_BEAM, \
PAY_DAY, RAGE, MIMIC, DOUBLE_TEAM, BIDE, \
SKULL_BASH, REST, SUBSTITUTE, SURF, STRENGTH
; end
db 0 ; padding
| 28.75
| 77
| 0.605797
|
6fcea46aaf3afdf13817f9b8bca6071d6cfb7989
| 243
|
asm
|
Assembly
|
SOURCE ASM FILES/FPSHack_17_SlowLinkSimpleAnmPlay.asm
|
Meowmaritus/Wind-Waker-60FPS-Hack
|
13696724637a1c60e82ef76759af85e3c78356ef
|
[
"MIT"
] | 14
|
2017-08-16T17:20:21.000Z
|
2021-12-07T03:45:12.000Z
|
SOURCE ASM FILES/FPSHack_17_SlowLinkSimpleAnmPlay.asm
|
Meowmaritus/Wind-Waker-60FPS-Hack
|
13696724637a1c60e82ef76759af85e3c78356ef
|
[
"MIT"
] | 1
|
2018-05-26T12:32:23.000Z
|
2018-08-10T06:48:38.000Z
|
SOURCE ASM FILES/FPSHack_17_SlowLinkSimpleAnmPlay.asm
|
Meowmaritus/Wind-Waker-60FPS-Hack
|
13696724637a1c60e82ef76759af85e3c78356ef
|
[
"MIT"
] | 6
|
2017-12-25T01:48:35.000Z
|
2021-12-07T21:07:30.000Z
|
#To be inserted at 801287f4
####################################
##FPSHack_17_SlowLinkSimpleAnmPlay##
####################################
lis r17, 0x817F
lfs f17, 0x0004 (r17) #Load FloatSlowdown
fmuls f1, f1, f17
fadds f2,f1,f0 #Vanilla
| 22.090909
| 41
| 0.526749
|
a6e1f67e0ea400ae3168a08ee56ffb8494c53aaf
| 548
|
asm
|
Assembly
|
8085_programming/YT/kth_largest_number.asm
|
SayanGhoshBDA/code-backup
|
8b6135facc0e598e9686b2e8eb2d69dd68198b80
|
[
"MIT"
] | 16
|
2018-11-26T08:39:42.000Z
|
2019-05-08T10:09:52.000Z
|
8085_programming/YT/kth_largest_number.asm
|
SayanGhoshBDA/code-backup
|
8b6135facc0e598e9686b2e8eb2d69dd68198b80
|
[
"MIT"
] | 8
|
2020-05-04T06:29:26.000Z
|
2022-02-12T05:33:16.000Z
|
8085_programming/YT/kth_largest_number.asm
|
SayanGhoshBDA/code-backup
|
8b6135facc0e598e9686b2e8eb2d69dd68198b80
|
[
"MIT"
] | 5
|
2020-02-11T16:02:21.000Z
|
2021-02-05T07:48:30.000Z
|
// TO FIND THE K-TH LARGEST NUMBER WITHOUT SORTING
LXI H,2060
MVI B,02
L8: MVI A,0H
LXI H,2060
MOV C,M
INX H
DCR C
JZ L4
MOV A,M
L3: INX H
CMP M
JC L1
L2: STC
CMC
DCR C
JNZ L3
MOV E,A
LXI H,2060
MOV C,M
L5: INX H
CMP M
JZ L6
L7: DCR C
JNZ L5
DCR B
JNZ L8
MOV A,E
STA 2080
HLT
L1: MOV A,M
JMP L2
L4: MOV A,M // IF ONE NUMBER IS PRESENT
STA 2080
HLT
L6: MVI M,0H
JMP L7
# ORG 2060H
# DB 04, 05, 06, 03, 01
| 11.416667
| 50
| 0.494526
|
1e76de4795b250e92d6d98e96c2dee094f7ba2a6
| 87
|
asm
|
Assembly
|
lab14/cases/letter3.asm
|
Brant-Skywalker/ZJUI-ECE-120-SP21
|
b8d444620f4a57766ac3f1346d7ec4608b35adbe
|
[
"MIT"
] | null | null | null |
lab14/cases/letter3.asm
|
Brant-Skywalker/ZJUI-ECE-120-SP21
|
b8d444620f4a57766ac3f1346d7ec4608b35adbe
|
[
"MIT"
] | null | null | null |
lab14/cases/letter3.asm
|
Brant-Skywalker/ZJUI-ECE-120-SP21
|
b8d444620f4a57766ac3f1346d7ec4608b35adbe
|
[
"MIT"
] | null | null | null |
; sample test file for lab 13
.ORIG x5000
.FILL x20
.FILL x41
.FILL x46
.END
| 7.909091
| 29
| 0.632184
|
ce7feccd159db3f6efb5d3c81c3c537854b4603a
| 22,737
|
asm
|
Assembly
|
CS61/cs61_assignments/assignment-5-Kuzame/assn5.asm
|
Kuzame/CS61
|
d384dd8170e86464d15c7c02745e33113537c832
|
[
"Apache-2.0"
] | 1
|
2018-10-12T20:39:46.000Z
|
2018-10-12T20:39:46.000Z
|
CS61/cs61_assignments/assignment-5-Kuzame/assn5.asm
|
Kuzame/CS61
|
d384dd8170e86464d15c7c02745e33113537c832
|
[
"Apache-2.0"
] | null | null | null |
CS61/cs61_assignments/assignment-5-Kuzame/assn5.asm
|
Kuzame/CS61
|
d384dd8170e86464d15c7c02745e33113537c832
|
[
"Apache-2.0"
] | null | null | null |
;=================================================
; Name: Adrian Harminto
; Email: aharm002
;
; Assignment name: Assignment 5
; Lab section: 24
;
; I hereby certify that I have not received assistance on this assignment,
; or used code, from ANY outside source other than the instruction team.
;
;=================================================
.ORIG x3000 ; Program begins here
;-------------
;Instructions
;-------------
;-------------------------------
;INSERT CODE STARTING FROM HERE
;--------------------------------
ReLoop
LD R6, MENU
JSRR R6
ADD R1, R1, #-1
BRz IsOne
ADD R1, R1, #-1
BRz IsTwo
ADD R1, R1, #-1
BRz IsThree
ADD R1, R1, #-1
BRz IsFour
ADD R1, R1, #-1
BRz IsFive
ADD R1, R1, #-1
BRz IsSix
ADD R1, R1, #-1
BRz IsSeven
; R1 should be diminished to 0 after reaching either one of these points below
IsOne
LD R6, ALL_MACHINES_BUSY
JSRR R6
ADD R2, R2, #-1
BRzp AllAreBusy
;NotAllBusy
LEA R0, ALLNOTBUSY
PUTS
BRnzp ExitIsOne
AllAreBusy
LEA R0, ALLBUSY
PUTS
ExitIsOne
BRnzp ReLoop
IsTwo
LD R6, ALL_MACHINES_FREE
JSRR R6
ADD R2, R2, #-1
BRzp AllAreFree
;NotAllBusy
LEA R0, NOTFREE
PUTS
BRnzp ExitIsTwo
AllAreFree
LEA R0, FREE
PUTS
ExitIsTwo
BRnzp ReLoop
IsThree
LD R6, NUM_BUSY_MACHINES
JSRR R6
LEA R0, BUSYMACHINE1
PUTS
LD R6, PRINT_NUMBER
JSRR R6
LEA R0, BUSYMACHINE2
PUTS
BRnzp ReLoop
IsFour
LD R6, NUM_FREE_MACHINES
JSRR R6
LEA R0, FREEMACHINE1
PUTS
LD R6, PRINT_NUMBER
JSRR R6
LEA R0, FREEMACHINE2
PUTS
BRnzp ReLoop
IsFive
LD R6, GET_INPUT
JSRR R6
LD R6, MACHINE_STATUS
JSRR R6
LEA R0, STATUS1
PUTS
ADD R3, R2, #0 ; store MACHINE STATUS temporarily to R3, so we can use our print number helper
ADD R2, R1, #0 ; load the value of GetInput
LD R6, PRINT_NUMBER
JSRR R6
ADD R2, R3, #0 ; store the original value from MachineStatus back to R2
ADD R2, R2, #-1
BRzp StatusIsFree
;StatusIsNOTFree
LEA R0, STATUS2
PUTS
BRnzp ExitStatus
StatusIsFree
LEA R0, STATUS3
PUTS
ExitStatus
BRnzp ReLoop
IsSix
LD R6, FIRST_FREE
JSRR R6
ADD R2, R2, #0
BRn NoFirstFree
;ThereIsFirstFree
LEA R0, FIRSTFREE
PUTS
LD R6, PRINT_NUMBER
JSRR R6
LEA R0, FIRSTFREE2
PUTS
BRnzp ExitFirstFree
NoFirstFree
LEA R0, FIRSTFREE3
PUTS
ExitFirstFree
BRnzp ReLoop
IsSeven
LEA R0, Goodbye
PUTS
HALT
;---------------
;Data
;---------------
;Add address for subroutines
MENU .FILL x3400
ALL_MACHINES_BUSY .FILL x3800
ALL_MACHINES_FREE .FILL x3C00
NUM_BUSY_MACHINES .FILL x4000
NUM_FREE_MACHINES .FILL x4400
MACHINE_STATUS .FILL x4800
FIRST_FREE .FILL x4C00
GET_INPUT .FILL x5000
PRINT_NUMBER .FILL x5400
;Other data
;Strings for options
Goodbye .Stringz "Goodbye!\n"
ALLNOTBUSY .Stringz "Not all machines are busy\n"
ALLBUSY .Stringz "All machines are busy\n"
FREE .STRINGZ "All machines are free\n"
NOTFREE .STRINGZ "Not all machines are free\n"
BUSYMACHINE1 .STRINGZ "There are "
BUSYMACHINE2 .STRINGZ " busy machines\n"
FREEMACHINE1 .STRINGZ "There are "
FREEMACHINE2 .STRINGZ " free machines\n"
STATUS1 .STRINGZ "Machine "
STATUS2 .STRINGZ " is busy\n"
STATUS3 .STRINGZ " is free\n"
FIRSTFREE .STRINGZ "The first available machine is number "
FIRSTFREE2 .STRINGZ "\n"
FIRSTFREE3 .STRINGZ "No machines are free\n"
.ORIG x3400
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: MENU
; Inputs: None
; Postcondition: The subroutine has printed out a menu with numerical options, allowed the
; user to select an option, and returned the selected option.
; Return Value (R1): The option selected: #1, #2, #3, #4, #5, #6 or #7
; no other return value is possible
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_3400
ST R1, BACKUP_R1_3400
ST R2, BACKUP_R2_3400
ST R3, BACKUP_R3_3400
ST R4, BACKUP_R4_3400
ST R5, BACKUP_R5_3400
ST R6, BACKUP_R6_3400
ST R7, BACKUP_R7_3400
;-------------------------------
;INSERT CODE For Subroutine MENU
;--------------------------------
; R2 for conversion
LD R2, convert
BRnzp IsItOneToSeven
NotOneToSeven
LEA R0, Error_message_1
PUTS
IsItOneToSeven
LD R0, Menu_string_addr
PUTS
GETC
OUT
ADD R1, R0, #0
LEA R0, newline
PUTS
ADD R1, R1, R2
BRnz NotOneToSeven
ADD R1, R1, #-7
BRp NotOneToSeven
ADD R1, R1, #7
; restoring data
LD R0, BACKUP_R0_3400
;LD R1, BACKUP_R1_3400
LD R2, BACKUP_R2_3400
LD R3, BACKUP_R3_3400
LD R4, BACKUP_R4_3400
LD R5, BACKUP_R5_3400
LD R6, BACKUP_R6_3400
LD R7, BACKUP_R7_3400
; returning
RET
BACKUP_R0_3400 .BLKW #1
BACKUP_R1_3400 .BLKW #1
BACKUP_R2_3400 .BLKW #1
BACKUP_R3_3400 .BLKW #1
BACKUP_R4_3400 .BLKW #1
BACKUP_R5_3400 .BLKW #1
BACKUP_R6_3400 .BLKW #1
BACKUP_R7_3400 .BLKW #1
;--------------------------------
;Data for subroutine MENU
;--------------------------------
convert .FILL xFFD0 ; This is equivalent to the negative value of x30
newline .STRINGZ "\n"
Error_message_1 .STRINGZ "INVALID INPUT\n"
Menu_string_addr .FILL x6000
.ORIG x3800
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: ALL_MACHINES_BUSY [1]
; Inputs: None
; Postcondition: The subroutine has returned a value indicating whether all machines are busy
; Return value (R2): 1 if all machines are busy, 0 otherwise
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_3800
ST R1, BACKUP_R1_3800
ST R2, BACKUP_R2_3800
ST R3, BACKUP_R3_3800
ST R4, BACKUP_R4_3800
ST R5, BACKUP_R5_3800
ST R6, BACKUP_R6_3800
ST R7, BACKUP_R7_3800
;-------------------------------
;INSERT CODE For Subroutine ALL_MACHINES_BUSY
;--------------------------------
AND R2, R2, #0
LD R6, BUSYNESS_ADDR_ALL_MACHINES_BUSY
LDR R5, R6, #0
AND R6, R6, #0
ADD R6, R6, #15 ;We want to check al 16 of them
CheckIfAllBusy
ADD R5, R5, #0
BRn NotAllBusy
ADD R5, R5, R5
ADD R6, R6, #-1
BRzp CheckIfAllBusy
; After exiting CheckIfAllBusy successfully
ADD R2, R2, #1
NotAllBusy ; R2 is already 0 by default
; restoring data
LD R0, BACKUP_R0_3800
LD R1, BACKUP_R1_3800
;LD R2, BACKUP_R2_3800
LD R3, BACKUP_R3_3800
LD R4, BACKUP_R4_3800
LD R5, BACKUP_R5_3800
LD R6, BACKUP_R6_3800
LD R7, BACKUP_R7_3800
; returning
RET
BACKUP_R0_3800 .BLKW #1
BACKUP_R1_3800 .BLKW #1
BACKUP_R2_3800 .BLKW #1
BACKUP_R3_3800 .BLKW #1
BACKUP_R4_3800 .BLKW #1
BACKUP_R5_3800 .BLKW #1
BACKUP_R6_3800 .BLKW #1
BACKUP_R7_3800 .BLKW #1
;--------------------------------
;Data for subroutine ALL_MACHINES_BUSY
;--------------------------------
BUSYNESS_ADDR_ALL_MACHINES_BUSY .Fill xC000
.ORIG x3C00
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: ALL_MACHINES_FREE [2]
; Inputs: None
; Postcondition: The subroutine has returned a value indicating whether all machines are free
; Return value (R2): 1 if all machines are free, 0 otherwise
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_3C00
ST R1, BACKUP_R1_3C00
ST R2, BACKUP_R2_3C00
ST R3, BACKUP_R3_3C00
ST R4, BACKUP_R4_3C00
ST R5, BACKUP_R5_3C00
ST R6, BACKUP_R6_3C00
ST R7, BACKUP_R7_3C00
;-------------------------------
;INSERT CODE For Subroutine ALL_MACHINES_FREE
;--------------------------------
AND R2, R2, #0
LD R6, BUSYNESS_ADDR_ALL_MACHINES_FREE
LDR R5, R6, #0
AND R6, R6, #0
ADD R6, R6, #15 ;We want to check al 16 of them
CheckIfAllFree
ADD R5, R5, #0
BRzp NotAllFree
ADD R5, R5, R5
ADD R6, R6, #-1
BRzp CheckIfAllFree
; After exiting CheckIfAllFree successfully
ADD R2, R2, #1
NotAllFree ; R2 is already 0 by default
; restoring data
LD R0, BACKUP_R0_3C00
LD R1, BACKUP_R1_3C00
;LD R2, BACKUP_R2_3C00
LD R3, BACKUP_R3_3C00
LD R4, BACKUP_R4_3C00
LD R5, BACKUP_R5_3C00
LD R6, BACKUP_R6_3C00
LD R7, BACKUP_R7_3C00
; returning
RET
BACKUP_R0_3C00 .BLKW #1
BACKUP_R1_3C00 .BLKW #1
BACKUP_R2_3C00 .BLKW #1
BACKUP_R3_3C00 .BLKW #1
BACKUP_R4_3C00 .BLKW #1
BACKUP_R5_3C00 .BLKW #1
BACKUP_R6_3C00 .BLKW #1
BACKUP_R7_3C00 .BLKW #1
;--------------------------------
;Data for subroutine ALL_MACHINES_FREE
;--------------------------------
BUSYNESS_ADDR_ALL_MACHINES_FREE .Fill xC000
.ORIG x4000
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: NUM_BUSY_MACHINES [3]
; Inputs: None
; Postcondition: The subroutine has returned the number of busy machines.
; Return Value (R2): The number of machines that are busy
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_4000
ST R1, BACKUP_R1_4000
ST R2, BACKUP_R2_4000
ST R3, BACKUP_R3_4000
ST R4, BACKUP_R4_4000
ST R5, BACKUP_R5_4000
ST R6, BACKUP_R6_4000
ST R7, BACKUP_R7_4000
;-------------------------------
;INSERT CODE For Subroutine NUM_BUSY_MACHINES
;--------------------------------
AND R2, R2, #0
LD R6, BUSYNESS_ADDR_NUM_BUSY_MACHINES
LDR R5, R6, #0
AND R6, R6, #0
ADD R6, R6, #15 ;We want to check al 16 of them
CheckNumBusy
ADD R5, R5, #0
BRn NotBusy
ADD R2, R2, #1
NotBusy
ADD R5, R5, R5
ADD R6, R6, #-1
BRzp CheckNumBusy
; restoring data
LD R0, BACKUP_R0_4000
LD R1, BACKUP_R1_4000
;LD R2, BACKUP_R2_4000
LD R3, BACKUP_R3_4000
LD R4, BACKUP_R4_4000
LD R5, BACKUP_R5_4000
LD R6, BACKUP_R6_4000
LD R7, BACKUP_R7_4000
; returning
RET
BACKUP_R0_4000 .BLKW #1
BACKUP_R1_4000 .BLKW #1
BACKUP_R2_4000 .BLKW #1
BACKUP_R3_4000 .BLKW #1
BACKUP_R4_4000 .BLKW #1
BACKUP_R5_4000 .BLKW #1
BACKUP_R6_4000 .BLKW #1
BACKUP_R7_4000 .BLKW #1
;--------------------------------
;Data for subroutine NUM_BUSY_MACHINES
;--------------------------------
BUSYNESS_ADDR_NUM_BUSY_MACHINES .Fill xC000
.ORIG x4400
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: NUM_FREE_MACHINES [4]
; Inputs: None
; Postcondition: The subroutine has returned the number of free machines
; Return Value (R2): The number of machines that are free
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_4400
ST R1, BACKUP_R1_4400
ST R2, BACKUP_R2_4400
ST R3, BACKUP_R3_4400
ST R4, BACKUP_R4_4400
ST R5, BACKUP_R5_4400
ST R6, BACKUP_R6_4400
ST R7, BACKUP_R7_4400
;-------------------------------
;INSERT CODE For Subroutine NUM_FREE_MACHINES
;--------------------------------
AND R2, R2, #0
LD R6, BUSYNESS_ADDR_NUM_FREE_MACHINES
LDR R5, R6, #0
AND R6, R6, #0
ADD R6, R6, #15 ;We want to check al 16 of them
CheckNumFree
ADD R5, R5, #0
BRzp NotFree
ADD R2, R2, #1
NotFree
ADD R5, R5, R5
ADD R6, R6, #-1
BRzp CheckNumFree
; restoring data
LD R0, BACKUP_R0_4400
LD R1, BACKUP_R1_4400
;LD R2, BACKUP_R2_4400
LD R3, BACKUP_R3_4400
LD R4, BACKUP_R4_4400
LD R5, BACKUP_R5_4400
LD R6, BACKUP_R6_4400
LD R7, BACKUP_R7_4400
; returning
RET
BACKUP_R0_4400 .BLKW #1
BACKUP_R1_4400 .BLKW #1
BACKUP_R2_4400 .BLKW #1
BACKUP_R3_4400 .BLKW #1
BACKUP_R4_4400 .BLKW #1
BACKUP_R5_4400 .BLKW #1
BACKUP_R6_4400 .BLKW #1
BACKUP_R7_4400 .BLKW #1
;--------------------------------
;Data for subroutine NUM_FREE_MACHINES
;--------------------------------
BUSYNESS_ADDR_NUM_FREE_MACHINES .Fill xC000
.ORIG x4800
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: MACHINE_STATUS [5]
; Input (R1): Which machine to check
; Postcondition: The subroutine has returned a value indicating whether the machine indicated
; by (R1) is busy or not.
; Return Value (R2): 0 if machine (R1) is busy, 1 if it is free
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_4800
ST R1, BACKUP_R1_4800
ST R2, BACKUP_R2_4800
ST R3, BACKUP_R3_4800
ST R4, BACKUP_R4_4800
ST R5, BACKUP_R5_4800
ST R6, BACKUP_R6_4800
ST R7, BACKUP_R7_4800
;-------------------------------
;INSERT CODE For Subroutine MACHINE_STATUS
;--------------------------------
AND R2, R2, #0
LD R6, BUSYNESS_ADDR_MACHINE_STATUS
LDR R5, R6, #0
AND R6, R6, #0
ADD R6, R6, #15 ;We want to check al 16 of them
NOT R1, R1
ADD R1, R1, #1
ADD R6, R6, R1
BRz ExitIteration
Iterate
ADD R5, R5, R5
ADD R6, R6, #-1
BRp Iterate
; After exiting CheckIfAllBusy successfully
ExitIteration
ADD R5, R5, #0
BRzp IsBusy
;IsFree
ADD R2, R2, #1
IsBusy ; R2 is already 0 by default
; restoring data
LD R0, BACKUP_R0_4800
LD R1, BACKUP_R1_4800
;LD R2, BACKUP_R2_4800
LD R3, BACKUP_R3_4800
LD R4, BACKUP_R4_4800
LD R5, BACKUP_R5_4800
LD R6, BACKUP_R6_4800
LD R7, BACKUP_R7_4800
; returning
RET
BACKUP_R0_4800 .BLKW #1
BACKUP_R1_4800 .BLKW #1
BACKUP_R2_4800 .BLKW #1
BACKUP_R3_4800 .BLKW #1
BACKUP_R4_4800 .BLKW #1
BACKUP_R5_4800 .BLKW #1
BACKUP_R6_4800 .BLKW #1
BACKUP_R7_4800 .BLKW #1
;--------------------------------
;Data for subroutine MACHINE_STATUS
;--------------------------------
BUSYNESS_ADDR_MACHINE_STATUS.Fill xC000
.ORIG x4C00
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: FIRST_FREE [6]
; Inputs: None
; Postcondition:
; The subroutine has returned a value indicating the lowest numbered free machine
; Return Value (R2): the number of the free machine
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_4C00
ST R1, BACKUP_R1_4C00
ST R2, BACKUP_R2_4C00
ST R3, BACKUP_R3_4C00
ST R4, BACKUP_R4_4C00
ST R5, BACKUP_R5_4C00
ST R6, BACKUP_R6_4C00
ST R7, BACKUP_R7_4C00
;-------------------------------
;INSERT CODE For Subroutine FIRST_FREE
;--------------------------------
AND R2, R2, #0
LD R6, BUSYNESS_ADDR_FIRST_FREE
LDR R5, R6, #0
AND R6, R6, #0
ADD R6, R6, #15 ;We want to check al 16 of them
ADD R3, R5, #0 ; R3 = Preserve the original value of R5
AND R4, R4, #0
ADD R4, R4, x0001 ;temporary value that we'll left shift to check the next value
CheckFirstFree
AND R5, R5, R4
ADD R5, R5, #0
BRnp IsFirstFree
; ADD R3, R6, #0 ; to right shift R6 numbers
; RightShiftLoop
;
ADD R4, R4, R4
ADD R5, R3, #0
ADD R6, R6, #-1
BRzp CheckFirstFree
BRn NothingIsFree
; After exiting CheckIfAllFree successfully
IsFirstFree;
ADD R2, R2, #15
NOT R6, R6
ADD R6, R6, #1
ADD R2, R2, R6
BRnzp DoneCheckFirstFree
NothingIsFree
ADD R2, R2, #-1
DoneCheckFirstFree
; restoring data
LD R0, BACKUP_R0_4C00
LD R1, BACKUP_R1_4C00
;LD R2, BACKUP_R2_4C00
LD R3, BACKUP_R3_4C00
LD R4, BACKUP_R4_4C00
LD R5, BACKUP_R5_4C00
LD R6, BACKUP_R6_4C00
LD R7, BACKUP_R7_4C00
; returning
RET
BACKUP_R0_4C00 .BLKW #1
BACKUP_R1_4C00 .BLKW #1
BACKUP_R2_4C00 .BLKW #1
BACKUP_R3_4C00 .BLKW #1
BACKUP_R4_4C00 .BLKW #1
BACKUP_R5_4C00 .BLKW #1
BACKUP_R6_4C00 .BLKW #1
BACKUP_R7_4C00 .BLKW #1
;--------------------------------
;Data for subroutine FIRST_FREE
;--------------------------------
BUSYNESS_ADDR_FIRST_FREE .Fill xC000
.ORIG x5000
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: Get input / GET_INPUT
; Inputs: None
; Postcondition:
; The subroutine get up to a 5 digit input from the user within the range [-32768,32767]
; Return Value (R1): The value of the contructed input
; NOTE: This subroutine should be the same as the one that you did in assignment 5
; to get input from the user, except the prompt is different.
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_5000
ST R1, BACKUP_R1_5000
ST R2, BACKUP_R2_5000
ST R3, BACKUP_R3_5000
ST R4, BACKUP_R4_5000
ST R5, BACKUP_R5_5000
ST R6, BACKUP_R6_5000
ST R7, BACKUP_R7_5000
;-------------------------------
;INSERT CODE For Subroutine
;--------------------------------
BRnzp StartJumpHere
Error
LEA R0, NEWLINE
PUTS
LEA R0, Error_message_2
PUTS
StartJumpHere
LEA R0, prompt
PUTS
;making sure that everything is neutralized
AND R1, R1, #0 ;########## WHAT IF YOU TRY: ADD R1, R0, #0 ??? ###############
AND R2, R2, #0
AND R3, R3, #0
AND R4, R4, #0
AND R5, R5, #0
AND R6, R6, #0
;setting up error check for char '+'
LD R4, positiveSign
ADD R4, R4, #-1
NOT R4, R4
;------------ Loop for debugging '-'/'+' sign ----------------
GETC
OUT
ADD R1, R1, R0 ; put cin value into R1
ADD R1, R1, R4 ; check if it's a +
BRz IsPositive
ADD R1, R1, #-2 ; check if it's a -
BRz IsNegative
ADD R1, R1, #-3 ; -3 will navigate it up and check if it's '0'
BRz IsZero
BRn Error ; we don't want any negatives up to this point, bc we're checking 0-9 now
ADD R1, R1, #-9 ; now 0-8 should be caught as by BRn and 9 by BRz
BRnz IsOneToNine
BRnp Error ; Then we are not receiving '+', '-', '0'-'9'
;-------------------------------------------------------------
IsPositive
ADD R3, R3, #1
BRnzp IsZero ; Jump to next argument
IsNegative
ADD R3, R3, #1
NOT R6, R6 ; determine that the user already entered - & to inverse its value
BRnzp IsZero ; Jump to next argument
IsOneToNine
ADD R1, R1, #9
ADD R5, R5, R1 ; Now store the value inside R5
IsZero ; Every conditions above exit with IsZero
BRnzp FirstTimeEnteringLoop
;-------------------------------------------------------------
;------------------- Loop for numbers ------------------------
IsNumber
FirstTimeEnteringLoop
;neutralize R1 to be use for R0 and testing
AND R1, R1, #0
GETC
OUT
ADD R1, R1, R0
ADD R1, R1, R4
ADD R1, R1, #-5 ; Now this should be '0'
BRz IsZero2
BRn Others ; Same reason as what I did before
ADD R1, R1, #-9
BRnz IsOneToNine2
BRp Others ; If it's not '0'(-9) - '9' (0), it should be error
Others
;----------------- Debugging Test Only Sign Entered
AND R1, R1, #0
ADD R1, R1, R0
ADD R3, R3, #0 ; we make sure that either number/signs already entered
BRp Error
;-----------------
ADD R1, R1, #-10
BRz ExitIsNumber ; Check if this is '\n', exit
ADD R1, R1, #10 ; return its value before
BRnzp Error
;-------------------------------------------------------------
IsOneToNine2
ADD R1, R1, #9
;---------Do times ten before input another value--------------
IsZero2
AND R3, R3, #0
LD R2, timesTen
ADD R3, R5, #0 ; create constant value of R5
;-------------------------
LoopTimesTen ; multiply whatever the value R5 has by 10
ADD R5, R5, R3
ADD R2, R2, #-1
BRp LoopTimesTen
AND R3, R3, #0
;--------------------------- /ten ------------------------------
Skip
;--- Convert # to neg if it should be ---
ADD R6, R6, #0
BRzp NotNegative
NOT R1, R1
ADD R1, R1, #1
NotNegative
;----------------------------------------
ADD R5, R5, R1
BRnzp IsNumber
ExitIsNumber
ADD R5, R5, #0 ; Check if it's negative
BRn Error
ADD R5, R5, #-15 ; Check if it's above +15
BRp Error
ADD R5, R5, #15 ; return its value back
LEA R0, NEWLINE
PUTS
ADD R1, R5, #0 ; now store it to the desired register (R1)
; restoring data
LD R0, BACKUP_R0_5000
;LD R1, BACKUP_R1_5000
LD R2, BACKUP_R2_5000
LD R3, BACKUP_R3_5000
LD R4, BACKUP_R4_5000
LD R5, BACKUP_R5_5000
LD R6, BACKUP_R6_5000
LD R7, BACKUP_R7_5000
; returning
RET
BACKUP_R0_5000 .BLKW #1
BACKUP_R1_5000 .BLKW #1
BACKUP_R2_5000 .BLKW #1
BACKUP_R3_5000 .BLKW #1
BACKUP_R4_5000 .BLKW #1
BACKUP_R5_5000 .BLKW #1
BACKUP_R6_5000 .BLKW #1
BACKUP_R7_5000 .BLKW #1
;--------------------------------
;Data for subroutine Get input
;--------------------------------
prompt .STRINGZ "Enter which machine you want the status of (0 - 15), followed by ENTER: "
Error_message_2 .STRINGZ "ERROR INVALID INPUT\n"
positiveSign .FILL x2B ; negativeSign is x2D, so same as x2B + #2
timesTen .FILL #9
NEWLINE .STRINGZ "\n"
.ORIG x5400
;-----------------------------------------------------------------------------------------------------------------
; Subroutine: print number
; Inputs:
; Postcondition:
; The subroutine prints the number that is in
; Return Value : -
; NOTE: This subroutine should print the number to the user WITHOUT
; leading 0's and DOES NOT output the '+' for positive numbers.
;-----------------------------------------------------------------------------------------------------------------
; restoring data
ST R0, BACKUP_R0_5400
ST R1, BACKUP_R1_5400
ST R2, BACKUP_R2_5400
ST R3, BACKUP_R3_5400
ST R4, BACKUP_R4_5400
ST R5, BACKUP_R5_5400
ST R6, BACKUP_R6_5400
ST R7, BACKUP_R7_5400
;-------------------------------
;INSERT CODE For Subroutine
;--------------------------------
ADD R2, R2, #-10
BRzp HasTwoDigits
BRn HasOneDigit
HasTwoDigits
LD R0, convert_to_dec
ADD R0, R0, #1
OUT
LD R0, convert_to_dec
ADD R0, R0, R2
OUT
BRnzp DonePrinting
HasOneDigit
ADD R2, R2, #10
LD R0, convert_to_dec
ADD R0, R0, R2
OUT
DonePrinting
; restoring data
LD R0, BACKUP_R0_5400
LD R1, BACKUP_R1_5400
LD R2, BACKUP_R2_5400
LD R3, BACKUP_R3_5400
LD R4, BACKUP_R4_5400
LD R5, BACKUP_R5_5400
LD R6, BACKUP_R6_5400
LD R7, BACKUP_R7_5400
; returning
RET
BACKUP_R0_5400 .BLKW #1
BACKUP_R1_5400 .BLKW #1
BACKUP_R2_5400 .BLKW #1
BACKUP_R3_5400 .BLKW #1
BACKUP_R4_5400 .BLKW #1
BACKUP_R5_5400 .BLKW #1
BACKUP_R6_5400 .BLKW #1
BACKUP_R7_5400 .BLKW #1
;--------------------------------
;Data for subroutine print number
;--------------------------------
convert_to_dec .FILL x30
.ORIG x6000
MENUSTRING .STRINGZ "**********************\n* The Busyness Server *\n**********************\n1. Check to see whether all machines are busy\n2. Check to see whether all machines are free\n3. Report the number of busy machines\n4. Report the number of free machines\n5. Report the status of machine n\n6. Report the number of the first available machine\n7. Quit\n"
.ORIG xC000 ; Remote data
BUSYNESS .FILL xABCD ; <----!!!VALUE FOR BUSYNESS VECTOR!!!
;---------------
;END of PROGRAM
;---------------
.END
| 26.134483
| 365
| 0.5886
|
af1c10db24c6ad2bff4600d6ef54956368d7a6c3
| 673
|
asm
|
Assembly
|
oeis/289/A289280.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/289/A289280.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/289/A289280.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A289280: a(n) = least integer k > n such that any prime factor of k is also a prime factor of n.
; Submitted by Jamie Morken(s3)
; 4,9,8,25,8,49,16,27,16,121,16,169,16,25,32,289,24,361,25,27,32,529,27,125,32,81,32,841,32,961,64,81,64,49,48,1369,64,81,50,1681,48,1849,64,75,64,2209,54,343,64,81,64,2809,64,121,64,81,64,3481,64,3721,64,81,128,125,72,4489,128,81,80,5041,81,5329,128,81,128,121,81,6241,100,243,128,6889,96,125,128,243,121,7921,96,169,128,243,128,125,108,9409,112,121,125,10201
add $0,2
mov $2,2
add $2,$0
lpb $0
pow $0,45
mov $3,$0
lpb $3
mov $4,$0
mod $4,$2
add $2,1
cmp $4,0
cmp $4,0
sub $3,$4
lpe
mov $0,0
lpe
mov $0,$2
| 30.590909
| 360
| 0.641902
|
47c15ab37ce2fa8a2fc183bc66b67e1ce29b20e4
| 783
|
asm
|
Assembly
|
oeis/261/A261120.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/261/A261120.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/261/A261120.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A261120: The number of distinct triple points in the set of function values FLSN(m/6/7^n), m in 0, 1, 2... 6*7^n, where FLSN:[0,1] is the "flowsnake" plane filling curve.
; Submitted by Jamie Morken(s1)
; 2,17,134,989,7082,50057,351854,2467349,17284562,121031297,847337174,5931714509,41523064442,290664639737,2034662044094,14242663006469,99698727138722,697891348251377,4885240212600614,34196683812727229,239376793662659402,1675637576559322217,11729463098677374734,82106241879027980789,574743693718054938482,4023205857720961788257,28162441009130464174454,197137087079164444191149,1379959609599904694247962,9659717267336593614465497,67618020871767937565447774,473326146103610909750702309
mov $2,3
pow $2,$0
mov $3,7
pow $3,$0
mul $3,2
sub $3,$2
mov $0,$3
div $0,2
mul $0,3
add $0,2
| 52.2
| 482
| 0.822478
|
b1a64de835c9372cdae634e4ab342c103ba3609d
| 603
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/zx/nirvanam/c/sdcc/NIRVANAM_drawW_callee.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/arch/zx/nirvanam/c/sdcc/NIRVANAM_drawW_callee.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/arch/zx/nirvanam/c/sdcc/NIRVANAM_drawW_callee.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | 1
|
2019-12-03T23:57:48.000Z
|
2019-12-03T23:57:48.000Z
|
; ----------------------------------------------------------------
; Z88DK INTERFACE LIBRARY FOR THE NIRVANA ENGINE - by Einar Saukas
;
; See "nirvana-.h" for further details
; ----------------------------------------------------------------
; void NIRVANAM_drawW(unsigned int tile, unsigned int lin, unsigned int col)
; callee
SECTION code_clib
SECTION code_nirvanam
PUBLIC _NIRVANAM_drawW_callee
EXTERN asm_NIRVANAM_drawW
_NIRVANAM_drawW_callee:
pop hl ; RET address
pop de ; tile
ld a,e
pop de ; lin
ld d,e
ex (sp),hl ; col
ld e,l
jp asm_NIRVANAM_drawW
| 21.535714
| 76
| 0.548922
|
151c6889a1642a902e7ccb54fbcbd88e254a8a31
| 268
|
asm
|
Assembly
|
libsrc/strings/strcat.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | 8
|
2017-01-18T12:02:17.000Z
|
2021-06-12T09:40:28.000Z
|
libsrc/strings/strcat.asm
|
grancier/z180
|
e83f35e36c9b4d1457e40585019430e901c86ed9
|
[
"ClArtistic"
] | 1
|
2017-03-06T07:41:56.000Z
|
2017-03-06T07:41:56.000Z
|
libsrc/strings/strcat.asm
|
RC2014Z80/z88dk
|
e5b9447b970e5fae26544b6d8aa5957c98ba0e6a
|
[
"ClArtistic"
] | 3
|
2017-03-07T03:19:40.000Z
|
2021-09-15T17:59:19.000Z
|
; CALLER linkage for function pointers
SECTION code_clib
PUBLIC strcat
PUBLIC _strcat
EXTERN strcat_callee
EXTERN ASMDISP_STRCAT_CALLEE
.strcat
._strcat
pop bc
pop de
pop hl
push hl
push de
push bc
jp strcat_callee + ASMDISP_STRCAT_CALLEE
| 12.761905
| 43
| 0.75
|
4a34236b31443d0f58aee94e24878894f5897534
| 402
|
asm
|
Assembly
|
programs/oeis/047/A047442.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/047/A047442.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/047/A047442.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A047442: Numbers that are congruent to {0, 1, 2, 5, 6} mod 8.
; 0,1,2,5,6,8,9,10,13,14,16,17,18,21,22,24,25,26,29,30,32,33,34,37,38,40,41,42,45,46,48,49,50,53,54,56,57,58,61,62,64,65,66,69,70,72,73,74,77,78,80,81,82,85,86,88,89,90,93,94,96,97,98,101,102,104
mov $2,$0
trn $0,2
mov $1,$2
lpb $0
sub $0,1
trn $0,1
add $1,4
mov $3,1
trn $3,$0
sub $0,1
trn $0,2
sub $1,$3
sub $1,1
lpe
| 22.333333
| 195
| 0.587065
|
8afd1e649b813739c902eb292419dc592772de94
| 6,153
|
asm
|
Assembly
|
lab4/kernel.asm
|
wkcn/OSLabs
|
9f88f02dbeee8930e3dadac8b51e54dcaad5175f
|
[
"MIT"
] | 73
|
2017-10-02T01:24:19.000Z
|
2021-12-17T08:50:03.000Z
|
lab4/kernel.asm
|
wkcn/OSLabs
|
9f88f02dbeee8930e3dadac8b51e54dcaad5175f
|
[
"MIT"
] | 4
|
2018-03-21T02:24:19.000Z
|
2020-02-15T04:19:34.000Z
|
lab4/kernel.asm
|
wkcn/OSLabs
|
9f88f02dbeee8930e3dadac8b51e54dcaad5175f
|
[
"MIT"
] | 14
|
2016-12-22T23:24:48.000Z
|
2021-10-13T08:27:42.000Z
|
BITS 16
[global _start]
[extern main]
[global ShellMode]
[global GetKey]
[global RunID]
[global RunNum]
[global MaxRunNum]
[global PROG_SEGMENT]
[global KillProg]
[global WritePCB]
;16k = 0x4000
;4M = 0x4 0 0000
PCB_SEGMENT equ 3000h
PROG_SEGMENT_ equ 5000h
UserProgramOffset equ 100h
UpdateTimes equ 20
;写入中断向量表
%macro WriteIVT 2
mov ax,0000h
mov es,ax
mov ax,%1
mov bx,4
mul bx
mov si,ax
mov ax,%2
mov [es:si],ax ; offset
add si,2
mov ax,cs
mov [es:si],ax
%endmacro
;Init
mov ax,cs
mov ds,ax
mov ax, 0
mov ss, ax
mov sp, 7c00h
WriteIVT 08h,WKCNINTTimer ; Timer Interupt
WriteIVT 20h,WKCNINT20H
;WriteIVT 21h,WKCNINT21H
_start:
mov ax,cs
mov ds,ax
mov ss,ax
;SetTimer
mov al,34h
out 43h,al ; write control word
mov ax,1193182/UpdateTimes ;X times / seconds
out 40h,al
mov al,ah
out 40h,al
jmp main
GetKey:
mov ah,01h
int 16h
jz NOKEY ;没有按键
;按键了,获取字符
mov ah,00h
int 16h
jmp HAVEKEY
mov ax, 0
NOKEY:
HAVEKEY:
o32 ret
WKCNINT21H:
iret
%macro SaveReg 1
mov ax, %1
mov [es:(bx + _%1_OFFSET)], ax
%endmacro
%macro LoadReg 1
mov ax, [es:(bx + _%1_OFFSET)]
mov %1, ax
%endmacro
KillProg:
cli
;KillProg(dw runid)
;runid must be not 0 !
;Use si to cover di
push es
push bp
push dx
push cx
push bx
push ax
mov bp, sp
mov ax, [ss:(bp + 2 + 2 + 2 * 6)]
mov bx, PCBSize
mul bx
mov di, ax; Set DI
mov ax, cs; kernel
mov es, ax
dec word[es:RunNum]
mov ax, [es:RunNum]
mul bx
mov si, ax; Set SI
mov bx, Processes
mov cx, PCBSize
COVERING:
mov al, [es:bx + si]
mov [es:bx + di], al
inc bx
loop COVERING
mov bx, Processes
mov ax, 0
mov [es:bx + si + _CS_OFFSET],ax ; set orics = 0
mov ax, cs; kernel
mov es, ax
mov ax, 0
mov [es:ShellMode], ax
mov [es:RunID], ax
pop ax
pop bx
pop cx
pop dx
pop bp
pop es
sti
o32 ret
WKCNINT20H:
;发送程序中止信号给内核
push si
push es
push ax
mov ax, 0x00
mov es, ax
mov ax, 0x7c00
mov si, ax
mov ax, 1
mov [es:si], ax
pop ax
pop es
pop si
iret
WKCNINTTimer:
cli
;Save current Progress
;System Stack: *\flags\cs\ip
push ds
;System Stack: *\flags\cs\ip\ds(old)
push cs
;System Stack: *\flags\cs\ip\ds(old)\cs(kernel)
pop ds
;ds = data segment(kernel)
;System Stack: *\flags\cs\ip\ds(old)
mov [ds:AX_SAVE], ax
mov [ds:BX_SAVE], bx
mov [ds:CX_SAVE], cx
mov [ds:DX_SAVE], dx
mov ax, word[ds:ShellMode]
cmp ax, 0
je ShellRunning
mov ax, word[ds:RunID]
mov bx, word[ds:RunNum]
cmp ax, bx
jb VALIDID
mov ax, 0
VALIDID:
ShellRunning:
;Must have a progress, it is Shell :-)
;ES,DS,DI,SI,BP,SP,BX,DX,CX,AX,SS,IP,CS,FLAGS
mov bx,PCBSize
mul bx
;add ax, Processes; current process PCB
mov bx,ax
push ds
mov ax, PCB_SEGMENT
mov ds, ax
mov ax, es
mov [bx + _ES_OFFSET], ax
pop ds
mov ax, PCB_SEGMENT
mov es, ax
;SaveReg ES
SaveReg DI
SaveReg SI
SaveReg BP
pop word[es:(bx + _DS_OFFSET)] ;System Stack: *\flags\cs\ip\
nop; 如果不加这句,会丢失下面一条pop语句,奇怪的bug!
pop word[es:(bx + _IP_OFFSET)]
pop word[es:(bx + _CS_OFFSET)]
pop word[es:(bx + _FLAGS_OFFSET)]
;System Stack: *
SaveReg SP
mov ax, [ds:DX_SAVE]
mov [es:(bx + _DX_OFFSET)], ax
mov ax, [ds:CX_SAVE]
mov [es:(bx + _CX_OFFSET)], ax
mov ax, [ds:BX_SAVE]
mov [es:(bx + _BX_OFFSET)], ax
mov ax, ss
mov [es:(bx + _SS_OFFSET)], ax
mov ax, [ds:AX_SAVE]
mov [es:(bx + _AX_OFFSET)], ax
;All Saved!
;Run Next Program!
;进程调度
;ax 是将要运行的进程id
;可用寄存器, ax,bx
mov ax, [ds:ShellMode]
cmp ax, 0
je UseShell
mov bx, word[ds:RunNum]
cmp bx, 1; if eq, only shell but ShellMode = 1
ja NotOnlyShell ; bx > 1
;只有Shell, 强制切换回Shell
mov ax, 0
mov [ds:ShellMode],ax
jmp UseShell
NotOnlyShell:
inc word[ds:RunID]
mov ax, [ds:RunID]
cmp ax, bx
jb NOOVERRIDE ; < namely valid
mov ax, 0
mov word[ds:RunID], ax
UseShell:
NOOVERRIDE:
;Restart RunID(ax)
;Must have a progress, it is Shell :-)
;ES,DS,DI,SI,BP,SP,BX,DX,CX,AX,SS,IP,CS,FLAGS
mov bx,PCBSize
mul bx
;add ax, Processes; current process PCB
mov bx, ax
;Now DS is kernel DS
LoadReg SP
mov ax, word[es:(bx + _SS_OFFSET)]
mov ss, ax
mov ax, word[es:(bx + _FLAGS_OFFSET)]
push ax
mov ax, word[es:(bx + _CS_OFFSET)]
push ax
mov ax, word[es:(bx + _IP_OFFSET)]
push ax
LoadReg DI
LoadReg SI
LoadReg BP
;LoadReg ES
mov ax, es
mov ds, ax
mov ax, [es:(bx + _ES_OFFSET)]
mov es, ax
mov cx, [bx + _CX_OFFSET]
mov dx, [bx + _DX_OFFSET]
mov ax, [bx + _DS_OFFSET]
push ax
mov ax, [bx + _BX_OFFSET]
push ax
;*/flags/cs/ip/ds/bx
mov ax, [bx + _AX_OFFSET]
pop bx
pop ds
push ax
mov al,20h
out 20h,al
out 0A0h,al
pop ax
sti
iret
WritePCB:
cli
push bp
push ds
push es
push dx
push cx
push bx
push ax
;开始计算PCB位置
mov ax, cs
mov ds, ax
mov bx, PCB_SEGMENT
mov es, bx
mov ax, word[RunNum]
mov bx, PCBSize
mul bx
;add ax, Processes
mov bx, ax
;bx = new progress PCB
mov bp, sp
mov cx, [ss:(bp + 2 + 2 + 2 * 7)]
;cx = segment addr
;es = kernel segment
mov [es:(bx + _CS_OFFSET)], cx
mov [es:(bx + _DS_OFFSET)], cx
mov [es:(bx + _SS_OFFSET)], cx
mov ax, UserProgramOffset
mov [es:(bx + _IP_OFFSET)], ax
sub ax, 4
mov [es:(bx + _SP_OFFSET)], ax
mov ax, 512
mov [es:(bx + _FLAGS_OFFSET)], ax
;分配进程ID
mov ax, [ProcessIDAssigner]
mov [es:(bx + _ID_OFFSET)], ax
inc word[ProcessIDAssigner]
inc word[RunNum]
pop ax
pop bx
pop cx
pop dx
pop es
pop ds
pop bp
sti
o32 ret
%macro SetOffset 1
%1_OFFSET equ (%1 - Processes)
%endmacro
DATA:
AX_SAVE dw 0
BX_SAVE dw 0
CX_SAVE dw 0
DX_SAVE dw 0
PCBCONST:
PCBSize equ FirstProcessEnd - Processes
SetOffset _ID
SetOffset _NAME
SetOffset _STATE
SetOffset _ES
SetOffset _DS
SetOffset _DI
SetOffset _SI
SetOffset _BP
SetOffset _SP
SetOffset _BX
SetOffset _DX
SetOffset _CX
SetOffset _AX
SetOffset _SS
SetOffset _IP
SetOffset _CS
SetOffset _FLAGS
ProcessesTable:
RunID dw 0 ; default to open shell
RunNum dw 1
MaxRunNum dw 16
PROG_SEGMENT dw PROG_SEGMENT_
ShellMode dw 0
ProcessIDAssigner dw 1; 进程 ID 分配
Processes:
_ID db 0
_STATE db 0
_NAME db "0123456789ABCDEF" ; 16 bytes
_ES dw 0
_DS dw 0
_DI dw 0
_SI dw 0
_BP dw 0
_SP dw 0
_BX dw 0
_DX dw 0
_CX dw 0
_AX dw 0
_SS dw 0
_IP dw 0
_CS dw 0
_FLAGS dw 512
FirstProcessEnd:
| 15.498741
| 61
| 0.673005
|
f43641c8ab4f371cc594521595605647ecd95f81
| 374
|
asm
|
Assembly
|
Old Programmes/8085/Square Root/SQRT_16.asm
|
illuminati-inc-2020/school
|
f22d640abd5505889bcfa9f7880c90a1b6e79635
|
[
"CC0-1.0"
] | null | null | null |
Old Programmes/8085/Square Root/SQRT_16.asm
|
illuminati-inc-2020/school
|
f22d640abd5505889bcfa9f7880c90a1b6e79635
|
[
"CC0-1.0"
] | null | null | null |
Old Programmes/8085/Square Root/SQRT_16.asm
|
illuminati-inc-2020/school
|
f22d640abd5505889bcfa9f7880c90a1b6e79635
|
[
"CC0-1.0"
] | null | null | null |
;Square root of a 16 bit number
;Input : 00A0H, 00A1H
;Output : 00B0H
LHLD 00A0H
MVI C, 00H
LXI D, 0001H
LOOP: MOV A, L
SUB E
MOV L, A
MOV A, H
SBB D
MOV H, A
INX D
INX D
INR C
MOV A, D
CMP H
JC LOOP ;if D<H continue
JNZ END ;if D>H break
MOV A, E
CMP L
JC LOOP ;if D=H and E<L continue
JZ LOOP ;if D=H and E=L continue
END: MOV A, C
STA 00B0H
HLT
| 14.384615
| 34
| 0.628342
|
bf403ab0dd88d0330680d19a9a227879279569fe
| 1,402
|
asm
|
Assembly
|
lib/am335x_sdk/ti/csl/src/ip/tsc/V0/csl_tsc.asm
|
brandonbraun653/Apollo
|
a1ece2cc3f1d3dae48fdf8fe94f0bbb59d405fce
|
[
"MIT"
] | 2
|
2021-12-27T10:19:01.000Z
|
2022-03-15T07:09:06.000Z
|
lib/am335x_sdk/ti/csl/src/ip/tsc/V0/csl_tsc.asm
|
brandonbraun653/Apollo
|
a1ece2cc3f1d3dae48fdf8fe94f0bbb59d405fce
|
[
"MIT"
] | null | null | null |
lib/am335x_sdk/ti/csl/src/ip/tsc/V0/csl_tsc.asm
|
brandonbraun653/Apollo
|
a1ece2cc3f1d3dae48fdf8fe94f0bbb59d405fce
|
[
"MIT"
] | null | null | null |
; *****************************************************************************
; * Copyright (c) Texas Instruments Inc 2008, 2009
; *
; * Use of this software is controlled by the terms and conditions found
; * in the license agreement under which this software has been supplied
; * provided
; *****************************************************************************
;
; * @file csl_tsc.asm
; *
; * @brief Assembly file for functional layer of TSC CSL
; *
; * \par
; * ============================================================================
; * @n (C) Copyright 2008, 2009, Texas Instruments, Inc.
; * @n Use of this software is controlled by the terms and conditions found
; * @n in the license agreement under which this software has been supplied.
; * ===========================================================================
; * \par
.global _CSL_tscEnable
.global CSL_tscEnable
.sect ".text:cslsys_section:tsc"
_CSL_tscEnable:
BNOP B3, 4 ;
MVC A4, TSCL ; Initiate CPU Timer by writing to TSCL
.global _CSL_tscRead
.global CSL_tscRead
.sect ".text:cslsys_section:tsc"
_CSL_tscRead:
BNOP B3, 2 ; Branch Return Pointer
MVC TSCL, B0 ; Read TSCL
MVC TSCH, B1 ; Read TSCH
|| MV B0, A4
MV B1, A5
| 35.948718
| 81
| 0.461484
|
deb8bff308e5f877ce245f82dc7715d20e946322
| 405
|
asm
|
Assembly
|
oeis/089/A089940.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/089/A089940.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/089/A089940.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A089940: Triangle read by rows: T(n,k)=binomial(n+k,floor((n-k)/2))
; Submitted by Christian Krause
; 1,1,1,2,1,1,3,4,1,1,6,5,6,1,1,10,15,7,8,1,1,20,21,28,9,10,1,1,35,56,36,45,11,12,1,1,70,84,120,55,66,13,14,1,1,126,210,165,220,78,91,15,16,1,1,252,330,495,286,364,105,120,17,18,1,1,462,792,715,1001,455,560,136,153
lpb $0
add $1,1
sub $0,$1
mov $2,$1
sub $2,$0
lpe
add $0,$1
div $2,2
bin $0,$2
| 28.928571
| 214
| 0.624691
|
b2e72594778187be4b27960764cfe33d21887dcc
| 5,743
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca.log_21829_1111.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca.log_21829_1111.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_sm_/i9-9900K_12_0xca.log_21829_1111.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r14
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x112be, %rsi
lea addresses_normal_ht+0xebbe, %rdi
nop
nop
nop
mfence
mov $17, %rcx
rep movsw
nop
nop
nop
and $1272, %r9
lea addresses_normal_ht+0xbed6, %r14
nop
nop
nop
nop
nop
xor %rbx, %rbx
movw $0x6162, (%r14)
nop
cmp $21965, %rsi
lea addresses_WC_ht+0x62be, %rcx
nop
nop
cmp %r14, %r14
mov $0x6162636465666768, %r9
movq %r9, (%rcx)
nop
nop
nop
nop
add $53562, %rcx
lea addresses_WT_ht+0x18cbe, %r14
nop
nop
add %r13, %r13
movups (%r14), %xmm6
vpextrq $0, %xmm6, %rcx
nop
nop
nop
dec %rsi
lea addresses_WT_ht+0xf066, %rsi
lea addresses_UC_ht+0x2abe, %rdi
nop
nop
nop
nop
nop
add $65252, %r12
mov $35, %rcx
rep movsq
nop
nop
sub %rbx, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r14
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r15
push %rcx
push %rdi
push %rdx
push %rsi
// REPMOV
lea addresses_PSE+0x1abfe, %rsi
lea addresses_PSE+0x17c3e, %rdi
nop
nop
nop
inc %r11
mov $124, %rcx
rep movsb
nop
nop
nop
nop
nop
add $1010, %r12
// Store
lea addresses_WC+0x1acbe, %r15
nop
nop
nop
nop
xor %rdi, %rdi
movw $0x5152, (%r15)
nop
nop
dec %rdi
// Faulty Load
lea addresses_WC+0x1acbe, %rsi
nop
nop
nop
and %rdx, %rdx
movb (%rsi), %cl
lea oracles, %rdx
and $0xff, %rcx
shlq $12, %rcx
mov (%rdx,%rcx,1), %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r15
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_PSE', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_PSE', 'congruent': 5}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 7}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 7}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 7}}
{'52': 21829}
52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52
*/
| 37.782895
| 2,999
| 0.660979
|
47b32cac3263e113620c90c8dcc62168abe0dda9
| 1,155
|
asm
|
Assembly
|
utils/screen.asm
|
peter-mount/departures8bit
|
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
|
[
"Apache-2.0"
] | null | null | null |
utils/screen.asm
|
peter-mount/departures8bit
|
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
|
[
"Apache-2.0"
] | null | null | null |
utils/screen.asm
|
peter-mount/departures8bit
|
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
|
[
"Apache-2.0"
] | null | null | null |
; **********************************************************************
; Common screen routines
; **********************************************************************
; setColour sets the current text colour
;
; on entry:
; A Colour code, platform dependent
;
; on exit:
; A undefined, preserved on C64
; X undefined, preserved on C64
; Y undefined, preserved on C64
.setColour
IF c64
STA &0286 ; 0286 holds the current text colour
RTS
ELIF bbc
RTS ; TODO define mode7 parameters here
ELSE
RTS ; not C64 or BBC so ignore
ENDIF
IF bbc
; Disable the flashing cursor
.disableCursor
LDX #1 ; Disable cursor
LDY #0
JMP vdu23
; Enable the flashing cursor
.enableCursor
LDX #1 ; Enable cursor
LDY #1
JMP vdu23
; vdu23 handles simple flag settings
;
; Equivalent to VDU 23,X,Y;0;0;0
;
.vdu23
{
LDA #23 ; VDU 23,X,Y;0;0;0
JSR oswrch
TXA
JSR oswrch
TYA
JSR oswrch
LDY #7 ; Remaining 7 bytes are 0
LDA #0
.vdu23Loop
JSR oswrch
DEY
BNE vdu23Loop
RTS
}
ENDIF
| 19.913793
| 72
| 0.516017
|
4b37b0e219f6b620e6953da4a3cd3ccbe07f4f0a
| 4,161
|
asm
|
Assembly
|
externals/mpir-3.0.0/mpn/x86_64w/skylake/rshift.asm
|
JaminChan/eos_win
|
c03e57151cfe152d0d3120abb13226f4df74f37e
|
[
"MIT"
] | 12
|
2021-09-29T14:50:06.000Z
|
2022-03-31T15:01:21.000Z
|
externals/mpir-3.0.0/mpn/x86_64w/skylake/rshift.asm
|
JaminChan/eos_win
|
c03e57151cfe152d0d3120abb13226f4df74f37e
|
[
"MIT"
] | 15
|
2021-12-24T22:53:49.000Z
|
2021-12-25T10:03:13.000Z
|
LibSource/mpir/mpn/x86_64w/skylake/rshift.asm
|
ekzyis/CrypTool-2
|
1af234b4f74486fbfeb3b3c49228cc36533a8c89
|
[
"Apache-2.0"
] | 10
|
2021-10-17T19:46:51.000Z
|
2022-03-18T02:57:57.000Z
|
; PROLOGUE(mpn_rshift)
; Version 1.0.4.
;
; Copyright 2008 Jason Moxham
;
; Windows Conversion Copyright 2008 Brian Gladman
;
; This file is part of the MPIR Library.
; The MPIR Library is free software; you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as published
; by the Free Software Foundation; either version 2.1 of the License, or (at
; your option) any later version.
; The MPIR Library is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
; License for more details.
; You should have received a copy of the GNU Lesser General Public License
; along with the MPIR Library; see the file COPYING.LIB. If not, write
; to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
; Boston, MA 02110-1301, USA.
;
; mp_limb_t mpn_rshift(mp_ptr, mp_ptr, mp_size_t, mp_uint)
; rax rdi rsi rdx rcx
; rax rcx rdx r8 r9d
%include "yasm_mac.inc"
CPU SSE4.2
BITS 64
LEAF_PROC mpn_rshift
mov r10, rcx
mov ecx, r9d
cmp r8, 2
ja .3
jz .2
.1: mov rdx, [rdx]
mov rax, rdx
shr rdx, cl
neg rcx
shl rax, cl
mov [r10], rdx
ret
.2: mov r8, [rdx]
mov r9, [rdx+8]
mov rax, r8
mov r11, r9
shr r8, cl
shr r9, cl
neg rcx
shl r11, cl
shl rax, cl
or r8, r11
mov [r10], r8
mov [r10+8], r9
ret
.3: mov r11, rdx
mov rdx, r8
mov eax, 64
lea r9, [r11+8]
sub rax, rcx
and r9, -16
movq xmm0, rcx
movq xmm1, rax
movdqa xmm5, [r9]
movdqa xmm3, xmm5
psllq xmm5, xmm1
movq rax, xmm5
cmp r11, r9
lea r11, [r11+rdx*8-40]
je .4
movq xmm2, [r9-8]
movq xmm4, xmm2
psllq xmm2, xmm1
psrlq xmm4, xmm0
por xmm4, xmm5
movq [r10], xmm4
lea r10, [r10+8]
dec rdx
movq rax, xmm2
.4: lea r10, [r10+rdx*8-40]
psrlq xmm3, xmm0
mov r8d, 5
sub r8, rdx
jnc .6
xalign 16
.5: movdqa xmm2, [r11+r8*8+16]
movdqa xmm4, xmm2
psllq xmm2, xmm1
shufpd xmm5, xmm2, 1
por xmm3, xmm5
movq [r10+r8*8], xmm3
movhpd [r10+r8*8+8], xmm3
psrlq xmm4, xmm0
movdqa xmm5, [r11+r8*8+32]
movdqa xmm3, xmm5
psllq xmm5, xmm1
shufpd xmm2, xmm5, 1
psrlq xmm3, xmm0
por xmm4, xmm2
movq [r10+r8*8+16], xmm4
movhpd [r10+r8*8+24], xmm4
add r8, 4
jnc .5
.6: cmp r8, 2
ja .10
jz .9
jp .8
.7: movdqa xmm2, [r11+r8*8+16]
movdqa xmm4, xmm2
psllq xmm2, xmm1
shufpd xmm5, xmm2, 1
por xmm3, xmm5
movq [r10+r8*8], xmm3
movhpd [r10+r8*8+8], xmm3
psrlq xmm4, xmm0
movq xmm5, [r11+r8*8+32]
movq xmm3, xmm5
psllq xmm5, xmm1
shufpd xmm2, xmm5, 1
psrlq xmm3, xmm0
por xmm4, xmm2
movq [r10+r8*8+16], xmm4
movhpd [r10+r8*8+24], xmm4
psrldq xmm5, 8
por xmm3, xmm5
movq [r10+r8*8+32], xmm3
ret
xalign 16
.8: movdqa xmm2, [r11+r8*8+16]
movdqa xmm4, xmm2
psllq xmm2, xmm1
shufpd xmm5, xmm2, 1
por xmm3, xmm5
movq [r10+r8*8], xmm3
movhpd [r10+r8*8+8], xmm3
psrlq xmm4, xmm0
psrldq xmm2, 8
por xmm4, xmm2
movq [r10+r8*8+16], xmm4
movhpd [r10+r8*8+24], xmm4
ret
xalign 16
.9: movq xmm2, [r11+r8*8+16]
movq xmm4, xmm2
psllq xmm2, xmm1
shufpd xmm5, xmm2, 1
por xmm3, xmm5
movq [r10+r8*8], xmm3
movhpd [r10+r8*8+8], xmm3
psrlq xmm4, xmm0
psrldq xmm2, 8
por xmm4, xmm2
movq [r10+r8*8+16], xmm4
ret
xalign 16
.10:psrldq xmm5, 8
por xmm3, xmm5
movq [r10+r8*8], xmm3
movhpd [r10+r8*8+8], xmm3
ret
end
| 24.19186
| 77
| 0.545542
|
1e8ee405e161fe3f59223c9472ffc7bd20546b27
| 5,621
|
asm
|
Assembly
|
Assembly/Project/StaticRec.asm
|
Myself086/Project-Nested
|
89153325af8e5e2d443994352eae60ad06ed5922
|
[
"MIT"
] | 338
|
2020-07-26T23:26:20.000Z
|
2022-03-31T15:26:49.000Z
|
Assembly/Project/StaticRec.asm
|
Myself086/Project-Nested
|
89153325af8e5e2d443994352eae60ad06ed5922
|
[
"MIT"
] | 47
|
2020-08-08T10:21:02.000Z
|
2022-03-30T16:28:35.000Z
|
Assembly/Project/StaticRec.asm
|
Myself086/Project-Nested
|
89153325af8e5e2d443994352eae60ad06ed5922
|
[
"MIT"
] | 8
|
2020-08-10T19:04:09.000Z
|
2021-09-27T07:25:02.000Z
|
// ---------------------------------------------------------------------------
StaticRec_OriginCount:
.data16 0
// Non-zero when StaticRec is at work
StaticRec_Active:
.data16 0
// ---------------------------------------------------------------------------
.mx 0x00
.func StaticRec__Init
StaticRec__Init:
// Initialize
call Main__InitMemory
call Feedback__Init
call StaticRec__InitMemory
call Main__InitEmulation
// Change bank
phk
plb
// Reset origin count and trap regular emulators
lda $_StaticRec_OriginCount
inc $_StaticRec_OriginCount
eor $_StaticRec_OriginCount
stz $_StaticRec_OriginCount
trapeq
// Activate StaticRec mode
sta $_StaticRec_Active
call Main__InitMemory
// Format ROM
call Memory__FormatRom
// Are we using native stack? If not, turn off every other stack options
lda $=RomInfo_StackEmulation
and #_RomInfo_StackEmu_NativeReturn
bne $+b_1
lda $=RomInfo_StackEmulation
and #_RomInfo_StackEmu_NATIVE_MASK
sta $=RomInfo_StackEmulation
b_1:
return
// ---------------------------------------------------------------------------
StaticRec__MainForExe:
rep #0x30
call StaticRec__Main
stp
// ---------------------------------------------------------------------------
.mx 0x00
.func StaticRec__Main
StaticRec__Main:
// Change bank
phk
plb
// Index for the first 8 bits
.local _lowBits
lda #0x00ff
sta $.lowBits
// Address for writing call table
.local =tableEP
lda #_StaticRec_Tables/0x100
sta $.tableEP+1
lda #_StaticRec_Tables+0x400
sta $.tableEP
StaticRec__Main_Loop2:
// Define starting pointer for feedback addresses
.local =pointer
lda #_Feedback_Calls_LowerBound/0x100
sta $.pointer+1
lda #_Feedback_Calls_LowerBound
sta $.pointer
// Start new call table
lda $.lowBits
asl a
asl a
tax
lda $.tableEP
sta $=StaticRec_Tables,x
lda #0
sta $=StaticRec_Tables+2,x
// Loop through each known calls from feedback
StaticRec__Main_Loop:
// Do low bits match?
lda [$.pointer]
and #0x00ff
cmp $.lowBits
beq $+b_in
jmp $_StaticRec__Main_Loop_Next
b_in:
// Set banks
sep #0x20
.mx 0x20
ldy #0x0002
lda [$.pointer],y
sta $_Program_BankNum_8000
sta $_Program_BankNum_a000
sta $_Program_BankNum_c000
sta $_Program_BankNum_e000
tax
lda $=RomInfo_BankLut_80,x
sta $_Program_Bank_0+2
lda $=RomInfo_BankLut_a0,x
sta $_Program_Bank_1+2
lda $=RomInfo_BankLut_c0,x
sta $_Program_Bank_2+2
lda $=RomInfo_BankLut_e0,x
sta $_Program_Bank_3+2
rep #0x20
.mx 0x00
// Clear known calls
ldx #_Recompiler_FunctionList
call Array__Clear
// Call recompiler
.precall Recompiler__Build _romAddr, _compileType
lda [$.pointer]
// Address must be in ROM range
//bpl $+StaticRec__Main_Loop_Next
// Address must be >= 0x8000
cmp #0x8000
bcc $+StaticRec__Main_Loop_Next
sta $.Param_romAddr
lda #_Recompiler_CompileType_MoveToCart
sta $.Param_compileType
call
// Optimize
// .precall Optimize__Simplify =functionHeapStackPointer, _callIndex
// sta $.Param_callIndex
// // Are we optimizing?
// lda $=RomInfo_Optimize
// and #_RomInfo_Optimize_StaticRec
// beq $+b_1
// stx $.Param_functionHeapStackPointer
// sty $.Param_functionHeapStackPointer+2
// call
//b_1:
// Add to list
lda [$.Recompiler_FunctionList+3]
sta [$.tableEP]
ldy #2
lda [$.Recompiler_FunctionList+3],y
sta [$.tableEP],y
ldy #4
lda [$.Recompiler_FunctionList+3],y
sta [$.tableEP],y
ldy #6
lda [$.Recompiler_FunctionList+3],y
sta [$.tableEP],y
// Increment table length, assume carry clear after asl
lda $.lowBits
asl a
asl a
tax
lda #8
adc $=StaticRec_Tables+2,x
sta $=StaticRec_Tables+2,x
// Increment table pointer, assume carry clear from previous adc
lda #8
adc $.tableEP
sta $.tableEP
StaticRec__Main_Loop_Next:
// Next
lda #3
clc
adc $.pointer
sta $.pointer
cmp $=Feedback_Calls_Top
bcs $+StaticRec__Main_Loop_End
jmp $_StaticRec__Main_Loop
StaticRec__Main_Loop_End:
// Next Loop2
dec $.lowBits
bmi $+StaticRec__Main_Loop2_End
jmp $_StaticRec__Main_Loop2
StaticRec__Main_Loop2_End:
// Disable StaticRec mode
lda #0
sta $=StaticRec_Active
return
// ---------------------------------------------------------------------------
// UNUSED
StaticRec_ListStart:
//.fill 0x200
StaticRec_ListLength:
//.fill 0x200
// ---------------------------------------------------------------------------
.mx 0x00
.func StaticRec__InitMemory
StaticRec__InitMemory:
// Fast access to StaticRec table
lda #_StaticRec_Tables/0x100
sta $.Recompiler_StaticRec_Table+1
// Are we using StaticRec?
lda $=StaticRec_OriginCount
bne $+StaticRec__InitMemory_In
return
StaticRec__InitMemory_In:
// Keep origin count for later
tax
// Bank 0x7f must be empty
lda $=Memory_Top+0x7f0000
trapne
Exception "Memory Not Empty{}{}{}Bank 0x7F was not empty during initialization. The first element in this bank must be reserved for AOT compiler calls."
// Allocate memory in bank 0x7f
lda #0x007f
call Memory__Alloc
lda $=StaticRec_OriginCount
tax
bra $+StaticRec__InitMemory_Loop_Entry
StaticRec__InitMemory_Loop:
// Write
lda #_Interpret__StaticJsr*0x100+0x22
sta $0x7f0000,x
lda #_Interpret__StaticJsr/0x100
sta $0x7f0002,x
StaticRec__InitMemory_Loop_Entry:
// Next
dex
dex
dex
dex
bpl $-StaticRec__InitMemory_Loop
return
// ---------------------------------------------------------------------------
| 21.211321
| 153
| 0.649706
|
c234383b67913b7cb291f89bc708e201ccc634a7
| 4,286
|
asm
|
Assembly
|
game/logic/stages/stages.asm
|
benoitryder/super-tilt-bro
|
8d5035f54e906a401d0808c2e104d32fa1fadd7f
|
[
"WTFPL"
] | null | null | null |
game/logic/stages/stages.asm
|
benoitryder/super-tilt-bro
|
8d5035f54e906a401d0808c2e104d32fa1fadd7f
|
[
"WTFPL"
] | null | null | null |
game/logic/stages/stages.asm
|
benoitryder/super-tilt-bro
|
8d5035f54e906a401d0808c2e104d32fa1fadd7f
|
[
"WTFPL"
] | null | null | null |
; Code common to most stage initialization
;
; Overwrites all registers, tmpfield1, tmpfield2 and tmpfield15
stage_generic_init:
.(
stage_table_index = tmpfield15
element_length = tmpfield15 ; warning reuse, take care of not mixing usages
; Point stage_table_index to the byte offset of selected stage entry in vector tables
lda config_selected_stage
asl
sta stage_table_index
; Write palette_data in actual ppu palettes
bit PPUSTATUS ;
lda #$80 ; Wait the begining of a VBI before
wait_vbi: ; writing data to PPU's palettes
bit PPUSTATUS ;
beq wait_vbi ;
lda PPUSTATUS ;
lda #$3f ; Point PPU to Background palette 0
sta PPUADDR ; (see http://wiki.nesdev.com/w/index.php/PPU_palettes)
lda #$00 ;
sta PPUADDR ;
ldx stage_table_index ;
lda stage_palettes, x ;
sta tmpfield1 ;
lda stage_palettes+1, x ;
sta tmpfield2 ;
ldy #0 ; Write palette_data in actual ppu palettes
copy_palette: ;
lda (tmpfield1), y ;
sta PPUDATA ;
iny ;
cpy #$20 ;
bne copy_palette ;
; Copy background from PRG-rom to PPU nametable
ldx stage_table_index
lda stages_nametable, x
sta tmpfield1
lda stages_nametable+1, x
sta tmpfield2
jsr draw_zipped_nametable
; Copy stage data to its fixed location
ldx stage_table_index
lda stages_data, x
sta tmpfield1
lda stages_data+1, x
sta tmpfield2
ldx #0
ldy #0
copy_header_loop:
lda (tmpfield1), y
sta stage_data, x
inx
iny
cpy #STAGE_OFFSET_ELEMENTS
bne copy_header_loop
copy_elements_loop:
; Copy element header and store element length
lda (tmpfield1), y
sta stage_data, x
beq copy_data_end
lda #STAGE_ELEMENT_SIZE
sta element_length
dec element_length
iny
inx
; Copy element
copy_one_element:
lda (tmpfield1), y
sta stage_data, x
iny
inx
dec element_length
bne copy_one_element
jmp copy_elements_loop
copy_data_end:
rts
.)
; Call a subroutine for each element of the current stage
; tmpfield1, tmpfield2 - subroutine to call
; register Y - offset of the first element from "stage_data"
;
; Overwrites register A and register Y.
;
; For each call
; - the element can be accessed at address "stage_data, y",
; - register A contains the element type.
;
; Called subroutine can stop the iteration by setting Y to $ff, else
; it must not modify the Y register.
;
; Called subroutine must not modify tmpfield1 nor tmpfield2.
#define STAGE_ITERATE_ELEMENTS() \
.(:\
check_current_element::\
lda stage_data, y:\
beq end_iterate_elements:\
:\
; Call element handler:\
jsr call_pointed_subroutine:\
cpy #$ff:\
beq end:\
:\
; Update offset to next element:\
tya:\
;clc ; useless, cpy cleared cary flag:\
adc #STAGE_ELEMENT_SIZE:\
tay:\
:\
; Handle next element:\
jmp check_current_element:\
:\
end_iterate_elements:\
.)
; Call a subroutine for each element of the current stage plus player handled elements
; tmpfield1, tmpfield2 - subroutine to call
;
; Overwrites register A and register Y.
;
; For each call, the element can be accessed at address
; "stage_data, y"
;
; Called subroutine can stop the iteration by setting Y to $ff, else
; it must not modify the Y register.
;
; Called subroutine must not modify tmpfield1 nor tmpfield2.
stage_iterate_all_elements:
.(
ldy #STAGE_OFFSET_ELEMENTS
STAGE_ITERATE_ELEMENTS()
cpy #$ff
beq end
#if player_a_objects < stage_data
#error following code assumes player_a_objects to be after stage data for less than 255 bytes
#endif
#if player_a_objects-stage_data > 255
#error following code assumes player_a_objects to be after stage data for less than 255 bytes
#endif
ldy #player_a_objects-stage_data
STAGE_ITERATE_ELEMENTS()
cpy #$ff
beq end
#if player_b_objects < stage_data
#error following code assumes player_a_objects to be after stage data for less than 255 bytes
#endif
#if player_b_objects-stage_data > 255
#error following code assumes player_a_objects to be after stage data for less than 255 bytes
#endif
ldy #player_b_objects-stage_data
STAGE_ITERATE_ELEMENTS()
cpy #$ff ; TODO investigate - if no code checks Z flag after calling this routine, then this instruction is unecessary
;beq end ; useless - fallthrough
end:
rts
.)
| 24.632184
| 119
| 0.729585
|
683c802229e63e650d14ee2c92653da2554ae420
| 686
|
asm
|
Assembly
|
oeis/213/A213823.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/213/A213823.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/213/A213823.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A213823: Principal diagonal of the convolution array A213822.
; Submitted by Jamie Morken(s4)
; 4,41,147,358,710,1239,1981,2972,4248,5845,7799,10146,12922,16163,19905,24184,29036,34497,40603,47390,54894,63151,72197,82068,92800,104429,116991,130522,145058,160635,177289,195056,213972,234073,255395,277974,301846,327047,353613,381580,410984,441861,474247,508178,543690,580819,619601,660072,702268,746225,791979,839566,889022,940383,993685,1048964,1106256,1165597,1227023,1290570,1356274,1424171,1494297,1566688,1641380,1718409,1797811,1879622,1963878,2050615,2139869,2231676,2326072,2423093
mul $0,3
add $0,2
mov $1,$0
mul $0,4
mul $1,4
add $1,5
bin $1,2
sub $1,4
mul $0,$1
div $0,144
| 45.733333
| 494
| 0.797376
|
623a02bdd6a15b08fe70057ea6c93cdd13c3f6c1
| 428
|
asm
|
Assembly
|
untested/x64/mulStuff.asm
|
GabrielRavier/Generic-Assembly-Samples
|
fbf803960a14307b7fce0165058d0d4048abaf42
|
[
"Unlicense"
] | null | null | null |
untested/x64/mulStuff.asm
|
GabrielRavier/Generic-Assembly-Samples
|
fbf803960a14307b7fce0165058d0d4048abaf42
|
[
"Unlicense"
] | null | null | null |
untested/x64/mulStuff.asm
|
GabrielRavier/Generic-Assembly-Samples
|
fbf803960a14307b7fce0165058d0d4048abaf42
|
[
"Unlicense"
] | null | null | null |
global _isMulOk
global _saturatedMul
segment .text align=16
_isMulOk:
test esi, esi
je .return1
test edi, edi
je .return1
mov eax, edi
mul esi
setno al
ret
align 16
.return1:
mov eax, 1
ret
align 16
_saturatedMul:
test esi, esi
je .doMul
test edi, edi
je .doMul
mov eax, edi
mul esi
jo .returnMinus1
.doMul:
mov eax, esi
imul eax, edi
ret
align 16
.returnMinus1:
or eax, -1
ret
| 9.106383
| 22
| 0.663551
|
b06ae729a2331a49ec2053f9e1a6dc3b74b23e88
| 7,456
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1165.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.log_21829_1165.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.log_21829_1165.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x4b30, %rsi
nop
inc %r10
movw $0x6162, (%rsi)
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_D_ht+0x18d90, %rdi
nop
nop
nop
nop
add $8449, %rdx
movw $0x6162, (%rdi)
nop
nop
cmp %rdi, %rdi
lea addresses_normal_ht+0x65d0, %r13
nop
nop
nop
nop
nop
inc %r8
movl $0x61626364, (%r13)
nop
nop
and $19604, %rsi
lea addresses_WT_ht+0x17890, %rdx
nop
inc %r11
movb (%rdx), %r13b
nop
nop
nop
nop
and $60999, %r10
lea addresses_D_ht+0x1b190, %rsi
lea addresses_WT_ht+0xf890, %rdi
clflush (%rdi)
xor %r11, %r11
mov $39, %rcx
rep movsw
nop
nop
nop
cmp %r10, %r10
lea addresses_D_ht+0x48a8, %rsi
lea addresses_D_ht+0x3f30, %rdi
clflush (%rdi)
nop
nop
nop
nop
add %r13, %r13
mov $69, %rcx
rep movsb
nop
nop
nop
nop
xor %r11, %r11
lea addresses_WC_ht+0x1a710, %r10
nop
nop
nop
add $35670, %r8
movl $0x61626364, (%r10)
nop
nop
and %rsi, %rsi
lea addresses_WT_ht+0x16340, %rsi
lea addresses_D_ht+0xdb90, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
and $8380, %rdx
mov $86, %rcx
rep movsb
nop
xor $18580, %rdi
lea addresses_A_ht+0x1d590, %r8
cmp $803, %rdi
movb $0x61, (%r8)
nop
nop
nop
sub %rsi, %rsi
lea addresses_D_ht+0x1a990, %rsi
lea addresses_A_ht+0xc8d0, %rdi
nop
and %rdx, %rdx
mov $52, %rcx
rep movsq
nop
nop
nop
xor $50922, %rdx
lea addresses_UC_ht+0x4910, %rcx
sub %r10, %r10
mov (%rcx), %rdi
and %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %r9
push %rax
push %rbp
push %rcx
push %rdi
// Store
mov $0xc18, %rbp
nop
nop
nop
nop
add $29839, %rdi
movw $0x5152, (%rbp)
nop
nop
nop
nop
sub $34521, %r9
// Store
lea addresses_RW+0x1264e, %rbp
and $33897, %r8
mov $0x5152535455565758, %r13
movq %r13, %xmm5
vmovups %ymm5, (%rbp)
nop
nop
nop
nop
nop
xor %rdi, %rdi
// Load
lea addresses_WC+0xb410, %rcx
nop
nop
nop
xor %rdi, %rdi
vmovups (%rcx), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rbp
sub $58831, %rcx
// Faulty Load
lea addresses_normal+0x4590, %r9
clflush (%r9)
nop
add %rax, %rax
mov (%r9), %ecx
lea oracles, %r13
and $0xff, %rcx
shlq $12, %rcx
mov (%r13,%rcx,1), %rcx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_P', 'AVXalign': False, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_RW', 'AVXalign': False, 'size': 32}}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_WC', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_normal', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4}}
{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}}
{'src': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 5, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4}}
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1}}
{'src': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 6, 'type': 'addresses_A_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8}, '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
*/
| 34.045662
| 2,999
| 0.653836
|
b1794fac47d230b6b78fdb48dcbf2388dd54d959
| 2,705
|
asm
|
Assembly
|
lib/neonlib/src/BIOS.asm
|
sharksym/vgmplay-sharksym
|
d7763b87a379da4e6dadcc55026969d310957952
|
[
"BSD-2-Clause"
] | 6
|
2020-04-21T17:26:27.000Z
|
2021-09-25T18:41:01.000Z
|
lib/neonlib/src/BIOS.asm
|
sharksym/vgmplay-sharksym
|
d7763b87a379da4e6dadcc55026969d310957952
|
[
"BSD-2-Clause"
] | null | null | null |
lib/neonlib/src/BIOS.asm
|
sharksym/vgmplay-sharksym
|
d7763b87a379da4e6dadcc55026969d310957952
|
[
"BSD-2-Clause"
] | null | null | null |
;
; BIOS symbols
;
CHKRAM: equ 00H
SYNCHR: equ 08H
RDSLT: equ 0CH
CHRGTR: equ 10H
WRSLT: equ 14H
OUTDO: equ 18H
CALSLT: equ 1CH
DCOMPR: equ 20H
ENASLT: equ 24H
GETYPR: equ 28H
IDBYT0: equ 2BH
IDBYT1: equ 2CH
IDBYT2: equ 2DH
IDBYT3: equ 2EH
CALLF: equ 30H
KEYINT: equ 38H
INITIO: equ 3BH
INIFNK: equ 3EH
DISSCR: equ 41H
ENASCR: equ 44H
WRTVDP: equ 47H
RDVRM: equ 4AH
WRTVRM: equ 4DH
SETRD: equ 50H
SETWRT: equ 53H
FILVRM: equ 56H
LDIRMV: equ 59H
LDIRVM: equ 5CH
CHGMOD: equ 5FH
CHGCLR: equ 62H
NMI: equ 66H
CLRSPR: equ 69H
INITXT: equ 6CH
INIT32: equ 6FH
INIGRP: equ 72H
INIMLT: equ 75H
SETTXT: equ 78H
SETT32: equ 7BH
SETGRP: equ 7EH
SETMLT: equ 81H
CALPAT: equ 84H
CALATR: equ 87H
GSPSIZ: equ 8AH
GRPPRT: equ 8DH
GICINI: equ 90H
WRTPSG: equ 93H
RDPSG: equ 96H
STRTMS: equ 99H
CHSNS: equ 9CH
CHGET: equ 9FH
CHPUT: equ 0A2H
LPTOUT: equ 0A5H
LPTSTT: equ 0A8H
CNVCHR: equ 0ABH
PINLIN: equ 0AEH
INLIN: equ 0B1H
QINLIN: equ 0B4H
BREAKX: equ 0B7H
BEEP: equ 0C0H
CLS: equ 0C3H
POSIT: equ 0C6H
FNKSB: equ 0C9H
ERAFNK: equ 0CCH
DSPFNK: equ 0CFH
TOTEXT: equ 0D2H
GTSTCK: equ 0D5H
GTTRIG: equ 0D8H
GTPAD: equ 0DBH
GTPDL: equ 0DEH
TAPION: equ 0E1H
TAPIN: equ 0E4H
TAPIOF: equ 0E7H
TAPOON: equ 0EAH
TAPOUT: equ 0EDH
TAPOOF: equ 0F0H
STMOTR: equ 0F3H
CHGCAP: equ 132H
CHGSND: equ 135H
RSLREG: equ 138H
WSLREG: equ 13BH
RDVDP: equ 13EH
SNSMAT: equ 141H
PHYDIO: equ 144H
ISFLIO: equ 14AH
OUTDLP: equ 14DH
KILBUF: equ 156H
CALBAS: equ 159H
SUBROM: equ 15CH
EXTROM: equ 15FH
EOL: equ 168H
BIGFIL: equ 16BH
NSETRD: equ 16EH
NSTWRT: equ 171H
NRDVRM: equ 174H
NWRVRM: equ 177H
RDRES: equ 17AH
WRRES: equ 17DH
CHGCPU: equ 180H
GETCPU: equ 183H
PCMPLY: equ 186H
PCMREC: equ 189H
SCNCNT: equ 0F3F6H
LINL40: equ 0F3AEH
TXTNAM: equ 0F3B3H
TXTCOL: equ 0F3B5H
TXTCGP: equ 0F3B7H
T32NAM: equ 0F3BDH
CLIKSW: equ 0F3DBH
STATFL: equ 0F3E7H
TRGFLG: equ 0F3E8H
FORCLR: equ 0F3E9H
BAKCLR: equ 0F3EAH
BDRCLR: equ 0F3EBH
HOKVLD: equ 0FB20H
NEWKEY: equ 0FBE5H
HIMEM: equ 0FC4AH
JIFFY: equ 0FC9EH
INTCNT: equ 0FCA2H
EXPTBL: equ 0FCC1H
SLTTBL: equ 0FCC5H
PROCNM: equ 0FD89H
H.KEYI: equ 0FD9AH
H.TIMI: equ 0FD9FH
H.MDIN: equ 0FF75H
H.MDTM: equ 0FF93H
EXTBIO: equ 0FFCAH
PPI_PORT_A: equ 0A8H
PPI_PORT_B: equ 0A9H
PPI_PORT_C: equ 0AAH
; d = device ID
; e = function call
; Modifies: depends on function call, alternate & index registers preserved
BIOS_ExtendedBIOS: PROC
ex af,af'
exx
push af
push bc
push de
push hl
ld a,(HOKVLD)
bit 0,a
jr z,Throw
exx
ex af,af'
push ix
push iy
call EXTBIO
pop iy
pop ix
ex af,af'
exx
pop hl
pop de
pop bc
pop af
exx
ex af,af'
ret
Throw:
ld hl,BIOS_noExtendedBIOSError
call System_ThrowExceptionWithMessage
ENDP
;
BIOS_noExtendedBIOSError:
db "No extended BIOS available.",13,10,0
| 15.726744
| 75
| 0.751201
|
e6a64c6f8c3215ebd142d6f1963d201cd535adbb
| 783
|
asm
|
Assembly
|
14-move_to_32/print_str_32.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | 2
|
2020-08-09T06:17:13.000Z
|
2021-03-06T11:18:38.000Z
|
16-kernel/print_str_32.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | null | null | null |
16-kernel/print_str_32.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | null | null | null |
; This is 32 bit code. We can't run it unless we enter 32 bit protected mode.
[bits 32]
; Set some display constants
VIDEO_MEMORY equ 0xb8000
WHITE_ON_BLACK equ 0x0f
print_str_32:
; Push all registers to stack
pusha
; Move dx (now edx in 32 bit mode) to Video memory location
mov edx, VIDEO_MEMORY
; Create a loop for every char
print_str_32_loop:
; Move byte at string location to register a, and change color to white on black
mov al, [ebx]
mov ah, WHITE_ON_BLACK
; If char is null, jump to end
cmp al, 0
je print_str_32_done
; Store the character onto video memory location
mov [edx], ax
; Move ahead in memory
add ebx, 1
add edx, 2
jmp print_str_32_loop
; return
print_str_32_done:
popa
ret
| 21.162162
| 83
| 0.684547
|
6c549ff991cdb255be6e8dab1cd9db80ede09f53
| 3,796
|
asm
|
Assembly
|
Aula03.X/build/default/production/Aula03.asm
|
yuricristhian/ECOP14-Laboratorio-programacao-embarcada
|
3ca0aba17982a9ae48ae109626411859b331b536
|
[
"MIT"
] | null | null | null |
Aula03.X/build/default/production/Aula03.asm
|
yuricristhian/ECOP14-Laboratorio-programacao-embarcada
|
3ca0aba17982a9ae48ae109626411859b331b536
|
[
"MIT"
] | null | null | null |
Aula03.X/build/default/production/Aula03.asm
|
yuricristhian/ECOP14-Laboratorio-programacao-embarcada
|
3ca0aba17982a9ae48ae109626411859b331b536
|
[
"MIT"
] | null | null | null |
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 3.5.0 #9253 (Jun 20 2015) (MINGW64)
; This file was generated Thu Sep 01 09:23:18 2016
;--------------------------------------------------------
; PIC16 port for the Microchip 16-bit core micros
;--------------------------------------------------------
list p=18f4520
radix dec
CONFIG MCLRE=ON
CONFIG OSC=HS
CONFIG WDT=OFF
CONFIG LVP=OFF
CONFIG DEBUG=OFF
CONFIG WDTPS=1
;--------------------------------------------------------
; public variables in this module
;--------------------------------------------------------
global _main
;--------------------------------------------------------
; extern variables in this module
;--------------------------------------------------------
extern _tempo
;--------------------------------------------------------
; Equates to used internal registers
;--------------------------------------------------------
STATUS equ 0xfd8
WREG equ 0xfe8
INDF0 equ 0xfef
POSTINC1 equ 0xfe6
POSTDEC1 equ 0xfe5
; Internal registers
.registers udata_ovr 0x0000
r0x00 res 1
r0x01 res 1
r0x02 res 1
r0x03 res 1
r0x04 res 1
;--------------------------------------------------------
; interrupt vector
;--------------------------------------------------------
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
; I code from now on!
; ; Starting pCode block
S_Aula03__main code
_main:
; .line 17; Aula03.c TRISA = 0x00; //config da porta A
LFSR 0x00, 0xf92
MOVLW 0x00
MOVWF INDF0
; .line 18; Aula03.c TRISE = 0x00; //config da porta E
LFSR 0x00, 0xf96
MOVLW 0x00
MOVWF INDF0
; .line 19; Aula03.c BitClr(INTCON2, 7); //liga pull up
LFSR 0x00, 0xff1
MOVFF INDF0, r0x00
BCF r0x00, 7
LFSR 0x00, 0xff1
MOVFF r0x00, INDF0
; .line 20; Aula03.c ADCON1 = 0x0E; //config AD
LFSR 0x00, 0xfc1
MOVLW 0x0e
MOVWF INDF0
; .line 21; Aula03.c TRISD = 0x00; //config. a porta D
LFSR 0x00, 0xf95
MOVLW 0x00
MOVWF INDF0
; .line 24; Aula03.c BitClr(INTCON2, 7); //liga pull up
LFSR 0x00, 0xff1
MOVFF INDF0, r0x00
BCF r0x00, 7
LFSR 0x00, 0xff1
MOVFF r0x00, INDF0
; .line 25; Aula03.c ADCON1 = 0x0E; //config AD
LFSR 0x00, 0xfc1
MOVLW 0x0e
MOVWF INDF0
; .line 26; Aula03.c TRISB = 0xF0; //config da porta B
LFSR 0x00, 0xf93
MOVLW 0xf0
MOVWF INDF0
; .line 27; Aula03.c PORTB = 0x0E; //config da porta B
LFSR 0x00, 0xf81
MOVLW 0x0e
MOVWF INDF0
_00109_DS_:
; .line 47; Aula03.c PORTD = 0xFF;
LFSR 0x00, 0xf83
MOVLW 0xff
MOVWF INDF0
; .line 48; Aula03.c tempo(2000);
MOVLW 0x07
MOVWF POSTDEC1
MOVLW 0xd0
MOVWF POSTDEC1
CALL _tempo
MOVF POSTINC1, F
MOVF POSTINC1, F
; .line 49; Aula03.c for(j=0; j<8; j++){
CLRF r0x00
CLRF r0x01
_00107_DS_:
; .line 50; Aula03.c BitFlp(PORTD, j);
LFSR 0x00, 0xf83
MOVFF INDF0, r0x02
MOVLW 0x01
MOVWF r0x03
CLRF r0x04
MOVF r0x00, W
BZ _00125_DS_
BN _00128_DS_
NEGF WREG
BCF STATUS, 0
_00126_DS_:
RLCF r0x03, F
RLCF r0x04, F
ADDLW 0x01
BNC _00126_DS_
BRA _00125_DS_
_00128_DS_:
BCF STATUS, 0
_00127_DS_:
RRCF r0x04, F
RRCF r0x03, F
ADDLW 0x01
BNC _00127_DS_
_00125_DS_:
MOVF r0x03, W
XORWF r0x02, F
LFSR 0x00, 0xf83
MOVFF r0x02, INDF0
; .line 51; Aula03.c tempo(2000);
MOVLW 0x07
MOVWF POSTDEC1
MOVLW 0xd0
MOVWF POSTDEC1
CALL _tempo
MOVF POSTINC1, F
MOVF POSTINC1, F
; .line 49; Aula03.c for(j=0; j<8; j++){
INFSNZ r0x00, F
INCF r0x01, F
MOVF r0x01, W
ADDLW 0x80
ADDLW 0x80
BNZ _00130_DS_
MOVLW 0x08
SUBWF r0x00, W
_00130_DS_:
BNC _00107_DS_
BRA _00109_DS_
RETURN
; Statistics:
; code size: 214 (0x00d6) bytes ( 0.16%)
; 107 (0x006b) words
; udata size: 0 (0x0000) bytes ( 0.00%)
; access size: 5 (0x0005) bytes
end
| 21.691429
| 57
| 0.570337
|
5d974299c4cdf25c180ef0716ea0514396295bff
| 434
|
asm
|
Assembly
|
text/maps/silvercave.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | null | null | null |
text/maps/silvercave.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | null | null | null |
text/maps/silvercave.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | null | null | null |
_SilverCaveBattleText2::
text "..."
done
_SilverCaveEndBattleText2::
text "...Amazing."
prompt
_SilverCaveAfterBattleText2::
text "...You've truly progressed as a trainer."
done
_SilverCaveBattleText1::
text "Did you come to"
line "explore too?"
done
_SilverCaveEndBattleText1::
text "Losing"
line "stinks!"
prompt
_SilverCaveAfterBattleText1::
text "This is called"
line "Mt. Silver."
cont "Spooky, right?"
done
| 15.5
| 48
| 0.732719
|
a423019ea4d25a86a17f5df5cc70d39b97f492b2
| 413
|
asm
|
Assembly
|
programs/oeis/063/A063327.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/063/A063327.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/063/A063327.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A063327: Dimension of the space of weight n cuspidal newforms for Gamma_1( 54 ).
; -1,22,42,64,86,106,128,150,170,192,214,234,256,278,298,320,342,362,384,406,426,448,470,490,512,534,554,576,598,618,640,662,682,704,726,746,768,790,810,832,854,874,896,918,938,960,982,1002,1024
mov $2,$0
mov $5,$0
mul $5,2
mov $4,$5
lpb $4
mov $1,1
add $3,2
add $1,$3
sub $4,3
lpe
sub $1,1
mov $6,$2
mul $6,20
add $1,$6
| 22.944444
| 194
| 0.663438
|
1a35276806074559087917f3a66081dfa2e98eef
| 6,759
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1588.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_1588.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_1588.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r15
push %r8
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x21b9, %r8
nop
nop
dec %rdi
mov $0x6162636465666768, %r15
movq %r15, %xmm4
vmovups %ymm4, (%r8)
nop
nop
nop
nop
add $32953, %r9
lea addresses_WC_ht+0x19f9f, %rsi
lea addresses_UC_ht+0x125b9, %rdi
nop
add $45170, %r10
mov $0, %rcx
rep movsw
nop
nop
nop
add %r15, %r15
lea addresses_WT_ht+0x180f9, %rcx
clflush (%rcx)
sub %r8, %r8
movb (%rcx), %r10b
nop
nop
nop
xor %rsi, %rsi
lea addresses_WC_ht+0xffb9, %r10
nop
nop
nop
sub $8340, %r8
mov (%r10), %r15w
nop
nop
nop
nop
nop
and %r8, %r8
lea addresses_WT_ht+0x6db9, %rsi
lea addresses_A_ht+0x16209, %rdi
nop
nop
nop
nop
and %rax, %rax
mov $10, %rcx
rep movsl
nop
nop
nop
inc %r8
lea addresses_normal_ht+0x7f85, %r9
nop
and %r15, %r15
mov (%r9), %cx
nop
nop
nop
nop
add $36512, %rsi
lea addresses_A_ht+0x2c01, %rsi
lea addresses_WC_ht+0xef95, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
sub %r9, %r9
mov $47, %rcx
rep movsq
nop
nop
inc %r9
lea addresses_WT_ht+0x19573, %rcx
nop
nop
xor $20546, %r10
and $0xffffffffffffffc0, %rcx
movaps (%rcx), %xmm0
vpextrq $1, %xmm0, %rax
nop
nop
nop
nop
xor $9884, %rcx
lea addresses_A_ht+0x11bb9, %rcx
cmp %r8, %r8
movb (%rcx), %al
nop
nop
nop
xor $59795, %rdi
lea addresses_A_ht+0x5af9, %rsi
lea addresses_normal_ht+0xc099, %rdi
nop
nop
nop
add %r8, %r8
mov $60, %rcx
rep movsq
nop
nop
nop
xor %r15, %r15
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r15
push %r8
push %rbx
// Store
lea addresses_WC+0x1039c, %r10
nop
xor %r8, %r8
movl $0x51525354, (%r10)
nop
nop
nop
nop
and %r13, %r13
// Faulty Load
lea addresses_PSE+0x4db9, %r11
nop
nop
nop
nop
nop
dec %rbx
mov (%r11), %r15d
lea oracles, %r11
and $0xff, %r15
shlq $12, %r15
mov (%r11,%r15,1), %r15
pop %rbx
pop %r8
pop %r15
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WC', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 4, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 10, '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_WT_ht', 'same': False, 'size': 1, 'congruent': 5, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 9, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': True, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 34.840206
| 2,999
| 0.657642
|
65bbdb31301865feeb5929b7397b6fd7866b6b86
| 7,453
|
asm
|
Assembly
|
json.asm
|
mmoeller86/jsonx64
|
e5e899c5fcd38b0dc2df31051548df0ebbe2d96e
|
[
"MIT"
] | null | null | null |
json.asm
|
mmoeller86/jsonx64
|
e5e899c5fcd38b0dc2df31051548df0ebbe2d96e
|
[
"MIT"
] | null | null | null |
json.asm
|
mmoeller86/jsonx64
|
e5e899c5fcd38b0dc2df31051548df0ebbe2d96e
|
[
"MIT"
] | null | null | null |
; JSON parser for the x64 architecture
.model flat, stdcall
option casemap: none
include json.inc
public json_init
public json_fini
public json_parse
public json_parser_free
json_parse_node_val PROTO node: Ptr JSONNode, buffer: Ptr JSONBuffer
json_parse_node PROTO buffer: Ptr JSONBuffer
.code
json_init PROC
invoke calloc, 1, sizeof JSONParser
ret
json_init ENDP
json_fini PROC p: Ptr JSONParser
mov rdi, p
call free
ret
json_fini ENDP
json_trim PROC buffer: Ptr JSONBuffer
@2:
invoke json_buffer_peek_char, buffer
cmp al, ' '
jz @1
cmp al, 9
jz @1
cmp al, 13
jz @1
cmp al, 10
jz @1
ret
@1: invoke json_buffer_skip_char, buffer
jmp @2
json_trim ENDP
json_trim2 PROC buffer: Ptr JSONBuffer
@2:
invoke json_buffer_peek_char, buffer
cmp al, ' '
je @1
cmp al, 9
je @1
ret
@1: invoke json_buffer_skip_char, buffer
jmp @2
json_trim2 ENDP
json_parse_string PROC buffer: Ptr JSONBuffer
LOCAL buf: Ptr BYTE
LOCAL len: QWORD
LOCAL hex [5]: BYTE
invoke json_buffer_skip_char, buffer
mov buf, 0
mov len, 1
@1: invoke json_buffer_read_char, buffer
cmp al, '"'
je @2
cmp al, '\'
jne @4
; Read a unicode sequence
invoke json_buffer_read_char, buffer
cmp al, 'u'
jne @5
invoke json_buffer_read_char, buffer
jc @3
mov hex [0], al
invoke json_buffer_read_char, buffer
jc @3
mov hex [1], al
invoke json_buffer_read_char, buffer
jc @3
mov hex [2], al
invoke json_buffer_read_char, buffer
jc @3
mov hex [3], al
mov hex [4], 0
lea rdi, hex
mov rsi, 0
mov edx, 16
call strtoul
cmp eax, 256
jl @4
push rax
invoke json_str_add_char, addr buf, addr len, rax
pop rax
shr ax, 8
invoke json_str_add_char, addr buf, addr len, rax
jmp @1
@5: cmp al, 'r'
je @6
cmp al, 'n'
je @7
cmp al, 'f'
je @8
cmp al, 't'
je @9
cmp al, 'b'
je @10
cmp al, '"'
je @11
cmp al, '\'
je @12
cmp al, '/'
je @13
jmp @3
@6: invoke json_str_add_char, addr buf, addr len, 13
jmp @1
@7: invoke json_str_add_char, addr buf, addr len, 10
jmp @1
@8: invoke json_str_add_char, addr buf, addr len, 12
jmp @1
@9: invoke json_str_add_char, addr buf, addr len, 9
jmp @1
@10: invoke json_str_add_char, addr buf, addr len, 8
jmp @1
@11: invoke json_str_add_char, addr buf, addr len, 34
jmp @1
@12: invoke json_str_add_char, addr buf, addr len, 92
jmp @1
@13: invoke json_str_add_char, addr buf, addr len, 47
jmp @1
@4: invoke json_str_add_char, addr buf, addr len, rax
jc @3
jmp @1
@2: mov rax, buf
clc
ret
@3: stc
ret
json_parse_string ENDP
json_parse_str PROC node: Ptr JSONNode, buffer: Ptr JSONBuffer
invoke json_parse_string, buffer
jc @1
mov rdi, node
mov [rdi + JSONNode.d_str], rax
mov [rdi + JSONNode.typ], NODE_TYPE_STRING
clc
@1: ret
json_parse_str ENDP
.data
b_true db 'true', 0
b_false db 'false', 0
.code
json_parse_boolean PROC node: Ptr JSONNode, stri: Ptr BYTE
mov rdi, stri
mov rsi, offset b_true
call strcasecmp
.if eax == 0
mov rdi, node
mov [rdi + JSONNode.d_bool], 1
mov [rdi + JSONNode.typ], NODE_TYPE_BOOLEAN
jmp @2
.endif
mov rdi, stri
mov rsi, offset b_false
call strcasecmp
.if eax == 0
mov rdi, node
mov [rdi + JSONNode.d_bool], 0
mov [rdi + JSONNode.typ], NODE_TYPE_BOOLEAN
jmp @2
.endif
@1: stc
ret
@2: mov rdi, stri
call free
clc
ret
json_parse_boolean ENDP
json_parse_num PROC node: Ptr JSONNode, stri: Ptr BYTE
LOCAL ende: QWORD
mov rdi, stri
lea rsi, ende
call strtod
mov rax, stri
.if rax == ende
stc
ret
.endif
mov r8, node
movq [r8 + JSONNode.d_num], mm0
mov [r8 + JSONNode.typ], NODE_TYPE_NUMBER
clc
ret
json_parse_num ENDP
json_parse_object PROC node: Ptr JSONNode, buffer: Ptr JSONBuffer
LOCAL array: Ptr
LOCAL n: QWORD
LOCAL nod: Ptr
invoke json_buffer_skip_char, buffer
mov array, 0
mov n, 0
@1: invoke json_trim, buffer
invoke json_buffer_peek_char, buffer
cmp al, '}'
je @3
invoke json_parse_node, buffer
jc @4
mov nod, rax
invoke json_array_add, addr array, addr n, nod
invoke json_trim2, buffer
invoke json_buffer_read_char, buffer
cmp al, ','
jne @3
jmp @1
@2: mov rax, node
mov rdi, array
mov [rax + JSONNode.a], rdi
mov rdi, n
mov [rax + JSONNode.n], rdi
mov [rax + JSONNode.typ], NODE_TYPE_OBJECT
clc
ret
@3: invoke json_trim, buffer
invoke json_buffer_read_char, buffer
cmp al, '}'
jne @4
jmp @2
@4: stc
ret
json_parse_object ENDP
json_parse_array PROC node: Ptr JSONNode, buffer: Ptr JSONBuffer
LOCAL array: Ptr
LOCAL n: QWORD
LOCAL nod: Ptr
invoke json_buffer_skip_char, buffer
mov array, 0
mov n, 0
@1: invoke json_trim, buffer
invoke json_buffer_peek_char, buffer
cmp al, ']'
je @3
invoke json_node_alloc
mov nod, rax
invoke json_parse_node_val, nod, buffer
jc @3
mov nod, rax
invoke json_array_add, addr array, addr n, nod
invoke json_trim2, buffer
invoke json_buffer_read_char, buffer
cmp al, ','
jne @3
jmp @1
@2: mov rax, node
mov rdi, array
mov [rax + JSONNode.a], rdi
mov rdi, n
mov [rax + JSONNode.n], rdi
mov [rax + JSONNode.typ], NODE_TYPE_ARRAY
clc
ret
@3: invoke json_trim, buffer
invoke json_buffer_read_char, buffer
cmp al, ']'
jne @4
jmp @2
@4: stc
ret
json_parse_array ENDP
json_parse_node PROC buffer: Ptr JSONBuffer
LOCAL nam: Ptr BYTE
LOCAL node: Ptr JSONNode
invoke json_parse_string, buffer
jc @1
mov nam, rax
invoke json_trim2, buffer
invoke json_buffer_peek_char, buffer
cmp al, ':'
jnz @1
invoke json_buffer_skip_char, buffer
invoke json_node_alloc
mov node, rax
invoke json_node_set_name, node, nam
invoke json_parse_node_val, node, buffer
jc @1
mov rax, node
clc
ret
@1: sub rax, rax
stc
ret
json_parse_node ENDP
json_get_str PROC buffer: Ptr JSONBuffer
LOCAL buf: Ptr BYTE
LOCAL len: QWORD
mov buf, 0
mov len, 1
@1:
invoke json_buffer_peek_char, buffer
cmp al, ' '
je @2
cmp al, 9
je @2
cmp al, ','
je @2
cmp al, 13
je @2
cmp al, 10
je @2
push rax
inc len
mov rdi, buf
mov rsi, len
call realloc
mov buf, rax
pop rax
mov rdi, buf
mov rsi, len
mov [rdi + rsi -2], al
mov byte ptr [rdi + rsi -1], 0
invoke json_buffer_skip_char, buffer
jmp @1
@2: mov rax, buf
clc
ret
json_get_str ENDP
.data
d_null db 'null', 0
.code
json_parse_null PROC node: Ptr JSONNode, stri: Ptr BYTE
mov rdi, stri
mov rsi, offset d_null
call strcasecmp
test eax, eax
jnz @1
mov rax, node
mov [rax + JSONNode.typ], NODE_TYPE_NULL
mov rdi, stri
call free
clc
ret
@1: stc
ret
json_parse_null ENDP
json_parse_node_val PROC node: Ptr JSONNode, buffer: Ptr JSONBuffer
LOCAL stri: Ptr BYTE
invoke json_trim, buffer
invoke json_buffer_peek_char, buffer
cmp al, '{' ; Object
je @1
cmp al, '[' ; Array
je @2
cmp al, '"' ; Name/Value Pair
je @3
; Number or Boolean
@5: invoke json_get_str, buffer
mov stri, rax
invoke json_parse_boolean, node, stri
jnc @7
invoke json_parse_num, node, stri
jnc @7
invoke json_parse_null, node, stri
jnc @7
jmp @4
@1: invoke json_parse_object, node, buffer
jc @4
jmp @7
@2: invoke json_parse_array, node, buffer
jc @4
jmp @7
@3: invoke json_parse_str, node, buffer
jc @4
jmp @7
@4: sub rax, rax
@6: ret
@7:
mov rax, node
ret
json_parse_node_val ENDP
json_parse PROC
LOCAL buffer: Ptr
push rdi
push rsi
mov buffer, rcx
invoke json_node_alloc
test rax, rax
jz @1
invoke json_parse_node_val, rax, buffer
@1: pop rsi
pop rdi
ret
json_parse ENDP
json_parser_free PROC
invoke json_node_free, rcx
ret
json_parser_free ENDP
END
| 15.36701
| 69
| 0.7075
|
ec5923bccbdfcccb1bf9134d7c0d43a6e59c857f
| 150
|
asm
|
Assembly
|
libsrc/target/laser500/graphics/res_MODE0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | null | null | null |
libsrc/target/laser500/graphics/res_MODE0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | null | null | null |
libsrc/target/laser500/graphics/res_MODE0.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1
|
2019-12-03T23:28:20.000Z
|
2019-12-03T23:28:20.000Z
|
SECTION code_clib
PUBLIC res_MODE0
.res_MODE0
defc NEEDunplot = 1
INCLUDE "graphics/generic_console/pixel.asm"
| 16.666667
| 52
| 0.62
|
cc8f4a01fbe72a1d3ecba2e447e26f82321777ad
| 797
|
asm
|
Assembly
|
hw1/homework.asm
|
yuhanchengo/assembly
|
e1d1a44488763c8dab1cd8eafe3454c4f9b67800
|
[
"MIT"
] | null | null | null |
hw1/homework.asm
|
yuhanchengo/assembly
|
e1d1a44488763c8dab1cd8eafe3454c4f9b67800
|
[
"MIT"
] | null | null | null |
hw1/homework.asm
|
yuhanchengo/assembly
|
e1d1a44488763c8dab1cd8eafe3454c4f9b67800
|
[
"MIT"
] | null | null | null |
TITLE Example of ASM (asmExample.ASM)
; This program locates the cursor and displays the
; system time. It uses two Win32 API structures.
; Last update: 6/30/2005
INCLUDE Irvine32.inc
; Redefine external symbols for convenience
; Redifinition is necessary for using stdcall in .model directive
; using "start" is because for linking to WinDbg. added by Huang
main EQU start@0
.data
;some data
.code
main PROC
MOV al, 00110101b ; last two digits of leader’s students ID in binary format
MOV ah, 02 ; last two digits of member’s students ID in decimal format
MOV ax, 41Dh ; last four digits of student’s ID in hexadecimal
MOV dx, 0eeeah ; let the value of dx is eeea
SUB dx, ax ; value of dx subtracting by ax
exit
main ENDP
END main
| 29.518519
| 78
| 0.707654
|
4a3832260e70079849ae4793351a03ee93163d8b
| 264
|
asm
|
Assembly
|
lib/crt/classic/tms9118/interrupt.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | null | null | null |
lib/crt/classic/tms9118/interrupt.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | null | null | null |
lib/crt/classic/tms9118/interrupt.asm
|
Toysoft/z88dk
|
f930bef9ac4feeec91a07303b79ddd9071131a24
|
[
"ClArtistic"
] | 1
|
2019-12-03T23:28:20.000Z
|
2019-12-03T23:28:20.000Z
|
EXTERN VDP_STATUS
tms9118_interrupt:
push af
push hl
ld a, +(VDP_STATUS / 256)
and a
jr z,read_port
ld a,(VDP_STATUS)
jr done_read
read_port:
in a,(VDP_STATUS % 256)
done_read:
or a
jp p,int_not_VBL
jp int_VBL
int_not_VBL:
pop hl
pop af
ei
reti
| 11
| 26
| 0.712121
|
4aef00ce35c3babafeec358f9828367476e86d3d
| 1,826
|
asm
|
Assembly
|
programs/oeis/110/A110286.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/110/A110286.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/110/A110286.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A110286: a(n) = 15*2^n.
; 15,30,60,120,240,480,960,1920,3840,7680,15360,30720,61440,122880,245760,491520,983040,1966080,3932160,7864320,15728640,31457280,62914560,125829120,251658240,503316480,1006632960,2013265920,4026531840,8053063680,16106127360,32212254720,64424509440,128849018880,257698037760,515396075520,1030792151040,2061584302080,4123168604160,8246337208320,16492674416640,32985348833280,65970697666560,131941395333120,263882790666240,527765581332480,1055531162664960,2111062325329920,4222124650659840,8444249301319680,16888498602639360,33776997205278720,67553994410557440,135107988821114880,270215977642229760,540431955284459520,1080863910568919040,2161727821137838080,4323455642275676160,8646911284551352320,17293822569102704640,34587645138205409280,69175290276410818560,138350580552821637120,276701161105643274240,553402322211286548480,1106804644422573096960,2213609288845146193920,4427218577690292387840,8854437155380584775680,17708874310761169551360,35417748621522339102720,70835497243044678205440,141670994486089356410880,283341988972178712821760,566683977944357425643520,1133367955888714851287040,2266735911777429702574080,4533471823554859405148160,9066943647109718810296320,18133887294219437620592640,36267774588438875241185280,72535549176877750482370560,145071098353755500964741120,290142196707511001929482240,580284393415022003858964480,1160568786830044007717928960,2321137573660088015435857920,4642275147320176030871715840,9284550294640352061743431680,18569100589280704123486863360,37138201178561408246973726720,74276402357122816493947453440,148552804714245632987894906880,297105609428491265975789813760,594211218856982531951579627520,1188422437713965063903159255040,2376844875427930127806318510080,4753689750855860255612637020160,9507379501711720511225274040320
mov $1,2
pow $1,$0
mul $1,15
mov $0,$1
| 228.25
| 1,759
| 0.926616
|
cc8faf13a96909037eb867e4774f89a818c163d8
| 1,279
|
asm
|
Assembly
|
assembly_repl/repl.asm
|
emmettgb/Random_Code
|
15f327406a4f43c4e68d637c68d227cb0d1d3cd8
|
[
"MIT"
] | 2
|
2021-10-08T23:05:20.000Z
|
2021-12-20T00:37:24.000Z
|
assembly_repl/repl.asm
|
emmettgb/Random_Code
|
15f327406a4f43c4e68d637c68d227cb0d1d3cd8
|
[
"MIT"
] | null | null | null |
assembly_repl/repl.asm
|
emmettgb/Random_Code
|
15f327406a4f43c4e68d637c68d227cb0d1d3cd8
|
[
"MIT"
] | null | null | null |
section .data
repl_prompt: db "Heya> "
ret_0: db "You entered 0!"
section .bss
; Input
inp resb 1
section .text
global _start
_exit:
mov rax, 60
mov rdi, 0
syscall
; ===============|
; _START
; Prints prompt by calling _show_prompt:
;, takes input, calls _parse:, on ret, checks for change in
; exit flag. If the exit flag has not been changed, then jumps to itself.
; ===============|
_start:
; Check for exit code set to 1:
mov rdi, 1
cmp rdi, inp
je _exit
mov rdi, 0
je _retzer
; Read
call _prompt
call _repl_input
; Evaluate
mov rsi, inp
mov rax, 1
mov rdi, 1
mov rdx, 2
syscall
mov rsi, 10
mov rax, 1
mov rdi, 1
mov rdx, 2
syscall
; Loop
jmp _start
; ===============|
; _REPL_INPUT
; Takes kernel standard in, returns to _repl.
; ===============|
_repl_input:
mov rax, 0
mov rdi, 0
mov rsi, inp
mov rdx, 64
syscall
ret
; ===============|
; _PROMPT
; Prints prompt, returns to _repl
; ===============|
_prompt:
mov rax, 1
mov rdi, 1
mov rsi, repl_prompt
mov rdx, 6
syscall
ret
_retzer:
mov rax, 1
mov rdi, 1
mov rsi, ret_0
mov rdx, 14
syscall
| 17.763889
| 77
| 0.531665
|
017f53e3e61f49ee87dea7a6309ff3ef23d575b1
| 325
|
asm
|
Assembly
|
programs/oeis/053/A053824.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/053/A053824.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/053/A053824.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A053824: Sum of digits of (n written in base 5).
; 0,1,2,3,4,1,2,3,4,5,2,3,4,5,6,3,4,5,6,7,4,5,6,7,8,1,2,3,4,5,2,3,4,5,6,3,4,5,6,7,4,5,6,7,8,5,6,7,8,9,2,3,4,5,6,3,4,5,6,7,4,5,6,7,8,5,6,7,8,9,6,7,8,9,10,3,4,5,6,7,4,5,6,7,8,5,6,7,8,9,6,7,8,9,10,7,8,9,10,11
lpb $0
mov $2,$0
div $0,5
mod $2,5
add $1,$2
lpe
mov $0,$1
| 29.545455
| 205
| 0.526154
|
95201b745bdef725aa15e678c743e66ebb916c05
| 445
|
asm
|
Assembly
|
oeis/098/A098534.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/098/A098534.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/098/A098534.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A098534: Mod 3 analog of Stern's diatomic series.
; Submitted by Jamie Morken(s3)
; 0,1,1,2,3,2,2,4,3,4,7,5,6,5,5,4,6,4,4,8,6,8,8,7,6,10,7,8,15,11,14,10,12,10,13,11,12,11,11,10,12,10,10,11,9,8,14,10,12,10,10,8,12,8,8,16,12,16,13,14,12,17,14,16,18,16,16,17,15,14,17,13,12,22,16,20,18,17,14,22,15,16,31,23,30,20,26,22,27,25,28,20,24,20,26,22,24,22,22,20
lpb $0
sub $0,1
mov $3,$2
add $2,1
bin $3,$0
mod $3,3
add $1,$3
lpe
mov $0,$1
| 31.785714
| 269
| 0.613483
|
26e9e18744118b54aaccbd1d3b8b3b3cc30f6213
| 3,704
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1754.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_21829_1754.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_21829_1754.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r15
push %r9
push %rax
push %rcx
push %rsi
// Faulty Load
lea addresses_PSE+0x13d16, %rax
nop
nop
nop
nop
nop
sub %r9, %r9
mov (%rax), %r15w
lea oracles, %rcx
and $0xff, %r15
shlq $12, %r15
mov (%rcx,%r15,1), %r15
pop %rsi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_PSE', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_PSE', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 82.311111
| 2,999
| 0.663877
|
c54279371117afd33a76765361c95431fe756b12
| 571
|
asm
|
Assembly
|
data/baseStats/chikorita.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 16
|
2018-08-28T21:47:01.000Z
|
2022-02-20T20:29:59.000Z
|
data/baseStats/chikorita.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 5
|
2019-04-03T19:53:11.000Z
|
2022-03-11T22:49:34.000Z
|
data/baseStats/chikorita.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 2
|
2019-12-09T19:46:02.000Z
|
2020-12-05T21:36:30.000Z
|
;not added
db DEX_CHIKORITA ; pokedex id
db 45 ; base hp
db 49 ; base attack
db 65 ; base defense
db 45 ; base speed
db 50 ; base special
db GRASS ; species type 1
db GRASS ; species type 2
db 35 ; catch rate
db 64 ; base exp yield
INCBIN "pic/ymon/chikorita.pic",0,1 ; sprite dimensions
dw ChikoritaPicFront
dw ChikoritaPicBack
; attacks known at lvl 0
db TACKLE
db GROWL
db 0
db 0
db 3 ; growth rate
; learnset
tmlearn 3,6,8
tmlearn 10
tmlearn 18,21,22
tmlearn 31,32
tmlearn 33
tmlearn 0
tmlearn 50,51,55
db Bank(ChikoritaPicFront) ; padding
| 19.033333
| 56
| 0.716287
|
a0e9c0fa4deff079dd4e3c0378498c35d31f8928
| 790
|
asm
|
Assembly
|
tests/nasm/jump.asm
|
brenden7158/v86
|
c9e274dc6e8cc619d1b36d57a69299aee6a45a91
|
[
"BSD-2-Clause"
] | 12,700
|
2015-01-04T15:03:42.000Z
|
2022-03-31T06:43:06.000Z
|
tests/nasm/jump.asm
|
brenden7158/v86
|
c9e274dc6e8cc619d1b36d57a69299aee6a45a91
|
[
"BSD-2-Clause"
] | 566
|
2015-01-01T18:16:40.000Z
|
2022-03-31T19:59:10.000Z
|
tests/nasm/jump.asm
|
brenden7158/v86
|
c9e274dc6e8cc619d1b36d57a69299aee6a45a91
|
[
"BSD-2-Clause"
] | 1,182
|
2015-01-05T09:20:48.000Z
|
2022-03-31T12:16:52.000Z
|
global _start
section .data
align 16
%include "header.inc"
mov eax, 0
mov ebx, 0
mov ecx, 0
mov edx, 0
mov esi, 0
mov edi, 0
; skip
jmp .target1
inc eax
.target1:
; conditional jump up
.target2:
inc ebx
inc ecx
cmp ebx, 2
jne .target2
; conditional jump down
.target3:
cmp ebx, 4
je .target4
inc ebx
inc edx
jmp .target3
.target4:
call .fun
call .not_returning_fun
.after_call:
jmp .after_fun
.fun:
inc esi
ret
.not_returning_fun:
inc esi
jmp .after_call
inc esi
ret
.after_fun:
push .target5
ret
.target5:
; clear stack (pushed eip is not the same between vm and gdb execution)
mov dword [esp], 0
mov dword [esp-4], 0
%include "footer.inc"
| 12.95082
| 75
| 0.597468
|
e9299859eb3d0262d701f27d164f1ab410fda06f
| 500
|
asm
|
Assembly
|
s2/sfx-original/C6 - Ring Spill.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 9
|
2017-10-09T20:28:45.000Z
|
2021-06-29T21:19:20.000Z
|
s2/sfx-original/C6 - Ring Spill.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 12
|
2018-08-01T13:52:20.000Z
|
2022-02-21T02:19:37.000Z
|
s2/sfx-original/C6 - Ring Spill.asm
|
Cancer52/flamedriver
|
9ee6cf02c137dcd63e85a559907284283421e7ba
|
[
"0BSD"
] | 2
|
2018-02-17T19:50:36.000Z
|
2019-10-30T19:28:06.000Z
|
Sound46_RingSpill_Header:
smpsHeaderStartSong 2
smpsHeaderVoice Sound_Ring_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $02
smpsHeaderSFXChannel cFM4, Sound46_RingSpill_FM4, $00, $05
smpsHeaderSFXChannel cFM5, Sound46_RingSpill_FM5, $00, $08
; FM4 Data
Sound46_RingSpill_FM4:
smpsSetvoice $00
dc.b nA5, $02, $05, $05, $05, $05, $05, $05, $3A
smpsStop
; FM5 Data
Sound46_RingSpill_FM5:
smpsSetvoice $00
dc.b nRst, $02, nG5, $02, $05, $15, $02, $05, $32
smpsStop
| 23.809524
| 59
| 0.718
|
db495aca97c6b79ca2424cb82512dd6550e41702
| 274
|
asm
|
Assembly
|
programs/oeis/264/A264386.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/264/A264386.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/264/A264386.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A264386: Gergonne's 27-card trick with three piles: finding a card after three dealings with pile information.
; 1,10,19,4,13,22,7,16,25,2,11,20,5,14,23,8,17,26,3,12,21,6,15,24,9,18,27
add $0,27
seq $0,30102 ; Base-3 reversal of n (written in base 10).
div $0,3
add $0,1
| 34.25
| 112
| 0.69708
|
fbaed93edea03cd21e58cc93881bca964410be76
| 331
|
asm
|
Assembly
|
llvm/test/tools/llvm-ml/parse_only_errors.asm
|
mkinsner/llvm
|
589d48844edb12cd357b3024248b93d64b6760bf
|
[
"Apache-2.0"
] | 2,338
|
2018-06-19T17:34:51.000Z
|
2022-03-31T11:00:37.000Z
|
llvm/test/tools/llvm-ml/parse_only_errors.asm
|
mkinsner/llvm
|
589d48844edb12cd357b3024248b93d64b6760bf
|
[
"Apache-2.0"
] | 3,740
|
2019-01-23T15:36:48.000Z
|
2022-03-31T22:01:13.000Z
|
llvm/test/tools/llvm-ml/parse_only_errors.asm
|
mkinsner/llvm
|
589d48844edb12cd357b3024248b93d64b6760bf
|
[
"Apache-2.0"
] | 500
|
2019-01-23T07:49:22.000Z
|
2022-03-30T02:59:37.000Z
|
; RUN: not llvm-ml %s /Zs /Fo - 2>&1 | FileCheck %s
.code
t1 PROC
blah
ret
t1 ENDP
; check for the .text symbol (appears in both object files & .s output)
; CHECK-NOT: .text
; CHECK: error: invalid instruction mnemonic 'blah'
; check for the .text symbol (appears in both object files & .s output)
; CHECK-NOT: .text
end
| 17.421053
| 71
| 0.673716
|
47ce9e5b447466598e565768f643d91813573573
| 430
|
asm
|
Assembly
|
programs/oeis/289/A289121.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/289/A289121.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/289/A289121.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A289121: a(n) = (8 - 2*n + 11*n^2 - 6*n^3 + n^4)/4.
; 3,4,5,12,37,98,219,430,767,1272,1993,2984,4305,6022,8207,10938,14299,18380,23277,29092,35933,43914,53155,63782,75927,89728,105329,122880,142537,164462,188823,215794,245555,278292,314197,353468,396309,442930,493547,548382,607663
mov $1,$0
bin $0,2
add $1,4
lpb $0,1
sub $0,1
lpb $0,1
sub $0,1
add $2,2
add $1,$2
lpe
lpe
mul $1,2
sub $1,8
div $1,2
add $1,3
| 22.631579
| 229
| 0.651163
|
9416fa4e16f9f33ca438c90bfc894e00fa4da4c0
| 329
|
asm
|
Assembly
|
oeis/040/A040484.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/040/A040484.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/040/A040484.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A040484: Continued fraction for sqrt(507).
; Submitted by Jon Maiga
; 22,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1,14,1,1,44,1,1
seq $0,40256 ; Continued fraction for sqrt(273).
mul $0,7
div $0,5
| 41.125
| 190
| 0.629179
|
1e0ffd0e33c888eabfa5aad3aeae2d90916d421c
| 319
|
asm
|
Assembly
|
data/mapHeaders/CinnabarLabTradeRoom.asm
|
AmateurPanda92/pokemon-rby-dx
|
f7ba1cc50b22d93ed176571e074a52d73360da93
|
[
"MIT"
] | 9
|
2020-07-12T19:44:21.000Z
|
2022-03-03T23:32:40.000Z
|
data/mapHeaders/CinnabarLabTradeRoom.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 7
|
2020-07-16T10:48:52.000Z
|
2021-01-28T18:32:02.000Z
|
data/mapHeaders/CinnabarLabTradeRoom.asm
|
JStar-debug2020/pokemon-rby-dx
|
c2fdd8145d96683addbd8d9075f946a68d1527a1
|
[
"MIT"
] | 2
|
2021-03-28T18:33:43.000Z
|
2021-05-06T13:12:09.000Z
|
CinnabarLabTradeRoom_h:
db LAB ; tileset
db CINNABAR_LAB_TRADE_ROOM_HEIGHT, CINNABAR_LAB_TRADE_ROOM_WIDTH ; dimensions (y, x)
dw CinnabarLabTradeRoom_Blocks ; blocks
dw CinnabarLabTradeRoom_TextPointers ; texts
dw CinnabarLabTradeRoom_Script ; scripts
db 0 ; connections
dw CinnabarLabTradeRoom_Object ; objects
| 35.444444
| 85
| 0.840125
|
194de1b0a3820c3f9b46a1194d66bd63e5b67b7f
| 5,902
|
asm
|
Assembly
|
Transynther/x86/_processed/US/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_921.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/US/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_921.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/US/_ht_zr_un_/i9-9900K_12_0xa0.log_21829_921.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r8
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x448, %rsi
lea addresses_WC_ht+0x7c4c, %rdi
clflush (%rsi)
nop
sub $13968, %r8
mov $39, %rcx
rep movsl
cmp %rdx, %rdx
lea addresses_D_ht+0x1a0e8, %r12
clflush (%r12)
nop
nop
cmp $50617, %r13
mov $0x6162636465666768, %rdi
movq %rdi, %xmm4
vmovups %ymm4, (%r12)
nop
nop
and $13407, %rcx
lea addresses_UC_ht+0x13ee8, %rsi
lea addresses_UC_ht+0x12fca, %rdi
nop
nop
add %rbx, %rbx
mov $111, %rcx
rep movsb
nop
nop
nop
and $25135, %r13
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r9
push %rbp
push %rbx
push %rdx
push %rsi
// Store
lea addresses_normal+0x99e8, %rdx
nop
nop
nop
nop
nop
dec %rbx
mov $0x5152535455565758, %rsi
movq %rsi, %xmm5
vmovups %ymm5, (%rdx)
nop
add $27527, %r11
// Store
lea addresses_RW+0xda68, %r9
nop
nop
nop
nop
xor %rbx, %rbx
mov $0x5152535455565758, %rbp
movq %rbp, %xmm4
movups %xmm4, (%r9)
and %r9, %r9
// Store
lea addresses_US+0xc2e8, %rsi
nop
nop
nop
nop
cmp $24525, %r9
mov $0x5152535455565758, %r11
movq %r11, %xmm5
vmovups %ymm5, (%rsi)
xor %r11, %r11
// Load
lea addresses_normal+0xd328, %rbx
nop
nop
nop
nop
nop
and $46406, %r15
mov (%rbx), %r11d
nop
nop
sub $43295, %r9
// Faulty Load
lea addresses_US+0x66e8, %rbx
nop
nop
sub $62284, %rbp
movups (%rbx), %xmm4
vpextrq $1, %xmm4, %rdx
lea oracles, %rbx
and $0xff, %rdx
shlq $12, %rdx
mov (%rbx,%rdx,1), %rdx
pop %rsi
pop %rdx
pop %rbx
pop %rbp
pop %r9
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_normal', 'AVXalign': False, 'size': 32}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_RW', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_US', 'AVXalign': False, 'size': 32}}
{'src': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_normal', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': True, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 0, 'type': 'addresses_UC_ht'}}
{'49': 21779, '08': 10, '00': 27, '4f': 11, '0c': 1, 'ff': 1}
49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 4f 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 08 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49
*/
| 39.610738
| 2,999
| 0.657404
|
e9cf25f204b7432676a28379e35ed5690843a81d
| 203
|
asm
|
Assembly
|
programs/oeis/099/A099018.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/099/A099018.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/099/A099018.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A099018: Duplicate of A033484.
; 1,4,10,22,46,94,190,382,766,1534,3070,6142,12286,24574,49150,98302,196606,393214,786430,1572862,3145726,6291454,12582910,25165822
mov $1,2
pow $1,$0
mul $1,3
sub $1,2
| 25.375
| 131
| 0.743842
|
875b81d32fd49ac571c3a35c21d815845e58902c
| 639
|
asm
|
Assembly
|
oeis/249/A249332.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/249/A249332.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/249/A249332.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A249332: a(n) = Sum_{k=0..2*n} binomial(2*n, k)^4.
; Submitted by Jamie Morken(s1)
; 1,18,1810,263844,44916498,8345319268,1640651321764,335556407724360,70666388112940818,15220552520052960516,3337324864503769353060,742446552655157791828680,167167472732516775004539300,38021985442071415426063237704,8723111727436784830252513497928,2016277475070313406862575366771344,469091792592212007832514250586070802,109762725965439126630187654909206155460,25814269708975139795224092291989482522372,6098686860897668349080928303307519541729544,1446718438312854075616871168904119870741883748
mul $0,2
seq $0,5260 ; a(n) = Sum_{k = 0..n} binomial(n,k)^4.
| 91.285714
| 490
| 0.86698
|
567f0363b1332ba452a160b2c36743bd84177c5f
| 302
|
asm
|
Assembly
|
data/mapObjects/ssanne3.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 16
|
2018-08-28T21:47:01.000Z
|
2022-02-20T20:29:59.000Z
|
data/mapObjects/ssanne3.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 5
|
2019-04-03T19:53:11.000Z
|
2022-03-11T22:49:34.000Z
|
data/mapObjects/ssanne3.asm
|
adhi-thirumala/EvoYellow
|
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
|
[
"Unlicense"
] | 2
|
2019-12-09T19:46:02.000Z
|
2020-12-05T21:36:30.000Z
|
SSAnne3Object:
db $c ; border block
db $2 ; warps
db $3, $0, $0, SS_ANNE_5
db $3, $13, $7, SS_ANNE_2
db $0 ; signs
db $1 ; objects
object SPRITE_SAILOR, $9, $3, WALK, $2, $1 ; person
; warp-to
EVENT_DISP SS_ANNE_3_WIDTH, $3, $0 ; SS_ANNE_5
EVENT_DISP SS_ANNE_3_WIDTH, $3, $13 ; SS_ANNE_2
| 18.875
| 52
| 0.642384
|
9061b2710447463d375c34b5e1d92a4fc638e7c4
| 53,142
|
asm
|
Assembly
|
cmd/assign/assgmain.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
cmd/assign/assgmain.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
cmd/assign/assgmain.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
PAGE 90,132 ;
TITLE ASSGMAIN.asm - ASSIGN MAIN PROGRAM
;/*
; * Microsoft Confidential
; * Copyright (C) Microsoft Corporation 1991
; * All Rights Reserved.
; */
;****************** START OF SPECIFICATIONS *****************************
; MODULE NAME: ASSGMAIN.asm
;
; DESCRIPTIVE NAME: Reassigns drive specifications.
;
;FUNCTION: This program reassigns the specified drives to a new drive
; identifier.
;
; ENTRY POINT: ENTRY_POINT
;
; INPUT:
;
; ASSIGN [DRIVE] [DELIMITER] [DRIVE] [SW]
; where DRIVE = optional colon
; where DELIMITER = +;=TAB LF SPACE
; where SW = /STATUS or /STA
;
; where:
; /STATUS - reports back to the user
; the currently changed
; drive assignments and the
; new assignment drive
;
; Note:
; If a drive value has not been
; ASSIGN will report back nothing.
;
; UTILITY FUNCTION:
; Instructs DOS to route disk I/O
; for one drive into disk I/O to another
; drive. eg.
; a=c sets a: to c:
;
; EXIT-NORMAL: Assigned drives or reassigned drives
;
; EXIT-ERROR: Any one of the possible parse errors
;
; INTERNAL REFERENCES:
; ROUTINES: SYSPARSE:near (INCLUDEd in PARSE.asm)
; SYSLOADMSG
; SYSDISPMSG
;
;
; EXTERNAL REFERENCES:
; ROUTINES: none
;
; NOTES:
; This module should be processed with the SALUT preprocessor
; with the re-alignment not requested, as:
;
; SALUT ASSPARM,NUL;
;
; To assemble these modules, the sequential
; ordering of segments may be used.
;
; For LINK instructions, refer to the PROLOG of the main module,
; ASSIGN.asm
;
; REVISION HISTORY: AN000 - Version 4.00: PARSER, System Message Handler,
; Status report
;
; COPYRIGHT: "Microsoft DOS ASSIGN Utility"
; "Version 4.00 (C)Copyright 1988 Microsoft"
; "Licensed Material - Program Property of Microsoft"
;
;
; AN000 -> New Code
;
; AN001 -> PTM P3954 Release the environmental vector and close
; all handles.
;
; AN002 -> PTM P3918 Parse error messages must conform to spec.
; All parse error messages should display
; the offending parameters.
;
;
;****************** END OF SPECIFICATIONS *****************************
;*********************************************
;* *
;* UTILITY NAME: ASSIGN.COM *
;* *
;* SOURCE FILE NAME: ASSIGN.asm *
;* *
;* STATUS: ASSIGN utility *
;* PC-DOS Version 3.40 *
;* *
;* SYNTAX (Command line) *
;* *
;* ASSIGN [DRIVE] [DELIMITER] [DRIVE] [SW] *
;* where DRIVE = optional colon *
;* where DELIMITER = +;=TAB LF SPACE *
;* where SW = /STATUS or /STA *
;* *
;* where: *
;* /STATUS - reports back to the user *
;* the currently changed *
;* drive assignments and the *
;* new assignment drive *
;* Note: *
;* If a drive value has not been *
;* ASSIGN will report back nothing. *
;* *
;* UTILITY FUNCTION: *
;* Instructs DOS to route disk I/O *
;* for one drive into disk I/O to another *
;* drive. eg. *
;* a=c sets a: to c: *
;*********************************************
page
DEBUG = 0
.xlist
INCLUDE SYSMSG.INC ;AN000;
INCLUDE SYSVAR.INC
INCLUDE CURDIR.INC
INCLUDE MULT.INC
INCLUDE PDB.INC
INCLUDE INT2A.INC
MSG_UTILNAME <ASSIGN>
.list
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
BREAK <MACRO DEFINITIONS>
BREAK MACRO subtitle
.XLIST
SUBTTL subtitle
.LIST
PAGE
ENDM
.xcref break
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CallOperRange macro low,high,routine ;;NS-macro to call subroutines
?call = low ;;NS-in the given call range
;;NS-starting call value = low #
rept (high-low)+1 ;;NS-calculate the entry point
CallOper ?call,routine ;;NS-into the table then execute
?call = ?call + 1 ;;NS-increment call value to next
endm
endm
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CallOper macro call,routine ;;NS-macro that calls a single
;;NS-subroutine that is used in
;;NS-the above macro loop CallOperange
ORG (SysTab-ASSIGN_BASE)+(call*2) ;;NS-Calculate entry point into
DW OFFSET CODE:routine ;;NS-code where SysTab is the
ENDM ;;NS-entry point to the tables
;;NS-ASSIGN_BASE is at 0:0000
;;NS-the (call*2) is calculated
;;NS-to take into account two bytes
;;NS-and final OFFSET statement points
;;NS-code to be executed at the given
;;NS-label
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
; $SALUT (0,36,40,48)
MyINT21 macro ;;NS-macro used to save
pushf ;;NS-the flags to maintain
call system ;;NS-DOS environment
endm
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
SaveReg MACRO reglist ;; push those registers
IRP reg,<reglist>
?stackdepth = ?stackdepth + 1
PUSH reg
ENDM
ENDM
.xcref SaveReg
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
RestoreReg MACRO reglist ;; pop those registers
IRP reg,<reglist>
?stackdepth = ?stackdepth - 1
POP reg
ENDM
ENDM
.xcref RestoreReg
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
page
BREAK <DOS FUNCTIONS, AND OTHER EQUATES>
; $SALUT (0,23,28,41)
; DOS FUNCTIONS USED
; (DEC) (HEX)
NO_ERROR equ 0 ;return code zero from the parser
;********** CNS *****************
;Std_Con_String_Output EQU 9 ; 9
PSP_Env equ 2ch ;Environmental vector segment in PSP ;an001; dms;
Get_PSP equ 62h ; DOS function call to get PSP address ;an001; dms;
Handle_Close equ 3eh ;close handle ;an001; dms;
Set_Default_Drive EQU 14 ; E
Get_Default_Drive EQU 25 ; 19
Set_Interrupt_Vector EQU 37 ; 25
Get_Version EQU 48 ; 30
Keep_Process EQU 49 ; 31
Get_Interrupt_Vector EQU 53 ; 35
Get_Drive_Freespace EQU 54 ; 36
Exit EQU 76 ; 4C
Dealloc EQU 73 ; 49
Get_In_Vars EQU 82 ; 52
Get_Set_Media_ID equ 69h ; 69h
IOCTL_READ_BLOCK EQU 4404H ;READ FROM BLOCK DEVICE
IOCTL_WRITE_BLOCK EQU 4405H ;WRITE TO A BLOCK DEVICE
IOCTL_BLOCK_CHANGE EQU 4408H ;BLOCK DEVICE CHANGEABLE
IOCTL_BLOCK_REMOTE EQU 4409H ;BLOCK DEVICE REMOTE
; VECTORS REFERENCED
PGM_TERM EQU 20H
DOS_CALL EQU 21H
CTL_BREAK EQU 23H
CRIT_ERR EQU 24H
ABS_DISK_READ EQU 25H
ABS_DISK_WRITE EQU 26H
stay equ 27h ;NS stay interrupt value
int_IBM EQU 2AH ;critical section maintenance
MULTIPLEXOR EQU 2FH ;MULTIPLEXOR INTERRUPT VECTOR NUMBER
; CONSTANTS USED ACROSS THE MULTIPLEXOR INTERFACE
MPLEX_ID EQU 06H ;ID OF ASSIGN IN MPLEX CHAIN
MPLEX_R_U_THERE EQU 0 ;MPLEX FUNCTION: ARE YOU THERE?
MPLEX_GET_SEG EQU 1 ;MPLEX FUNCTION: GET SEG OF INSTALLED ASSIGN
MPLEX_INSTALLED EQU 0FFH ;"I AM HERE" RETURN VALUE
; OTHER EQUATES
cr equ 0dh ;CARRIAGE RETURN
LF EQU 0AH ;LINE FEED
f_Interrupt EQU 0000001000000000B ;NS - mask used for interrupt
;NS value
BREAK <ENTRY POINT FOR CODE, EXTRNS>
; $SALUT (4,15,21,41)
code segment para public ;NS code all in one segment
assume cs:code
; one segment
page
ASSIGN_BASE: ;NS- starting point of loaded file
org 100h
ENTRY_POINT:
jmp INITIALIZATION ;JUMP TO INITIALIZATION
; = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
BREAK <TABLES AND LOCAL WORKAREAS>
drives db 1,2,3,4,5,6,7,8,9 ;drive values used in comparison
db 10,11,12,13,14,15,16,17,18,19 ;against default or found drive
db 20,21,22,23,24,25,26
default_drive db ?
drive_save db ? ; saved drive byte
drive_address dw ? ; location (from DS) of drive byte
drive_save2 db ? ; second saved drive byte
;******************************************************************************
;******************************************************************************
system dd ?
int25_vec dd ? ;NS - Hooks for the Int 2f handler preparation
int26_vec dd ? ;NS - Hooks for the Int 2f handler preparation
int2F_vec dd ? ;NS - Area to be hooked in and remain resident
user_ret dd ? ; ???????????????????????????????????????
saveIntF dw ? ; ???????????????????????????????????????
I21_Func db ? ; Save area for INT21 function requested -->RW
; $SALUT (4,9,23,41)
EVEN
SysTab label word ;NS-Beginning of the call,subroutine table
CallOper 00h,DoReset
CallOperRange 01h,0Ch,DoNothing ; done ????????????????????????
CallOper 0Dh,DoReset ; done ????????????????????????
CallOper 0Eh,DoSetDefault
CallOperRange 0Fh,17h,DoFCB ; done ????????????????????????
CallOper 18h,DoReset ; done ????????????????????????
CallOper 19h,DoGetDefault ; ????????????????????????
CallOperRange 1Ah,1Bh,DoReset ; done ????????????????????????
CallOper 1Ch,DoDL ; done ????????????????????????
CallOperRange 1Dh,20h,DoReset ; done ????????????????????????
CallOperRange 21h,24h,DoFCB ; done ????????????????????????
CallOperRange 25h,26h,DoReset ; done ????????????????????????
CallOperRange 27h,28h,DoFCB ; done ????????????????????????
CallOperRange 29h,31h,DoReset ; done ????????????????????????
CallOper 32h,DoDL ; done ????????????????????????
CallOperRange 33h,35h,DoReset ; done ????????????????????????
CallOper 36h,DoDL ; done ????????????????????????
CallOperRange 37h,38h,DoReset ; done ????????????????????????
CallOperRange 39h,3Dh,DoAscii ; done ????????????????????????
CallOperRange 3Eh,40h,DoReset ; done ????????????????????????
CallOper 41h,DoAscii ; done ????????????????????????
CallOper 42h,DoReset ; done ????????????????????????
CallOper 43h,DoAscii ; done ????????????????????????
CallOper 44h,DoIOCTL ; done ????????????????????????
CallOperRange 45h,46h,DoReset ; done ????????????????????????
CallOper 47h,DoDL ; done ????????????????????????
CallOperRange 48h,4Ah,DoReset ; done ????????????????????????
CallOper 4Bh,DoExec ; done ????????????????????????
CallOperRange 4Ch,4Dh,DoReset ; done ????????????????????????
CallOper 4Eh,DoAscii ; done ????????????????????????
CallOperRange 4Fh,55h,DoReset ; done ????????????????????????
CallOper 56h,DoRename ; done ????????????????????????
CallOperRange 57h,59h,DoReset ; done ????????????????????????
CallOperRange 5Ah,5Bh,DoAscii ; done ????????????????????????
CallOperRange 5Ch,5Fh,DoReset ; done ????????????????????????
CallOper 60h,DoTranslate ; done ????????????????????????
CallOperRange 61h,63h,DoReset ; done ????????????????????????
CallOperRange 64h,69h,DoSetGetMedia ;done ????????????????????????
CallOperRange 6ah,6bh,DoNothing ;done ????????????????????????
CallOper 6ch,DoAscii_DS_SI ;done ?????????????????????????
; ????????????????????????
page
; $SALUT (4,5,11,36)
MAXCLL EQU 6CH ; High bound of table
org (systab-ASSIGN_BASE) + (2 * (MAXCLL + 1)) ;NS - Beginning of code starts at
;NS - Beginning of table + 128 bytes
BREAK <ASSIGN INTERRUPT HANDLER>
ASSIGN_HANDLER:
mov SaveIntf,f_interrupt ;NS- Move in the mask into a saved area
SaveReg <AX,BX> ;NS- ??????????????????????????????????
cmp ah,MAXCLL ; Do a high bound check on the call
; so we don't index past the end of
ja DoNothing ; the table on a bogus call
mov al,ah ;NS- Call must be in the 0 - 63h range
cbw ;NS- zero out the high byte now
;NS- AX has 0 & call number
shl ax,1 ;NS- Double the value in AX
mov bx,ax ;NS- Move the value into BX to
jmp systab[bx] ;NS- access the call number & subroutine
;NS- bx bytes into the tbl
;***********************************************************************************
EnterAssign: ;NS- make sure system intact by doing
call LeaveAllAssign ;NS- error recovery check
push ax ;NS- before making code
mov ax,8000h + critAssign ;NS- non- reentrant if unable
INT INT_IBM ;(2AH) NS- to screen out successfully
POP AX ;NS- LeaveAllAssign will be executed
RET ;return NS- and the critical section will be reset
;************************************************************************************
LeaveAssign: ;NS- restore re-entrancy to
push ax ;NS- the code after & only
mov ax,8100h + critAssign ;NS- after this call has been
INT INT_IBM ;(2AH) NS- made or the error recovery
POP AX ;NS- call has been made
RET ;return NS-
;************************************************************************************
LeaveAllAssign: ;NS- Error recovery call
push ax ;NS- to restore the Assigns
mov ax,8908h ;NS- critical section
int INT_IBM ;(2AH) NS- if ASSIGN has encountered
pop ax ;NS- a problem on entrance or departure
RET ;return NS-
;************************************************************************************
;
; Reset the exclusion flag ;NS- Reset to Assign
; ;NS- critical section state
DoReset: ;NS-
call LeaveAllAssign ;NS-
;NS-
;****************************************************************************************
;
; The system call needed no special processing. Go do it directly.
;
DoNothing: ;NS-System registers and flags still
RestoreReg <bx,ax> ;NS-intact it has not been clobbered
jmp system ;NS-by ASSIGN code
page
;************************************************************************************
;
; Munge the drive byte in an FCB pointed to by DS:DX.
; "MUNGE" ? (Webster will turn over in his gravy...)
;
DoFCB:
mov bx,dx ; indexable pointer
mov al,[bx] ; get drive
cmp al,0ffh ; extended fcb?
jnz DoMapDrive ; no
add bx,7 ; yes, advance past it
mov al,[bx] ; get read drive byte
DoMapDrive:
or al,al ; default drive?
; $IF Z ;YES
JNZ $$IF1
mov al,default_drive ; get default drive
;
; DS:BX points to the drive byte being munged. AL is the old value. Save
; it away.
;
; $ENDIF ;AC000;
$$IF1:
;SaveFCB:
call EnterAssign ; NS-Enter Assign's critical section
mov drive_save,al ; NS-save the drive assignment
call mapdrv1 ; NS-now let's map it to the
mov [bx],al ; NS-numeric drive associated in
; NS-in drive range 1 to 26
;******************************************************************************
; The FCB has been converted. Now let's POP off the user's info and do the
; system call. Note that we are no longer reentrant!
;
mov drive_address,bx ; NS- location of drive value
RestoreReg <BX,AX> ; get back original registers
pop word ptr user_ret ; restore his IP
pop word ptr user_ret+2 ; restore his CS
call GotoCLI ; NS- Clear out old interrupts
; NS- before an IRET is issued
; NS- update the current
call system ; flags saved => this is a system call
pushf ; NS- re-adjust the stack
call RestInt ; NS- and setup the environment
SaveReg <ax,bx> ; NS- with drive and the drive address
mov bx,drive_address ; NS- before leaving the Assign critical
mov al,drive_save ; NS- section
mov [bx],al
RestoreReg <bx,ax>
push word ptr user_ret+2 ; push back user's cs
push word ptr user_ret ; push back user's ip
Call LeaveAssign
iret ; back to user
page
;************************************************************************************
;
; Munge the user's ASCIZ string at DS:DX.
;
DoAscii:
mov bx,dx ; point to area
cmp byte ptr [bx+1],':' ; drive letter present?
jnz DoNothing ; nope, ignore this
;
; There is a drive leter present. Grab it and convert it
;
mov al,[bx] ; get drive letter
call EnterAssign ; NS- Re-enter ASSIGN crit section
mov drive_save,al ; remember previous contents
call maplet ; convert to real drive letter
mov [bx],al ; place in new drive letter
mov drive_address,bx
RestoreReg <BX,AX> ; get back original registers
pop word ptr user_ret ; restore his IP
pop word ptr user_ret+2 ; restore his CS
call GotoCLI ; clean up stack
call system ; flags saved => this is a system call
pushf ; save all drive info
call RestInt ; NS- clean up environment before
SaveReg <ax,bx> ; NS- returning to the user's environment
mov bx,drive_address ; NS- to ask on the next ASSIGN entrance
mov al,drive_save
mov [bx],al
RestoreReg <bx,ax>
push word ptr user_ret+2 ; push back user's cs
push word ptr user_ret ; push back user's ip
Call LeaveAssign ; NS- exit ASSIGN crit. section
iret ; back to user
;************************************************************************************
;
; Munge the user's ASCIZ string at DS:SI.
;
DoAscii_DS_SI:
mov bx,si ; point to area
cmp byte ptr [bx+1],':' ; drive letter present?
; $if ne ; drive letter not present
JE $$IF3
jmp DoNothing ; nope, ignore this
; $endif ;
$$IF3:
;
; There is a drive leter present. Grab it and convert it
;
mov al,[bx] ; get drive letter
call EnterAssign ; NS- Re-enter ASSIGN crit section
mov drive_save,al ; remember previous contents
call maplet ; convert to real drive letter
mov [bx],al ; place in new drive letter
mov drive_address,bx
RestoreReg <BX,AX> ; get back original registers
pop word ptr user_ret ; restore his IP
pop word ptr user_ret+2 ; restore his CS
call GotoCLI ; clean up stack
call system ; flags saved => this is a system call
pushf ; save all drive info
call RestInt ; NS- clean up environment before
SaveReg <ax,bx> ; NS- returning to the user's environment
mov bx,drive_address ; NS- to ask on the next ASSIGN entrance
mov al,drive_save
mov [bx],al
RestoreReg <bx,ax>
push word ptr user_ret+2 ; push back user's cs
push word ptr user_ret ; push back user's ip
Call LeaveAssign ; NS- exit ASSIGN crit. section
iret ; back to user
page
;************************************************************************************
;
; DoDL - the drive to map is in DL.
;
DoDL:
or dl,dl ; NS- check for drive mapping
; $IF Z ;AC000;;USE DEFAULT DRIVE
JNZ $$IF5
DNJ1:
jmp DoNothing ; NS- default drive was requested
; NS- thus no mapping needed
; $ENDIF ;AC000;
$$IF5:
mov al,dl ; NS- not default case so no need doctor
call EnterAssign ; NS- so enter ASSIGN crit. section again
mov drive_save,al ; preserve old drive
call mapdrv1
mov dl,al ; drive is mapped
RestoreReg <BX,AX> ; get back registers
mov I21_Func,ah ; Save requested function call -->RW
pop word ptr user_ret ; restore his IP
pop word ptr user_ret+2 ; restore his CS
call GotoCLI
call system ; flags saved => this is a system call
pushf ;
call RestInt
cmp I21_Func,GET_DRIVE_FREESPACE ;(36h) If call returns info in DX, -->RW
; NS- DL in both cases Func 36
; NS- Func 1Ch are both used for
; NS- drive input we don't want to
; NS- the old drives so they should not
; restored as the old value - use ASSIGN's
je Dont_Restore_DL ;AC000;;THEN DO CHANGE IT
cmp I21_Func,1ch ; If call returns info in DX, -->RW
;(NOTE 1CH IS NOT DEFINED IN SYSCALL.INC. EK)
je Dont_Restore_DL ;AC000;;THEN DO CHANGE IT
mov dl,drive_save ; restore his dl
;DONT_RESTORE_DL:
Dont_Restore_DL:
push word ptr user_ret+2 ; push back user's cs
push word ptr user_ret ; push back user's ip
Call LeaveAssign
iret ; back to user
;************************************************************************************
; Map the IOCTL drives in BX ; NS- this section handles
; NS- INT21 calls to get drive info
DoIOCTL:
RestoreReg <BX,AX>
SaveReg <AX,BX>
cmp ax,IOCTL_READ_BLOCK ;(4404h) IOCTL read string from block dev
jz DoMapBX ;AC000;
; jz DoMapBX
cmp ax,IOCTL_WRITE_BLOCK ;(4405h) IOCTL write string from block dev
jz DoMapBX ;AC000;
; jz DoMapBX
cmp ax,IOCTL_BLOCK_CHANGE ;(4408h) IOCTL is removable
jz DoMapBX ;AC000;
; jz DoMapBX
cmp ax,IOCTL_BLOCK_REMOTE ;(4409h) IOCTL block dev redir (network)
jnz DNJ2 ;AC000;;NORMAL CALL
;DoMapBX:
DoMapBX:
or bx,bx ; NS- drive letter associated in BL
jz DNJ2
mov al,bl ; not the default case
call EnterAssign
mov drive_save,al ; remember drive
call mapdrv1 ; NS- time to map drive to new assoc.
mov bl,al ; drive is mapped
RestoreReg <AX,AX> ; get back registers (throw away BX)
pop word ptr user_ret ; restore his IP
pop word ptr user_ret+2 ; restore his CS
call GotoCLI
call system ; flags saved => this is a system call
pushf
call RestInt
mov bl,drive_save ; restore his dl
push word ptr user_ret+2 ; push back user's cs
push word ptr user_ret ; push back user's ip
Call LeaveAssign
iret ; back to user
DNJ2:
jmp DoNothing
DoSetGetMedia:
RestoreReg <BX,AX> ;an000; dms;restore regs
SaveReg <AX,BX> ;an000; dms;save regs
cmp ah,Get_Set_Media_ID ;an000; dms;trap on get/set media id
; $if z ;an000; dms;found
JNZ $$IF7
or bl,bl ;an000; dms;drive letter entered
; $if nz ;an000; dms;yes
JZ $$IF8
mov al,bl ; not the default case
call EnterAssign
mov drive_save,al ; remember drive
call mapdrv1 ; NS- time to map drive to new assoc.
mov bl,al ; drive is mapped
RestoreReg <AX,AX> ; get back registers (throw away BX)
pop word ptr user_ret ; restore his IP
pop word ptr user_ret+2 ; restore his CS
call GotoCLI
call system ; flags saved => this is a system call
pushf
call RestInt
mov bl,drive_save ; restore his dl
push word ptr user_ret+2 ; push back user's cs
push word ptr user_ret ; push back user's ip
Call LeaveAssign
; $else ;an000; dms;not valid function 69h
JMP SHORT $$EN8
$$IF8:
jmp DoNothing ;an000; dms;pass to interrupt
; $endif ;an000; dms;
$$EN8:
; $else ;an000; dms;
JMP SHORT $$EN7
$$IF7:
jmp DoNothing ;an000; dms;pass to interrupt
; $endif ;an000; dms;
$$EN7:
iret ; back to user
page
;************************************************************************************
;
; Map the drive letter and forget about it. EXEC never returns.
;
DoExec:
RestoreReg <BX,AX>
SaveReg <AX,BX>
or al,al
; $IF Z ;AC000;;IS LOAD GO, NOT USE NORMAL STUFF
JNZ $$IF13
mov bx,dx ; point to area
DoOnce:
cmp byte ptr [bx+1],':' ; drive letter present?
; $IF Z ;AC000;;YES
JNZ $$IF14
;
; There is a drive leter present. Grab it and convert it
;
mov al,[bx] ; get drive letter
call maplet ; convert to real drive letter
mov [bx],al ; place in new drive letter
; $ENDIF ;AC000;
$$IF14:
DNJ3:
jmp DoNothing ; restore and go on!
; $ENDIF
$$IF13:
;DAJ:
jmp DoAscii
;************************************************************************************
;
; Map the drive letter at DS:SI. We need to un-map it at the end.
;
DoTranslate:
mov bx,SI ; point to area
cmp byte ptr [bx+1],':' ; drive letter present?
jnz DNJ3 ; nope, ignore this
;
; There is a drive leter present. Grab it and convert it
;
mov al,[bx] ; get drive letter
call EnterAssign
mov drive_save,al ; remember previous contents
call maplet ; convert to real drive letter
mov [bx],al ; place in new drive letter
mov drive_address,bx
RestoreReg <BX,AX> ; get back original registers
pop word ptr user_ret ; restore his IP
pop word ptr user_ret+2 ; restore his CS
call GotoCLI
call system ; flags saved => this is a system call
pushf
call RestInt
SaveReg <ax,bx>
mov bx,drive_address
mov al,drive_save
mov [bx],al
RestoreReg <bx,ax>
push word ptr user_ret+2 ; push back user's cs
push word ptr user_ret ; push back user's ip
Call LeaveAssign
iret ; back to user
page
;************************************************************************************
;
; Munge the user's ASCIZ string at DS:DX and es:di
;
DoRename:
mov bx,dx ; point to area
mov ax,[bx]
call EnterAssign
mov drive_save,al
mov drive_address,bx
cmp ah,':' ; drive letter present?
; $IF Z ;AC000;
JNZ $$IF17
call maplet ; convert to real drive letter
mov [bx],al ; place in new drive letter
; $ENDIF ;AC000;
$$IF17:
;DoES:
mov ax,es:[di] ;NS- Get the 2nd drive from the command linepSOP
mov drive_save2,al ;NS- Save possible drive
cmp ah,':' ;NS- exclude if no colon present
; $IF Z ;AC000;
JNZ $$IF19
call maplet ;NS- go convert letter to actual drive #
mov es:[di],al ;NS- new drive value
; $ENDIF ;AC000;
$$IF19:
;DoIt:
RestoreReg <BX,AX> ; get back original registers
pop word ptr user_ret ; restore his IP
pop word ptr user_ret+2 ; restore his CS
call GotoCLI
call system ; flags saved => this is a system call
pushf
call RestInt
SaveReg <ax,bx>
mov al,drive_save2 ; NS- get the second drive update
mov es:[di],al ; NS- on the command line
mov bx,drive_address ;
mov al,drive_save ;
mov [bx],al ;
RestoreReg <bx,ax> ;
push word ptr user_ret+2 ; push back user's cs
push word ptr user_ret ; push back user's ip
Call LeaveAssign
iret ; back to user
;************************************************************************************
;
; DoGetDefault - return our idea of the current drive...
;
DoGetDefault:
call Assign_Check
; $IF Z ;AC000;
JNZ $$IF21
;DNJ4:
jmp DoNothing
; $ENDIF ;AC000;
$$IF21:
RestoreReg <BX,AX>
mov al,default_drive
dec al
iret
page
;************************************************************************************
;
; DoSetDefault - try to set to the mapped current drive. If we can do it,
; then OK, else oops!
;
DoSetDefault:
RestoreReg <BX,AX>
mov al,dl ; get new drive
inc al ; convert it to 1-based
call EnterAssign
mov drive_save,al ; remember what we're doing
call mapdrv1 ; convert drive
dec al ; convert back to 0-based
mov dl,al ; stick back in correct register
mov drive_save2,al ; remember more of what we're doing
MyInt21 ; try the set
push ax ; save return info from set
mov ah,Get_Default_Drive ;(29h)
MyInt21
mov dl,drive_save
dec dl ; Restore users original value
cmp al,drive_save2 ; Did the set work?
; $IF Z ;AC000;;YES!
JNZ $$IF23
mov al,drive_save
mov default_drive,al ; Set ours too, it's valid!
; $ENDIF ;AC000;
$$IF23:
;BadDrive:
pop ax ; Set return info
call LeaveAssign
iret
;************************************************************************************
;
; Maintain the CLI state upon the next IRET. Flags for the IRET are on the
; stack just under the return address. This means saving the current state
; of the int flag and then turning off the saved version.
;
GotoCLI:
push ax
push bp
mov bp,sp
; bp ax ret f
mov ax,[bp + 2 + 2 + 2]
and SaveIntf,ax ; save those interrupts
and word ptr [bp + 2 + 2 + 2],not f_interrupt
pop bp
pop ax
ret
;
;************************************************************************************
; Restore he saved interrupt flag for the user. His flags are on the stack
; just above the RET.
;
RestInt:
push ax
push bp
mov bp,sp
mov ax,SaveIntf
; bp ax ret f
or [bp + 2 + 2 + 2],ax
pop bp
pop ax
ret
;************************************************************************************
mapdrv0: ;a = 0 , b = 1
inc al
; $IF NZ ;AC000;
JZ $$IF25
call mapdrv1
; $ENDIF ;AC000;
$$IF25:
;Wrap0:
dec al
ret
;************************************************************************************
mapdrv1:
cmp al,26
; $IF NA ;AC000;
JA $$IF27
cmp al,0 ; check for default
; $IF Z ;AC000;
JNZ $$IF28
mov al,default_drive
mov drive_save,al
; $ENDIF ;AC000;
$$IF28:
push bx ;a = 1, b = 2
push cx
mov ch,ah
cbw
mov bx,offset drives-1
add bx,ax
mov al,cs:[bx]
mov ah,ch
pop cx
pop bx
; $ENDIF ;AC000;
$$IF27:
ret
;************************************************************************************
maplet:
cmp al,'A'
jb LetDone
cmp al,'Z'
jbe DoMapLet
cmp al,'a'
jb LetDone
cmp al,'z'
ja LetDone
DoMapLet:
or al,20h
sub al,"a"-1
call mapdrv1
add al,40h
LetDone:
ret
page
;************************************************************************************
int25:
call mapdrv0
jmp int25_vec
int26:
call mapdrv0
jmp int26_vec
int2F:
CMP AH,mplex_id ;(06h) is this our multiplex?
; $IF NE ;AC000;;NO
JE $$IF31
jmp int2F_vec ; No, Chain to next guy
; $ENDIF ;AC000;
$$IF31:
;MINE:
CMP AL,mplex_get_seg ;(01h)
;0 AND 1 ARE THE ONLY ALLOWED FUNCTIONS
; $IF NA ;AC000;;IF NOT SOME OTHER NUMBER,
JA $$IF33
; $IF E ;AC000;;IF FUNCTION REQUEST IS 01
JNE $$IF34
;RETURN THE SEGID IN ES
PUSH CS
POP ES ; Call 1 gets our segment in ES
; $ENDIF ;AC000;
$$IF34:
;QUER:
MOV AL,MPLEX_INSTALLED ;(0FFh) I AM here
; $ENDIF
$$IF33:
;RESERVED_RET:
IRET
;************************************************************************************
assign_check:
push si
push ax
push cx
xor ax,ax
mov si,ax
mov cx,26
; $SEARCH ;AC000;
$$DO37:
;scn:
mov al,drives[si]
INC SI
cmp ax,si
; $EXITIF NZ,NUL ;AC000;
JNZ $$SR37
; $ENDLOOP LOOP ;AC000;
LOOP $$DO37
xor ax,ax ; reset z flag
; $ENDSRCH ;AC000;
$$SR37:
;scndone:
pop cx
pop ax
pop si
ret
prog_size = ($-ASSIGN_BASE+15)/16
page
;************************************************************************************
; TRANSIENT CODE
;************************************************************************************
;*********************************************
;* *
;* Subroutine name: Initialization *
;* *
;* Purpose: Process the command line. *
;* If there are no errors update *
;* the drive table according to *
;* the drive assignments, terminate *
;* and stay resident. If status switch *
;* set and the drive values have been *
;* altered display drive is set to *
;* 2nd drive. *
;* *
;* Input: Command line (described in header) *
;* *
;* Output: Table will be updated and resident*
;* code will be hooked in. *
;* *
;* Normal Exit: Valid drives, sufficient *
;* memory. *
;* Error Conditions: *
;* Incorrect DOS Version *
;* Invalid Parameter *
;* Invalid switch *
;*Externals: *
;* PROCESS_PATH *
;* REPORT_STATUS *
;* EXIT_PROG *
;* *
;*********************************************
; *****************************************
; * INITIALIZATION *
; *****************************************
; * *
; * CALL SYSLOADMSG *
; * Do DOS Versinon Check *
; * CALL SYSDISPMSG *
; * IF <> X.X then *
; * Display message *
; * Message number 1 *
; * (001 - Incorrect DOS Version) *
; * exit *
; * .ENDIF *
; * Continue *
; * *
; * Establish address of the *
; * PDB environment *
; * (Process Data Block ) *
; * .IF NO SPACE free de-allocate (49)*
; * memory at the environment *
; * address *
; * .ENDIF *
; *****************************************
;*******************************************************************************
BREAK <INITIALIZATION - NOT STAY RESIDENT>
EXTRN SYSPARSE:NEAR ;AN000;
ODDX equ 01H ;AN000;
EVENX equ 00H ;AN000;
PAD_CHAR equ ' ' ;AN000;
SEMICOLON equ ';' ;AN000;
SPACE equ ' ' ;AN000;
EQUAL equ '=' ;AN000;
PLUS equ '+' ;AN000;
good_parse_finish equ 0ffffh ;an000;
;******************************************************************************
STATUS_ONLY db 0 ;AN000;
STRING_CTR db 0 ;AN000;
STATUS_FLAG db 0 ;AN000;
OPTIONS_FLAG db 0 ; non-0 if options wanted
ERR_CODE db 0 ;AN000;
POS_FLAG db 'n' ;AN000;
PARMS_AVAIL db 'n' ;AN000;
PAR_RETC dw 0 ;AN000; used for the return code
DRV_X db 0 ;AN000; from the parser
save_dr_tbl_ptr dw ? ;an000;drive table pointer
curr_es_seg dw ?
Parm_Ptr1 dw ? ;an002;ptr to parse parm
Parm_Ptr2 dw ? ;an002;ptr to parse parm
inv dd ?
STring dd ? ;AN000;string holder
INCLUDE ASSGPARM.INC ;AN000;
INCLUDE ASSGMSG.INC ;AN000;
assume cs:code, ds:code, ss:code, es:code
INITIALIZATION:
push ax ;an000; save ax
mov ax,ds ;an000; get the current ds
mov SEG_1,ax ;an000; set sublist table
mov SEG_2,ax ;an000; set sublist table
pop ax ;an000; restore ax
call SYSLOADMSG ;AN000; ;does DOS version check
; $IF C ;AN000;
JNC $$IF41
;remainder of info given
call SYSDISPMSG ;AN000; ;by the msg retriever
;message and exit
call EXIT_PROG ;AC000; ;(4CH) Terminate function
; $ENDIF
$$IF41:
page
;************************************* CNS ************************************
; *****************************************
; * INITIALIZATION *
; *****************************************
; * *
; * Make internal DOS function call (52h)*
; * to process the data block *
; * information after mem is available *
; ******************************************
;************************************* CNS ************************************
;OKDOS:
mov ax,ds:[pdb_environ] ;get your Process Data Block Address
or ax,ax ;check to see if space available
; $IF NZ ;AC000;
JZ $$IF43
; jz nofree
push es ; save code segment value
mov es,ax ; de-allocate memory
mov ah,dealloc ;(49H)
int DOS_CALL
pop es ;restore code segment value
; $ENDIF ;ACx00;
$$IF43:
;nofree:
push es ;an000; save es
mov ah,Get_In_Vars ;(52H)
int DOS_CALL
mov Word ptr inv,bx
mov Word ptr inv+2,es
pop es ;an000; restore es
;******************************************************************************
;
; *****************************************
; * Establish addressability *
; * to command line parms (DS:SI) *
; * Establish addressability to PARM *
; * control block (ES:DI) *
; * *
; *****************************************
;*******************************************************************************
;parser es & ds now points at the command line
cld ;clear the directional flag
;decrement mode - maintanis pointer without
;advancement
mov di,offset ASS_PARMS ;AC000; ;set index to the location of your PARAMETER
;PARSER control block
mov si,81h ;AC000; ;set index to the beginning of the commandline
;at 81h to the first 128 bytes
page
;******************************************************************************
;* PROCESS PATH
;******************************************************************************
;*********************************************
;* *
;* Subroutine : Process_path *
;* Function : Process command line. *
;* Repeat searching for drive *
;* spec. If valid update *
;* drive table. *
;* *
;* Normal exit: End of line *
;* Parse error *
;* *
;* Abort exit: Invalid drive *
;* *
;*********************************************
; *****************************************
; * *
; * WHILE PAR_RETC eq NO_ERROR (0) *
; * CALL SYSPARSE *
; * Case: *
; * .IF (POSITIONAL) *
; * Result is positional & Ctr even *
; * INC CTR *
; * CHECK_STRING *
; * .IF the string is valid *
; * valid drive *
; * calculate table drv posit. *
; * based on the ascii value *
; * .ELSE *
; * *
; * PARSE ERROR *
; * .ENDIF *
; * Result is positional & CTR odd *
; * save the ascii_value *
; * Check the String *
; * .IF the string is valid *
; * valid drive *
; * update the drive table *
; * .ELSE *
; * *
; * PARSE ERROR *
; * .ENDIF *
; * .ENDIF *
; * INC CTR *
; *****************************************
;******************************************************************************
xor cx,cx ;an000; set cx to 0 for parse
xor dx,dx ;an000; set dx to 0 for parse
mov Parm_Ptr1,si ;an002; dms;ptr to 1st. parm
mov Parm_Ptr2,si ;an002; dms;ptr to 1st. parm
call SYSPARSE ;AN000; dms;priming parse
mov par_retc,ax ;AN000; dms;set flag
; $DO
$$DO45:
CMP ax,no_error ;AN000;Is compare the return
; $LEAVE NE ;AN000;code 0 no error keep
JNE $$EN45
;AN000;parsing
call CHK_PARSER ;AN000;
mov Parm_Ptr2,si ;an002; dms;ptr to 1st. parm
call SYSPARSE ;AN000;go parse the command line
mov par_retc,ax ;AN000; dms;set flag
;AN000;restore the parm return code
; $ENDDO ;AN000;
JMP SHORT $$DO45
$$EN45:
; See if the user gave us /?
; If so, display the available options
; and exit.
;
; I gave this precedence over checking for parser errors,
; since the user may not have (yet) any idea of what the
; command syntax is supposed to be.
;
; Also, note that there is no message displaying function
; inside of ASSIGN, except for PARSE_ERR - which always
; uses the same message. So the message displaying part
; of this block could be subroutine-ized.
;
; 4/17/90 - c-PaulB
cmp OPTIONS_FLAG, 0 ; /? entered?
je OptionsDone ; skip if not
call DISPLAY_OPTIONS ; else display message
mov ax, 0 ; no error returned
call EXIT_PROG ; let user try again
OptionsDone:
cmp ax,good_parse_finish ;an000; dms;see if a parse error
; $if ne ;an000; dms;if a parse error
JE $$IF48
push ax ;an002; dms save ax
mov ax,Parm_Ptr2 ;an002; dms;get original parm ptr
mov Parm_Ptr1,ax ;an002; dms;place in variable
pop ax ;an002; dms;restore ax
call PARSE_ERR ;an000; dms;display error & exit
; $endif ;an000; dms;
$$IF48:
cmp PARMS_AVAIL,'y' ;AN000;
; $IF E ;AN000; If there are parms available
JNE $$IF50
cmp ax,0 ;AN000; see if the return code was no error
; $IF G ;AN000; if greater than 0
JNG $$IF51
mov ax,parse10
call PARSE_ERR ;AN000; you got a parser error
;AN000; so report & exit
; $ENDIF ;AN000; you also get an error
$$IF51:
xor ax,ax ;AN000;
mov al,String_ctr ;AN000;
mov bx,0002h
div bl ;AN000;
cmp ah,EVENX
; $IF NE ;AN000; if the drives did not pair off
JE $$IF53
mov ax,parse10
call PARSE_ERR
; $ENDIF ;AN000;
$$IF53:
cmp POS_FLAG,'n' ;AN000;has a drive been specified
; $IF E,AND ;AN000;and has a switch also been
JNE $$IF55
cmp STATUS_FLAG,1 ;AN000;specified if so hook in code
; $IF E ;AN000;and then report status
JNE $$IF55
mov STATUS_ONLY,1 ;AN000;set flag specifing user input full
; $ENDIF ;AN000;command line
$$IF55:
;AN000; hook in the code
; $ENDIF ;AN000;
$$IF50:
page
cmp STATUS_ONLY,0 ;AN000;
; $IF E ;AN000;
JNE $$IF58
call Get_Vectors ;get current vectors ;an001; dms;
call Set_Vectors ;set new vectors ;an001; dms;
; $ELSE ;AN000;END of HOOK-IN
JMP SHORT $$EN58
$$IF58:
call REPORT_STATUS ;AN000;
call EXIT_PROG ;AN000;
; $ENDIF
$$EN58:
page
;*********************************** CNS ***************************************
RELOAD_CURDIR PROC NEAR
;*****************************************************************************
;
; We have an interesting problem here. What if the user is assigning away
; his current drive? Here's the solution:
;
; o We get the current drive here.
; o We reload the mapping table.
; o We set the current drive.
;
MOV AH,Get_Default_Drive ;(19H)
INT DOS_CALL
PUSH AX ; save away the table
MOV AX,(MPLEX_ID SHL 8)+MPLEX_GET_SEG ;(0601H) Get the SEG of the installed ASSIGN
INT MULTIPLEXOR ;(2FH) in ES
mov si,offset drives ;move in the new drive table
mov di,si
mov cx,26 ; move a-z
CLI
rep movsb ;
STI
POP DX ; restore the old current drive
MOV AH,Set_Default_Drive ;(0EH)
INT DOS_CALL
call EXIT_PROG ;go_home:
INT PGM_TERM ;(20H) Exit SHOULD not return, but be safe
ret
RELOAD_CURDIR ENDP
;*********************************** CNS ***************************************
;Input: Parser control block
;Output: Result Parser control block
;Register usage: AX,BX,CX,DX,ES,DS,SI,DI
;
;
;*********************************** CNS ***************************************
CHK_PARSER PROC NEAR
xor cx,cx ;an000; clear out cx
xor ax,ax ;AN000; clear out ax
mov al,String_ctr ;AN000; grab current assign ctr
mov bx,0002h ;an000; set bx to 2
div bl ;AN000; divide so we get rem.
cmp RES_TYPE,2 ;an000; check for 1st drive
; $IF E,AND ;AN000; drive letter?
JNE $$IF61
cmp ah,EVENX ;AN000; and no remainder?
; $IF E ;AN000;
JNE $$IF61
inc STRING_CTR ;AN000; increment counter
mov PARMS_AVAIL,'y' ;AN000; signal parms entered
push ax ;AN000; save ax
mov al,res_itag ;AN000; grab parm entered
mov drv_x,al ;AN000; save it for later use
call drvchk ;AC000; check for valid drive
cbw ;AC000; convert drive byte found to a word
mov bx,offset drives-1 ;AC000; get the drive table
add bx,ax ;AC000; get the drive address
mov save_dr_tbl_ptr,bx ;an000; save the drive table pointer
pop ax ;an000; restore ax
; $ENDIF ;AN000;
$$IF61:
cmp RES_TYPE,2 ;AN000; check for 2nd drive
; $IF E,AND ;AN000; drive entered?
JNE $$IF63
cmp ah,EVENX ;AN000; and not first?
; $IF NE ;AN000;
JE $$IF63
inc STRING_CTR ;AN000; increment counter
mov PARMS_AVAIL,'y' ;AN000; signal parms entered
push ax ;AN000; save ax
mov al,res_itag ;AN000; grab parm entered
mov drv_x,al ;AN000; save it for later use
call drvchk ;AC000; if so see if it was valid
mov bx,save_dr_tbl_ptr ;an000; set bx to drive table
mov [bx],al ;AC000; if valid update the table
mov POS_FLAG,'y' ;AN000; yes you have valid positionals
pop ax ;an000; restore ax
mov Parm_Ptr1,si ;an002; dms;ptr to 1st. parm
; $ENDIF ;AN000;
$$IF63:
; Check for /switches
PUBLIC CheckSwitches
CheckSwitches:
cmp RES_SYN,0 ;AN000; See if a switch was specified
; $IF NE ;AN000; If so,
JE $$IF65
; Check for /STATUS or /STA
cmp [RES_SYN], offset SW_Syn1 ; is it /STATUS?
je SwitchStatus ; jump if so
cmp [RES_SYN], offset SW_Syn2 ; is it /STA?
je SwitchStatus
cmp [RES_SYN], offset SW_Syn3 ; is it /S?
jne SwitchStatusDone ; jump if not
SwitchStatus:
mov STATUS_flag,1 ;AN000; set the status flag on
mov PARMS_AVAIL,'y' ;AN000; and report that a valid parameter
mov byte ptr SW_Syn1,20h ;an000; remove switch from list
mov byte ptr SW_Syn2,20h ;an000; remove switch from list
mov byte ptr SW_Syn3,20h
mov Parm_Ptr1,si ;an002; dms;ptr to 1st. parm
jmp short $$IF65 ; jump out of switches
SwitchStatusDone:
; Check for /?
cmp [RES_SYN], offset SW2_Syn ; is it /?
jne SwitchOptionsDone ; jump if not
mov OPTIONS_flag,1 ; else set flag for later
jmp short $$IF65 ; jump out of switches
SwitchOptionsDone:
; $ENDIF ;AN000; was on the command line
$$IF65:
ret ;AN000;
CHK_PARSER ENDP
;**************************************************************************
;
;Purpose: Display the options help message
;Input : No value passed
;Registers affected: BX,CX,DX,AX
;
;Output : Message line(s) displayed. No value returned.
;
;**************************************************************************
PUBLIC DISPLAY_OPTIONS
DISPLAY_OPTIONS PROC NEAR
mov ax, MSG_OPTIONS_FIRST ; message #
mov bx, stdout ; where to send it
mov cx, 0 ; # of replaceable parms
mov si, 0 ; offset of sublist
mov di, 0 ; ptr to buffer for user input
mov dl, no_input ; no user input to mes. ret.
mov dh, utility_msg_class ; utility messages only
DO_LOOP:
call SYSDISPMSG ; go to message retriever
cmp ax, MSG_OPTIONS_LAST ; last message?
je DO_DONE ; done if so
inc ax ; else, get next one
jmp short DO_LOOP ; and go do it
DO_DONE:
ret
DISPLAY_OPTIONS ENDP
page
;*********************************** CNS ***************************************
;
; check drive validity
;
drvchk:
sub al,"A" ; NS- error checking
; $IF NB ;AN000; ;if alphabetic,
JB $$IF67
push es
push bx
push ax
les bx,inv
cmp al,es:[bx].sysi_ncds ;AN000; ;NS- check in case current directory
; $IF NAE ;AN000; ;NS- has been altered
JAE $$IF68
les bx,es:[bx].sysi_cds
push bx
mov bl,size curdir_list
mul bl
pop bx
add bx,ax
test es:[bx].curdir_flags,curdir_inuse
; $IF NZ ;AC000;
JZ $$IF69
pop ax
pop bx
pop es
inc al
ret
; $ENDIF ;AC000; curdir in use?
$$IF69:
; $ENDIF ;AC000; curdir been altered?
$$IF68:
; $ENDIF ;AC000; alphabetic?
$$IF67:
mov ax,parse10 ;AN000; Invalid parameter
call PARSE_ERR ;an000; display the error & end
;******************************* CNS *******************************************
;Purpose: Print the mapping status of the drive table.
;Input : Drive table
;Registers affected: BX,CX,DX,AX
;
;Output : Display of all drive values stored not equal to their sequential
; storage address
;
;******************************* CNS *******************************************
REPORT_STATUS PROC NEAR
push es ;an000; save es
push es ;an000; swap es with
pop ax ;an000; ax
mov curr_es_seg,ax ;an000; save es in curr_es_seg
mov ax,0601h ;an000; our int 2fh
int 2fh ;an000; returns segment of drive vector
assume es:nothing ;an000; tell the linker
mov cl,01 ;AN000; ;initialize the counter
;AN000; advance to next drive
mov bx,offset drives ;AN000; load drive table
; $DO
$$DO73:
cmp cl,26 ;AN000; see if we scanned all drives
; $LEAVE A ;AN000; exit loop if we have
JA $$EN73
cmp cl,es:[bx] ;AN000; ;compare the table value
;to the table contents
; $IF NE ;AN000;
JE $$IF75
push bx ;an000; save bx - we stomp it
push cx ;an000; save cx - we stomp it
mov al,es:[bx] ;AN000; get the table contents to convert
push es ;an000; save es for print
mov bx,curr_es_seg ;an000; get the current segment
mov es,bx ;an000; get the segment into es
assume es:code ;an000; tell linker it is code
add cl,40H ;AN000; convert to ascii representation
add al,40h ;an000; convert to ascii
mov OLD_DRV,cl ;AN000; place in parms for printing
mov NEW_DRV,al ;AN000; by message retriever
mov ax,0002h ;an000; message #2
mov bx,stdout ;an000; print to standard out
mov cx,0002h ;an000; two replaceable parms
mov si,offset sublist1 ;an000; offset of sublist
mov di,0000h ;an000; no buffer for user input
mov dl,no_input ;AN000; no user input to mes. ret.
mov dh,utility_msg_class ;an000; utility messages only
call SYSDISPMSG ;AN000; ;go to message retriever
pop es ;an000; restore es
assume es:nothing ;an000; tell the linker
pop cx ;an000; restore cx
pop bx ;an000; restore bx
; $ENDIF ;AN000;
$$IF75:
inc bx ;an000; next drive in vector
inc cl ;AN000; next letter to address
; $ENDDO ;AN000;
JMP SHORT $$DO73
$$EN73:
pop es ;an000; restore es
assume es:code ;an000; tell the linker
ret ;AN000;
REPORT_STATUS ENDP
page
;******************************* CNS *******************************************
; Purpose: Exit program
; Input : Error code AL
; Output : Error code AL
;
;******************************* CNS *******************************************
EXIT_PROG PROC NEAR
mov ah,EXIT ;AC000;(4ch) RETURN TO DOS WITH ERRORLEVEL
int DOS_CALL ;AC000;
ret ;AC000;
EXIT_PROG ENDP
;******************************* CNS *******************************************
;=========================================================================
; PARSE_ERR : This routine prints out the applicable parse
; error that is returned in AX by SYSPARSE.
;
; Inputs : AX - Parse error number to be printed
; Outputs : Applicable parse error
;=========================================================================
PARSE_ERR proc near ;an000; dms;report an error
push ax ;an000;save ax
mov byte ptr ds:[si],0 ;an002;null terminate string
mov dx,Parm_Ptr1 ;an002;move ptr to sublist
mov Parse_Sub_Off,dx ;an002;
mov Parse_Sub_Seg,ds ;an002;
mov bx,STDERR ;an000;print to standard out
mov cx,1 ;an002;1 replaceable parm
mov si,offset Parse_Sublist ;an002;sublist for replaceable parm
mov dl,NO_INPUT ;AN000;no input to message retriever
mov dh,PARSE_ERR_CLASS ;AN000;display parse errors
call SYSDISPMSG ;AN000;display error
pop ax ;AN000;restore errcode
call EXIT_PROG ;AN000;exit ASSIGN due to error
PARSE_ERR endp ;an000; dms;
Release_Environment proc near ;an001; dms;
push ax ;save regs ;an001; dms;
push bx ; ;an001; dms;
push es ; ;an001; dms;
mov ah,Get_PSP ; get the PSP segment ;an001; dms;
int 21h ; invoke INT 21h ;an001; dms;
mov es,bx ; BX contains PSP segment - put in ES ;an001; dms;
mov bx,word ptr es:[PSP_Env]; get segment of environmental vector ;an001; dms;
mov es,bx ; place segment in ES for Free Memory ;an001; dms;
mov ah,Dealloc ; Free Allocated Memory ;an001; dms;
int 21h ; invoke INT 21h ;an001; dms;
pop es ; restore regs ;an001; dms;
pop bx ; ;an001; dms;
pop ax ; ;an001; dms;
ret ; return to caller ;an001; dms;
Release_Environment endp
Close_Handles proc near ;close handles 0-4 ;an001; dms;
push bx ;save regs ;an001; dms;
mov bx,4 ;close all standard files ;an001; dms;
Close_Handle_Loop:
mov ah,Handle_Close ;close file handle ;an001; dms;
int 21h ; ;an001; dms;
dec bx ;next handle ;an001; dms;
jns Close_Handle_Loop ;continue ;an001; dms;
pop bx ;restore regs ;an001; dms;
ret ; ;an001; dms;
Close_Handles endp ; ;an001; dms;
Get_Vectors proc near ;get original vectors ;an001; dms;
mov ax,(GET_INTERRUPT_VECTOR SHL 8)+ABS_DISK_READ ;(3525h) get the int 25 vector
int DOS_CALL
mov word ptr [int25_vec],bx
mov word ptr [int25_vec+2],es
mov ax,(GET_INTERRUPT_VECTOR SHL 8)+ABS_DISK_WRITE ;(3526H) get the int 26 vector
int DOS_CALL
mov word ptr [int26_vec],bx
mov word ptr [int26_vec+2],es
mov ax,(GET_INTERRUPT_VECTOR SHL 8)+MULTIPLEXOR ;(352FH) get the int 2F vector
int DOS_CALL
mov word ptr [int2F_vec],bx
mov word ptr [int2F_vec+2],es
mov ax,(Get_Interrupt_Vector SHL 8)+DOS_CALL ;(3521H)
int DOS_CALL
mov word ptr cs:[system],bx
mov word ptr cs:[system+2],es
MOV AX,(MPLEX_ID SHL 8)+MPLEX_R_U_THERE ;(0600H) See if we are in system already
INT MULTIPLEXOR ;(2FH)
OR AL,AL
; $IF NZ ;AC000; NOT INSTALLED
JZ $$IF78
call RELOAD_CURDIR ;AC000;
; $ENDIF
$$IF78:
ret ; ;an001; dms;
Get_Vectors endp ; ;an001; dms;
Set_Vectors proc near ;set to new vectors ;an001; dms;
mov ah,Get_Default_Drive ;(19H)
int DOS_CALL
inc al
mov [default_drive],al ;NS- add one to the value to get the
call mapdrv1 ;NS- actual drive value before mapping
dec al ;NS- dec one to setup for select function
mov dl,al ;select its replacement
mov ah,Set_Default_Drive ;(0EH)
int DOS_CALL
;NS- Set up hooks
mov dx,offset int25 ;set int 25 vector
mov ax,(SET_INTERRUPT_VECTOR SHL 8) + ABS_DISK_READ ;(2525H)
int DOS_CALL
;NS- setup new seg
mov dx,offset int26 ;set int 26 vector
mov ax,(SET_INTERRUPT_VECTOR SHL 8) + ABS_DISK_WRITE ;(2526H)
int DOS_CALL
;NS- Hook in resident portion
mov dx,offset int2F ;set int 2F vector
mov ax,(SET_INTERRUPT_VECTOR SHL 8) + MULTIPLEXOR ;(252FH)
int DOS_CALL
mov dx,offset ASSIGN_HANDLER ;set the system int vector
mov ax,(SET_INTERRUPT_VECTOR SHL 8) + DOS_CALL ;(2521H)
int DOS_CALL
call Close_Handles ;close handles 0-4 ;an001; dms;
call Release_Environment ;release the environmental vector ;an001; dms;
mov dx,prog_size ;end but stay resident
mov ah,KEEP_PROCESS ;(31h) NS- ASSIGN loaded in mem
int DOS_CALL
ret ; ;an001; dms;
Set_Vectors endp ; ;an001; dms;
.xlist
MSG_SERVICES <MSGDATA>
msg_services <NEARmsg>
msg_services <LOADmsg>
msg_services <DISPLAYmsg,CHARmsg>
msg_services <assign.cla,assign.cl1>
msg_services <assign.cl2>
.list
include msgdcl.inc
code ends
end ENTRY_POINT
| 28.617124
| 90
| 0.565316
|
20c88d6976702bf0804f37494532453a103367e1
| 1,861
|
asm
|
Assembly
|
kernel/kernel_entry_start.asm
|
lolblat/OrOS
|
baf253c50c506a099112232329e4ca126f674340
|
[
"MIT"
] | 4
|
2018-03-18T20:26:43.000Z
|
2018-09-20T13:52:38.000Z
|
kernel/kernel_entry_start.asm
|
lolblat/OrOS
|
baf253c50c506a099112232329e4ca126f674340
|
[
"MIT"
] | 1
|
2018-01-15T06:57:39.000Z
|
2018-01-15T06:57:39.000Z
|
kernel/kernel_entry_start.asm
|
lolblat/OrOS
|
baf253c50c506a099112232329e4ca126f674340
|
[
"MIT"
] | null | null | null |
[bits 32]
KERNEL_VIRTUAL_ADDRESS_BASE equ 0xC0000000
KERNEL_PAGE_TABLE_ENTRY equ 769 - 1
PAGE_SIZE equ 0x1000
extern kernel_main
global _loader
section .text
align 0x1000
loader equ (_loader - 0xC0000000)
STACK_SIZE equ 0x4000
_loader:
push edx
push ebx
mov ecx,0
.loop: ;4mb identity mapping
cmp ecx, 1024
jz .end
mov eax,PAGE_SIZE
imul eax,ecx
or eax,7
lea ebx, [TableEntry_0 - KERNEL_VIRTUAL_ADDRESS_BASE + 4*ecx]
mov [ebx], eax
inc ecx
jmp .loop
.end:
mov ecx, 0
.loop_768:
cmp ecx,1024 ; 4 mega bytes of shit
jz .end_768
mov eax,PAGE_SIZE
imul eax,ecx
or eax, 0x7
lea ebx,[TableEntry_768 - KERNEL_VIRTUAL_ADDRESS_BASE + 4 * ecx]
mov [ebx], eax
inc ecx
jmp .loop_768
.end_768:
mov ecx,(BootPageDir - KERNEL_VIRTUAL_ADDRESS_BASE)
mov ebx,ecx
mov edx,(TableEntry_0 - KERNEL_VIRTUAL_ADDRESS_BASE )
or edx,0x7
mov dword[ebx],edx
mov edx,(TableEntry_768 - KERNEL_VIRTUAL_ADDRESS_BASE) ; the address of the table
or edx,0x7
add ebx, KERNEL_PAGE_TABLE_ENTRY * 4 ; get the kernel pages
mov dword[ebx], edx
mov cr3, ecx ; base dir address
mov ecx,cr0
or ecx,0x80000000; enable paging
mov cr0,ecx
lea ecx,[HighHalfBitch] ; jmp to high half
jmp ecx
extern kernel_virtual_end;
extern kernel_physical_end;
HighHalfBitch:
pop ebx
pop edx
invlpg[0]
mov esp,0xC0090000 + STACK_SIZE
mov ebp,esp
push kernel_virtual_end
push kernel_physical_end
push ebx
call kernel_main
hlt
section .data
align 0x1000
BootPageDir times 1024 dd 0x2 ;not present, read write and kernel only
TableEntry_0 times 1024 dd 0x3; for the first mb
TableEntry_768 times 1024 dd 0x3; for the kernel
| 18.79798
| 85
| 0.663084
|
475f29248e13d7ea2c8625d034e9aa621eae5cec
| 1,056
|
asm
|
Assembly
|
examples/factorial/factorial.pre.asm
|
enoua5/IOTA-C0
|
d4333a47b01a041e591c3552706e21016c4b0391
|
[
"MIT"
] | null | null | null |
examples/factorial/factorial.pre.asm
|
enoua5/IOTA-C0
|
d4333a47b01a041e591c3552706e21016c4b0391
|
[
"MIT"
] | null | null | null |
examples/factorial/factorial.pre.asm
|
enoua5/IOTA-C0
|
d4333a47b01a041e591c3552706e21016c4b0391
|
[
"MIT"
] | null | null | null |
#uses draft 3, which added pre and post processor
JMP &start_program
.var results[8]
.var n
.var tot
.lbl fact
#init factorial
MOV :tot 1
#start the body of the function
.lbl fact_body
#check if n is at or below 1
.var fact_reached_1
LOE :n 1 :fact_reached_1
#if it is, exit the function
.var fact_jump_loc
TNA :fact_reached_1 &fact_ret &fact_mult :fact_jump_loc
QJP :fact_jump_loc
#otherwise, tot=tot*(n--)
.lbl fact_mult
MUL :n :tot :tot
DEC :n :n
#recursion!
CAL &fact_body
#the exit
.lbl fact_ret
RET
.lbl start_program
#for i=1
.var i
MOV :i 1
.var for_loop
LBL :for_loop
#i<=8
.var end_of_array
LOE :i 8 :end_of_array
.var for_jump
TNA :end_of_array &continue_for &exit_for :for_jump
QJP :for_jump
.lbl continue_for
#get i factorial into tot
MOV :n :i
CAL &fact
#put it into results
.var addr
ADD :results :i :addr
DEC :addr :addr
ADR :addr :addr
SET :addr :tot
#i++
INC :i :i
QJP :for_loop
.lbl exit_for
.lbl exit_program
JMP &exit_program
| 15.529412
| 57
| 0.669508
|
a04e413c3a74e94d456f0343c0b8226063a66417
| 573
|
asm
|
Assembly
|
progs/chap05k08-fibonacci.asm
|
HKhademian/AssemblyDandamudi
|
b4d4ccbb7e585953a8d2d22b47d815a3f45f9129
|
[
"Unlicense"
] | 1
|
2020-05-07T14:20:09.000Z
|
2020-05-07T14:20:09.000Z
|
progs/chap05k08-fibonacci.asm
|
HKhademian/AssemblyDandamudi
|
b4d4ccbb7e585953a8d2d22b47d815a3f45f9129
|
[
"Unlicense"
] | null | null | null |
progs/chap05k08-fibonacci.asm
|
HKhademian/AssemblyDandamudi
|
b4d4ccbb7e585953a8d2d22b47d815a3f45f9129
|
[
"Unlicense"
] | null | null | null |
%include "lib.asm"
extern ExitProcess
global _start
section .text
section .bss
buffer resb 25
section .data
section .code
_start:
fgets buffer, 12
a2i 12, buffer
push EAX
call fibonacci
pop EAX
i2a EAX, buffer
putstr buffer
jmp _end
fibonacci:
%define n DWORD [EBP+8]
%define return DWORD [EBP+8]
enter 0,0
push EAX
push EBX
push ECX
mov EBX, 1
mov EAX, 1
fibonacci_loop:
mov ECX, EAX
mov EAX, EBX
add EBX, ECX
cmp EBX, n
jle fibonacci_loop
mov return, EAX
pop ECX
pop EBX
pop EAX
leave
ret
_end:
push 0
call ExitProcess
| 10.052632
| 29
| 0.696335
|
b2f01cd5c2f1f2050e28ac791c1e8de340d3ee80
| 347
|
asm
|
Assembly
|
oeis/030/A030966.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/030/A030966.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/030/A030966.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A030966: [ exp(2/7)*n! ].
; Submitted by Jamie Morken(s3)
; 1,2,7,31,159,958,6706,53654,482888,4828888,53117772,637413271,8286372532,116009215452,1740138231786,27842211708589,473317599046024,8519716782828440,161874618873740361,3237492377474807236
add $0,1
mov $2,1
lpb $0
mul $1,4
mul $2,$0
sub $0,1
div $1,14
add $1,$2
lpe
mov $0,$1
| 23.133333
| 188
| 0.726225
|
cc0646d8e958ce442e24c1e1e543b5e3a0db2439
| 389
|
asm
|
Assembly
|
programs/oeis/049/A049854.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/049/A049854.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/049/A049854.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A049854: a(n)=Sum{a(k): k=0,1,2,...,n-3,n-1}; a(n-2) is not a summand; 2 initial terms required.
; 1,3,3,4,8,15,26,45,79,139,244,428,751,1318,2313,4059,7123,12500,21936,38495,67554,118549,208039,365083,640676,1124308,1973023,3462414,6076113,10662835,18711971,32837220,57625304,101125359
mov $3,3
lpb $0
sub $0,1
add $1,$3
add $2,1
sub $1,$2
add $3,$2
add $2,$1
lpe
add $1,1
| 27.785714
| 189
| 0.66838
|
483732cba4375f201290353e04b6981c7a876a7e
| 673
|
asm
|
Assembly
|
oeis/064/A064949.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | null | null | null |
oeis/064/A064949.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | null | null | null |
oeis/064/A064949.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | null | null | null |
; A064949: a(n) = Sum_{i|n, j|n} min(i,j).
; Submitted by Jamie Morken(w2)
; 1,5,6,15,8,32,10,37,23,42,14,100,16,52,52,83,20,125,22,132,64,72,26,252,45,82,76,162,32,286,34,177,88,102,88,397,40,112,100,336,44,352,46,222,208,132,50,572,75,239,124,252,56,416,120,414,136,162,62,916,64,172,258,367,136,480,70,312,160,474,74,1017,76,202,298,342,152,544,82,768,237,222,86,1126,168,232,196,564,92,1160,172,402,208,252,184,1228,100,393,354,759
add $0,1
lpb $0
mov $2,$0
lpb $0
mov $3,$2
dif $3,$0
lpb $3
add $5,$3
add $5,$3
cmp $3,$2
cmp $3,0
sub $3,1
add $4,$0
add $4,$5
lpe
sub $0,1
lpe
lpe
mov $0,$4
add $0,1
| 26.92
| 360
| 0.58841
|
7aeb62b76bc7c8c42988a5eae9a9e5d46684e628
| 1,533
|
asm
|
Assembly
|
asm/ooe_boss_orb_reloads_room.asm
|
Iemnur/DSVEdit
|
1f52feb6de8a47c7d223a17d739e69bb40aedd3f
|
[
"MIT"
] | 70
|
2017-02-25T15:06:47.000Z
|
2022-03-16T03:05:35.000Z
|
asm/ooe_boss_orb_reloads_room.asm
|
Iemnur/DSVEdit
|
1f52feb6de8a47c7d223a17d739e69bb40aedd3f
|
[
"MIT"
] | 58
|
2017-03-12T21:34:50.000Z
|
2022-01-31T17:22:36.000Z
|
asm/ooe_boss_orb_reloads_room.asm
|
Iemnur/DSVEdit
|
1f52feb6de8a47c7d223a17d739e69bb40aedd3f
|
[
"MIT"
] | 26
|
2017-03-04T16:35:13.000Z
|
2021-11-24T20:52:19.000Z
|
.nds
.relativeinclude on
.erroronwarning on
; This patch makes it so getting a boss orb in Mystery Manor or Ecclesia will reload the room.
; This is because the cutscene after beating Albus/Barlowe won't play until the room is reloaded.
; Albus/Barlowe normally reload the room on defeat, but in boss randomizer something else needs to do it.
@Overlay86Start equ 0x022EB1A0
@FreeSpace equ @Overlay86Start + 0x48
.open "ftc/arm9.bin", 02000000h
.org 0x02061254 ; At the end of the function for the boss orb being picked up
b @BossOrbCheckReloadRoom
.close
.open "ftc/overlay9_86", @Overlay86Start ; Free space overlay
.org @FreeSpace
@BossOrbCheckReloadRoom:
ldr r0, =02100790h
ldrb r0, [r0] ; Read the current game mode
cmp r0, 0h ; Shanoa mode
bne @BossOrbCheckReloadRoomEnd
ldr r0, =020FFCB9h
ldrb r0, [r0] ; Read the current area index
cmp r0, 0Eh ; Mystery Manor
beq @BossOrbReloadRoomMysteryManor
cmp r0, 2h ; Ecclesia
bne @BossOrbCheckReloadRoomEnd
@BossOrbReloadRoomEcclesia:
mov r0, 2h ; Area, Ecclesia
mov r1, 0h ; Sector
mov r2, 6h ; Room
b @BossOrbReloadRoom
@BossOrbReloadRoomMysteryManor:
mov r0, 0Eh ; Area, Mystery Manor
mov r1, 0h ; Sector
mov r2, 9h ; Room
@BossOrbReloadRoom:
mov r3, 0C0h ; X pos
mov r4, 0B0h ; Y pos
str r3, [r13]
bl 0203AFD0h ; TeleportPlayer
bl 0203B014h ; TriggerRoomTransition
@BossOrbCheckReloadRoomEnd:
; Return to the normal boss orb code
add r13, r13, 34h ; Replace line overwritten to jump here
b 2061258h
.pool
.close
| 25.55
| 105
| 0.741683
|
0e8230559cf3ee9463464a1bb444ebbf60359f08
| 353
|
asm
|
Assembly
|
programs/oeis/131/A131423.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/131/A131423.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/131/A131423.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A131423: a(n) = n*(n+2)*(2*n-1)/3. Also, row sums of triangle A131422.
; 1,8,25,56,105,176,273,400,561,760,1001,1288,1625,2016,2465,2976,3553,4200,4921,5720,6601,7568,8625,9776,11025,12376,13833,15400,17081,18880,20801,22848,25025,27336,29785,32376,35113,38000,41041,44240,47601,51128
mov $1,$0
mul $0,2
add $0,5
bin $0,2
mul $1,$0
div $1,3
add $1,1
| 32.090909
| 213
| 0.705382
|
bd2e221aa95ed62119acc39dc6a59435cd27a34c
| 528
|
asm
|
Assembly
|
oeis/194/A194899.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/194/A194899.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/194/A194899.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A194899: Triangular array (and fractal sequence): row n is the permutation of (1,2,...,n) obtained from the increasing ordering of fractional parts {r}, {2r}, ..., {nr}, where r=sqrt(12).
; Submitted by Jon Maiga
; 1,1,2,3,1,2,3,1,4,2,5,3,1,4,2,5,3,1,6,4,2,7,5,3,1,6,4,2,7,5,3,1,8,6,4,2,9,7,5,3,1,8,6,4,2,9,7,5,3,1,10,8,6,4,2,11,9,7,5,3,1,10,8,6,4,2,11,9,7,5,3,1,12,10,8,6,4,2,13,11,9,7,5,3,1,12,10,8,6,4,2
sub $0,1
mov $3,1
lpb $0
mov $2,$3
mul $2,$0
add $3,2
sub $0,$3
trn $0,$3
lpe
mod $2,$3
mov $0,$2
add $0,1
| 31.058824
| 193
| 0.585227
|
6594f290179482f12b931572a93b6380df62bee2
| 5,232
|
asm
|
Assembly
|
Code/CustomControl/RAProject/Src/Misc.asm
|
CherryDT/FbEditMOD
|
beb0eb22cae1b8f7203d55bd6b293d8ec88231ca
|
[
"Unlicense"
] | 11
|
2016-12-03T16:35:42.000Z
|
2022-03-26T06:02:53.000Z
|
Code/CustomControl/RAProject/Src/Misc.asm
|
CherryDT/FbEditMOD
|
beb0eb22cae1b8f7203d55bd6b293d8ec88231ca
|
[
"Unlicense"
] | 1
|
2018-02-24T20:17:46.000Z
|
2018-03-02T08:57:40.000Z
|
Code/CustomControl/RAProject/Src/Misc.asm
|
CherryDT/FbEditMOD
|
beb0eb22cae1b8f7203d55bd6b293d8ec88231ca
|
[
"Unlicense"
] | 4
|
2018-10-19T01:14:55.000Z
|
2021-09-11T18:51:48.000Z
|
.code
xInString proc lpStr:DWORD,lpSrc:DWORD
LOCAL buffer[256]:BYTE
push esi
push edi
mov esi,lpSrc
lea edi,buffer
InStr0:
mov al,[esi]
cmp al,'a'
jl @f
cmp al,'z'
jg @f
and al,5Fh
@@:
mov [edi],al
inc esi
inc edi
or al,al
jne InStr0
mov edi,lpStr
dec edi
InStr1:
inc edi
push edi
lea esi,buffer
InStr2:
mov ah,[esi]
or ah,ah
je Found
mov al,[edi]
or al,al
je NotFound
cmp al,'a'
jl @f
cmp al,'z'
jg @f
and al,5Fh
@@:
inc esi
inc edi
cmp al,ah
jz InStr2
pop edi
jmp InStr1
Found:
pop eax
sub eax,lpStr
pop edi
pop esi
ret
NotFound:
pop edi
mov eax,-1
pop edi
pop esi
ret
xInString endp
FindFileExt proc uses ebx esi edi,lpPROJECTBROWSER:DWORD,lpszFile:DWORD
LOCAL buffer[64]:BYTE
mov esi,lpszFile
invoke lstrlen,esi
.while eax
dec eax
.break .if byte ptr [esi+eax]=='.'
.endw
.if eax
invoke lstrcpyn,addr buffer,addr [esi+eax],sizeof buffer
invoke lstrlen,addr buffer
mov word ptr buffer[eax],'.'
mov ebx,lpPROJECTBROWSER
mov edi,[ebx].PROJECTBROWSER.hmemfileext
.while [edi].PBFILEEXT.id
invoke xInString,addr [edi].PBFILEEXT.szfileext,addr buffer
.if eax!=-1
mov eax,[edi].PBFILEEXT.id
jmp Ex
.endif
lea edi,[edi+sizeof PBFILEEXT]
.endw
.endif
mov eax,5
Ex:
ret
FindFileExt endp
RemoveThePath proc uses esi edi,lpszFileName:DWORD,lpPath:DWORD,lpBuff:DWORD
add lpBuff,21
invoke lstrcpy,lpBuff,lpszFileName
mov edi,lpBuff
mov esi,lpPath
dec esi
dec edi
@@:
inc esi
inc edi
mov al,[esi]
.if al>='a' && al<='z'
and al,5Fh
.endif
mov ah,[edi]
.if ah>='a' && ah<='z'
and ah,5Fh
.endif
cmp al,ah
je @b
.if al
@@:
dec esi
dec edi
mov al,[esi]
cmp al,'\'
jne @b
inc esi
inc edi
.endif
@@:
mov al,[esi]
inc esi
.if al=='\'
dec edi
mov [edi],al
dec edi
dec edi
mov word ptr [edi],'..'
jmp @b
.elseif al
jmp @b
.endif
lea eax,[edi+1]
ret
RemoveThePath endp
CombSort PROC uses ebx esi edi,lpArr:DWORD,count:DWORD
LOCAL Gap:DWORD
LOCAL eFlag:DWORD
mov eax,count
mov Gap,eax
mov ebx,lpArr
dec count
@Loop1:
fild Gap ; load integer memory operand to divide
fdiv CombSort_Const ; divide number by 1.3
fistp Gap ; store result back in integer memory operand
dec Gap
jnz @F
mov Gap,1
@@:
mov eFlag,0
mov esi,count
sub esi,Gap
xor ecx,ecx ; low value index
@Loop2:
mov edx,ecx
add edx,Gap ; high value index
;Get offsets to row data
push edx
mov edx,[ebx+edx*4]
mov edi,[ebx+ecx*4]
;Get cell data
push ecx
invoke lstrcmpi,edi,edx
pop ecx
pop edx
cmp eax,0
jle @F
mov eax,[ebx+ecx*4] ; lower value
mov edi,[ebx+edx*4] ; higher value
mov [ebx+edx*4],eax
mov [ebx+ecx*4],edi
inc eFlag
@@:
inc ecx
cmp ecx,esi
jle @Loop2
cmp eFlag,0
jg @Loop1
cmp Gap,1
jg @Loop1
ret
CombSort ENDP
SortItems proc uses ebx esi edi,lpPROJECTBROWSER:DWORD
LOCAL hMemItems:HGLOBAL
LOCAL hMemSort:HGLOBAL
LOCAL buffer[MAX_PATH]:BYTE
LOCAL nCount:DWORD
LOCAL hMemItemsSorted:HGLOBAL
mov ebx,lpPROJECTBROWSER
mov esi,[ebx].PROJECTBROWSER.hmemitems
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,MAXITEMMEM
mov hMemItems,eax
mov edi,eax
mov nCount,0
.while [esi].PBITEM.id
.if sdword ptr [esi].PBITEM.id>0
;File
.if [ebx].PROJECTBROWSER.style & RPBS_NOPATH
invoke lstrlen,addr [esi].PBITEM.szitem
.while [esi].PBITEM.szitem[eax-1]!='\' && eax
dec eax
.endw
lea eax,[esi].PBITEM.szitem[eax]
.else
invoke RemoveThePath,addr [esi].PBITEM.szitem,addr [ebx].PROJECTBROWSER.projectpath,addr buffer
.endif
invoke lstrcpy,addr [edi].SORT.szname,eax
mov [edi].SORT.lpPBITEM,esi
inc nCount
lea edi,[edi+sizeof SORT]
.endif
lea esi,[esi+sizeof PBITEM]
.endw
mov eax,nCount
.if eax>1
inc eax
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,addr [eax*4]
mov hMemSort,eax
mov esi,hMemItems
mov edi,hMemSort
.while [esi].SORT.lpPBITEM
mov [edi],esi
lea edi,[edi+4]
lea esi,[esi+sizeof SORT]
.endw
invoke CombSort,hMemSort,nCount
invoke GlobalAlloc,GMEM_FIXED or GMEM_ZEROINIT,MAXITEMMEM
mov hMemItemsSorted,eax
mov edi,eax
;Add groups
mov esi,[ebx].PROJECTBROWSER.hmemitems
.while [esi].PBITEM.id
mov [edi].SORT.lpPBITEM,esi
.if sdword ptr [esi].PBITEM.id<0
;Group
invoke RtlMoveMemory,edi,esi,sizeof PBITEM
lea edi,[edi+sizeof PBITEM]
.endif
lea esi,[esi+sizeof PBITEM]
.endw
mov esi,hMemSort
.while dword ptr [esi]
mov edx,[esi]
mov edx,[edx].SORT.lpPBITEM
invoke RtlMoveMemory,edi,edx,sizeof PBITEM
lea edi,[edi+sizeof PBITEM]
lea esi,[esi+4]
.endw
invoke GlobalFree,[ebx].PROJECTBROWSER.hmemitems
mov eax,hMemItemsSorted
mov [ebx].PROJECTBROWSER.hmemitems,eax
invoke GlobalFree,hMemSort
.endif
invoke GlobalFree,hMemItems
ret
SortItems endp
| 19.306273
| 100
| 0.632836
|
6c67c186a8b686d2f273137ea1aa806a2e1f716b
| 701
|
asm
|
Assembly
|
oeis/046/A046172.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/046/A046172.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/046/A046172.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A046172: Indices of pentagonal numbers (A000326) that are also squares (A000290).
; Submitted by Christian Krause
; 1,81,7921,776161,76055841,7452696241,730288175761,71560788528321,7012226987599681,687126683996240401,67331402804643959601,6597790348171111800481,646516122717964312487521,63351982236012331511976561,6207847743006490523861215441,608305726832400059006887136641,59607753381832199292151078175361,5840951525692723130571798774048721,572353641764505034596744128778599281,56084815941395800667350352821528680801,5495739608615023960365737832381032119201,538526396828330952315174957220519619000881
mov $3,1
lpb $0
sub $0,1
mov $1,$3
mul $1,8
add $2,$1
add $3,$2
lpe
pow $3,2
mov $0,$3
| 46.733333
| 486
| 0.857347
|
c430effccb082c3943a223434605da6aa148b462
| 15,395
|
asm
|
Assembly
|
maps/KurtsHouse.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 28
|
2019-11-08T07:19:00.000Z
|
2021-12-20T10:17:54.000Z
|
maps/KurtsHouse.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 13
|
2020-01-11T17:00:40.000Z
|
2021-09-14T01:27:38.000Z
|
maps/KurtsHouse.asm
|
Dev727/ancientplatinum
|
8b212a1728cc32a95743e1538b9eaa0827d013a7
|
[
"blessing"
] | 22
|
2020-05-28T17:31:38.000Z
|
2022-03-07T20:49:35.000Z
|
object_const_def ; object_event constants
const KURTSHOUSE_KURT1
const KURTSHOUSE_TWIN1
const KURTSHOUSE_SLOWPOKE
const KURTSHOUSE_KURT2
const KURTSHOUSE_TWIN2
KurtsHouse_MapScripts:
db 0 ; scene scripts
db 1 ; callbacks
callback MAPCALLBACK_OBJECTS, .KurtCallback
.KurtCallback:
checkevent EVENT_CLEARED_SLOWPOKE_WELL
iffalse .Done
checkevent EVENT_FOREST_IS_RESTLESS
iftrue .Done
checkflag ENGINE_KURT_MAKING_BALLS
iftrue .MakingBalls
disappear KURTSHOUSE_KURT2
appear KURTSHOUSE_KURT1
disappear KURTSHOUSE_TWIN2
appear KURTSHOUSE_TWIN1
return
.MakingBalls:
disappear KURTSHOUSE_KURT1
appear KURTSHOUSE_KURT2
disappear KURTSHOUSE_TWIN1
appear KURTSHOUSE_TWIN2
.Done:
return
Kurt1:
faceplayer
opentext
checkevent EVENT_KURT_GAVE_YOU_LURE_BALL
iftrue .GotLureBall
checkevent EVENT_CLEARED_SLOWPOKE_WELL
iftrue .ClearedSlowpokeWell
writetext KurtsHouseKurtMakingBallsMustWaitText
waitbutton
closetext
special FadeOutMusic
setevent EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
readvar VAR_FACING
ifequal UP, .RunAround
turnobject PLAYER, DOWN
playsound SFX_FLY
applymovement KURTSHOUSE_KURT1, KurtsHouseKurtExitHouseMovement
playsound SFX_EXIT_BUILDING
disappear KURTSHOUSE_KURT1
waitsfx
special RestartMapMusic
end
.RunAround:
turnobject PLAYER, DOWN
playsound SFX_FLY
applymovement KURTSHOUSE_KURT1, KurtsHouseKurtGoAroundPlayerThenExitHouseMovement
playsound SFX_EXIT_BUILDING
disappear KURTSHOUSE_KURT1
waitsfx
special RestartMapMusic
end
.ClearedSlowpokeWell:
writetext KurtsHouseKurtHonoredToMakeBallsText
buttonsound
verbosegiveitem LURE_BALL
iffalse .NoRoomForBall
setevent EVENT_KURT_GAVE_YOU_LURE_BALL
.GotLureBall:
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
iftrue .WaitForApricorns
checkevent EVENT_GAVE_KURT_RED_APRICORN
iftrue .GiveLevelBall
checkevent EVENT_GAVE_KURT_BLU_APRICORN
iftrue .GiveLureBall
checkevent EVENT_GAVE_KURT_YLW_APRICORN
iftrue .GiveMoonBall
checkevent EVENT_GAVE_KURT_GRN_APRICORN
iftrue .GiveFriendBall
checkevent EVENT_GAVE_KURT_WHT_APRICORN
iftrue .GiveFastBall
checkevent EVENT_GAVE_KURT_BLK_APRICORN
iftrue .GiveHeavyBall
checkevent EVENT_GAVE_KURT_PNK_APRICORN
iftrue .GiveLoveBall
checkevent EVENT_CAN_GIVE_GS_BALL_TO_KURT
iftrue .CanGiveGSBallToKurt
.NoGSBall:
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2
iftrue .CheckApricorns
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3
iftrue .CheckApricorns
writetext KurtsHouseKurtBallsFromApricornsText
waitbutton
.CheckApricorns:
checkitem RED_APRICORN
iftrue .AskApricorn
checkitem BLU_APRICORN
iftrue .AskApricorn
checkitem YLW_APRICORN
iftrue .AskApricorn
checkitem GRN_APRICORN
iftrue .AskApricorn
checkitem WHT_APRICORN
iftrue .AskApricorn
checkitem BLK_APRICORN
iftrue .AskApricorn
checkitem PNK_APRICORN
iftrue .AskApricorn
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2
iftrue .ThatTurnedOutGreat
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3
iftrue .IMakeBallsFromApricorns
closetext
end
.IMakeBallsFromApricorns:
writetext KurtsHouseKurtBallsFromApricornsText
waitbutton
closetext
end
.AskApricorn:
writetext KurtsHouseKurtAskYouHaveAnApricornText
buttonsound
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3
special SelectApricornForKurt
ifequal FALSE, .Cancel
ifequal BLU_APRICORN, .Blu
ifequal YLW_APRICORN, .Ylw
ifequal GRN_APRICORN, .Grn
ifequal WHT_APRICORN, .Wht
ifequal BLK_APRICORN, .Blk
ifequal PNK_APRICORN, .Pnk
; .Red
setevent EVENT_GAVE_KURT_RED_APRICORN
sjump .GaveKurtApricorns
.Blu:
setevent EVENT_GAVE_KURT_BLU_APRICORN
sjump .GaveKurtApricorns
.Ylw:
setevent EVENT_GAVE_KURT_YLW_APRICORN
sjump .GaveKurtApricorns
.Grn:
setevent EVENT_GAVE_KURT_GRN_APRICORN
sjump .GaveKurtApricorns
.Wht:
setevent EVENT_GAVE_KURT_WHT_APRICORN
sjump .GaveKurtApricorns
.Blk:
setevent EVENT_GAVE_KURT_BLK_APRICORN
sjump .GaveKurtApricorns
.Pnk:
setevent EVENT_GAVE_KURT_PNK_APRICORN
sjump .GaveKurtApricorns
.GaveKurtApricorns:
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
setflag ENGINE_KURT_MAKING_BALLS
.WaitForApricorns:
writetext KurtsHouseKurtItWillTakeADayText
waitbutton
closetext
end
.Cancel:
writetext KurtsHouseKurtThatsALetdownText
waitbutton
closetext
end
._ThatTurnedOutGreat:
setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2
.ThatTurnedOutGreat:
writetext KurtsHouseKurtTurnedOutGreatText
waitbutton
.NoRoomForBall:
closetext
end
.GiveLevelBall:
checkflag ENGINE_KURT_MAKING_BALLS
iftrue KurtMakingBallsScript
writetext KurtsHouseKurtJustFinishedYourBallText
buttonsound
verbosegiveitemvar LEVEL_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_RED_APRICORN
sjump ._ThatTurnedOutGreat
.GiveLureBall:
checkflag ENGINE_KURT_MAKING_BALLS
iftrue KurtMakingBallsScript
writetext KurtsHouseKurtJustFinishedYourBallText
buttonsound
verbosegiveitemvar LURE_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_BLU_APRICORN
sjump ._ThatTurnedOutGreat
.GiveMoonBall:
checkflag ENGINE_KURT_MAKING_BALLS
iftrue KurtMakingBallsScript
writetext KurtsHouseKurtJustFinishedYourBallText
buttonsound
verbosegiveitemvar MOON_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_YLW_APRICORN
sjump ._ThatTurnedOutGreat
.GiveFriendBall:
checkflag ENGINE_KURT_MAKING_BALLS
iftrue KurtMakingBallsScript
writetext KurtsHouseKurtJustFinishedYourBallText
buttonsound
verbosegiveitemvar FRIEND_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_GRN_APRICORN
sjump ._ThatTurnedOutGreat
.GiveFastBall:
checkflag ENGINE_KURT_MAKING_BALLS
iftrue KurtMakingBallsScript
writetext KurtsHouseKurtJustFinishedYourBallText
buttonsound
verbosegiveitemvar FAST_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_WHT_APRICORN
sjump ._ThatTurnedOutGreat
.GiveHeavyBall:
checkflag ENGINE_KURT_MAKING_BALLS
iftrue KurtMakingBallsScript
writetext KurtsHouseKurtJustFinishedYourBallText
buttonsound
verbosegiveitemvar HEAVY_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_BLK_APRICORN
sjump ._ThatTurnedOutGreat
.GiveLoveBall:
checkflag ENGINE_KURT_MAKING_BALLS
iftrue KurtMakingBallsScript
writetext KurtsHouseKurtJustFinishedYourBallText
buttonsound
verbosegiveitemvar LOVE_BALL, VAR_KURT_APRICORNS
iffalse .NoRoomForBall
clearevent EVENT_GAVE_KURT_PNK_APRICORN
sjump ._ThatTurnedOutGreat
.CanGiveGSBallToKurt:
checkevent EVENT_GAVE_GS_BALL_TO_KURT
iftrue .GaveGSBallToKurt
checkitem GS_BALL
iffalse .NoGSBall
writetext KurtsHouseKurtWhatIsThatText
waitbutton
closetext
setevent EVENT_GAVE_GS_BALL_TO_KURT
takeitem GS_BALL
setflag ENGINE_KURT_MAKING_BALLS
end
.GaveGSBallToKurt:
checkflag ENGINE_KURT_MAKING_BALLS
iffalse .NotMakingBalls
writetext KurtsHouseKurtImCheckingItNowText
waitbutton
writetext KurtsHouseKurtAhHaISeeText
waitbutton
closetext
end
.NotMakingBalls:
writetext KurtsHouseKurtThisBallStartedToShakeText
waitbutton
closetext
setevent EVENT_FOREST_IS_RESTLESS
clearevent EVENT_CAN_GIVE_GS_BALL_TO_KURT
clearevent EVENT_GAVE_GS_BALL_TO_KURT
special FadeOutMusic
pause 20
showemote EMOTE_SHOCK, KURTSHOUSE_KURT1, 30
readvar VAR_FACING
ifequal UP, .GSBallRunAround
turnobject PLAYER, DOWN
playsound SFX_FLY
applymovement KURTSHOUSE_KURT1, KurtsHouseKurtExitHouseMovement
sjump .KurtHasLeftTheBuilding
.GSBallRunAround:
turnobject PLAYER, DOWN
playsound SFX_FLY
applymovement KURTSHOUSE_KURT1, KurtsHouseKurtGoAroundPlayerThenExitHouseMovement
.KurtHasLeftTheBuilding:
playsound SFX_EXIT_BUILDING
disappear KURTSHOUSE_KURT1
clearevent EVENT_AZALEA_TOWN_KURT
waitsfx
special RestartMapMusic
setmapscene AZALEA_TOWN, SCENE_AZALEATOWN_KURT_RETURNS_GS_BALL
end
Kurt2:
faceplayer
opentext
checkevent EVENT_GAVE_GS_BALL_TO_KURT
iftrue KurtScript_ImCheckingItNow
KurtMakingBallsScript:
checkevent EVENT_BUGGING_KURT_TOO_MUCH
iffalse Script_FirstTimeBuggingKurt
writetext KurtsHouseKurtDontBotherMeText
waitbutton
closetext
turnobject KURTSHOUSE_KURT2, UP
end
Script_FirstTimeBuggingKurt:
writetext KurtsHouseKurtGranddaughterHelpingWorkFasterText
waitbutton
closetext
turnobject KURTSHOUSE_KURT2, UP
setevent EVENT_BUGGING_KURT_TOO_MUCH
end
KurtScript_ImCheckingItNow:
writetext KurtsHouseKurtImCheckingItNowText
waitbutton
turnobject KURTSHOUSE_KURT2, UP
writetext KurtsHouseKurtAhHaISeeText
waitbutton
closetext
end
KurtsGranddaughter1:
faceplayer
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1
iftrue KurtsGranddaughter2Subscript
checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2
iftrue KurtsGranddaughterFunScript
checkevent EVENT_FOREST_IS_RESTLESS
iftrue .Lonely
checkevent EVENT_FAST_SHIP_FIRST_TIME
iftrue .Dad
checkevent EVENT_CLEARED_SLOWPOKE_WELL
iftrue .SlowpokeBack
checkevent EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
iftrue .Lonely
opentext
writetext KurtsGranddaughterSlowpokeGoneText
waitbutton
closetext
end
.SlowpokeBack:
opentext
writetext KurtsGranddaughterSlowpokeBackText
waitbutton
closetext
end
.Lonely:
opentext
writetext KurtsGranddaughterLonelyText
waitbutton
closetext
end
.Dad:
opentext
writetext KurtsGranddaughterDadText
waitbutton
closetext
end
KurtsGranddaughter2:
faceplayer
KurtsGranddaughter2Subscript:
opentext
checkevent EVENT_GAVE_GS_BALL_TO_KURT
iftrue .GSBall
writetext KurtsGranddaughterHelpText
waitbutton
closetext
turnobject KURTSHOUSE_TWIN2, RIGHT
end
.GSBall:
writetext KurtsGranddaughterGSBallText
waitbutton
closetext
turnobject KURTSHOUSE_TWIN2, RIGHT
end
KurtsGranddaughterFunScript:
opentext
writetext KurtsGranddaughterFunText
waitbutton
closetext
end
KurtsHouseSlowpoke:
faceplayer
opentext
writetext KurtsHouseSlowpokeText
cry SLOWPOKE
waitbutton
closetext
end
KurtsHouseOakPhoto:
jumptext KurtsHouseOakPhotoText
KurtsHouseCelebiStatue:
jumptext KurtsHouseCelebiStatueText
KurtsHouseBookshelf:
jumpstd difficultbookshelf
KurtsHouseRadio:
jumpstd radio2
KurtsHouseKurtExitHouseMovement:
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
step_end
KurtsHouseKurtGoAroundPlayerThenExitHouseMovement:
big_step RIGHT
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
big_step DOWN
step_end
KurtsHouseKurtMakingBallsMustWaitText:
text "Hm? Who are you?"
para "<PLAYER>, eh? You"
line "want me to make"
cont "some BALLS?"
para "Sorry, but that'll"
line "have to wait."
para "Do you know TEAM"
line "ROCKET? Ah, don't"
para "worry. I'll tell"
line "you anyhow."
para "TEAM ROCKET's an"
line "evil gang that"
para "uses #MON for"
line "their dirty work."
para "They're supposed"
line "to have disbanded"
cont "three years ago."
para "Anyway, they're at"
line "the WELL, cutting"
para "off SLOWPOKETAILS"
line "for sale!"
para "So I'm going to"
line "go give them a"
cont "lesson in pain!"
para "Hang on, SLOWPOKE!"
line "Old KURT is on his"
cont "way!"
done
KurtsHouseKurtHonoredToMakeBallsText:
text "KURT: Hi, <PLAYER>!"
para "You handled your-"
line "self like a real"
cont "hero at the WELL."
para "I like your style!"
para "I would be honored"
line "to make BALLS for"
para "a trainer like"
line "you."
para "This is all I have"
line "now, but take it."
done
KurtsHouseKurtBallsFromApricornsText:
text "KURT: I make BALLS"
line "from APRICORNS."
para "Collect them from"
line "trees and bring"
cont "'em to me."
para "I'll make BALLS"
line "out of them."
done
KurtsHouseKurtAskYouHaveAnApricornText:
text "KURT: You have an"
line "APRICORN for me?"
para "Fine! I'll turn it"
line "into a BALL."
done
KurtsHouseKurtItWillTakeADayText:
text "KURT: It'll take a"
line "day to make you a"
para "BALL. Come back"
line "for it later."
done
KurtsHouseKurtThatsALetdownText:
text "KURT: Oh…"
line "That's a letdown."
done
KurtsHouseKurtDontBotherMeText:
text "KURT: I'm working!"
line "Don't bother me!"
done
KurtsHouseKurtJustFinishedYourBallText:
text "KURT: Ah, <PLAYER>!"
line "I just finished"
cont "your BALL. Here!"
done
KurtsHouseKurtTurnedOutGreatText:
text "KURT: That turned"
line "out great."
para "Try catching"
line "#MON with it."
done
KurtsHouseKurtGranddaughterHelpingWorkFasterText:
text "KURT: Now that my"
line "granddaughter is"
para "helping me, I can"
line "work much faster."
done
KurtsHouseKurtWhatIsThatText:
text "Wh-what is that?"
para "I've never seen"
line "one before."
para "It looks a lot"
line "like a # BALL,"
para "but it appears to"
line "be something else."
para "Let me check it"
line "for you."
done
KurtsHouseKurtImCheckingItNowText:
text "I'm checking it"
line "now."
done
KurtsHouseKurtAhHaISeeText:
text "Ah-ha! I see!"
line "So…"
done
KurtsHouseKurtThisBallStartedToShakeText:
text "<PLAYER>!"
para "This BALL started"
line "to shake while I"
cont "was checking it."
para "There must be"
line "something to this!"
done
KurtsGranddaughterSlowpokeGoneText:
text "The SLOWPOKE are"
line "gone… Were they"
para "taken away by bad"
line "people?"
done
KurtsGranddaughterLonelyText:
text "Grandpa's gone…"
line "I'm so lonely…"
done
KurtsGranddaughterSlowpokeBackText:
text "The SLOWPOKE my"
line "dad gave me came"
para "back! Its TAIL is"
line "growing back too!"
done
KurtsGranddaughterDadText:
text "Dad works at SILPH"
line "where he studies"
cont "# BALLS."
para "I have to stay"
line "home with Grandpa"
cont "and SLOWPOKE."
done
KurtsGranddaughterHelpText:
text "I get to help"
line "Grandpa now!"
para "We'll make good"
line "BALLS for you, so"
cont "please wait!"
done
KurtsGranddaughterFunText:
text "It's fun to make"
line "BALLS!"
done
KurtsGranddaughterGSBallText:
text "Grandpa's checking"
line "a BALL right now."
para "So I'm waiting"
line "till he's done."
done
KurtsHouseSlowpokeText:
text "SLOWPOKE: …"
line "Yawn?"
done
KurtsHouseOakPhotoText:
text "…A young PROF."
line "OAK?"
done
KurtsHouseCelebiStatueText:
text "It's a statue of"
line "the forest's pro-"
cont "tector."
done
KurtsHouse_MapEvents:
db 0, 0 ; filler
db 2 ; warp events
warp_event 3, 7, AZALEA_TOWN, 4
warp_event 4, 7, AZALEA_TOWN, 4
db 0 ; coord events
db 7 ; bg events
bg_event 6, 1, BGEVENT_READ, KurtsHouseRadio
bg_event 8, 0, BGEVENT_READ, KurtsHouseOakPhoto
bg_event 9, 0, BGEVENT_READ, KurtsHouseOakPhoto
bg_event 5, 1, BGEVENT_READ, KurtsHouseBookshelf
bg_event 2, 1, BGEVENT_READ, KurtsHouseBookshelf
bg_event 3, 1, BGEVENT_READ, KurtsHouseBookshelf
bg_event 4, 1, BGEVENT_READ, KurtsHouseCelebiStatue
db 5 ; object events
object_event 3, 2, SPRITE_KURT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Kurt1, EVENT_KURTS_HOUSE_KURT_1
object_event 5, 3, SPRITE_TWIN, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsGranddaughter1, EVENT_KURTS_HOUSE_GRANDDAUGHTER_1
object_event 6, 3, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsHouseSlowpoke, EVENT_KURTS_HOUSE_SLOWPOKE
object_event 14, 3, SPRITE_KURT, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Kurt2, EVENT_KURTS_HOUSE_KURT_2
object_event 11, 4, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsGranddaughter2, EVENT_KURTS_HOUSE_GRANDDAUGHTER_2
| 21.961484
| 160
| 0.823839
|
05a53f4ece3df3575947f7b339a03b649cb3bd2a
| 551
|
asm
|
Assembly
|
oeis/016/A016847.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/016/A016847.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/016/A016847.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A016847: (4n+3)^11.
; 177147,1977326743,285311670611,8649755859375,116490258898219,952809757913927,5559060566555523,25408476896404831,96549157373046875,317475837322472439,929293739471222707,2472159215084012303,6071163615208263051,13931233916552734375,30155888444737842659,62050608388552823487,122130132904968017083,231122292121701565271,422351360321044921875,747993810527520928879,1287831418538085836267,2161283703465490489863,3543686674874777831491,5688000922764599609375,8953382542587164451099,13842338707244455781047
mul $0,4
add $0,3
pow $0,11
| 78.714286
| 499
| 0.907441
|
288ecd2f0db8e076a3f097c39c76d401a6bcb74f
| 879
|
asm
|
Assembly
|
testsuite/ubivm/expected/writeln_varios_tipos.asm
|
alexgarzao/UOP
|
12460841ff2b9991d2f7f461635b1f551413823f
|
[
"MIT"
] | null | null | null |
testsuite/ubivm/expected/writeln_varios_tipos.asm
|
alexgarzao/UOP
|
12460841ff2b9991d2f7f461635b1f551413823f
|
[
"MIT"
] | null | null | null |
testsuite/ubivm/expected/writeln_varios_tipos.asm
|
alexgarzao/UOP
|
12460841ff2b9991d2f7f461635b1f551413823f
|
[
"MIT"
] | null | null | null |
Entity start
No options
Constants
0 S start
1 S ABCDEFGHIJKLMNOPQRSTUVWXYZ
2 I 1
3 S io.writeln
4 S 12345 true false 10.0 20.9876
5 I 12345
6 B true
7 B false
8 R 10.000000
9 R 20.987600
End
Valid context (always)
No properties
Def start
No parameters
No local variables
No results
ldconst 1 --> [ABCDEFGHIJKLMNOPQRSTUVWXYZ]
ldconst 2 --> [1]
lcall 3 --> [io.writeln]
ldconst 4 --> [12345 true false 10.0 20.9876]
ldconst 2 --> [1]
lcall 3 --> [io.writeln]
ldconst 5 --> [12345]
ldconst 2 --> [1]
lcall 3 --> [io.writeln]
ldconst 6 --> [true]
ldconst 2 --> [1]
lcall 3 --> [io.writeln]
ldconst 7 --> [false]
ldconst 2 --> [1]
lcall 3 --> [io.writeln]
ldconst 8 --> [10.000000]
ldconst 2 --> [1]
lcall 3 --> [io.writeln]
ldconst 9 --> [20.987600]
ldconst 2 --> [1]
lcall 3 --> [io.writeln]
stop
End
End
| 19.533333
| 47
| 0.607509
|
48761c918511aada81bccea520a86103b4d2894e
| 659
|
asm
|
Assembly
|
oeis/074/A074571.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/074/A074571.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/074/A074571.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A074571: a(n) = 5^n + 6^n + 7^n.
; Submitted by Jamie Morken(s2)
; 3,18,110,684,4322,27708,179930,1181604,7835042,52384428,352707050,2388951924,16262210162,111170407548,762690752570,5248264072644,36206628367682,250320112885068,1733788251844490,12027328411711764,83543792169315602,580959651881864988,4043826938216270810,28170398492089597284,196379217363663421922,1369796930917771555308,9559552181946717279530,66743303313208673217204,466164731662189395614642,3256937673614891715524028,22761345532987606924278650,159106482166043284155019524,1112409618418232434152581762
mov $3,$0
seq $0,74520 ; 1^n + 6^n + 7^n.
add $0,6
mov $2,5
pow $2,$3
add $0,$2
sub $0,7
| 54.916667
| 501
| 0.836115
|
0cbe4251f6511020c129a2b73c8a404bea3a8d2d
| 2,475
|
asm
|
Assembly
|
Examples/error-checking-correcting/calculateparity.asm
|
agguro/linux-nasm
|
3e72083c3db6d7118eb2aa430b73e0d20e88456b
|
[
"Unlicense"
] | 6
|
2020-07-19T18:34:43.000Z
|
2022-03-26T10:21:09.000Z
|
Examples/error-checking-correcting/calculateparity.asm
|
NrdyBhu1/linux-nasm
|
3e72083c3db6d7118eb2aa430b73e0d20e88456b
|
[
"Unlicense"
] | null | null | null |
Examples/error-checking-correcting/calculateparity.asm
|
NrdyBhu1/linux-nasm
|
3e72083c3db6d7118eb2aa430b73e0d20e88456b
|
[
"Unlicense"
] | 3
|
2020-07-19T18:35:10.000Z
|
2021-07-25T17:34:50.000Z
|
;name: calculateparitybit.asm
;
;build: nasm -f elf64 -o calculateparitybit.o calculateparitybit.asm
; ld calculateparitybit.o -o calculateparitybit
;
;description: calculate parity bit
;
;remark: Source: Hacker's Delight - 5.2 page 98
[list -]
%include "unistd.inc"
[list +]
bits 64
section .bss
buffer: resb 1
section .data
message: db " has parity "
.len: equ $-message
.odd: db "odd"
.odd.len: equ $-message.odd
.even: db "even"
.even.len: equ $-message.even
.end: db ".", 0x0A
.end.len: equ $-message.end
section .text
global _start
_start:
mov rax, 0x123456789ABCDEF ;value we calculate parity of
call printBinary ;print in binary on screen
call parity ;calculate parity bit (in RAX)
push rax ;save parity bit on stack
mov rsi, message ;write first part of message
mov rdx, message.len
call print
pop rax ; parity bit from stack
and rax, rax ;test if bit is zero or one
jnz oddparity ;in case 1 then odd parity
mov rsi, message.even ;print second part of message (parity even)
mov rdx, message.even.len
jmp write
oddparity:
mov rsi, message.odd ;print second part of message (parity odd)
mov rdx, message.odd.len
write:
call print
mov rsi, message.end ;print the trailing dot
mov rdx, message.end.len
call print
syscall exit, 0
parity: ;calculate parity bit 0 = even, 1 is odd
mov rcx, 32
repeat:
mov rbx, rax
shr rbx, cl
xor rax, rbx
shr rcx, 1
cmp rcx, 0
jne repeat
and rax, 1 ;rightmost bit is parity bit
ret
printBinary:
push rax
mov rcx, 64 ;64 bits to display
clc ;clear carry flag
.repeat:
rcl rax, 1 ;start with leftmost bit
adc byte [buffer],0x30 ;make it ASCII
push rcx
push rax
call printBuffer
pop rax
pop rcx
loop .repeat
pop rax
ret
printBuffer:
mov rsi, buffer
mov rdx, 1
print:
syscall write, stdout
and byte [buffer],0 ;clear buffer
ret
| 26.902174
| 79
| 0.532121
|
338903ff38538466ab0eaa10fc2bb0d6f6979d65
| 816
|
asm
|
Assembly
|
programs/oeis/317/A317335.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/317/A317335.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/317/A317335.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A317335: a(n) = A317332(n) - 8*n.
; 1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,-2,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,-2,1,1,-2,1,1,-2,-2,-2,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,-2,1,1,-2,-2,1,-2,-2,-2,1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,-2,1,1,-2,1,1,-2,-2,-2,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,-2,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,-2,1,1,-2,1,1,-2,-2,-2,1,1,-2,-2,1,-2,-2,-2,1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,1,1,1,-2,1,1,-2,-2,-2,1,1,-2,-2,1,-2,-2,-2,1,1,-2,1,1,-2,-2,1,1,1,-2,-2,1,-2,-2,-2,1,1,-2,1,1,-2,-2,-2,1,1
lpb $0
add $0,1
mov $1,$0
add $1,1
div $1,2
gcd $0,$1
sub $0,1
mov $2,1
lpe
add $1,$2
add $1,1
mod $1,2
sub $1,2
div $1,2
mul $1,3
add $1,1
| 40.8
| 624
| 0.42402
|
3859851c8f97eb9c2e27c90562ca522b0e686614
| 2,469
|
asm
|
Assembly
|
programs/oeis/247/A247049.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/247/A247049.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/247/A247049.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A247049: Rectangular array read upwards by columns: T = T(n,k) = number of paths from (0,0) to (n,k), where 0 >= k <= 2, consisting of segments given by the vectors (1,1), (1,2), (1,-1).
; 1,0,0,0,1,1,1,1,1,1,2,2,2,3,3,3,5,5,5,8,8,8,13,13,13,21,21,21,34,34,34,55,55,55,89,89,89,144,144,144,233,233,233,377,377,377,610,610,610,987,987,987,1597,1597,1597,2584,2584,2584,4181,4181,4181,6765,6765,6765,10946,10946,10946,17711,17711,17711,28657,28657,28657,46368,46368,46368,75025,75025,75025,121393,121393,121393,196418,196418,196418,317811,317811,317811,514229,514229,514229,832040,832040,832040,1346269,1346269,1346269,2178309,2178309,2178309,3524578,3524578,3524578,5702887,5702887,5702887,9227465,9227465,9227465,14930352,14930352,14930352,24157817,24157817,24157817,39088169,39088169,39088169,63245986,63245986,63245986,102334155,102334155,102334155,165580141,165580141,165580141,267914296,267914296,267914296,433494437,433494437,433494437,701408733,701408733,701408733,1134903170,1134903170,1134903170,1836311903,1836311903,1836311903,2971215073,2971215073,2971215073,4807526976,4807526976,4807526976,7778742049,7778742049,7778742049,12586269025,12586269025,12586269025,20365011074,20365011074,20365011074,32951280099,32951280099,32951280099,53316291173,53316291173,53316291173,86267571272,86267571272,86267571272,139583862445,139583862445,139583862445,225851433717,225851433717,225851433717,365435296162,365435296162,365435296162,591286729879,591286729879,591286729879,956722026041,956722026041,956722026041,1548008755920,1548008755920,1548008755920,2504730781961,2504730781961,2504730781961,4052739537881,4052739537881,4052739537881,6557470319842,6557470319842,6557470319842,10610209857723,10610209857723,10610209857723,17167680177565,17167680177565,17167680177565,27777890035288,27777890035288,27777890035288,44945570212853,44945570212853,44945570212853,72723460248141,72723460248141,72723460248141,117669030460994,117669030460994,117669030460994,190392490709135,190392490709135,190392490709135,308061521170129,308061521170129,308061521170129,498454011879264,498454011879264,498454011879264,806515533049393,806515533049393,806515533049393,1304969544928657,1304969544928657,1304969544928657,2111485077978050,2111485077978050,2111485077978050,3416454622906707,3416454622906707,3416454622906707,5527939700884757,5527939700884757,5527939700884757,8944394323791464,8944394323791464,8944394323791464
mov $1,1
lpb $0
trn $0,3
mov $2,$3
add $3,$1
mov $1,$2
lpe
| 224.454545
| 2,211
| 0.860672
|
c8cd0e4e2335765f2ffebb07c376661b7d877194
| 1,277
|
asm
|
Assembly
|
WS5_ASM/Task_2.asm
|
OlegMalchenko/ACOS_WS_3
|
a0a6d02b6dcd54b1a103a3da24de17251d934605
|
[
"MIT"
] | null | null | null |
WS5_ASM/Task_2.asm
|
OlegMalchenko/ACOS_WS_3
|
a0a6d02b6dcd54b1a103a3da24de17251d934605
|
[
"MIT"
] | null | null | null |
WS5_ASM/Task_2.asm
|
OlegMalchenko/ACOS_WS_3
|
a0a6d02b6dcd54b1a103a3da24de17251d934605
|
[
"MIT"
] | null | null | null |
#
# Write a program that fills an array of 32 integers from values from the standard input.
# It reads values in a loop and finishes reading when all 32 values are read or when value 0 is read.
#
.include "macros.s"
.macro print_hex(%var)
li a7, 34
mv a0, %var
ecall
.end_macro
.eqv COUNT t5
.eqv CONST t1
.eqv x t0
.data
.space 128
.text
main:
li COUNT, 0
li CONST, 32
print_str("Please, sequntially input the integers to be stored:\n")
j while_case
while_case:
int_input(x)
beqz x, _exit
#sw x, 0(sp)
addi sp, sp, -4
sw x, 0(sp)
addi COUNT, COUNT, 1
beq COUNT, CONST, _exit
j while_case
_exit:
print_str("The current sp-address is: ")
print_hex(sp)
newline
print_str("Check this address in the 'Data Segment' of 'Execute' pannel to see if all ints were stored correctly.\n")
print_str("Note that if zero was inputted as a terminating symbol, the above address would point to that very zero.\n")
newline
print_str("arr[max_arr_index] = ")
lw t3 0(sp) #| this code will give you the last content of the array, i.e. arr[max_arr_index]
print_var_int(t3) #| for example for sequence 1 2 3 4 5 6 999 0, it gives 999. (as zero is an indicator number)
# #| for the sequence 1,2,3,4,5,6,7,8,...,32 it gives 32.
| 26.061224
| 120
| 0.689115
|
e8350cdfb1f7388ada75c36be87a37f70a3f97b8
| 335
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_nan.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_nan.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_nan.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; double nan(const char *tagp)
SECTION code_fp_math48
PUBLIC am48_nan
EXTERN am48_derror_einval_zc
; return nan
;
; enter : hl = char *tagp
;
; exit : AC' = 0
; carry set, errno set
;
; note : math48 does not support nan
;
; uses : af, bc', de', hl'
defc am48_nan = am48_derror_einval_zc
| 15.227273
| 40
| 0.60597
|
852242f27f523452ae2784c971e0fc988be2089f
| 371
|
asm
|
Assembly
|
programs/oeis/101/A101306.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/101/A101306.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/101/A101306.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A101306: a(n) = Sum_{i=1..n} {last digit of prime(i)}.
; 2,5,10,17,18,21,28,37,40,49,50,57,58,61,68,71,80,81,88,89,92,101,104,113,120,121,124,131,140,143,150,151,158,167,176,177,184,187,194,197,206,207,208,211,218,227,228,231,238,247,250,259,260,261,268,271,280
lpb $0
mov $2,$0
sub $0,1
seq $2,7652 ; Final digit of prime(n).
add $1,$2
lpe
add $1,2
mov $0,$1
| 30.916667
| 206
| 0.644205
|
08bfbeb92c37fe2d56ce2bf86fcc9e6ace2c478c
| 439
|
asm
|
Assembly
|
programs/oeis/037/A037482.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/037/A037482.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/037/A037482.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A037482: Base 5 digits are, in order, the first n terms of the periodic sequence with initial period 1,2.
; 1,7,36,182,911,4557,22786,113932,569661,2848307,14241536,71207682,356038411,1780192057,8900960286,44504801432,222524007161,1112620035807,5563100179036,27815500895182,139077504475911,695387522379557
add $0,1
mov $1,196572
mov $2,5
pow $2,$0
mul $2,7
div $2,6
mul $2,2
add $2,7
add $1,$2
mul $1,5
sub $1,982945
div $1,40
add $1,1
| 25.823529
| 199
| 0.76082
|
e57edc386e4c8f5330db31379bd0e660d88c6a21
| 238
|
asm
|
Assembly
|
stdlib/src/font.asm
|
brian-kelley/GoldOS
|
738e19c3b9310cfea6bf316c6a4b398eee900324
|
[
"MIT"
] | 5
|
2016-11-10T02:29:38.000Z
|
2022-01-09T23:45:59.000Z
|
stdlib/src/font.asm
|
brian-kelley/GoldOS
|
738e19c3b9310cfea6bf316c6a4b398eee900324
|
[
"MIT"
] | null | null | null |
stdlib/src/font.asm
|
brian-kelley/GoldOS
|
738e19c3b9310cfea6bf316c6a4b398eee900324
|
[
"MIT"
] | null | null | null |
bits 32
global fontbin
section .data
align 4
; Font bitmap credit: https://github.com/dhepper/font8x8
; To get glyph for character c, take 8 bytes starting at address:
; fontbin + (c - '!') << 3
fontbin: incbin "stdlib/src/font.bin"
| 17
| 65
| 0.705882
|
fec785646182d50ff7a50ced6643c27919fbb64c
| 552
|
asm
|
Assembly
|
boot/BIOS/stage_2/src/long_mode/gdt64.asm
|
Andrispowq/HackOS
|
73b24450281abbbe5f37b8f2c02904d82a255c25
|
[
"Apache-2.0"
] | 10
|
2020-12-10T16:36:41.000Z
|
2021-11-08T12:01:05.000Z
|
boot/BIOS/stage_2/src/long_mode/gdt64.asm
|
Andrispowq/HackOS
|
73b24450281abbbe5f37b8f2c02904d82a255c25
|
[
"Apache-2.0"
] | null | null | null |
boot/BIOS/stage_2/src/long_mode/gdt64.asm
|
Andrispowq/HackOS
|
73b24450281abbbe5f37b8f2c02904d82a255c25
|
[
"Apache-2.0"
] | 1
|
2020-10-02T05:42:21.000Z
|
2020-10-02T05:42:21.000Z
|
[bits 32]
gdt_start_64:
dw 0xFFFF
dw 0x0
db 0x0
db 0x0
db 0x1
db 0x0
gdt_code_64:
dw 0x0
dw 0x0
db 0x0
db 10011010b
db 10101111b
db 0x0
gdt_data_64:
dw 0x0
dw 0x0
db 0x0
db 10010010b
db 00000000b
db 0x0
gdt_end_64:
gdt_descriptor_64:
dw gdt_end_64 - gdt_start_64 - 1
dd gdt_start_64
CODE_SEG_64 equ gdt_code_64 - gdt_start_64
DATA_SEG_64 equ gdt_data_64 - gdt_start_64
| 15.771429
| 45
| 0.538043
|
3ea6f44b8513cdf460c9926cfe1d1a6c8acf423d
| 210
|
asm
|
Assembly
|
libsrc/gfx/portable/draw.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/gfx/portable/draw.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/gfx/portable/draw.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_graphics
PUBLIC draw
PUBLIC _draw
EXTERN commondraw
EXTERN plot
;void draw(int x, int y, int x2, int y2) __smallc
;Note ints are actually uint8_t
draw:
_draw:
ld hl,plot
jp commondraw
| 12.352941
| 50
| 0.742857
|
84c01dc7dcad33fa19e76b676efc0d0f92c35ea8
| 3,958
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_384.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_384.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_384.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 %rax
push %rdi
lea addresses_WT_ht+0x24cc, %rdi
xor %rax, %rax
movb $0x61, (%rdi)
nop
nop
cmp %rax, %rax
pop %rdi
pop %rax
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r9
push %rax
push %rbp
push %rsi
// Faulty Load
lea addresses_A+0x1ce58, %rbp
nop
xor $25737, %r9
movb (%rbp), %r13b
lea oracles, %rax
and $0xff, %r13
shlq $12, %r13
mov (%rax,%r13,1), %r13
pop %rsi
pop %rbp
pop %rax
pop %r9
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': True, 'type': 'addresses_A'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'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
*/
| 73.296296
| 2,999
| 0.661445
|
5e36f96e403118cb5010afdb55f2402a11a05914
| 2,427
|
asm
|
Assembly
|
programs/oeis/272/A272870.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/272/A272870.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/272/A272870.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A272870: Real part of (n + i)^4.
; 1,-4,-7,28,161,476,1081,2108,3713,6076,9401,13916,19873,27548,37241,49276,64001,81788,103033,128156,157601,191836,231353,276668,328321,386876,452921,527068,609953,702236,804601,917756,1042433,1179388,1329401,1493276,1671841,1865948,2076473,2304316,2550401,2815676,3101113,3407708,3736481,4088476,4464761,4866428,5294593,5750396,6235001,6749596,7295393,7873628,8485561,9132476,9815681,10536508,11296313,12096476,12938401,13823516,14753273,15729148,16752641,17825276,18948601,20124188,21353633,22638556,23980601,25381436,26842753,28366268,29953721,31606876,33327521,35117468,36978553,38912636,40921601,43007356,45171833,47416988,49744801,52157276,54656441,57244348,59923073,62694716,65561401,68525276,71588513,74753308,78021881,81396476,84879361,88472828,92179193,96000796,99940001,103999196,108180793,112487228,116920961,121484476,126180281,131010908,135978913,141086876,146337401,151733116,157276673,162970748,168818041,174821276,180983201,187306588,193794233,200448956,207273601,214271036,221444153,228795868,236329121,244046876,251952121,260047868,268337153,276823036,285508601,294396956,303491233,312794588,322310201,332041276,341991041,352162748,362559673,373185116,384042401,395134876,406465913,418038908,429857281,441924476,454243961,466819228,479653793,492751196,506115001,519748796,533656193,547840828,562306361,577056476,592094881,607425308,623051513,638977276,655206401,671742716,688590073,705752348,723233441,741037276,759167801,777628988,796424833,815559356,835036601,854860636,875035553,895565468,916454521,937706876,959326721,981318268,1003685753,1026433436,1049565601,1073086556,1097000633,1121312188,1146025601,1171145276,1196675641,1222621148,1248986273,1275775516,1302993401,1330644476,1358733313,1387264508,1416242681,1445672476,1475558561,1505905628,1536718393,1568001596,1599760001,1631998396,1664721593,1697934428,1731641761,1765848476,1800559481,1835779708,1871514113,1907767676,1944545401,1981852316,2019693473,2058073948,2096998841,2136473276,2176502401,2217091388,2258245433,2299969756,2342269601,2385150236,2428616953,2472675068,2517329921,2562586876,2608451321,2654928668,2702024353,2749743836,2798092601,2847076156,2896700033,2946969788,2997891001,3049469276,3101710241,3154619548,3208202873,3262465916,3317414401,3373054076,3429390713,3486430108,3544178081,3602640476,3661823161,3721732028,3782372993,3843751996
pow $0,2
mov $1,$0
sub $0,6
mul $1,$0
add $1,1
| 269.666667
| 2,343
| 0.879687
|
aa485bf88cab7f5079b65820d6563001c66b14bc
| 683
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/error/z80/error_edom_zc.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/error/z80/error_edom_zc.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/error/z80/error_edom_zc.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
INCLUDE "config_private.inc"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IF __CLIB_OPT_ERROR
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; verbose mode
SECTION code_clib
SECTION code_error
PUBLIC error_edom_zc
EXTERN error_edom_mc
pop hl
error_edom_zc:
; set hl = 0
; set carry flag
; set errno = EDOM
call error_edom_mc
inc hl
ret
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ELSE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
SECTION code_clib
SECTION code_error
PUBLIC error_edom_zc
EXTERN errno_zc
defc error_edom_zc = errno_zc - 2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ENDIF
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
| 14.847826
| 36
| 0.43631
|
64e24a6c51769b5e423d488edcc91e67cc65c484
| 1,241
|
asm
|
Assembly
|
programs/oeis/247/A247817.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/247/A247817.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/247/A247817.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A247817: Sum(4^k, k=2..n).
; 0,16,80,336,1360,5456,21840,87376,349520,1398096,5592400,22369616,89478480,357913936,1431655760,5726623056,22906492240,91625968976,366503875920,1466015503696,5864062014800,23456248059216,93824992236880,375299968947536,1501199875790160,6004799503160656,24019198012642640,96076792050570576,384307168202282320,1537228672809129296,6148914691236517200,24595658764946068816,98382635059784275280,393530540239137101136,1574122160956548404560,6296488643826193618256,25185954575304774473040,100743818301219097892176,402975273204876391568720,1611901092819505566274896,6447604371278022265099600,25790417485112089060398416,103161669940448356241593680,412646679761793424966374736,1650586719047173699865498960,6602346876188694799461995856,26409387504754779197847983440,105637550019019116791391933776,422550200076076467165567735120,1690200800304305868662270940496,6760803201217223474649083762000,27043212804868893898596335048016,108172851219475575594385340192080,432691404877902302377541360768336,1730765619511609209510165443073360,6923062478046436838040661772293456,27692249912185747352162647089173840,110768999648742989408650588356695376,443075998594971957634602353426781520
mov $1,4
pow $1,$0
div $1,3
mul $1,16
mov $0,$1
| 137.888889
| 1,162
| 0.921031
|
d933dacf84e3ec84e5091a0dbee7f563845ba68e
| 395
|
nasm
|
Assembly
|
Lib/site-packages/wx-2.8-msw-unicode/wx/tools/Editra/tests/syntax/netwide_assembler.nasm
|
ekkipermana/robotframework-test
|
243ca26f69962f8cf20cd7d054e0ff3e709bc7f4
|
[
"bzip2-1.0.6"
] | 27
|
2020-11-12T19:24:54.000Z
|
2022-03-27T23:10:45.000Z
|
Lib/site-packages/wx-2.8-msw-unicode/wx/tools/Editra/tests/syntax/netwide_assembler.nasm
|
ekkipermana/robotframework-test
|
243ca26f69962f8cf20cd7d054e0ff3e709bc7f4
|
[
"bzip2-1.0.6"
] | 2
|
2020-11-02T06:30:39.000Z
|
2022-02-23T18:39:55.000Z
|
Lib/site-packages/wx-2.8-msw-unicode/wx/tools/Editra/tests/syntax/netwide_assembler.nasm
|
ekkipermana/robotframework-test
|
243ca26f69962f8cf20cd7d054e0ff3e709bc7f4
|
[
"bzip2-1.0.6"
] | 7
|
2018-02-13T10:22:39.000Z
|
2019-07-04T07:39:28.000Z
|
; Syntax Highlighting Test File for NASM
; Some Comments about this file
; Hello World in NASM
section .text
_start:
push dword len
push dword msg
push dword 1
mov eax, 0x4
call _syscall
add esp, 12
push dword 0
mov eax, 0x1
call _syscall
_syscall:
int 0x80
ret
msg db "Hello World",0xa
len equ $ - msg
| 15.8
| 40
| 0.582278
|
a6cd73e0c3a1c4257b336cc6be59411333e34b00
| 622
|
asm
|
Assembly
|
oeis/315/A315515.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/315/A315515.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/315/A315515.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A315515: Coordination sequence Gal.6.200.5 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
; Submitted by Simon Strandgaard
; 1,6,11,17,22,26,31,36,40,45,51,56,62,68,73,79,84,88,93,98,102,107,113,118,124,130,135,141,146,150,155,160,164,169,175,180,186,192,197,203,208,212,217,222,226,231,237,242,248,254
mov $1,$0
seq $0,315741 ; Coordination sequence Gal.6.210.5 where G.u.t.v denotes the coordination sequence for a vertex of type v in tiling number t in the Galebach list of u-uniform tilings.
mul $0,3
add $0,1
sub $0,$1
div $0,3
| 56.545455
| 182
| 0.744373
|
3e342a310b04443b9626772411eb7984a5968508
| 162
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/ts2068/display/c/sdcc/tshc_aaddrpdown.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/arch/ts2068/display/c/sdcc/tshc_aaddrpdown.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/arch/ts2068/display/c/sdcc/tshc_aaddrpdown.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; void *tshc_aaddrpdown(void *saddr)
SECTION code_clib
SECTION code_arch
PUBLIC _tshc_aaddrpdown
EXTERN _zx_saddrpdown
defc _tshc_aaddrpdown = _zx_saddrpdown
| 14.727273
| 38
| 0.839506
|
69a713d060beee744f9ecce64904c3d6a3f974b6
| 202
|
asm
|
Assembly
|
programs/oeis/256/A256302.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/256/A256302.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/256/A256302.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A256302: Least prime p such that p+3*k*(k+1) is prime for all k=0,...,n.
; 2,5,5,5,11,11,11,11,11,11,23,23,23,23,23,23,23,23,23,23,23,23
mov $1,3
lpb $0
trn $0,$1
mul $1,2
lpe
sub $1,1
mov $0,$1
| 18.363636
| 74
| 0.589109
|
b39c8762cdbf64564c997e8f881070bfcd74e511
| 938
|
asm
|
Assembly
|
programs/oeis/232/A232866.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/232/A232866.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/232/A232866.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A232866: Positions of the nonnegative integers in the sequence (or tree) of complex numbers generated by these rules: 0 is in S, and if x is in S, then x + 1 and i*x are in S, where duplicates are deleted as they occur.
; 1,2,3,5,9,16,27,42,61,84,111,142,177,216,259,306,357,412,471,534,601,672,747,826,909,996,1087,1182,1281,1384,1491,1602,1717,1836,1959,2086,2217,2352,2491,2634,2781,2932,3087,3246,3409,3576,3747,3922,4101,4284,4471,4662,4857,5056,5259,5466,5677,5892,6111,6334,6561,6792,7027,7266,7509,7756,8007,8262,8521,8784,9051,9322,9597,9876,10159,10446,10737,11032,11331,11634,11941,12252,12567,12886,13209,13536,13867,14202,14541,14884,15231,15582,15937,16296,16659,17026,17397,17772,18151,18534
lpb $0
add $1,1
add $2,$3
trn $2,5
mov $3,$0
add $4,$0
sub $0,1
trn $3,4
trn $4,2
add $4,$3
add $1,$4
add $1,$2
mov $2,$0
sub $2,$3
mov $4,$3
mov $3,$2
mov $2,$0
trn $4,1
lpe
add $1,1
mov $0,$1
| 37.52
| 486
| 0.696162
|
cfe88f6ad5b22d7e12c1f77ccfd43ea44f967297
| 34
|
asm
|
Assembly
|
orgb/t1/multi_instruction.asm
|
rrrichter/ufrgs
|
6a1de03afb5af0ff48d0e630a501c1db3ec2591e
|
[
"MIT"
] | null | null | null |
orgb/t1/multi_instruction.asm
|
rrrichter/ufrgs
|
6a1de03afb5af0ff48d0e630a501c1db3ec2591e
|
[
"MIT"
] | null | null | null |
orgb/t1/multi_instruction.asm
|
rrrichter/ufrgs
|
6a1de03afb5af0ff48d0e630a501c1db3ec2591e
|
[
"MIT"
] | 1
|
2018-06-24T18:19:23.000Z
|
2018-06-24T18:19:23.000Z
|
lh $t1, 8($zero)
sw $t1, 12($zero)
| 17
| 17
| 0.558824
|
663e20b8d8caf41ad5f6145fdcad4be726ae58f2
| 173
|
asm
|
Assembly
|
runshellcode.asm
|
paranoidninja/PIC-Privileges
|
2de12c21dedda76fa8b9f888f1a3b1204ad811db
|
[
"MIT"
] | 68
|
2021-01-30T16:14:50.000Z
|
2022-03-29T22:32:51.000Z
|
runshellcode.asm
|
paranoidninja/PIC-Privileges
|
2de12c21dedda76fa8b9f888f1a3b1204ad811db
|
[
"MIT"
] | null | null | null |
runshellcode.asm
|
paranoidninja/PIC-Privileges
|
2de12c21dedda76fa8b9f888f1a3b1204ad811db
|
[
"MIT"
] | 14
|
2021-01-30T16:05:55.000Z
|
2022-01-21T20:21:25.000Z
|
; compile with
; nasm -f win64 runshellcode.asm -o runshellcode.o
; x86_64-w64-mingw32-ld runshellcode.o -o runshellcode.exe
Global Start
Start:
incbin "getprivs.bin"
| 19.222222
| 58
| 0.751445
|
8be1b8dc7f7dabe7eb864e8eac3be80f46547633
| 42,644
|
asm
|
Assembly
|
rm.asm
|
ray5273/os_project4
|
1ed4cb594205baed90d821d5c4c93be26ec6a889
|
[
"MIT-0"
] | null | null | null |
rm.asm
|
ray5273/os_project4
|
1ed4cb594205baed90d821d5c4c93be26ec6a889
|
[
"MIT-0"
] | null | null | null |
rm.asm
|
ray5273/os_project4
|
1ed4cb594205baed90d821d5c4c93be26ec6a889
|
[
"MIT-0"
] | null | null | null |
_rm: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 53 push %ebx
e: 51 push %ecx
f: 83 ec 10 sub $0x10,%esp
12: 89 cb mov %ecx,%ebx
int i;
if(argc < 2){
14: 83 3b 01 cmpl $0x1,(%ebx)
17: 7f 17 jg 30 <main+0x30>
printf(2, "Usage: rm files...\n");
19: 83 ec 08 sub $0x8,%esp
1c: 68 44 08 00 00 push $0x844
21: 6a 02 push $0x2
23: e8 66 04 00 00 call 48e <printf>
28: 83 c4 10 add $0x10,%esp
exit();
2b: e8 b7 02 00 00 call 2e7 <exit>
}
for(i = 1; i < argc; i++){
30: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp)
37: eb 4b jmp 84 <main+0x84>
if(unlink(argv[i]) < 0){
39: 8b 45 f4 mov -0xc(%ebp),%eax
3c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
43: 8b 43 04 mov 0x4(%ebx),%eax
46: 01 d0 add %edx,%eax
48: 8b 00 mov (%eax),%eax
4a: 83 ec 0c sub $0xc,%esp
4d: 50 push %eax
4e: e8 e4 02 00 00 call 337 <unlink>
53: 83 c4 10 add $0x10,%esp
56: 85 c0 test %eax,%eax
58: 79 26 jns 80 <main+0x80>
printf(2, "rm: %s failed to delete\n", argv[i]);
5a: 8b 45 f4 mov -0xc(%ebp),%eax
5d: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
64: 8b 43 04 mov 0x4(%ebx),%eax
67: 01 d0 add %edx,%eax
69: 8b 00 mov (%eax),%eax
6b: 83 ec 04 sub $0x4,%esp
6e: 50 push %eax
6f: 68 58 08 00 00 push $0x858
74: 6a 02 push $0x2
76: e8 13 04 00 00 call 48e <printf>
7b: 83 c4 10 add $0x10,%esp
break;
7e: eb 0b jmp 8b <main+0x8b>
if(argc < 2){
printf(2, "Usage: rm files...\n");
exit();
}
for(i = 1; i < argc; i++){
80: 83 45 f4 01 addl $0x1,-0xc(%ebp)
84: 8b 45 f4 mov -0xc(%ebp),%eax
87: 3b 03 cmp (%ebx),%eax
89: 7c ae jl 39 <main+0x39>
printf(2, "rm: %s failed to delete\n", argv[i]);
break;
}
}
exit();
8b: e8 57 02 00 00 call 2e7 <exit>
00000090 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
90: 55 push %ebp
91: 89 e5 mov %esp,%ebp
93: 57 push %edi
94: 53 push %ebx
asm volatile("cld; rep stosb" :
95: 8b 4d 08 mov 0x8(%ebp),%ecx
98: 8b 55 10 mov 0x10(%ebp),%edx
9b: 8b 45 0c mov 0xc(%ebp),%eax
9e: 89 cb mov %ecx,%ebx
a0: 89 df mov %ebx,%edi
a2: 89 d1 mov %edx,%ecx
a4: fc cld
a5: f3 aa rep stos %al,%es:(%edi)
a7: 89 ca mov %ecx,%edx
a9: 89 fb mov %edi,%ebx
ab: 89 5d 08 mov %ebx,0x8(%ebp)
ae: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
b1: 90 nop
b2: 5b pop %ebx
b3: 5f pop %edi
b4: 5d pop %ebp
b5: c3 ret
000000b6 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
b6: 55 push %ebp
b7: 89 e5 mov %esp,%ebp
b9: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
bc: 8b 45 08 mov 0x8(%ebp),%eax
bf: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
c2: 90 nop
c3: 8b 45 08 mov 0x8(%ebp),%eax
c6: 8d 50 01 lea 0x1(%eax),%edx
c9: 89 55 08 mov %edx,0x8(%ebp)
cc: 8b 55 0c mov 0xc(%ebp),%edx
cf: 8d 4a 01 lea 0x1(%edx),%ecx
d2: 89 4d 0c mov %ecx,0xc(%ebp)
d5: 0f b6 12 movzbl (%edx),%edx
d8: 88 10 mov %dl,(%eax)
da: 0f b6 00 movzbl (%eax),%eax
dd: 84 c0 test %al,%al
df: 75 e2 jne c3 <strcpy+0xd>
;
return os;
e1: 8b 45 fc mov -0x4(%ebp),%eax
}
e4: c9 leave
e5: c3 ret
000000e6 <strcmp>:
int
strcmp(const char *p, const char *q)
{
e6: 55 push %ebp
e7: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
e9: eb 08 jmp f3 <strcmp+0xd>
p++, q++;
eb: 83 45 08 01 addl $0x1,0x8(%ebp)
ef: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
f3: 8b 45 08 mov 0x8(%ebp),%eax
f6: 0f b6 00 movzbl (%eax),%eax
f9: 84 c0 test %al,%al
fb: 74 10 je 10d <strcmp+0x27>
fd: 8b 45 08 mov 0x8(%ebp),%eax
100: 0f b6 10 movzbl (%eax),%edx
103: 8b 45 0c mov 0xc(%ebp),%eax
106: 0f b6 00 movzbl (%eax),%eax
109: 38 c2 cmp %al,%dl
10b: 74 de je eb <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
10d: 8b 45 08 mov 0x8(%ebp),%eax
110: 0f b6 00 movzbl (%eax),%eax
113: 0f b6 d0 movzbl %al,%edx
116: 8b 45 0c mov 0xc(%ebp),%eax
119: 0f b6 00 movzbl (%eax),%eax
11c: 0f b6 c0 movzbl %al,%eax
11f: 29 c2 sub %eax,%edx
121: 89 d0 mov %edx,%eax
}
123: 5d pop %ebp
124: c3 ret
00000125 <strlen>:
uint
strlen(char *s)
{
125: 55 push %ebp
126: 89 e5 mov %esp,%ebp
128: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
12b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
132: eb 04 jmp 138 <strlen+0x13>
134: 83 45 fc 01 addl $0x1,-0x4(%ebp)
138: 8b 55 fc mov -0x4(%ebp),%edx
13b: 8b 45 08 mov 0x8(%ebp),%eax
13e: 01 d0 add %edx,%eax
140: 0f b6 00 movzbl (%eax),%eax
143: 84 c0 test %al,%al
145: 75 ed jne 134 <strlen+0xf>
;
return n;
147: 8b 45 fc mov -0x4(%ebp),%eax
}
14a: c9 leave
14b: c3 ret
0000014c <memset>:
void*
memset(void *dst, int c, uint n)
{
14c: 55 push %ebp
14d: 89 e5 mov %esp,%ebp
stosb(dst, c, n);
14f: 8b 45 10 mov 0x10(%ebp),%eax
152: 50 push %eax
153: ff 75 0c pushl 0xc(%ebp)
156: ff 75 08 pushl 0x8(%ebp)
159: e8 32 ff ff ff call 90 <stosb>
15e: 83 c4 0c add $0xc,%esp
return dst;
161: 8b 45 08 mov 0x8(%ebp),%eax
}
164: c9 leave
165: c3 ret
00000166 <strchr>:
char*
strchr(const char *s, char c)
{
166: 55 push %ebp
167: 89 e5 mov %esp,%ebp
169: 83 ec 04 sub $0x4,%esp
16c: 8b 45 0c mov 0xc(%ebp),%eax
16f: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
172: eb 14 jmp 188 <strchr+0x22>
if(*s == c)
174: 8b 45 08 mov 0x8(%ebp),%eax
177: 0f b6 00 movzbl (%eax),%eax
17a: 3a 45 fc cmp -0x4(%ebp),%al
17d: 75 05 jne 184 <strchr+0x1e>
return (char*)s;
17f: 8b 45 08 mov 0x8(%ebp),%eax
182: eb 13 jmp 197 <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
184: 83 45 08 01 addl $0x1,0x8(%ebp)
188: 8b 45 08 mov 0x8(%ebp),%eax
18b: 0f b6 00 movzbl (%eax),%eax
18e: 84 c0 test %al,%al
190: 75 e2 jne 174 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
192: b8 00 00 00 00 mov $0x0,%eax
}
197: c9 leave
198: c3 ret
00000199 <gets>:
char*
gets(char *buf, int max)
{
199: 55 push %ebp
19a: 89 e5 mov %esp,%ebp
19c: 83 ec 18 sub $0x18,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
19f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
1a6: eb 42 jmp 1ea <gets+0x51>
cc = read(0, &c, 1);
1a8: 83 ec 04 sub $0x4,%esp
1ab: 6a 01 push $0x1
1ad: 8d 45 ef lea -0x11(%ebp),%eax
1b0: 50 push %eax
1b1: 6a 00 push $0x0
1b3: e8 47 01 00 00 call 2ff <read>
1b8: 83 c4 10 add $0x10,%esp
1bb: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
1be: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1c2: 7e 33 jle 1f7 <gets+0x5e>
break;
buf[i++] = c;
1c4: 8b 45 f4 mov -0xc(%ebp),%eax
1c7: 8d 50 01 lea 0x1(%eax),%edx
1ca: 89 55 f4 mov %edx,-0xc(%ebp)
1cd: 89 c2 mov %eax,%edx
1cf: 8b 45 08 mov 0x8(%ebp),%eax
1d2: 01 c2 add %eax,%edx
1d4: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1d8: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
1da: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1de: 3c 0a cmp $0xa,%al
1e0: 74 16 je 1f8 <gets+0x5f>
1e2: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1e6: 3c 0d cmp $0xd,%al
1e8: 74 0e je 1f8 <gets+0x5f>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1ea: 8b 45 f4 mov -0xc(%ebp),%eax
1ed: 83 c0 01 add $0x1,%eax
1f0: 3b 45 0c cmp 0xc(%ebp),%eax
1f3: 7c b3 jl 1a8 <gets+0xf>
1f5: eb 01 jmp 1f8 <gets+0x5f>
cc = read(0, &c, 1);
if(cc < 1)
break;
1f7: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1f8: 8b 55 f4 mov -0xc(%ebp),%edx
1fb: 8b 45 08 mov 0x8(%ebp),%eax
1fe: 01 d0 add %edx,%eax
200: c6 00 00 movb $0x0,(%eax)
return buf;
203: 8b 45 08 mov 0x8(%ebp),%eax
}
206: c9 leave
207: c3 ret
00000208 <stat>:
int
stat(char *n, struct stat *st)
{
208: 55 push %ebp
209: 89 e5 mov %esp,%ebp
20b: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
20e: 83 ec 08 sub $0x8,%esp
211: 6a 00 push $0x0
213: ff 75 08 pushl 0x8(%ebp)
216: e8 0c 01 00 00 call 327 <open>
21b: 83 c4 10 add $0x10,%esp
21e: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
221: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
225: 79 07 jns 22e <stat+0x26>
return -1;
227: b8 ff ff ff ff mov $0xffffffff,%eax
22c: eb 25 jmp 253 <stat+0x4b>
r = fstat(fd, st);
22e: 83 ec 08 sub $0x8,%esp
231: ff 75 0c pushl 0xc(%ebp)
234: ff 75 f4 pushl -0xc(%ebp)
237: e8 03 01 00 00 call 33f <fstat>
23c: 83 c4 10 add $0x10,%esp
23f: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
242: 83 ec 0c sub $0xc,%esp
245: ff 75 f4 pushl -0xc(%ebp)
248: e8 c2 00 00 00 call 30f <close>
24d: 83 c4 10 add $0x10,%esp
return r;
250: 8b 45 f0 mov -0x10(%ebp),%eax
}
253: c9 leave
254: c3 ret
00000255 <atoi>:
int
atoi(const char *s)
{
255: 55 push %ebp
256: 89 e5 mov %esp,%ebp
258: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
25b: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
262: eb 25 jmp 289 <atoi+0x34>
n = n*10 + *s++ - '0';
264: 8b 55 fc mov -0x4(%ebp),%edx
267: 89 d0 mov %edx,%eax
269: c1 e0 02 shl $0x2,%eax
26c: 01 d0 add %edx,%eax
26e: 01 c0 add %eax,%eax
270: 89 c1 mov %eax,%ecx
272: 8b 45 08 mov 0x8(%ebp),%eax
275: 8d 50 01 lea 0x1(%eax),%edx
278: 89 55 08 mov %edx,0x8(%ebp)
27b: 0f b6 00 movzbl (%eax),%eax
27e: 0f be c0 movsbl %al,%eax
281: 01 c8 add %ecx,%eax
283: 83 e8 30 sub $0x30,%eax
286: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
289: 8b 45 08 mov 0x8(%ebp),%eax
28c: 0f b6 00 movzbl (%eax),%eax
28f: 3c 2f cmp $0x2f,%al
291: 7e 0a jle 29d <atoi+0x48>
293: 8b 45 08 mov 0x8(%ebp),%eax
296: 0f b6 00 movzbl (%eax),%eax
299: 3c 39 cmp $0x39,%al
29b: 7e c7 jle 264 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
29d: 8b 45 fc mov -0x4(%ebp),%eax
}
2a0: c9 leave
2a1: c3 ret
000002a2 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
2a2: 55 push %ebp
2a3: 89 e5 mov %esp,%ebp
2a5: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
2a8: 8b 45 08 mov 0x8(%ebp),%eax
2ab: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
2ae: 8b 45 0c mov 0xc(%ebp),%eax
2b1: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
2b4: eb 17 jmp 2cd <memmove+0x2b>
*dst++ = *src++;
2b6: 8b 45 fc mov -0x4(%ebp),%eax
2b9: 8d 50 01 lea 0x1(%eax),%edx
2bc: 89 55 fc mov %edx,-0x4(%ebp)
2bf: 8b 55 f8 mov -0x8(%ebp),%edx
2c2: 8d 4a 01 lea 0x1(%edx),%ecx
2c5: 89 4d f8 mov %ecx,-0x8(%ebp)
2c8: 0f b6 12 movzbl (%edx),%edx
2cb: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2cd: 8b 45 10 mov 0x10(%ebp),%eax
2d0: 8d 50 ff lea -0x1(%eax),%edx
2d3: 89 55 10 mov %edx,0x10(%ebp)
2d6: 85 c0 test %eax,%eax
2d8: 7f dc jg 2b6 <memmove+0x14>
*dst++ = *src++;
return vdst;
2da: 8b 45 08 mov 0x8(%ebp),%eax
}
2dd: c9 leave
2de: c3 ret
000002df <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2df: b8 01 00 00 00 mov $0x1,%eax
2e4: cd 40 int $0x40
2e6: c3 ret
000002e7 <exit>:
SYSCALL(exit)
2e7: b8 02 00 00 00 mov $0x2,%eax
2ec: cd 40 int $0x40
2ee: c3 ret
000002ef <wait>:
SYSCALL(wait)
2ef: b8 03 00 00 00 mov $0x3,%eax
2f4: cd 40 int $0x40
2f6: c3 ret
000002f7 <pipe>:
SYSCALL(pipe)
2f7: b8 04 00 00 00 mov $0x4,%eax
2fc: cd 40 int $0x40
2fe: c3 ret
000002ff <read>:
SYSCALL(read)
2ff: b8 05 00 00 00 mov $0x5,%eax
304: cd 40 int $0x40
306: c3 ret
00000307 <write>:
SYSCALL(write)
307: b8 10 00 00 00 mov $0x10,%eax
30c: cd 40 int $0x40
30e: c3 ret
0000030f <close>:
SYSCALL(close)
30f: b8 15 00 00 00 mov $0x15,%eax
314: cd 40 int $0x40
316: c3 ret
00000317 <kill>:
SYSCALL(kill)
317: b8 06 00 00 00 mov $0x6,%eax
31c: cd 40 int $0x40
31e: c3 ret
0000031f <exec>:
SYSCALL(exec)
31f: b8 07 00 00 00 mov $0x7,%eax
324: cd 40 int $0x40
326: c3 ret
00000327 <open>:
SYSCALL(open)
327: b8 0f 00 00 00 mov $0xf,%eax
32c: cd 40 int $0x40
32e: c3 ret
0000032f <mknod>:
SYSCALL(mknod)
32f: b8 11 00 00 00 mov $0x11,%eax
334: cd 40 int $0x40
336: c3 ret
00000337 <unlink>:
SYSCALL(unlink)
337: b8 12 00 00 00 mov $0x12,%eax
33c: cd 40 int $0x40
33e: c3 ret
0000033f <fstat>:
SYSCALL(fstat)
33f: b8 08 00 00 00 mov $0x8,%eax
344: cd 40 int $0x40
346: c3 ret
00000347 <link>:
SYSCALL(link)
347: b8 13 00 00 00 mov $0x13,%eax
34c: cd 40 int $0x40
34e: c3 ret
0000034f <mkdir>:
SYSCALL(mkdir)
34f: b8 14 00 00 00 mov $0x14,%eax
354: cd 40 int $0x40
356: c3 ret
00000357 <chdir>:
SYSCALL(chdir)
357: b8 09 00 00 00 mov $0x9,%eax
35c: cd 40 int $0x40
35e: c3 ret
0000035f <dup>:
SYSCALL(dup)
35f: b8 0a 00 00 00 mov $0xa,%eax
364: cd 40 int $0x40
366: c3 ret
00000367 <getpid>:
SYSCALL(getpid)
367: b8 0b 00 00 00 mov $0xb,%eax
36c: cd 40 int $0x40
36e: c3 ret
0000036f <sbrk>:
SYSCALL(sbrk)
36f: b8 0c 00 00 00 mov $0xc,%eax
374: cd 40 int $0x40
376: c3 ret
00000377 <sleep>:
SYSCALL(sleep)
377: b8 0d 00 00 00 mov $0xd,%eax
37c: cd 40 int $0x40
37e: c3 ret
0000037f <uptime>:
SYSCALL(uptime)
37f: b8 0e 00 00 00 mov $0xe,%eax
384: cd 40 int $0x40
386: c3 ret
00000387 <halt>:
SYSCALL(halt)
387: b8 16 00 00 00 mov $0x16,%eax
38c: cd 40 int $0x40
38e: c3 ret
0000038f <thread_create>:
SYSCALL(thread_create)
38f: b8 17 00 00 00 mov $0x17,%eax
394: cd 40 int $0x40
396: c3 ret
00000397 <thread_exit>:
SYSCALL(thread_exit)
397: b8 18 00 00 00 mov $0x18,%eax
39c: cd 40 int $0x40
39e: c3 ret
0000039f <thread_join>:
SYSCALL(thread_join)
39f: b8 19 00 00 00 mov $0x19,%eax
3a4: cd 40 int $0x40
3a6: c3 ret
000003a7 <gettid>:
SYSCALL(gettid)
3a7: b8 1a 00 00 00 mov $0x1a,%eax
3ac: cd 40 int $0x40
3ae: c3 ret
000003af <clone>:
SYSCALL(clone)
3af: b8 1b 00 00 00 mov $0x1b,%eax
3b4: cd 40 int $0x40
3b6: c3 ret
000003b7 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
3b7: 55 push %ebp
3b8: 89 e5 mov %esp,%ebp
3ba: 83 ec 18 sub $0x18,%esp
3bd: 8b 45 0c mov 0xc(%ebp),%eax
3c0: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
3c3: 83 ec 04 sub $0x4,%esp
3c6: 6a 01 push $0x1
3c8: 8d 45 f4 lea -0xc(%ebp),%eax
3cb: 50 push %eax
3cc: ff 75 08 pushl 0x8(%ebp)
3cf: e8 33 ff ff ff call 307 <write>
3d4: 83 c4 10 add $0x10,%esp
}
3d7: 90 nop
3d8: c9 leave
3d9: c3 ret
000003da <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3da: 55 push %ebp
3db: 89 e5 mov %esp,%ebp
3dd: 53 push %ebx
3de: 83 ec 24 sub $0x24,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
3e1: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
3e8: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
3ec: 74 17 je 405 <printint+0x2b>
3ee: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
3f2: 79 11 jns 405 <printint+0x2b>
neg = 1;
3f4: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
3fb: 8b 45 0c mov 0xc(%ebp),%eax
3fe: f7 d8 neg %eax
400: 89 45 ec mov %eax,-0x14(%ebp)
403: eb 06 jmp 40b <printint+0x31>
} else {
x = xx;
405: 8b 45 0c mov 0xc(%ebp),%eax
408: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
40b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
412: 8b 4d f4 mov -0xc(%ebp),%ecx
415: 8d 41 01 lea 0x1(%ecx),%eax
418: 89 45 f4 mov %eax,-0xc(%ebp)
41b: 8b 5d 10 mov 0x10(%ebp),%ebx
41e: 8b 45 ec mov -0x14(%ebp),%eax
421: ba 00 00 00 00 mov $0x0,%edx
426: f7 f3 div %ebx
428: 89 d0 mov %edx,%eax
42a: 0f b6 80 c4 0a 00 00 movzbl 0xac4(%eax),%eax
431: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
435: 8b 5d 10 mov 0x10(%ebp),%ebx
438: 8b 45 ec mov -0x14(%ebp),%eax
43b: ba 00 00 00 00 mov $0x0,%edx
440: f7 f3 div %ebx
442: 89 45 ec mov %eax,-0x14(%ebp)
445: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
449: 75 c7 jne 412 <printint+0x38>
if(neg)
44b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
44f: 74 2d je 47e <printint+0xa4>
buf[i++] = '-';
451: 8b 45 f4 mov -0xc(%ebp),%eax
454: 8d 50 01 lea 0x1(%eax),%edx
457: 89 55 f4 mov %edx,-0xc(%ebp)
45a: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
45f: eb 1d jmp 47e <printint+0xa4>
putc(fd, buf[i]);
461: 8d 55 dc lea -0x24(%ebp),%edx
464: 8b 45 f4 mov -0xc(%ebp),%eax
467: 01 d0 add %edx,%eax
469: 0f b6 00 movzbl (%eax),%eax
46c: 0f be c0 movsbl %al,%eax
46f: 83 ec 08 sub $0x8,%esp
472: 50 push %eax
473: ff 75 08 pushl 0x8(%ebp)
476: e8 3c ff ff ff call 3b7 <putc>
47b: 83 c4 10 add $0x10,%esp
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
47e: 83 6d f4 01 subl $0x1,-0xc(%ebp)
482: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
486: 79 d9 jns 461 <printint+0x87>
putc(fd, buf[i]);
}
488: 90 nop
489: 8b 5d fc mov -0x4(%ebp),%ebx
48c: c9 leave
48d: c3 ret
0000048e <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
48e: 55 push %ebp
48f: 89 e5 mov %esp,%ebp
491: 83 ec 28 sub $0x28,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
494: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
49b: 8d 45 0c lea 0xc(%ebp),%eax
49e: 83 c0 04 add $0x4,%eax
4a1: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
4a4: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
4ab: e9 59 01 00 00 jmp 609 <printf+0x17b>
c = fmt[i] & 0xff;
4b0: 8b 55 0c mov 0xc(%ebp),%edx
4b3: 8b 45 f0 mov -0x10(%ebp),%eax
4b6: 01 d0 add %edx,%eax
4b8: 0f b6 00 movzbl (%eax),%eax
4bb: 0f be c0 movsbl %al,%eax
4be: 25 ff 00 00 00 and $0xff,%eax
4c3: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
4c6: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
4ca: 75 2c jne 4f8 <printf+0x6a>
if(c == '%'){
4cc: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
4d0: 75 0c jne 4de <printf+0x50>
state = '%';
4d2: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
4d9: e9 27 01 00 00 jmp 605 <printf+0x177>
} else {
putc(fd, c);
4de: 8b 45 e4 mov -0x1c(%ebp),%eax
4e1: 0f be c0 movsbl %al,%eax
4e4: 83 ec 08 sub $0x8,%esp
4e7: 50 push %eax
4e8: ff 75 08 pushl 0x8(%ebp)
4eb: e8 c7 fe ff ff call 3b7 <putc>
4f0: 83 c4 10 add $0x10,%esp
4f3: e9 0d 01 00 00 jmp 605 <printf+0x177>
}
} else if(state == '%'){
4f8: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
4fc: 0f 85 03 01 00 00 jne 605 <printf+0x177>
if(c == 'd'){
502: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
506: 75 1e jne 526 <printf+0x98>
printint(fd, *ap, 10, 1);
508: 8b 45 e8 mov -0x18(%ebp),%eax
50b: 8b 00 mov (%eax),%eax
50d: 6a 01 push $0x1
50f: 6a 0a push $0xa
511: 50 push %eax
512: ff 75 08 pushl 0x8(%ebp)
515: e8 c0 fe ff ff call 3da <printint>
51a: 83 c4 10 add $0x10,%esp
ap++;
51d: 83 45 e8 04 addl $0x4,-0x18(%ebp)
521: e9 d8 00 00 00 jmp 5fe <printf+0x170>
} else if(c == 'x' || c == 'p'){
526: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
52a: 74 06 je 532 <printf+0xa4>
52c: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
530: 75 1e jne 550 <printf+0xc2>
printint(fd, *ap, 16, 0);
532: 8b 45 e8 mov -0x18(%ebp),%eax
535: 8b 00 mov (%eax),%eax
537: 6a 00 push $0x0
539: 6a 10 push $0x10
53b: 50 push %eax
53c: ff 75 08 pushl 0x8(%ebp)
53f: e8 96 fe ff ff call 3da <printint>
544: 83 c4 10 add $0x10,%esp
ap++;
547: 83 45 e8 04 addl $0x4,-0x18(%ebp)
54b: e9 ae 00 00 00 jmp 5fe <printf+0x170>
} else if(c == 's'){
550: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
554: 75 43 jne 599 <printf+0x10b>
s = (char*)*ap;
556: 8b 45 e8 mov -0x18(%ebp),%eax
559: 8b 00 mov (%eax),%eax
55b: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
55e: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
562: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
566: 75 25 jne 58d <printf+0xff>
s = "(null)";
568: c7 45 f4 71 08 00 00 movl $0x871,-0xc(%ebp)
while(*s != 0){
56f: eb 1c jmp 58d <printf+0xff>
putc(fd, *s);
571: 8b 45 f4 mov -0xc(%ebp),%eax
574: 0f b6 00 movzbl (%eax),%eax
577: 0f be c0 movsbl %al,%eax
57a: 83 ec 08 sub $0x8,%esp
57d: 50 push %eax
57e: ff 75 08 pushl 0x8(%ebp)
581: e8 31 fe ff ff call 3b7 <putc>
586: 83 c4 10 add $0x10,%esp
s++;
589: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
58d: 8b 45 f4 mov -0xc(%ebp),%eax
590: 0f b6 00 movzbl (%eax),%eax
593: 84 c0 test %al,%al
595: 75 da jne 571 <printf+0xe3>
597: eb 65 jmp 5fe <printf+0x170>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
599: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
59d: 75 1d jne 5bc <printf+0x12e>
putc(fd, *ap);
59f: 8b 45 e8 mov -0x18(%ebp),%eax
5a2: 8b 00 mov (%eax),%eax
5a4: 0f be c0 movsbl %al,%eax
5a7: 83 ec 08 sub $0x8,%esp
5aa: 50 push %eax
5ab: ff 75 08 pushl 0x8(%ebp)
5ae: e8 04 fe ff ff call 3b7 <putc>
5b3: 83 c4 10 add $0x10,%esp
ap++;
5b6: 83 45 e8 04 addl $0x4,-0x18(%ebp)
5ba: eb 42 jmp 5fe <printf+0x170>
} else if(c == '%'){
5bc: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
5c0: 75 17 jne 5d9 <printf+0x14b>
putc(fd, c);
5c2: 8b 45 e4 mov -0x1c(%ebp),%eax
5c5: 0f be c0 movsbl %al,%eax
5c8: 83 ec 08 sub $0x8,%esp
5cb: 50 push %eax
5cc: ff 75 08 pushl 0x8(%ebp)
5cf: e8 e3 fd ff ff call 3b7 <putc>
5d4: 83 c4 10 add $0x10,%esp
5d7: eb 25 jmp 5fe <printf+0x170>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
5d9: 83 ec 08 sub $0x8,%esp
5dc: 6a 25 push $0x25
5de: ff 75 08 pushl 0x8(%ebp)
5e1: e8 d1 fd ff ff call 3b7 <putc>
5e6: 83 c4 10 add $0x10,%esp
putc(fd, c);
5e9: 8b 45 e4 mov -0x1c(%ebp),%eax
5ec: 0f be c0 movsbl %al,%eax
5ef: 83 ec 08 sub $0x8,%esp
5f2: 50 push %eax
5f3: ff 75 08 pushl 0x8(%ebp)
5f6: e8 bc fd ff ff call 3b7 <putc>
5fb: 83 c4 10 add $0x10,%esp
}
state = 0;
5fe: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
605: 83 45 f0 01 addl $0x1,-0x10(%ebp)
609: 8b 55 0c mov 0xc(%ebp),%edx
60c: 8b 45 f0 mov -0x10(%ebp),%eax
60f: 01 d0 add %edx,%eax
611: 0f b6 00 movzbl (%eax),%eax
614: 84 c0 test %al,%al
616: 0f 85 94 fe ff ff jne 4b0 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
61c: 90 nop
61d: c9 leave
61e: c3 ret
0000061f <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
61f: 55 push %ebp
620: 89 e5 mov %esp,%ebp
622: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
625: 8b 45 08 mov 0x8(%ebp),%eax
628: 83 e8 08 sub $0x8,%eax
62b: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
62e: a1 e0 0a 00 00 mov 0xae0,%eax
633: 89 45 fc mov %eax,-0x4(%ebp)
636: eb 24 jmp 65c <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
638: 8b 45 fc mov -0x4(%ebp),%eax
63b: 8b 00 mov (%eax),%eax
63d: 3b 45 fc cmp -0x4(%ebp),%eax
640: 77 12 ja 654 <free+0x35>
642: 8b 45 f8 mov -0x8(%ebp),%eax
645: 3b 45 fc cmp -0x4(%ebp),%eax
648: 77 24 ja 66e <free+0x4f>
64a: 8b 45 fc mov -0x4(%ebp),%eax
64d: 8b 00 mov (%eax),%eax
64f: 3b 45 f8 cmp -0x8(%ebp),%eax
652: 77 1a ja 66e <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
654: 8b 45 fc mov -0x4(%ebp),%eax
657: 8b 00 mov (%eax),%eax
659: 89 45 fc mov %eax,-0x4(%ebp)
65c: 8b 45 f8 mov -0x8(%ebp),%eax
65f: 3b 45 fc cmp -0x4(%ebp),%eax
662: 76 d4 jbe 638 <free+0x19>
664: 8b 45 fc mov -0x4(%ebp),%eax
667: 8b 00 mov (%eax),%eax
669: 3b 45 f8 cmp -0x8(%ebp),%eax
66c: 76 ca jbe 638 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
66e: 8b 45 f8 mov -0x8(%ebp),%eax
671: 8b 40 04 mov 0x4(%eax),%eax
674: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
67b: 8b 45 f8 mov -0x8(%ebp),%eax
67e: 01 c2 add %eax,%edx
680: 8b 45 fc mov -0x4(%ebp),%eax
683: 8b 00 mov (%eax),%eax
685: 39 c2 cmp %eax,%edx
687: 75 24 jne 6ad <free+0x8e>
bp->s.size += p->s.ptr->s.size;
689: 8b 45 f8 mov -0x8(%ebp),%eax
68c: 8b 50 04 mov 0x4(%eax),%edx
68f: 8b 45 fc mov -0x4(%ebp),%eax
692: 8b 00 mov (%eax),%eax
694: 8b 40 04 mov 0x4(%eax),%eax
697: 01 c2 add %eax,%edx
699: 8b 45 f8 mov -0x8(%ebp),%eax
69c: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
69f: 8b 45 fc mov -0x4(%ebp),%eax
6a2: 8b 00 mov (%eax),%eax
6a4: 8b 10 mov (%eax),%edx
6a6: 8b 45 f8 mov -0x8(%ebp),%eax
6a9: 89 10 mov %edx,(%eax)
6ab: eb 0a jmp 6b7 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
6ad: 8b 45 fc mov -0x4(%ebp),%eax
6b0: 8b 10 mov (%eax),%edx
6b2: 8b 45 f8 mov -0x8(%ebp),%eax
6b5: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
6b7: 8b 45 fc mov -0x4(%ebp),%eax
6ba: 8b 40 04 mov 0x4(%eax),%eax
6bd: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
6c4: 8b 45 fc mov -0x4(%ebp),%eax
6c7: 01 d0 add %edx,%eax
6c9: 3b 45 f8 cmp -0x8(%ebp),%eax
6cc: 75 20 jne 6ee <free+0xcf>
p->s.size += bp->s.size;
6ce: 8b 45 fc mov -0x4(%ebp),%eax
6d1: 8b 50 04 mov 0x4(%eax),%edx
6d4: 8b 45 f8 mov -0x8(%ebp),%eax
6d7: 8b 40 04 mov 0x4(%eax),%eax
6da: 01 c2 add %eax,%edx
6dc: 8b 45 fc mov -0x4(%ebp),%eax
6df: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
6e2: 8b 45 f8 mov -0x8(%ebp),%eax
6e5: 8b 10 mov (%eax),%edx
6e7: 8b 45 fc mov -0x4(%ebp),%eax
6ea: 89 10 mov %edx,(%eax)
6ec: eb 08 jmp 6f6 <free+0xd7>
} else
p->s.ptr = bp;
6ee: 8b 45 fc mov -0x4(%ebp),%eax
6f1: 8b 55 f8 mov -0x8(%ebp),%edx
6f4: 89 10 mov %edx,(%eax)
freep = p;
6f6: 8b 45 fc mov -0x4(%ebp),%eax
6f9: a3 e0 0a 00 00 mov %eax,0xae0
}
6fe: 90 nop
6ff: c9 leave
700: c3 ret
00000701 <morecore>:
static Header*
morecore(uint nu)
{
701: 55 push %ebp
702: 89 e5 mov %esp,%ebp
704: 83 ec 18 sub $0x18,%esp
char *p;
Header *hp;
if(nu < 4096)
707: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
70e: 77 07 ja 717 <morecore+0x16>
nu = 4096;
710: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
717: 8b 45 08 mov 0x8(%ebp),%eax
71a: c1 e0 03 shl $0x3,%eax
71d: 83 ec 0c sub $0xc,%esp
720: 50 push %eax
721: e8 49 fc ff ff call 36f <sbrk>
726: 83 c4 10 add $0x10,%esp
729: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
72c: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
730: 75 07 jne 739 <morecore+0x38>
return 0;
732: b8 00 00 00 00 mov $0x0,%eax
737: eb 26 jmp 75f <morecore+0x5e>
hp = (Header*)p;
739: 8b 45 f4 mov -0xc(%ebp),%eax
73c: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
73f: 8b 45 f0 mov -0x10(%ebp),%eax
742: 8b 55 08 mov 0x8(%ebp),%edx
745: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
748: 8b 45 f0 mov -0x10(%ebp),%eax
74b: 83 c0 08 add $0x8,%eax
74e: 83 ec 0c sub $0xc,%esp
751: 50 push %eax
752: e8 c8 fe ff ff call 61f <free>
757: 83 c4 10 add $0x10,%esp
return freep;
75a: a1 e0 0a 00 00 mov 0xae0,%eax
}
75f: c9 leave
760: c3 ret
00000761 <malloc>:
void*
malloc(uint nbytes)
{
761: 55 push %ebp
762: 89 e5 mov %esp,%ebp
764: 83 ec 18 sub $0x18,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
767: 8b 45 08 mov 0x8(%ebp),%eax
76a: 83 c0 07 add $0x7,%eax
76d: c1 e8 03 shr $0x3,%eax
770: 83 c0 01 add $0x1,%eax
773: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
776: a1 e0 0a 00 00 mov 0xae0,%eax
77b: 89 45 f0 mov %eax,-0x10(%ebp)
77e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
782: 75 23 jne 7a7 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
784: c7 45 f0 d8 0a 00 00 movl $0xad8,-0x10(%ebp)
78b: 8b 45 f0 mov -0x10(%ebp),%eax
78e: a3 e0 0a 00 00 mov %eax,0xae0
793: a1 e0 0a 00 00 mov 0xae0,%eax
798: a3 d8 0a 00 00 mov %eax,0xad8
base.s.size = 0;
79d: c7 05 dc 0a 00 00 00 movl $0x0,0xadc
7a4: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
7a7: 8b 45 f0 mov -0x10(%ebp),%eax
7aa: 8b 00 mov (%eax),%eax
7ac: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
7af: 8b 45 f4 mov -0xc(%ebp),%eax
7b2: 8b 40 04 mov 0x4(%eax),%eax
7b5: 3b 45 ec cmp -0x14(%ebp),%eax
7b8: 72 4d jb 807 <malloc+0xa6>
if(p->s.size == nunits)
7ba: 8b 45 f4 mov -0xc(%ebp),%eax
7bd: 8b 40 04 mov 0x4(%eax),%eax
7c0: 3b 45 ec cmp -0x14(%ebp),%eax
7c3: 75 0c jne 7d1 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
7c5: 8b 45 f4 mov -0xc(%ebp),%eax
7c8: 8b 10 mov (%eax),%edx
7ca: 8b 45 f0 mov -0x10(%ebp),%eax
7cd: 89 10 mov %edx,(%eax)
7cf: eb 26 jmp 7f7 <malloc+0x96>
else {
p->s.size -= nunits;
7d1: 8b 45 f4 mov -0xc(%ebp),%eax
7d4: 8b 40 04 mov 0x4(%eax),%eax
7d7: 2b 45 ec sub -0x14(%ebp),%eax
7da: 89 c2 mov %eax,%edx
7dc: 8b 45 f4 mov -0xc(%ebp),%eax
7df: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
7e2: 8b 45 f4 mov -0xc(%ebp),%eax
7e5: 8b 40 04 mov 0x4(%eax),%eax
7e8: c1 e0 03 shl $0x3,%eax
7eb: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
7ee: 8b 45 f4 mov -0xc(%ebp),%eax
7f1: 8b 55 ec mov -0x14(%ebp),%edx
7f4: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
7f7: 8b 45 f0 mov -0x10(%ebp),%eax
7fa: a3 e0 0a 00 00 mov %eax,0xae0
return (void*)(p + 1);
7ff: 8b 45 f4 mov -0xc(%ebp),%eax
802: 83 c0 08 add $0x8,%eax
805: eb 3b jmp 842 <malloc+0xe1>
}
if(p == freep)
807: a1 e0 0a 00 00 mov 0xae0,%eax
80c: 39 45 f4 cmp %eax,-0xc(%ebp)
80f: 75 1e jne 82f <malloc+0xce>
if((p = morecore(nunits)) == 0)
811: 83 ec 0c sub $0xc,%esp
814: ff 75 ec pushl -0x14(%ebp)
817: e8 e5 fe ff ff call 701 <morecore>
81c: 83 c4 10 add $0x10,%esp
81f: 89 45 f4 mov %eax,-0xc(%ebp)
822: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
826: 75 07 jne 82f <malloc+0xce>
return 0;
828: b8 00 00 00 00 mov $0x0,%eax
82d: eb 13 jmp 842 <malloc+0xe1>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
82f: 8b 45 f4 mov -0xc(%ebp),%eax
832: 89 45 f0 mov %eax,-0x10(%ebp)
835: 8b 45 f4 mov -0xc(%ebp),%eax
838: 8b 00 mov (%eax),%eax
83a: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
83d: e9 6d ff ff ff jmp 7af <malloc+0x4e>
}
842: c9 leave
843: c3 ret
| 34.00638
| 60
| 0.421114
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.