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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79d1a622d20c1e6e5b96e4bfe45bc4e11415c4b2
| 439
|
asm
|
Assembly
|
programs/oeis/026/A026044.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/026/A026044.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/026/A026044.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A026044: a(n) = (d(n)-r(n))/2, where d = A026043 and r is the periodic sequence with fundamental period (1,1,0,0).
; 22,33,49,70,97,132,176,229,292,367,455,556,671,802,950,1115,1298,1501,1725,1970,2237,2528,2844,3185,3552,3947,4371,4824,5307,5822,6370,6951,7566,8217,8905,9630,10393,11196,12040,12925,13852,14823,15839,16900,18007,19162,20366,21619,22922,24277
seq $0,26043 ; a(n) = dot_product(1,2,...,n)*(5,6,...,n,1,2,3,4).
div $0,2
| 73.166667
| 245
| 0.701595
|
f134930f0c12cfd4d2e435610eda99a72a433cd1
| 3,685
|
a51
|
Assembly
|
C51/RtxTiny2/SourceCode/os_delete.a51
|
AllRoundeer/Keil
|
43cad8de348ff206c02395fca86bdb08c9725142
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
C51/RtxTiny2/SourceCode/os_delete.a51
|
AllRoundeer/Keil
|
43cad8de348ff206c02395fca86bdb08c9725142
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
C51/RtxTiny2/SourceCode/os_delete.a51
|
AllRoundeer/Keil
|
43cad8de348ff206c02395fca86bdb08c9725142
|
[
"Apache-2.0",
"MIT"
] | null | null | null |
;------------------------------------------------------------------------------
; This file is part of the 'RTX-51 tiny' Real-Time Operating System Package
; Copyright KEIL ELEKTRONIK GmbH and Keil Software, Inc. 1991 - 2002
;------------------------------------------------------------------------------
;
; OS_DELETE.A51: This module contains the OS_DELETE_TASK function
;
; RTX51 TINY VERSION 2
;
;------------------------------------------------------------------------------
NAME ?RTX51_TINY_OS_DELETE
$include (os_defines.inc)
PUBLIC _os_delete_task
?RTX?CODE SEGMENT CODE
RSEG ?RTX?CODE
USING 0 ; Registerbank 0 for following code
; uchar os_delete_task (uchar no) {
; uchar i;
; uchar last, first, check;
;
_os_delete_task:
;---- Variable 'first' assigned to Register 'R1' ----
;---- Variable 'last' assigned to Register 'R5' ----
;---- Variable 'check' assigned to Register 'R4' ----
;---- Variable 'no' assigned to Register 'R7' ----
; if (no > MAXTASKN) return (0xff);
MOV A,R7
SETB C
SUBB A,#?RTX_MAXTASKN
JC ?C0030
?C0032: MOV R7,#0FFH
RET
?C0030:
; if (!(STATE[no].st & K_ACTIVE)) return (0xff);
MOV A,R7
RL A
ADD A,#?RTX?TASKSTATE?S+1
MOV R0,A
MOV A,@R0
JNB ACC.B_ACTIVE,?C0032
; STATE[no].st &= ~(K_ACTIVE | K_READY | K_SIG | K_TMO | K_ROBIN);
CLR EA
MOV A,@R0
ANL A,#NOT (K_ACTIVE+K_READY+K_SIG+K_TMO+K_ROBIN)
MOV @R0,A
SETB EA
; if (current == no) {
MOV A,?RTX_CURRENTTASK
CJNE A,AR7,?C0033
; SP = STKP[no];
MOV A,#?RTX?TASKSP?S
ADD A,R7
MOV R0,A
MOV A,@R0
MOV SP,A
; switchnow ();
OS_delete_task_exit1:
LJMP OS_SWITCH_TASK
; }
?C0033:
; if (current < no) {
JNC ?C0034
; last = (no == MAXTASKN) ? STACKTOP : STKP[no+1];
MOV A,#?RTX?TASKSP?S+1
ADD A,R7
MOV R0,A
MOV A,@R0
CJNE R7,#?RTX_MAXTASKN,?C0035
MOV A,#?RTX_RAMTOP
?C0035:
MOV R5,A
; first = STKP[no];
DEC R0
MOV A,@R0
MOV R1,A
?C0039:
; do {
; check = STKP[no];
MOV A,#?RTX?TASKSP?S
ADD A,R7
MOV R0,A
MOV R3,A ; save @STKP
MOV A,@R0
MOV R4,A
; while (first != check) {
?C0040:
MOV A,R1
XRL A,R4
JZ ?C0037
; DBYTE[last] = DBYTE[first];
; SOURCE LINE # 186
MOV R0,AR5
MOV A,@R1
MOV @R0,A
; last--;
DEC R5
; first--;
DEC R1
; }
SJMP ?C0040
?C0037:
; STKP[no] = last;
MOV R0,AR3 ; restore @STKP
MOV @R0,AR5
; no--;
DEC R7
; } while (current != no);
MOV A,?RTX_CURRENTTASK
CJNE A,AR7,?C0039
; return (0);
MOV R7,#0
OS_delete_task_exit2:
RET
; }
?C0034:
; if (current > no) {
; last = STKP[no+1];
MOV A,#?RTX?TASKSP?S+1
ADD A,R7
MOV R0,A
MOV A,@R0
MOV R5,A
; first = STKP[no];
DEC R0
MOV AR1,@R0
?C0045:
; do {
; no++;
INC R7
; STKP[no] = first;
MOV A,#?RTX?TASKSP?S
ADD A,R7
MOV R0,A
MOV @R0,AR1
; check = (no == current) ? SP : STKP[no+1];
INC R0
MOV AR4,@R0
MOV A,?RTX_CURRENTTASK
CJNE A,AR7,?C0046
MOV R4,SP
?C0046:
; while (last != check) {
MOV A,R5
XRL A,R4
JZ ?C0043
; last++;
INC R5
; first++;
INC R1
; DBYTE[first] = DBYTE[last];
MOV R0,AR5
MOV A,@R0
MOV @R1,A
; }
SJMP ?C0046
; } while (current != no);
?C0043:
MOV A,?RTX_CURRENTTASK
CJNE A,AR7,?C0045
; SP = first;
MOV SP,R1
; return (0);
MOV R7,#0
; }
;}
?C0031:
OS_delete_task_exit3:
RET
END
| 20.359116
| 79
| 0.496879
|
a67ac4923410a5bb8c89a94f2f93424ec752dd54
| 527
|
asm
|
Assembly
|
12-disk/print_str.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | 2
|
2020-08-09T06:17:13.000Z
|
2021-03-06T11:18:38.000Z
|
16-kernel/print_str.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | null | null | null |
16-kernel/print_str.asm
|
soumitradev/assembly-fun
|
3ab433e96ea1f6ea21121013800455a4fa999021
|
[
"MIT"
] | null | null | null |
print_str:
; Push all registers
pusha
; Define a while loop that runs while current character is not null.
while:
; Copy the character into lower end of register c
mov al, [bx]
; Check if char is null. If yes, end loop
cmp al, 0
je end
; Set register a to print mode, and print
mov ah, 0x0e
int 0x10
; Move the char read pointer to next location in memory and hit next while loop
add bx, 1
jmp while
end:
; Restore all registers and return
popa
ret
| 26.35
| 84
| 0.639469
|
d5ebec85995cd3a57e357ddb7fe745c62db0b779
| 480
|
asm
|
Assembly
|
programs/oeis/328/A328005.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/328/A328005.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/328/A328005.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A328005: Number of distinct coefficients in functional composition of 1 + x + ... + x^(n-1) with itself.
; 0,1,2,4,8,13,19,25,33,41,51,61,73,85,99,113,129,145,163,181,201,221,243,265,289,313,339,365,393,421,451,481,513,545,579,613,649,685,723,761,801,841,883,925,969,1013,1059,1105,1153,1201,1251,1301,1353,1405,1459
pow $0,2
mov $5,$0
div $0,2
mul $0,2
sub $0,9
mov $2,12
sub $5,4
div $5,2
lpb $0,1
mov $0,$2
add $4,1
lpe
mov $1,25
add $4,$5
sub $3,$4
sub $1,$3
sub $1,23
| 22.857143
| 211
| 0.658333
|
1a636eaad99d7fe1fbcc4ea3c252b541be29113a
| 4,691
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1285.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1285.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_1285.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r15
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x5a31, %rsi
lea addresses_WC_ht+0x1b931, %rdi
nop
nop
nop
add %r13, %r13
mov $79, %rcx
rep movsl
nop
nop
nop
nop
inc %rdi
lea addresses_A_ht+0x6631, %rsi
lea addresses_A_ht+0x8c31, %rdi
clflush (%rdi)
nop
nop
xor %r15, %r15
mov $122, %rcx
rep movsb
and %r13, %r13
lea addresses_D_ht+0x11831, %rcx
nop
add $31957, %r12
mov $0x6162636465666768, %r15
movq %r15, %xmm0
and $0xffffffffffffffc0, %rcx
vmovaps %ymm0, (%rcx)
nop
nop
cmp $43735, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %r15
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r8
push %rbp
push %rcx
push %rdi
// Faulty Load
lea addresses_WC+0xb431, %r8
nop
nop
nop
nop
cmp %r12, %r12
mov (%r8), %di
lea oracles, %rcx
and $0xff, %rdi
shlq $12, %rdi
mov (%rcx,%rdi,1), %rdi
pop %rdi
pop %rcx
pop %rbp
pop %r8
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': True, 'congruent': 10, 'size': 32, 'same': True, 'NT': True}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 51.549451
| 2,999
| 0.663824
|
1c3853d26f48f6c93dd2ab0804820cb80beef26d
| 364
|
asm
|
Assembly
|
Lab2/Lab_2.asm
|
Osimjon/NSTU
|
79155561ab63ae327b684d60940a48a702808809
|
[
"MIT"
] | 2
|
2022-03-31T14:17:12.000Z
|
2022-03-31T15:44:40.000Z
|
Lab2/Lab_2.asm
|
Osimjon/NSTU
|
79155561ab63ae327b684d60940a48a702808809
|
[
"MIT"
] | null | null | null |
Lab2/Lab_2.asm
|
Osimjon/NSTU
|
79155561ab63ae327b684d60940a48a702808809
|
[
"MIT"
] | null | null | null |
include console.inc ; вывод в терминал
.data ; директива где объявляем переменные
x dd -8 ; переменная
s_4 dd 4
.code ; директива кода
Start: ; название блока
mov eax, x ; заносем 1 значение в eax
mul s_4
mul eax
outint eax ; выводим произведение
outstr " "
xor eax, eax
end Start ; конец программы, Start - имя первой процедуры
| 19.157895
| 59
| 0.681319
|
2f9633144ed537aeba8447164a9c06347e3b0e48
| 316
|
asm
|
Assembly
|
src/headers_song2.6502.asm
|
mrpopogod/nes-fun
|
80e6af809874f2de89bd52f05f04c451dc29b333
|
[
"MIT"
] | null | null | null |
src/headers_song2.6502.asm
|
mrpopogod/nes-fun
|
80e6af809874f2de89bd52f05f04c451dc29b333
|
[
"MIT"
] | null | null | null |
src/headers_song2.6502.asm
|
mrpopogod/nes-fun
|
80e6af809874f2de89bd52f05f04c451dc29b333
|
[
"MIT"
] | null | null | null |
song2_header:
.b $01 ;1 stream
.b SFX_1 ;which stream
.b $01 ;status byte (stream enabled)
.b SQUARE_2 ;which channel
.b $7F ;initial volume (F) and duty (01)
.w song2_square2 ;pointer to stream
song2_square2:
.b D3, D2
.b $FF
| 24.307692
| 54
| 0.512658
|
dad6f6200ec9ca5176d1793ec247cdca815f4d17
| 8,074
|
asm
|
Assembly
|
src/Native/Runtime/amd64/AllocFast.asm
|
ZZHGit/corert
|
367ec5addb0a80bfbbda339d6add3ce3b99ddc75
|
[
"MIT"
] | null | null | null |
src/Native/Runtime/amd64/AllocFast.asm
|
ZZHGit/corert
|
367ec5addb0a80bfbbda339d6add3ce3b99ddc75
|
[
"MIT"
] | null | null | null |
src/Native/Runtime/amd64/AllocFast.asm
|
ZZHGit/corert
|
367ec5addb0a80bfbbda339d6add3ce3b99ddc75
|
[
"MIT"
] | 1
|
2019-09-17T21:10:15.000Z
|
2019-09-17T21:10:15.000Z
|
;;
;; Copyright (c) Microsoft. All rights reserved.
;; Licensed under the MIT license. See LICENSE file in the project root for full license information.
;;
include asmmacros.inc
;; Allocate non-array, non-finalizable object. If the allocation doesn't fit into the current thread's
;; allocation context then automatically fallback to the slow allocation path.
;; RCX == EEType
LEAF_ENTRY RhpNewFast, _TEXT
;; rdx = GetThread(), TRASHES rax
INLINE_GETTHREAD rdx, rax
;;
;; rcx contains EEType pointer
;;
mov eax, [rcx + OFFSETOF__EEType__m_uBaseSize]
;;
;; eax: base size
;; rcx: EEType pointer
;; rdx: Thread pointer
;;
add rax, [rdx + OFFSETOF__Thread__m_alloc_context__alloc_ptr]
cmp rax, [rdx + OFFSETOF__Thread__m_alloc_context__alloc_limit]
ja RhpNewFast_RarePath
;; set the new alloc pointer
mov [rdx + OFFSETOF__Thread__m_alloc_context__alloc_ptr], rax
;; calc the new object pointer
mov edx, dword ptr [rcx + OFFSETOF__EEType__m_uBaseSize]
sub rax, rdx
;; set the new object's EEType pointer
mov [rax], rcx
ret
RhpNewFast_RarePath:
xor edx, edx
jmp RhpNewObject
LEAF_END RhpNewFast, _TEXT
;; Allocate non-array object with finalizer
;; RCX == EEType
LEAF_ENTRY RhpNewFinalizable, _TEXT
mov edx, GC_ALLOC_FINALIZE
jmp RhpNewObject
LEAF_END RhpNewFinalizable, _TEXT
;; Allocate non-array object
;; RCX == EEType
;; EDX == alloc flags
NESTED_ENTRY RhpNewObject, _TEXT
INLINE_GETTHREAD rax, r10 ; rax <- Thread pointer, r10 <- trashed
mov r11, rax ; r11 <- Thread pointer
PUSH_COOP_PINVOKE_FRAME rax, r10, no_extraStack ; rax <- in: Thread, out: trashed, r10 <- trashed
END_PROLOGUE
; RCX: EEType
; EDX: alloc flags
; R11: Thread *
;; Preserve the EEType in RSI
mov rsi, rcx
mov r9, rcx ; pEEType
mov r8d, edx ; uFlags
mov edx, [rsi + OFFSETOF__EEType__m_uBaseSize] ; cbSize
mov rcx, r11 ; pThread
;; Call the rest of the allocation helper.
;; void* RedhawkGCInterface::Alloc(Thread *pThread, UIntNative cbSize, UInt32 uFlags, EEType *pEEType)
call REDHAWKGCINTERFACE__ALLOC
;; Set the new object's EEType pointer on success.
test rax, rax
jz NewOutOfMemory
mov [rax + OFFSETOF__Object__m_pEEType], rsi
;; If the object is bigger than RH_LARGE_OBJECT_SIZE, we must publish it to the BGC
mov edx, [rsi + OFFSETOF__EEType__m_uBaseSize]
cmp rdx, RH_LARGE_OBJECT_SIZE
jb New_SkipPublish
mov rcx, rax ;; rcx: object
;; rdx: already contains object size
call RhpPublishObject ;; rax: this function returns the object that was passed-in
New_SkipPublish:
POP_COOP_PINVOKE_FRAME no_extraStack
ret
NewOutOfMemory:
;; This is the OOM failure path. We're going to tail-call to a managed helper that will throw
;; an out of memory exception that the caller of this allocator understands.
mov rcx, r9 ; EEType pointer
xor edx, edx ; Indicate that we should throw OOM.
POP_COOP_PINVOKE_FRAME no_extraStack
jmp RhExceptionHandling_FailedAllocation
NESTED_END RhpNewObject, _TEXT
;; Allocate one dimensional, zero based array (SZARRAY).
;; RCX == EEType
;; EDX == element count
LEAF_ENTRY RhpNewArray, _TEXT
; we want to limit the element count to the non-negative 32-bit int range
cmp rdx, 07fffffffh
ja ArraySizeOverflow
; save element count
mov r8, rdx
; Compute overall allocation size (align(base size + (element size * elements), 8)).
movzx eax, word ptr [rcx + OFFSETOF__EEType__m_usComponentSize]
mul rdx
mov edx, [rcx + OFFSETOF__EEType__m_uBaseSize]
add rax, rdx
add rax, 7
and rax, -8
; rax == array size
; rcx == EEType
; rdx == scratch
; r8 == element count
INLINE_GETTHREAD rdx, r9
mov r9, rax
add rax, [rdx + OFFSETOF__Thread__m_alloc_context__alloc_ptr]
jc RhpNewArrayRare
; rax == new alloc ptr
; rcx == EEType
; rdx == thread
; r8 == element count
; r9 == array size
cmp rax, [rdx + OFFSETOF__Thread__m_alloc_context__alloc_limit]
ja RhpNewArrayRare
mov [rdx + OFFSETOF__Thread__m_alloc_context__alloc_ptr], rax
; calc the new object pointer
sub rax, r9
mov [rax + OFFSETOF__Object__m_pEEType], rcx
mov [rax + OFFSETOF__Array__m_Length], r8d
ret
ArraySizeOverflow:
; We get here if the size of the final array object can't be represented as an unsigned
; 32-bit value. We're going to tail-call to a managed helper that will throw
; an overflow exception that the caller of this allocator understands.
; rcx holds EEType pointer already
mov edx, 1 ; Indicate that we should throw OverflowException
jmp RhExceptionHandling_FailedAllocation
LEAF_END RhpNewArray, _TEXT
NESTED_ENTRY RhpNewArrayRare, _TEXT
; rcx == EEType
; rdx == thread
; r8 == element count
; r9 == array size
mov r11, rdx ; r11 <- Thread pointer
PUSH_COOP_PINVOKE_FRAME rdx, r10, no_extraStack ; rdx <- in: Thread, out: trashed, r10 <- trashed
END_PROLOGUE
; R11: Thread *
; Preserve the EEType in RSI
mov rsi, rcx
; Preserve the size in RDI
mov rdi, r9
; Preserve the element count in RBX
mov rbx, r8
mov rcx, r11 ; pThread
mov rdx, r9 ; cbSize
xor r8d, r8d ; uFlags
mov r9, rsi ; pEEType
; Call the rest of the allocation helper.
; void* RedhawkGCInterface::Alloc(Thread *pThread, UIntNative cbSize, UInt32 uFlags, EEType *pEEType)
call REDHAWKGCINTERFACE__ALLOC
; Set the new object's EEType pointer and length on success.
test rax, rax
jz ArrayOutOfMemory
mov [rax + OFFSETOF__Object__m_pEEType], rsi
mov [rax + OFFSETOF__Array__m_Length], ebx
;; If the object is bigger than RH_LARGE_OBJECT_SIZE, we must publish it to the BGC
cmp rdi, RH_LARGE_OBJECT_SIZE
jb NewArray_SkipPublish
mov rcx, rax ;; rcx: object
mov rdx, rdi ;; rdx: object size
call RhpPublishObject ;; rax: this function returns the object that was passed-in
NewArray_SkipPublish:
POP_COOP_PINVOKE_FRAME no_extraStack
ret
ArrayOutOfMemory:
;; This is the OOM failure path. We're going to tail-call to a managed helper that will throw
;; an out of memory exception that the caller of this allocator understands.
mov rcx, rsi ; EEType pointer
xor edx, edx ; Indicate that we should throw OOM.
POP_COOP_PINVOKE_FRAME no_extraStack
jmp RhExceptionHandling_FailedAllocation
NESTED_END RhpNewArrayRare, _TEXT
END
| 34.211864
| 110
| 0.573198
|
03c9363bca5f5e92a7f550d6353fc2c0aad804b0
| 7,300
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_21829_708.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_21829_708.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_zr_/i3-7100_9_0x84_notsx.log_21829_708.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r15
push %r8
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x3ec, %r11
nop
nop
nop
and $17401, %r10
mov $0x6162636465666768, %rdi
movq %rdi, %xmm5
vmovups %ymm5, (%r11)
nop
nop
nop
nop
nop
add $15247, %rbx
lea addresses_WT_ht+0x1dedc, %r10
nop
nop
add %r13, %r13
mov $0x6162636465666768, %r15
movq %r15, %xmm4
vmovups %ymm4, (%r10)
nop
nop
nop
nop
nop
inc %rdi
lea addresses_normal_ht+0x1a735, %rbx
nop
nop
nop
add %r8, %r8
movl $0x61626364, (%rbx)
nop
nop
nop
and %r10, %r10
lea addresses_normal_ht+0xa274, %rsi
lea addresses_UC_ht+0x15c1c, %rdi
clflush (%rsi)
nop
nop
nop
and $44295, %r13
mov $1, %rcx
rep movsw
nop
nop
nop
nop
nop
add %r11, %r11
lea addresses_WT_ht+0x51bc, %r8
nop
nop
nop
xor %r15, %r15
mov (%r8), %r13
nop
nop
nop
nop
add $10537, %rbx
lea addresses_WT_ht+0x1a214, %rsi
lea addresses_A_ht+0xc5c, %rdi
nop
nop
nop
cmp $13786, %r11
mov $102, %rcx
rep movsw
nop
nop
nop
sub $7831, %rsi
lea addresses_WC_ht+0x1787c, %r13
nop
nop
nop
nop
nop
sub %r11, %r11
mov $0x6162636465666768, %r10
movq %r10, %xmm2
movups %xmm2, (%r13)
nop
nop
nop
nop
nop
inc %rsi
lea addresses_normal_ht+0x56dc, %rsi
lea addresses_D_ht+0x4886, %rdi
nop
nop
nop
nop
nop
xor $24271, %r11
mov $40, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp %rbx, %rbx
lea addresses_WC_ht+0x1c3dc, %rdi
nop
nop
nop
nop
sub $14685, %rcx
mov $0x6162636465666768, %r8
movq %r8, %xmm3
movups %xmm3, (%rdi)
nop
nop
nop
nop
xor $29612, %r13
lea addresses_WT_ht+0x198bc, %rsi
lea addresses_WT_ht+0xd61d, %rdi
nop
nop
nop
nop
nop
and $60319, %r10
mov $17, %rcx
rep movsl
nop
and $25722, %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r15
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r9
push %rbp
push %rcx
push %rdi
// Store
mov $0x2dc, %rdi
cmp %r12, %r12
movb $0x51, (%rdi)
nop
nop
cmp $18716, %r12
// Store
lea addresses_RW+0xe9dc, %rbp
nop
nop
dec %r14
mov $0x5152535455565758, %r12
movq %r12, %xmm6
vmovups %ymm6, (%rbp)
nop
sub $37080, %rbp
// Faulty Load
lea addresses_US+0x6dc, %r14
clflush (%r14)
and $57007, %r9
vmovntdqa (%r14), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rcx
lea oracles, %r12
and $0xff, %rcx
shlq $12, %rcx
mov (%r12,%rcx,1), %rcx
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_US', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_P', 'same': False, 'size': 1, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 32, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_US', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 32, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 32.15859
| 2,999
| 0.661096
|
af2c66aff69ac4c8c9a8443fb32ec892c9d0ceaf
| 696
|
asm
|
Assembly
|
oeis/138/A138691.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/138/A138691.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/138/A138691.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A138691: Numbers of the form 68+p^2 (where p is a prime).
; Submitted by Jamie Morken(s3)
; 72,77,93,117,189,237,357,429,597,909,1029,1437,1749,1917,2277,2877,3549,3789,4557,5109,5397,6309,6957,7989,9477,10269,10677,11517,11949,12837,16197,17229,18837,19389,22269,22869,24717,26637,27957,29997,32109,32829,36549,37317,38877,39669,44589,49797,51597,52509,54357,57189,58149,63069,66117,69237,72429,73509,76797,79029,80157,85917,94317,96789,98037,100557,109629,113637,120477,121869,124677,128949,134757,139197,143709,146757,151389,157677,160869,167349,175629,177309,185829,187557,192789,196317
mul $0,2
max $0,1
seq $0,173919 ; Numbers that are prime or one less than a prime.
pow $0,2
add $0,68
| 69.6
| 500
| 0.78592
|
18a268ace6b943c8bd7025c51d79dd00a5e9665d
| 2,995
|
asm
|
Assembly
|
third-party/gmp/gmp-src/mpn/arm64/sec_tabselect.asm
|
jhh67/chapel
|
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
|
[
"ECL-2.0",
"Apache-2.0"
] | 1,602
|
2015-01-06T11:26:31.000Z
|
2022-03-30T06:17:21.000Z
|
third-party/gmp/gmp-src/mpn/arm64/sec_tabselect.asm
|
jhh67/chapel
|
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
|
[
"ECL-2.0",
"Apache-2.0"
] | 11,789
|
2015-01-05T04:50:15.000Z
|
2022-03-31T23:39:19.000Z
|
third-party/gmp/gmp-src/mpn/arm64/sec_tabselect.asm
|
jhh67/chapel
|
f041470e9b88b5fc4914c75aa5a37efcb46aa08f
|
[
"ECL-2.0",
"Apache-2.0"
] | 498
|
2015-01-08T18:58:18.000Z
|
2022-03-20T15:37:45.000Z
|
dnl ARM64 Neon mpn_sec_tabselect.
dnl Contributed to the GNU project by Torbjörn Granlund.
dnl Copyright 2011-2014 Free Software Foundation, Inc.
dnl This file is part of the GNU MP Library.
dnl
dnl The GNU MP Library is free software; you can redistribute it and/or modify
dnl it under the terms of either:
dnl
dnl * the GNU Lesser General Public License as published by the Free
dnl Software Foundation; either version 3 of the License, or (at your
dnl option) any later version.
dnl
dnl or
dnl
dnl * the GNU General Public License as published by the Free Software
dnl Foundation; either version 2 of the License, or (at your option) any
dnl later version.
dnl
dnl or both in parallel, as here.
dnl
dnl The GNU MP Library is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
dnl for more details.
dnl
dnl You should have received copies of the GNU General Public License and the
dnl GNU Lesser General Public License along with the GNU MP Library. If not,
dnl see https://www.gnu.org/licenses/.
include(`../config.m4')
C cycles/limb
C Cortex-A53 2.25
C Cortex-A57 1.33
C X-Gene 2
C void
C mpn_sec_tabselect (mp_ptr rp, mp_srcptr *tab,
C mp_size_t n, mp_size_t nents, mp_size_t which)
changecom(blah)
define(`rp', `x0')
define(`tp', `x1')
define(`n', `x2')
define(`nents', `x3')
define(`which', `x4')
define(`i', `x5')
define(`j', `x6')
define(`maskq', `v4')
ASM_START()
PROLOGUE(mpn_sec_tabselect)
dup v7.2d, x4 C 2 `which' copies
mov x10, #1
dup v6.2d, x10 C 2 copies of 1
subs j, n, #4
b.mi L(outer_end)
L(outer_top):
mov i, nents
mov x12, tp C preserve tp
movi v5.16b, #0 C zero 2 counter copies
movi v2.16b, #0
movi v3.16b, #0
ALIGN(16)
L(tp4): cmeq maskq.2d, v5.2d, v7.2d C compare idx copies to `which' copies
ld1 {v0.2d,v1.2d}, [tp]
add v5.2d, v5.2d, v6.2d
bit v2.16b, v0.16b, maskq.16b
bit v3.16b, v1.16b, maskq.16b
add tp, tp, n, lsl #3
sub i, i, #1
cbnz i, L(tp4)
st1 {v2.2d,v3.2d}, [rp], #32
add tp, x12, #32 C restore tp, point to next slice
subs j, j, #4
b.pl L(outer_top)
L(outer_end):
tbz n, #1, L(b0x)
mov i, nents
mov x12, tp
movi v5.16b, #0 C zero 2 counter copies
movi v2.16b, #0
ALIGN(16)
L(tp2): cmeq maskq.2d, v5.2d, v7.2d
ld1 {v0.2d}, [tp]
add v5.2d, v5.2d, v6.2d
bit v2.16b, v0.16b, maskq.16b
add tp, tp, n, lsl #3
sub i, i, #1
cbnz i, L(tp2)
st1 {v2.2d}, [rp], #16
add tp, x12, #16
L(b0x): tbz n, #0, L(b00)
mov i, nents
mov x12, tp
movi v5.16b, #0 C zero 2 counter copies
movi v2.16b, #0
ALIGN(16)
L(tp1): cmeq maskq.2d, v5.2d, v7.2d
ld1 {v0.1d}, [tp]
add v5.2d, v5.2d, v6.2d C FIXME size should be `1d'
bit v2.8b, v0.8b, maskq.8b
add tp, tp, n, lsl #3
sub i, i, #1
cbnz i, L(tp1)
st1 {v2.1d}, [rp], #8
add tp, x12, #8
L(b00): ret
EPILOGUE()
| 24.349593
| 79
| 0.666444
|
bbf9a30d6f1ed031dbfa447e76f2fd8e5f89a225
| 325
|
asm
|
Assembly
|
oeis/340/A340536.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/340/A340536.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/340/A340536.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A340536: Digital root of 2*n^2.
; Submitted by Christian Krause
; 2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9,2,8,9,5,5,9,8,2,9
add $0,1
pow $0,2
mul $0,40
sub $0,1
mul $0,19
div $0,18
add $0,1
mod $0,10
| 25
| 181
| 0.563077
|
d78f631c23e80245e0d87d57f985542eaa182f0e
| 414
|
asm
|
Assembly
|
programs/oeis/000/A000346.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/000/A000346.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/000/A000346.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A000346: a(n) = 2^(2*n+1) - binomial(2*n+1, n+1).
; 1,5,22,93,386,1586,6476,26333,106762,431910,1744436,7036530,28354132,114159428,459312152,1846943453,7423131482,29822170718,119766321572,480832549478,1929894318332,7744043540348,31067656725032,124613686513778,499744650202436,2003840547211196,8033729541916936
mov $2,$0
add $2,1
mov $1,$2
cal $1,68551 ; a(n) = 4^n - binomial(2*n,n).
sub $1,2
div $1,2
add $1,1
| 37.636364
| 259
| 0.751208
|
490a59cafb4541be3813938c9e7d04c76d76d3ad
| 721
|
asm
|
Assembly
|
oeis/267/A267941.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/267/A267941.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/267/A267941.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A267941: Decimal representation of the n-th iteration of the "Rule 253" elementary cellular automaton starting with a single ON (black) cell.
; 1,3,31,127,511,2047,8191,32767,131071,524287,2097151,8388607,33554431,134217727,536870911,2147483647,8589934591,34359738367,137438953471,549755813887,2199023255551,8796093022207,35184372088831,140737488355327,562949953421311,2251799813685247,9007199254740991,36028797018963967,144115188075855871,576460752303423487,2305843009213693951,9223372036854775807,36893488147419103231,147573952589676412927,590295810358705651711,2361183241434822606847,9444732965739290427391,37778931862957161709567
mov $1,2
trn $1,$0
gcd $1,2
mul $1,2
pow $1,$0
mov $0,$1
sub $0,1
mul $0,2
add $0,1
| 55.461538
| 491
| 0.847434
|
1da9023b513fa28a2e843427b598b6ea18758463
| 91
|
asm
|
Assembly
|
Source Codes/Character input and display.asm
|
kaazima/Emulator-8086
|
2137954ecd35418b3720ac32e2577c7191006947
|
[
"MIT"
] | null | null | null |
Source Codes/Character input and display.asm
|
kaazima/Emulator-8086
|
2137954ecd35418b3720ac32e2577c7191006947
|
[
"MIT"
] | null | null | null |
Source Codes/Character input and display.asm
|
kaazima/Emulator-8086
|
2137954ecd35418b3720ac32e2577c7191006947
|
[
"MIT"
] | null | null | null |
.MODEL small
.DATA
.CODE
.STARTUP
mov ah,01h
int 21h
mov dl,al
mov ah,02h
int 21h
.EXIT
end
| 8.272727
| 12
| 0.736264
|
c2f55b197601ac67dbeb14214e351a1585e529ed
| 395
|
asm
|
Assembly
|
oeis/002/A002260.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/002/A002260.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/002/A002260.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A002260: Triangle read by rows: T(n,k) = k for n >= 1, k = 1..n.
; Submitted by Christian Krause
; 1,1,2,1,2,3,1,2,3,4,1,2,3,4,5,1,2,3,4,5,6,1,2,3,4,5,6,7,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,11,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,12,13,1,2,3,4,5,6,7,8,9
seq $0,25682 ; Exponent of 9 (value of j) in n-th number of form 8^i*9^j.
add $0,1
| 56.428571
| 211
| 0.574684
|
ab24d61c1bddc429ce07d46ffa727d996065cfb4
| 409
|
asm
|
Assembly
|
programs/oeis/176/A176631.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/176/A176631.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/176/A176631.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A176631: Triangle T(n, k) = 22^(k*(n-k)), read by rows.
; 1,1,1,1,22,1,1,484,484,1,1,10648,234256,10648,1,1,234256,113379904,113379904,234256,1,1,5153632,54875873536,1207269217792,54875873536,5153632,1,1,113379904,26559922791424,12855002631049216,12855002631049216,26559922791424,113379904,1
seq $0,4247 ; Multiplication table read by antidiagonals: T(i,j) = ij (i>=0, j>=0).
mov $1,22
pow $1,$0
mov $0,$1
| 51.125
| 235
| 0.738386
|
33b916f14fd3c1d4940c77066d24168a43681e35
| 4,058
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_251.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_0xca_notsx.log_21829_251.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_0xca_notsx.log_21829_251.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r9
push %rdx
lea addresses_UC_ht+0xe6a1, %r9
nop
nop
nop
nop
cmp $5525, %rdx
movb (%r9), %r11b
nop
nop
add $18681, %r12
pop %rdx
pop %r9
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r14
push %r8
push %rbp
push %rdx
push %rsi
// Faulty Load
lea addresses_WT+0xdfed, %r10
nop
nop
nop
cmp $59725, %r8
vmovups (%r10), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %rbp
lea oracles, %r8
and $0xff, %rbp
shlq $12, %rbp
mov (%r8,%rbp,1), %rbp
pop %rsi
pop %rdx
pop %rbp
pop %r8
pop %r14
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 63.40625
| 2,999
| 0.662395
|
ec516bb8af609184d2ad9fedde66c756cb796ea0
| 349
|
asm
|
Assembly
|
programs/oeis/187/A187532.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/187/A187532.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/187/A187532.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | null | null | null |
; A187532: a(n) = 4^n mod 19.
; 1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1,4,16,7,9,17,11,6,5,1
mov $1,2
mov $2,$0
lpb $2
mul $1,4
mod $1,38
sub $2,1
lpe
mov $0,$1
div $0,2
| 26.846154
| 234
| 0.550143
|
57e0d108c2336da0fc9788c5b12eb667b4f1e5b5
| 1,551
|
asm
|
Assembly
|
programs/oeis/192/A192389.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/192/A192389.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/192/A192389.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A192389: Coefficient of x in the reduction by x^2 -> x+1 of the polynomial p(n,x) defined at Comments.
; 0,1,3,9,22,48,96,181,327,573,982,1656,2760,4561,7491,12249,19966,32472,52728,85525,138615,224541,363598,588624,952752,1541953,2495331,4037961,6534022,10572768,17107632,27681301,44789895,72472221,117263206,189736584,307001016,496738897,803741283,1300481625,2104224430,3404707656,5508933768,8913643189,14422578807,23336223933,37758804766,61095030816,98853837792,159948870913,258802711107,418751584521,677554298230,1096305885456,1773860186496,2870166074869,4644026264391,7514192342397,12158218610038,19672410955800,31830629569320,51503040528721,83333670101763,134836710634329,218170380740062,353007091378488,571177472122776,924184563505621,1495362035632887,2419546599143133,3914908634780782,6334455233928816,10249363868714640,16583819102648641,26833182971368611,43417002074022729,70250185045396966,113667187119425472,183917372164828368,297584559284259925,481501931449094535,779086490733360861,1260588422182461958,2039674912915829544,3300263335098298392,5339938248014134993,8640201583112440611,13980139831126583001,22620341414239031182,36600481245365621928,59220822659604661032,95821303904970291061,155042126564574960375,250863430469545259901,405905557034120228926,656768987503665497664,1062674544537785735616,1719443532041451242497,2782118076579236987523,4501561608620688239625
lpb $0
mov $2,$0
sub $0,1
seq $2,192953 ; Coefficient of x in the reduction by x^2 -> x+1 of the polynomial p(n,x) defined at Comments.
add $1,$2
lpe
mov $0,$1
| 141
| 1,276
| 0.874919
|
b5ce42fd4a7e404b5d03a8bd9a64bfe2baec3415
| 1,190
|
asm
|
Assembly
|
src/util/icon/asm_cellprot.asm
|
olifink/qspread
|
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
|
[
"MIT"
] | null | null | null |
src/util/icon/asm_cellprot.asm
|
olifink/qspread
|
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
|
[
"MIT"
] | null | null | null |
src/util/icon/asm_cellprot.asm
|
olifink/qspread
|
d6403d210bdad9966af5d2a0358d4eed3f1e1c02
|
[
"MIT"
] | null | null | null |
* Sprite cellprot
*
* Mode 4
* +|------------------+
* -wwwwwwwwwwww -
* |wrrrrrrrrrrw |
* |wrrrrrrrrrrw |
* |wrrrrrrrrrrw |
* |wrrrrrrrwwwwwwwww |
* |wrrrrrrwwaaaaaaaww |
* |wrrrrrrwaawwwwwaaw |
* |wrrrrrwwawwwwwwwaww|
* |wwwwwwwaaaaaaaaaaaw|
* | waaaaawaaaaaw|
* | waaaawwwaaaaw|
* | waaaaawaaaaaw|
* | wwaaaawaaaaww|
* | wwaaaaaaaww |
* | wwwwwwwww |
* +|------------------+
*
section sprite
xdef mes_cellprot
xref mes_zero
mes_cellprot
dc.w $0100,$0000
dc.w 19,15,0,0
dc.l mcs_cellprot-*
dc.l mes_zero-*
dc.l sp_cellprot-*
mcs_cellprot
dc.w $FFFF,$F0F0
dc.w $0000,$0000
dc.w $80FF,$10F0
dc.w $0000,$0000
dc.w $80FF,$10F0
dc.w $0000,$0000
dc.w $80FF,$10F0
dc.w $0000,$0000
dc.w $80FF,$FFFF
dc.w $8080,$0000
dc.w $81FF,$8080
dc.w $C0C0,$0000
dc.w $81FF,$3E3E
dc.w $4040,$0000
dc.w $83FF,$7F7F
dc.w $6060,$0000
dc.w $FEFE,$0000
dc.w $2020,$0000
dc.w $0202,$0808
dc.w $2020,$0000
dc.w $0202,$1C1C
dc.w $2020,$0000
dc.w $0202,$0808
dc.w $2020,$0000
dc.w $0303,$0808
dc.w $6060,$0000
dc.w $0101,$8080
dc.w $C0C0,$0000
dc.w $0000,$FFFF
dc.w $8080,$0000
sp_cellprot
incbin 'win1_util_icon_asm_Cellprot_spr'
*
end
| 17.5
| 41
| 0.618487
|
fe8e52a3e081fd36b96405219e6a537650285373
| 981
|
asm
|
Assembly
|
45/runtime/crt/crt0stub.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
45/runtime/crt/crt0stub.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
45/runtime/crt/crt0stub.asm
|
minblock/msdos
|
479ffd237d9bb7cc83cb06361db2c4ef42dfbac0
|
[
"Apache-2.0"
] | null | null | null |
TITLE crt0stub - stub replacement for crt0*.* (QLib only)
;***
; crt0stub - stub replacement for crt0*.* (QLib only)
;
; Copyright <C> 1987, Microsoft Corporation
;
;Purpose:
; Quick Libs need the C startup for linking, but never execute it.
; This stub contains the appropriate PUBLICs so that the link will
; work, but contains no code.
;
; Note: Before this module can be linked into BQLB40 successfully
; it must be run through DOSSEG for C segment ordering.
;
;*******************************************************************************
DOSSEG ;[5]
extrn B$IEND:FAR ;[3]
_TEXT segment byte public 'CODE'
public __acrtused ; trick to force in startup
__acrtused = 9876h
assume cs:_TEXT
public _exit ;[3]
public __exit ;[3]
__astart:
__cinit:
__ctermsub:
_exit:
__exit:
jmp B$IEND ;[3] vector to B$IEND to stop execution
__cexit proc far ;[6]
public __cexit ;[6]
ret ;[6]
__cexit endp ;[6]
_TEXT ends
end __astart ; start address
| 21.8
| 80
| 0.643221
|
e56f79bbf8c084924f0b6cc995cff06c03858df6
| 8,867
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_216.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_216.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_216.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 %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x164ae, %r11
nop
nop
nop
nop
nop
sub %rsi, %rsi
mov $0x6162636465666768, %r10
movq %r10, %xmm5
movups %xmm5, (%r11)
cmp $49463, %rax
lea addresses_WC_ht+0xfa92, %rsi
lea addresses_A_ht+0x89f2, %rdi
nop
nop
nop
xor $21537, %rbp
mov $74, %rcx
rep movsl
nop
xor %r10, %r10
lea addresses_normal_ht+0x14b96, %rsi
and %rbp, %rbp
mov $0x6162636465666768, %r10
movq %r10, (%rsi)
nop
nop
nop
cmp %rbp, %rbp
lea addresses_UC_ht+0xb062, %rbp
and %rsi, %rsi
vmovups (%rbp), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r11
nop
nop
cmp $9367, %r10
lea addresses_WC_ht+0x19772, %rsi
lea addresses_normal_ht+0x81f2, %rdi
nop
nop
nop
nop
nop
cmp %r13, %r13
mov $35, %rcx
rep movsl
and %rax, %rax
lea addresses_A_ht+0x1a7f2, %rsi
nop
nop
nop
nop
nop
cmp $42474, %r11
movl $0x61626364, (%rsi)
nop
and $7776, %r10
lea addresses_D_ht+0x54f2, %rsi
lea addresses_WT_ht+0x70da, %rdi
nop
nop
add %r10, %r10
mov $67, %rcx
rep movsl
add $22735, %rbp
lea addresses_WT_ht+0x1bf2, %rsi
nop
nop
nop
nop
nop
xor $11687, %rcx
movb $0x61, (%rsi)
nop
nop
nop
nop
dec %r11
lea addresses_WC_ht+0x19f2, %rdi
nop
nop
and $12747, %rsi
mov $0x6162636465666768, %r10
movq %r10, (%rdi)
nop
cmp %r13, %r13
lea addresses_normal_ht+0x7cf2, %rax
nop
nop
and %r11, %r11
vmovups (%rax), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdi
nop
nop
nop
nop
inc %r10
lea addresses_WC_ht+0x16352, %rsi
lea addresses_WC_ht+0xa592, %rdi
nop
nop
nop
nop
nop
xor $57070, %r10
mov $86, %rcx
rep movsq
nop
nop
sub $59938, %rdi
lea addresses_UC_ht+0x123f2, %rsi
lea addresses_D_ht+0x4df2, %rdi
clflush (%rdi)
xor $63821, %r13
mov $11, %rcx
rep movsq
nop
xor %rax, %rax
lea addresses_UC_ht+0xe9f2, %rdi
xor %rsi, %rsi
mov $0x6162636465666768, %r13
movq %r13, %xmm3
and $0xffffffffffffffc0, %rdi
movaps %xmm3, (%rdi)
nop
nop
nop
xor $57444, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r15
push %r9
push %rdi
push %rsi
// Store
lea addresses_RW+0x6b72, %r13
nop
nop
nop
add %rdi, %rdi
movl $0x51525354, (%r13)
xor %r10, %r10
// Load
lea addresses_US+0x1629, %rsi
cmp $65417, %r15
movaps (%rsi), %xmm2
vpextrq $1, %xmm2, %r13
nop
nop
nop
cmp %rsi, %rsi
// Store
lea addresses_UC+0xf9f2, %rsi
nop
nop
nop
xor %r9, %r9
mov $0x5152535455565758, %r10
movq %r10, %xmm2
vmovaps %ymm2, (%rsi)
nop
and $4562, %rdi
// Store
lea addresses_WT+0x1b32, %rdi
nop
nop
and $56678, %r9
movb $0x51, (%rdi)
nop
nop
nop
add %r10, %r10
// Load
lea addresses_normal+0x35ca, %r9
dec %r11
movb (%r9), %r15b
nop
nop
nop
nop
nop
inc %rsi
// Load
mov $0x472, %r9
xor $56785, %rsi
mov (%r9), %r10w
nop
nop
nop
nop
add $23436, %r11
// Faulty Load
lea addresses_D+0x61f2, %r9
add $23991, %rdi
movb (%r9), %r13b
lea oracles, %r10
and $0xff, %r13
shlq $12, %r13
mov (%r10,%r13,1), %r13
pop %rsi
pop %rdi
pop %r9
pop %r15
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_US', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 2}}
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_D_ht'}, 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 11}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 11}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 32.840741
| 2,999
| 0.654111
|
0a7150f5c7a19d68f804837d924b867317d27b01
| 365
|
asm
|
Assembly
|
solutions/40 - Printing Etiquette 2/size-9_speed-53.asm
|
behrmann/7billionhumans
|
36d53daf278ef4f3729bc5cba2f2398d5411bd6d
|
[
"MIT"
] | 45
|
2018-09-05T04:56:59.000Z
|
2021-11-22T08:57:26.000Z
|
solutions/40 - Printing Etiquette 2/size-9_speed-53.asm
|
behrmann/7billionhumans
|
36d53daf278ef4f3729bc5cba2f2398d5411bd6d
|
[
"MIT"
] | 36
|
2018-09-01T11:34:26.000Z
|
2021-05-19T23:20:49.000Z
|
solutions/40 - Printing Etiquette 2/size-9_speed-53.asm
|
behrmann/7billionhumans
|
36d53daf278ef4f3729bc5cba2f2398d5411bd6d
|
[
"MIT"
] | 36
|
2018-09-01T07:44:19.000Z
|
2021-09-10T19:07:35.000Z
|
-- 7 Billion Humans (2087) --
-- 40: Printing Etiquette 2 --
-- Author: landfillbaby
-- Size: 9
-- Speed: 53
-- Speed Tests: 53, 53, 53, 55, 54, 53, 53, 52, 53, 53
a:
mem1 = nearest printer
if mem2 < 5 and
myitem == nothing:
takefrom mem1
endif
step nw,w,sw,n,ne,e,se
if c == nothing and
myitem != nothing:
mem2 = calc mem2 + 1
write mem2
drop
endif
jump a
| 15.869565
| 54
| 0.641096
|
512acd1d28d0cf51bfe28079b08ad19cf3c080eb
| 61,059
|
asm
|
Assembly
|
stressfs.asm
|
jhsie007/xv6
|
237fe356270a548f3171bd206771d6b9f29776c4
|
[
"MIT-0"
] | null | null | null |
stressfs.asm
|
jhsie007/xv6
|
237fe356270a548f3171bd206771d6b9f29776c4
|
[
"MIT-0"
] | null | null | null |
stressfs.asm
|
jhsie007/xv6
|
237fe356270a548f3171bd206771d6b9f29776c4
|
[
"MIT-0"
] | null | null | null |
_stressfs: file format elf32-i386
Disassembly of section .text:
00001000 <main>:
#include "fs.h"
#include "fcntl.h"
int
main(int argc, char *argv[])
{
1000: 55 push %ebp
1001: 89 e5 mov %esp,%ebp
1003: 83 e4 f0 and $0xfffffff0,%esp
1006: 81 ec 30 02 00 00 sub $0x230,%esp
int fd, i;
char path[] = "stressfs0";
100c: c7 84 24 1e 02 00 00 movl $0x65727473,0x21e(%esp)
1013: 73 74 72 65
1017: c7 84 24 22 02 00 00 movl $0x73667373,0x222(%esp)
101e: 73 73 66 73
1022: 66 c7 84 24 26 02 00 movw $0x30,0x226(%esp)
1029: 00 30 00
char data[512];
printf(1, "stressfs starting\n");
102c: c7 44 24 04 05 1c 00 movl $0x1c05,0x4(%esp)
1033: 00
1034: c7 04 24 01 00 00 00 movl $0x1,(%esp)
103b: e8 84 05 00 00 call 15c4 <printf>
memset(data, 'a', sizeof(data));
1040: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
1047: 00
1048: c7 44 24 04 61 00 00 movl $0x61,0x4(%esp)
104f: 00
1050: 8d 44 24 1e lea 0x1e(%esp),%eax
1054: 89 04 24 mov %eax,(%esp)
1057: e8 13 02 00 00 call 126f <memset>
for(i = 0; i < 4; i++)
105c: c7 84 24 2c 02 00 00 movl $0x0,0x22c(%esp)
1063: 00 00 00 00
1067: eb 13 jmp 107c <main+0x7c>
if(fork() > 0)
1069: e8 a6 03 00 00 call 1414 <fork>
106e: 85 c0 test %eax,%eax
1070: 7e 02 jle 1074 <main+0x74>
break;
1072: eb 12 jmp 1086 <main+0x86>
char data[512];
printf(1, "stressfs starting\n");
memset(data, 'a', sizeof(data));
for(i = 0; i < 4; i++)
1074: 83 84 24 2c 02 00 00 addl $0x1,0x22c(%esp)
107b: 01
107c: 83 bc 24 2c 02 00 00 cmpl $0x3,0x22c(%esp)
1083: 03
1084: 7e e3 jle 1069 <main+0x69>
if(fork() > 0)
break;
printf(1, "write %d\n", i);
1086: 8b 84 24 2c 02 00 00 mov 0x22c(%esp),%eax
108d: 89 44 24 08 mov %eax,0x8(%esp)
1091: c7 44 24 04 18 1c 00 movl $0x1c18,0x4(%esp)
1098: 00
1099: c7 04 24 01 00 00 00 movl $0x1,(%esp)
10a0: e8 1f 05 00 00 call 15c4 <printf>
path[8] += i;
10a5: 0f b6 84 24 26 02 00 movzbl 0x226(%esp),%eax
10ac: 00
10ad: 89 c2 mov %eax,%edx
10af: 8b 84 24 2c 02 00 00 mov 0x22c(%esp),%eax
10b6: 01 d0 add %edx,%eax
10b8: 88 84 24 26 02 00 00 mov %al,0x226(%esp)
fd = open(path, O_CREATE | O_RDWR);
10bf: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
10c6: 00
10c7: 8d 84 24 1e 02 00 00 lea 0x21e(%esp),%eax
10ce: 89 04 24 mov %eax,(%esp)
10d1: e8 86 03 00 00 call 145c <open>
10d6: 89 84 24 28 02 00 00 mov %eax,0x228(%esp)
for(i = 0; i < 20; i++)
10dd: c7 84 24 2c 02 00 00 movl $0x0,0x22c(%esp)
10e4: 00 00 00 00
10e8: eb 27 jmp 1111 <main+0x111>
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
10ea: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
10f1: 00
10f2: 8d 44 24 1e lea 0x1e(%esp),%eax
10f6: 89 44 24 04 mov %eax,0x4(%esp)
10fa: 8b 84 24 28 02 00 00 mov 0x228(%esp),%eax
1101: 89 04 24 mov %eax,(%esp)
1104: e8 33 03 00 00 call 143c <write>
printf(1, "write %d\n", i);
path[8] += i;
fd = open(path, O_CREATE | O_RDWR);
for(i = 0; i < 20; i++)
1109: 83 84 24 2c 02 00 00 addl $0x1,0x22c(%esp)
1110: 01
1111: 83 bc 24 2c 02 00 00 cmpl $0x13,0x22c(%esp)
1118: 13
1119: 7e cf jle 10ea <main+0xea>
// printf(fd, "%d\n", i);
write(fd, data, sizeof(data));
close(fd);
111b: 8b 84 24 28 02 00 00 mov 0x228(%esp),%eax
1122: 89 04 24 mov %eax,(%esp)
1125: e8 1a 03 00 00 call 1444 <close>
printf(1, "read\n");
112a: c7 44 24 04 22 1c 00 movl $0x1c22,0x4(%esp)
1131: 00
1132: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1139: e8 86 04 00 00 call 15c4 <printf>
fd = open(path, O_RDONLY);
113e: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1145: 00
1146: 8d 84 24 1e 02 00 00 lea 0x21e(%esp),%eax
114d: 89 04 24 mov %eax,(%esp)
1150: e8 07 03 00 00 call 145c <open>
1155: 89 84 24 28 02 00 00 mov %eax,0x228(%esp)
for (i = 0; i < 20; i++)
115c: c7 84 24 2c 02 00 00 movl $0x0,0x22c(%esp)
1163: 00 00 00 00
1167: eb 27 jmp 1190 <main+0x190>
read(fd, data, sizeof(data));
1169: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
1170: 00
1171: 8d 44 24 1e lea 0x1e(%esp),%eax
1175: 89 44 24 04 mov %eax,0x4(%esp)
1179: 8b 84 24 28 02 00 00 mov 0x228(%esp),%eax
1180: 89 04 24 mov %eax,(%esp)
1183: e8 ac 02 00 00 call 1434 <read>
close(fd);
printf(1, "read\n");
fd = open(path, O_RDONLY);
for (i = 0; i < 20; i++)
1188: 83 84 24 2c 02 00 00 addl $0x1,0x22c(%esp)
118f: 01
1190: 83 bc 24 2c 02 00 00 cmpl $0x13,0x22c(%esp)
1197: 13
1198: 7e cf jle 1169 <main+0x169>
read(fd, data, sizeof(data));
close(fd);
119a: 8b 84 24 28 02 00 00 mov 0x228(%esp),%eax
11a1: 89 04 24 mov %eax,(%esp)
11a4: e8 9b 02 00 00 call 1444 <close>
wait();
11a9: e8 76 02 00 00 call 1424 <wait>
exit();
11ae: e8 69 02 00 00 call 141c <exit>
11b3: 90 nop
000011b4 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
11b4: 55 push %ebp
11b5: 89 e5 mov %esp,%ebp
11b7: 57 push %edi
11b8: 53 push %ebx
asm volatile("cld; rep stosb" :
11b9: 8b 4d 08 mov 0x8(%ebp),%ecx
11bc: 8b 55 10 mov 0x10(%ebp),%edx
11bf: 8b 45 0c mov 0xc(%ebp),%eax
11c2: 89 cb mov %ecx,%ebx
11c4: 89 df mov %ebx,%edi
11c6: 89 d1 mov %edx,%ecx
11c8: fc cld
11c9: f3 aa rep stos %al,%es:(%edi)
11cb: 89 ca mov %ecx,%edx
11cd: 89 fb mov %edi,%ebx
11cf: 89 5d 08 mov %ebx,0x8(%ebp)
11d2: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
11d5: 5b pop %ebx
11d6: 5f pop %edi
11d7: 5d pop %ebp
11d8: c3 ret
000011d9 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
11d9: 55 push %ebp
11da: 89 e5 mov %esp,%ebp
11dc: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
11df: 8b 45 08 mov 0x8(%ebp),%eax
11e2: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
11e5: 90 nop
11e6: 8b 45 08 mov 0x8(%ebp),%eax
11e9: 8d 50 01 lea 0x1(%eax),%edx
11ec: 89 55 08 mov %edx,0x8(%ebp)
11ef: 8b 55 0c mov 0xc(%ebp),%edx
11f2: 8d 4a 01 lea 0x1(%edx),%ecx
11f5: 89 4d 0c mov %ecx,0xc(%ebp)
11f8: 0f b6 12 movzbl (%edx),%edx
11fb: 88 10 mov %dl,(%eax)
11fd: 0f b6 00 movzbl (%eax),%eax
1200: 84 c0 test %al,%al
1202: 75 e2 jne 11e6 <strcpy+0xd>
;
return os;
1204: 8b 45 fc mov -0x4(%ebp),%eax
}
1207: c9 leave
1208: c3 ret
00001209 <strcmp>:
int
strcmp(const char *p, const char *q)
{
1209: 55 push %ebp
120a: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
120c: eb 08 jmp 1216 <strcmp+0xd>
p++, q++;
120e: 83 45 08 01 addl $0x1,0x8(%ebp)
1212: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
1216: 8b 45 08 mov 0x8(%ebp),%eax
1219: 0f b6 00 movzbl (%eax),%eax
121c: 84 c0 test %al,%al
121e: 74 10 je 1230 <strcmp+0x27>
1220: 8b 45 08 mov 0x8(%ebp),%eax
1223: 0f b6 10 movzbl (%eax),%edx
1226: 8b 45 0c mov 0xc(%ebp),%eax
1229: 0f b6 00 movzbl (%eax),%eax
122c: 38 c2 cmp %al,%dl
122e: 74 de je 120e <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
1230: 8b 45 08 mov 0x8(%ebp),%eax
1233: 0f b6 00 movzbl (%eax),%eax
1236: 0f b6 d0 movzbl %al,%edx
1239: 8b 45 0c mov 0xc(%ebp),%eax
123c: 0f b6 00 movzbl (%eax),%eax
123f: 0f b6 c0 movzbl %al,%eax
1242: 29 c2 sub %eax,%edx
1244: 89 d0 mov %edx,%eax
}
1246: 5d pop %ebp
1247: c3 ret
00001248 <strlen>:
uint
strlen(char *s)
{
1248: 55 push %ebp
1249: 89 e5 mov %esp,%ebp
124b: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
124e: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
1255: eb 04 jmp 125b <strlen+0x13>
1257: 83 45 fc 01 addl $0x1,-0x4(%ebp)
125b: 8b 55 fc mov -0x4(%ebp),%edx
125e: 8b 45 08 mov 0x8(%ebp),%eax
1261: 01 d0 add %edx,%eax
1263: 0f b6 00 movzbl (%eax),%eax
1266: 84 c0 test %al,%al
1268: 75 ed jne 1257 <strlen+0xf>
;
return n;
126a: 8b 45 fc mov -0x4(%ebp),%eax
}
126d: c9 leave
126e: c3 ret
0000126f <memset>:
void*
memset(void *dst, int c, uint n)
{
126f: 55 push %ebp
1270: 89 e5 mov %esp,%ebp
1272: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
1275: 8b 45 10 mov 0x10(%ebp),%eax
1278: 89 44 24 08 mov %eax,0x8(%esp)
127c: 8b 45 0c mov 0xc(%ebp),%eax
127f: 89 44 24 04 mov %eax,0x4(%esp)
1283: 8b 45 08 mov 0x8(%ebp),%eax
1286: 89 04 24 mov %eax,(%esp)
1289: e8 26 ff ff ff call 11b4 <stosb>
return dst;
128e: 8b 45 08 mov 0x8(%ebp),%eax
}
1291: c9 leave
1292: c3 ret
00001293 <strchr>:
char*
strchr(const char *s, char c)
{
1293: 55 push %ebp
1294: 89 e5 mov %esp,%ebp
1296: 83 ec 04 sub $0x4,%esp
1299: 8b 45 0c mov 0xc(%ebp),%eax
129c: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
129f: eb 14 jmp 12b5 <strchr+0x22>
if(*s == c)
12a1: 8b 45 08 mov 0x8(%ebp),%eax
12a4: 0f b6 00 movzbl (%eax),%eax
12a7: 3a 45 fc cmp -0x4(%ebp),%al
12aa: 75 05 jne 12b1 <strchr+0x1e>
return (char*)s;
12ac: 8b 45 08 mov 0x8(%ebp),%eax
12af: eb 13 jmp 12c4 <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
12b1: 83 45 08 01 addl $0x1,0x8(%ebp)
12b5: 8b 45 08 mov 0x8(%ebp),%eax
12b8: 0f b6 00 movzbl (%eax),%eax
12bb: 84 c0 test %al,%al
12bd: 75 e2 jne 12a1 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
12bf: b8 00 00 00 00 mov $0x0,%eax
}
12c4: c9 leave
12c5: c3 ret
000012c6 <gets>:
char*
gets(char *buf, int max)
{
12c6: 55 push %ebp
12c7: 89 e5 mov %esp,%ebp
12c9: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
12cc: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
12d3: eb 4c jmp 1321 <gets+0x5b>
cc = read(0, &c, 1);
12d5: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
12dc: 00
12dd: 8d 45 ef lea -0x11(%ebp),%eax
12e0: 89 44 24 04 mov %eax,0x4(%esp)
12e4: c7 04 24 00 00 00 00 movl $0x0,(%esp)
12eb: e8 44 01 00 00 call 1434 <read>
12f0: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
12f3: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
12f7: 7f 02 jg 12fb <gets+0x35>
break;
12f9: eb 31 jmp 132c <gets+0x66>
buf[i++] = c;
12fb: 8b 45 f4 mov -0xc(%ebp),%eax
12fe: 8d 50 01 lea 0x1(%eax),%edx
1301: 89 55 f4 mov %edx,-0xc(%ebp)
1304: 89 c2 mov %eax,%edx
1306: 8b 45 08 mov 0x8(%ebp),%eax
1309: 01 c2 add %eax,%edx
130b: 0f b6 45 ef movzbl -0x11(%ebp),%eax
130f: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
1311: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1315: 3c 0a cmp $0xa,%al
1317: 74 13 je 132c <gets+0x66>
1319: 0f b6 45 ef movzbl -0x11(%ebp),%eax
131d: 3c 0d cmp $0xd,%al
131f: 74 0b je 132c <gets+0x66>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1321: 8b 45 f4 mov -0xc(%ebp),%eax
1324: 83 c0 01 add $0x1,%eax
1327: 3b 45 0c cmp 0xc(%ebp),%eax
132a: 7c a9 jl 12d5 <gets+0xf>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
132c: 8b 55 f4 mov -0xc(%ebp),%edx
132f: 8b 45 08 mov 0x8(%ebp),%eax
1332: 01 d0 add %edx,%eax
1334: c6 00 00 movb $0x0,(%eax)
return buf;
1337: 8b 45 08 mov 0x8(%ebp),%eax
}
133a: c9 leave
133b: c3 ret
0000133c <stat>:
int
stat(char *n, struct stat *st)
{
133c: 55 push %ebp
133d: 89 e5 mov %esp,%ebp
133f: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1342: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1349: 00
134a: 8b 45 08 mov 0x8(%ebp),%eax
134d: 89 04 24 mov %eax,(%esp)
1350: e8 07 01 00 00 call 145c <open>
1355: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
1358: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
135c: 79 07 jns 1365 <stat+0x29>
return -1;
135e: b8 ff ff ff ff mov $0xffffffff,%eax
1363: eb 23 jmp 1388 <stat+0x4c>
r = fstat(fd, st);
1365: 8b 45 0c mov 0xc(%ebp),%eax
1368: 89 44 24 04 mov %eax,0x4(%esp)
136c: 8b 45 f4 mov -0xc(%ebp),%eax
136f: 89 04 24 mov %eax,(%esp)
1372: e8 fd 00 00 00 call 1474 <fstat>
1377: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
137a: 8b 45 f4 mov -0xc(%ebp),%eax
137d: 89 04 24 mov %eax,(%esp)
1380: e8 bf 00 00 00 call 1444 <close>
return r;
1385: 8b 45 f0 mov -0x10(%ebp),%eax
}
1388: c9 leave
1389: c3 ret
0000138a <atoi>:
int
atoi(const char *s)
{
138a: 55 push %ebp
138b: 89 e5 mov %esp,%ebp
138d: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
1390: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
1397: eb 25 jmp 13be <atoi+0x34>
n = n*10 + *s++ - '0';
1399: 8b 55 fc mov -0x4(%ebp),%edx
139c: 89 d0 mov %edx,%eax
139e: c1 e0 02 shl $0x2,%eax
13a1: 01 d0 add %edx,%eax
13a3: 01 c0 add %eax,%eax
13a5: 89 c1 mov %eax,%ecx
13a7: 8b 45 08 mov 0x8(%ebp),%eax
13aa: 8d 50 01 lea 0x1(%eax),%edx
13ad: 89 55 08 mov %edx,0x8(%ebp)
13b0: 0f b6 00 movzbl (%eax),%eax
13b3: 0f be c0 movsbl %al,%eax
13b6: 01 c8 add %ecx,%eax
13b8: 83 e8 30 sub $0x30,%eax
13bb: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
13be: 8b 45 08 mov 0x8(%ebp),%eax
13c1: 0f b6 00 movzbl (%eax),%eax
13c4: 3c 2f cmp $0x2f,%al
13c6: 7e 0a jle 13d2 <atoi+0x48>
13c8: 8b 45 08 mov 0x8(%ebp),%eax
13cb: 0f b6 00 movzbl (%eax),%eax
13ce: 3c 39 cmp $0x39,%al
13d0: 7e c7 jle 1399 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
13d2: 8b 45 fc mov -0x4(%ebp),%eax
}
13d5: c9 leave
13d6: c3 ret
000013d7 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
13d7: 55 push %ebp
13d8: 89 e5 mov %esp,%ebp
13da: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
13dd: 8b 45 08 mov 0x8(%ebp),%eax
13e0: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
13e3: 8b 45 0c mov 0xc(%ebp),%eax
13e6: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
13e9: eb 17 jmp 1402 <memmove+0x2b>
*dst++ = *src++;
13eb: 8b 45 fc mov -0x4(%ebp),%eax
13ee: 8d 50 01 lea 0x1(%eax),%edx
13f1: 89 55 fc mov %edx,-0x4(%ebp)
13f4: 8b 55 f8 mov -0x8(%ebp),%edx
13f7: 8d 4a 01 lea 0x1(%edx),%ecx
13fa: 89 4d f8 mov %ecx,-0x8(%ebp)
13fd: 0f b6 12 movzbl (%edx),%edx
1400: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
1402: 8b 45 10 mov 0x10(%ebp),%eax
1405: 8d 50 ff lea -0x1(%eax),%edx
1408: 89 55 10 mov %edx,0x10(%ebp)
140b: 85 c0 test %eax,%eax
140d: 7f dc jg 13eb <memmove+0x14>
*dst++ = *src++;
return vdst;
140f: 8b 45 08 mov 0x8(%ebp),%eax
}
1412: c9 leave
1413: c3 ret
00001414 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
1414: b8 01 00 00 00 mov $0x1,%eax
1419: cd 40 int $0x40
141b: c3 ret
0000141c <exit>:
SYSCALL(exit)
141c: b8 02 00 00 00 mov $0x2,%eax
1421: cd 40 int $0x40
1423: c3 ret
00001424 <wait>:
SYSCALL(wait)
1424: b8 03 00 00 00 mov $0x3,%eax
1429: cd 40 int $0x40
142b: c3 ret
0000142c <pipe>:
SYSCALL(pipe)
142c: b8 04 00 00 00 mov $0x4,%eax
1431: cd 40 int $0x40
1433: c3 ret
00001434 <read>:
SYSCALL(read)
1434: b8 05 00 00 00 mov $0x5,%eax
1439: cd 40 int $0x40
143b: c3 ret
0000143c <write>:
SYSCALL(write)
143c: b8 10 00 00 00 mov $0x10,%eax
1441: cd 40 int $0x40
1443: c3 ret
00001444 <close>:
SYSCALL(close)
1444: b8 15 00 00 00 mov $0x15,%eax
1449: cd 40 int $0x40
144b: c3 ret
0000144c <kill>:
SYSCALL(kill)
144c: b8 06 00 00 00 mov $0x6,%eax
1451: cd 40 int $0x40
1453: c3 ret
00001454 <exec>:
SYSCALL(exec)
1454: b8 07 00 00 00 mov $0x7,%eax
1459: cd 40 int $0x40
145b: c3 ret
0000145c <open>:
SYSCALL(open)
145c: b8 0f 00 00 00 mov $0xf,%eax
1461: cd 40 int $0x40
1463: c3 ret
00001464 <mknod>:
SYSCALL(mknod)
1464: b8 11 00 00 00 mov $0x11,%eax
1469: cd 40 int $0x40
146b: c3 ret
0000146c <unlink>:
SYSCALL(unlink)
146c: b8 12 00 00 00 mov $0x12,%eax
1471: cd 40 int $0x40
1473: c3 ret
00001474 <fstat>:
SYSCALL(fstat)
1474: b8 08 00 00 00 mov $0x8,%eax
1479: cd 40 int $0x40
147b: c3 ret
0000147c <link>:
SYSCALL(link)
147c: b8 13 00 00 00 mov $0x13,%eax
1481: cd 40 int $0x40
1483: c3 ret
00001484 <mkdir>:
SYSCALL(mkdir)
1484: b8 14 00 00 00 mov $0x14,%eax
1489: cd 40 int $0x40
148b: c3 ret
0000148c <chdir>:
SYSCALL(chdir)
148c: b8 09 00 00 00 mov $0x9,%eax
1491: cd 40 int $0x40
1493: c3 ret
00001494 <dup>:
SYSCALL(dup)
1494: b8 0a 00 00 00 mov $0xa,%eax
1499: cd 40 int $0x40
149b: c3 ret
0000149c <getpid>:
SYSCALL(getpid)
149c: b8 0b 00 00 00 mov $0xb,%eax
14a1: cd 40 int $0x40
14a3: c3 ret
000014a4 <sbrk>:
SYSCALL(sbrk)
14a4: b8 0c 00 00 00 mov $0xc,%eax
14a9: cd 40 int $0x40
14ab: c3 ret
000014ac <sleep>:
SYSCALL(sleep)
14ac: b8 0d 00 00 00 mov $0xd,%eax
14b1: cd 40 int $0x40
14b3: c3 ret
000014b4 <uptime>:
SYSCALL(uptime)
14b4: b8 0e 00 00 00 mov $0xe,%eax
14b9: cd 40 int $0x40
14bb: c3 ret
000014bc <clone>:
SYSCALL(clone)
14bc: b8 16 00 00 00 mov $0x16,%eax
14c1: cd 40 int $0x40
14c3: c3 ret
000014c4 <texit>:
SYSCALL(texit)
14c4: b8 17 00 00 00 mov $0x17,%eax
14c9: cd 40 int $0x40
14cb: c3 ret
000014cc <tsleep>:
SYSCALL(tsleep)
14cc: b8 18 00 00 00 mov $0x18,%eax
14d1: cd 40 int $0x40
14d3: c3 ret
000014d4 <twakeup>:
SYSCALL(twakeup)
14d4: b8 19 00 00 00 mov $0x19,%eax
14d9: cd 40 int $0x40
14db: c3 ret
000014dc <thread_yield>:
SYSCALL(thread_yield)
14dc: b8 1a 00 00 00 mov $0x1a,%eax
14e1: cd 40 int $0x40
14e3: c3 ret
000014e4 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
14e4: 55 push %ebp
14e5: 89 e5 mov %esp,%ebp
14e7: 83 ec 18 sub $0x18,%esp
14ea: 8b 45 0c mov 0xc(%ebp),%eax
14ed: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
14f0: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
14f7: 00
14f8: 8d 45 f4 lea -0xc(%ebp),%eax
14fb: 89 44 24 04 mov %eax,0x4(%esp)
14ff: 8b 45 08 mov 0x8(%ebp),%eax
1502: 89 04 24 mov %eax,(%esp)
1505: e8 32 ff ff ff call 143c <write>
}
150a: c9 leave
150b: c3 ret
0000150c <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
150c: 55 push %ebp
150d: 89 e5 mov %esp,%ebp
150f: 56 push %esi
1510: 53 push %ebx
1511: 83 ec 30 sub $0x30,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
1514: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
151b: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
151f: 74 17 je 1538 <printint+0x2c>
1521: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
1525: 79 11 jns 1538 <printint+0x2c>
neg = 1;
1527: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
152e: 8b 45 0c mov 0xc(%ebp),%eax
1531: f7 d8 neg %eax
1533: 89 45 ec mov %eax,-0x14(%ebp)
1536: eb 06 jmp 153e <printint+0x32>
} else {
x = xx;
1538: 8b 45 0c mov 0xc(%ebp),%eax
153b: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
153e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
1545: 8b 4d f4 mov -0xc(%ebp),%ecx
1548: 8d 41 01 lea 0x1(%ecx),%eax
154b: 89 45 f4 mov %eax,-0xc(%ebp)
154e: 8b 5d 10 mov 0x10(%ebp),%ebx
1551: 8b 45 ec mov -0x14(%ebp),%eax
1554: ba 00 00 00 00 mov $0x0,%edx
1559: f7 f3 div %ebx
155b: 89 d0 mov %edx,%eax
155d: 0f b6 80 e0 1f 00 00 movzbl 0x1fe0(%eax),%eax
1564: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
1568: 8b 75 10 mov 0x10(%ebp),%esi
156b: 8b 45 ec mov -0x14(%ebp),%eax
156e: ba 00 00 00 00 mov $0x0,%edx
1573: f7 f6 div %esi
1575: 89 45 ec mov %eax,-0x14(%ebp)
1578: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
157c: 75 c7 jne 1545 <printint+0x39>
if(neg)
157e: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1582: 74 10 je 1594 <printint+0x88>
buf[i++] = '-';
1584: 8b 45 f4 mov -0xc(%ebp),%eax
1587: 8d 50 01 lea 0x1(%eax),%edx
158a: 89 55 f4 mov %edx,-0xc(%ebp)
158d: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
1592: eb 1f jmp 15b3 <printint+0xa7>
1594: eb 1d jmp 15b3 <printint+0xa7>
putc(fd, buf[i]);
1596: 8d 55 dc lea -0x24(%ebp),%edx
1599: 8b 45 f4 mov -0xc(%ebp),%eax
159c: 01 d0 add %edx,%eax
159e: 0f b6 00 movzbl (%eax),%eax
15a1: 0f be c0 movsbl %al,%eax
15a4: 89 44 24 04 mov %eax,0x4(%esp)
15a8: 8b 45 08 mov 0x8(%ebp),%eax
15ab: 89 04 24 mov %eax,(%esp)
15ae: e8 31 ff ff ff call 14e4 <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
15b3: 83 6d f4 01 subl $0x1,-0xc(%ebp)
15b7: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
15bb: 79 d9 jns 1596 <printint+0x8a>
putc(fd, buf[i]);
}
15bd: 83 c4 30 add $0x30,%esp
15c0: 5b pop %ebx
15c1: 5e pop %esi
15c2: 5d pop %ebp
15c3: c3 ret
000015c4 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
15c4: 55 push %ebp
15c5: 89 e5 mov %esp,%ebp
15c7: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
15ca: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
15d1: 8d 45 0c lea 0xc(%ebp),%eax
15d4: 83 c0 04 add $0x4,%eax
15d7: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
15da: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
15e1: e9 7c 01 00 00 jmp 1762 <printf+0x19e>
c = fmt[i] & 0xff;
15e6: 8b 55 0c mov 0xc(%ebp),%edx
15e9: 8b 45 f0 mov -0x10(%ebp),%eax
15ec: 01 d0 add %edx,%eax
15ee: 0f b6 00 movzbl (%eax),%eax
15f1: 0f be c0 movsbl %al,%eax
15f4: 25 ff 00 00 00 and $0xff,%eax
15f9: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
15fc: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1600: 75 2c jne 162e <printf+0x6a>
if(c == '%'){
1602: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
1606: 75 0c jne 1614 <printf+0x50>
state = '%';
1608: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
160f: e9 4a 01 00 00 jmp 175e <printf+0x19a>
} else {
putc(fd, c);
1614: 8b 45 e4 mov -0x1c(%ebp),%eax
1617: 0f be c0 movsbl %al,%eax
161a: 89 44 24 04 mov %eax,0x4(%esp)
161e: 8b 45 08 mov 0x8(%ebp),%eax
1621: 89 04 24 mov %eax,(%esp)
1624: e8 bb fe ff ff call 14e4 <putc>
1629: e9 30 01 00 00 jmp 175e <printf+0x19a>
}
} else if(state == '%'){
162e: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
1632: 0f 85 26 01 00 00 jne 175e <printf+0x19a>
if(c == 'd'){
1638: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
163c: 75 2d jne 166b <printf+0xa7>
printint(fd, *ap, 10, 1);
163e: 8b 45 e8 mov -0x18(%ebp),%eax
1641: 8b 00 mov (%eax),%eax
1643: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
164a: 00
164b: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
1652: 00
1653: 89 44 24 04 mov %eax,0x4(%esp)
1657: 8b 45 08 mov 0x8(%ebp),%eax
165a: 89 04 24 mov %eax,(%esp)
165d: e8 aa fe ff ff call 150c <printint>
ap++;
1662: 83 45 e8 04 addl $0x4,-0x18(%ebp)
1666: e9 ec 00 00 00 jmp 1757 <printf+0x193>
} else if(c == 'x' || c == 'p'){
166b: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
166f: 74 06 je 1677 <printf+0xb3>
1671: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
1675: 75 2d jne 16a4 <printf+0xe0>
printint(fd, *ap, 16, 0);
1677: 8b 45 e8 mov -0x18(%ebp),%eax
167a: 8b 00 mov (%eax),%eax
167c: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
1683: 00
1684: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
168b: 00
168c: 89 44 24 04 mov %eax,0x4(%esp)
1690: 8b 45 08 mov 0x8(%ebp),%eax
1693: 89 04 24 mov %eax,(%esp)
1696: e8 71 fe ff ff call 150c <printint>
ap++;
169b: 83 45 e8 04 addl $0x4,-0x18(%ebp)
169f: e9 b3 00 00 00 jmp 1757 <printf+0x193>
} else if(c == 's'){
16a4: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
16a8: 75 45 jne 16ef <printf+0x12b>
s = (char*)*ap;
16aa: 8b 45 e8 mov -0x18(%ebp),%eax
16ad: 8b 00 mov (%eax),%eax
16af: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
16b2: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
16b6: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
16ba: 75 09 jne 16c5 <printf+0x101>
s = "(null)";
16bc: c7 45 f4 28 1c 00 00 movl $0x1c28,-0xc(%ebp)
while(*s != 0){
16c3: eb 1e jmp 16e3 <printf+0x11f>
16c5: eb 1c jmp 16e3 <printf+0x11f>
putc(fd, *s);
16c7: 8b 45 f4 mov -0xc(%ebp),%eax
16ca: 0f b6 00 movzbl (%eax),%eax
16cd: 0f be c0 movsbl %al,%eax
16d0: 89 44 24 04 mov %eax,0x4(%esp)
16d4: 8b 45 08 mov 0x8(%ebp),%eax
16d7: 89 04 24 mov %eax,(%esp)
16da: e8 05 fe ff ff call 14e4 <putc>
s++;
16df: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
16e3: 8b 45 f4 mov -0xc(%ebp),%eax
16e6: 0f b6 00 movzbl (%eax),%eax
16e9: 84 c0 test %al,%al
16eb: 75 da jne 16c7 <printf+0x103>
16ed: eb 68 jmp 1757 <printf+0x193>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
16ef: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
16f3: 75 1d jne 1712 <printf+0x14e>
putc(fd, *ap);
16f5: 8b 45 e8 mov -0x18(%ebp),%eax
16f8: 8b 00 mov (%eax),%eax
16fa: 0f be c0 movsbl %al,%eax
16fd: 89 44 24 04 mov %eax,0x4(%esp)
1701: 8b 45 08 mov 0x8(%ebp),%eax
1704: 89 04 24 mov %eax,(%esp)
1707: e8 d8 fd ff ff call 14e4 <putc>
ap++;
170c: 83 45 e8 04 addl $0x4,-0x18(%ebp)
1710: eb 45 jmp 1757 <printf+0x193>
} else if(c == '%'){
1712: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
1716: 75 17 jne 172f <printf+0x16b>
putc(fd, c);
1718: 8b 45 e4 mov -0x1c(%ebp),%eax
171b: 0f be c0 movsbl %al,%eax
171e: 89 44 24 04 mov %eax,0x4(%esp)
1722: 8b 45 08 mov 0x8(%ebp),%eax
1725: 89 04 24 mov %eax,(%esp)
1728: e8 b7 fd ff ff call 14e4 <putc>
172d: eb 28 jmp 1757 <printf+0x193>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
172f: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
1736: 00
1737: 8b 45 08 mov 0x8(%ebp),%eax
173a: 89 04 24 mov %eax,(%esp)
173d: e8 a2 fd ff ff call 14e4 <putc>
putc(fd, c);
1742: 8b 45 e4 mov -0x1c(%ebp),%eax
1745: 0f be c0 movsbl %al,%eax
1748: 89 44 24 04 mov %eax,0x4(%esp)
174c: 8b 45 08 mov 0x8(%ebp),%eax
174f: 89 04 24 mov %eax,(%esp)
1752: e8 8d fd ff ff call 14e4 <putc>
}
state = 0;
1757: 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++){
175e: 83 45 f0 01 addl $0x1,-0x10(%ebp)
1762: 8b 55 0c mov 0xc(%ebp),%edx
1765: 8b 45 f0 mov -0x10(%ebp),%eax
1768: 01 d0 add %edx,%eax
176a: 0f b6 00 movzbl (%eax),%eax
176d: 84 c0 test %al,%al
176f: 0f 85 71 fe ff ff jne 15e6 <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
1775: c9 leave
1776: c3 ret
1777: 90 nop
00001778 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
1778: 55 push %ebp
1779: 89 e5 mov %esp,%ebp
177b: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
177e: 8b 45 08 mov 0x8(%ebp),%eax
1781: 83 e8 08 sub $0x8,%eax
1784: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
1787: a1 00 20 00 00 mov 0x2000,%eax
178c: 89 45 fc mov %eax,-0x4(%ebp)
178f: eb 24 jmp 17b5 <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
1791: 8b 45 fc mov -0x4(%ebp),%eax
1794: 8b 00 mov (%eax),%eax
1796: 3b 45 fc cmp -0x4(%ebp),%eax
1799: 77 12 ja 17ad <free+0x35>
179b: 8b 45 f8 mov -0x8(%ebp),%eax
179e: 3b 45 fc cmp -0x4(%ebp),%eax
17a1: 77 24 ja 17c7 <free+0x4f>
17a3: 8b 45 fc mov -0x4(%ebp),%eax
17a6: 8b 00 mov (%eax),%eax
17a8: 3b 45 f8 cmp -0x8(%ebp),%eax
17ab: 77 1a ja 17c7 <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)
17ad: 8b 45 fc mov -0x4(%ebp),%eax
17b0: 8b 00 mov (%eax),%eax
17b2: 89 45 fc mov %eax,-0x4(%ebp)
17b5: 8b 45 f8 mov -0x8(%ebp),%eax
17b8: 3b 45 fc cmp -0x4(%ebp),%eax
17bb: 76 d4 jbe 1791 <free+0x19>
17bd: 8b 45 fc mov -0x4(%ebp),%eax
17c0: 8b 00 mov (%eax),%eax
17c2: 3b 45 f8 cmp -0x8(%ebp),%eax
17c5: 76 ca jbe 1791 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
17c7: 8b 45 f8 mov -0x8(%ebp),%eax
17ca: 8b 40 04 mov 0x4(%eax),%eax
17cd: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
17d4: 8b 45 f8 mov -0x8(%ebp),%eax
17d7: 01 c2 add %eax,%edx
17d9: 8b 45 fc mov -0x4(%ebp),%eax
17dc: 8b 00 mov (%eax),%eax
17de: 39 c2 cmp %eax,%edx
17e0: 75 24 jne 1806 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
17e2: 8b 45 f8 mov -0x8(%ebp),%eax
17e5: 8b 50 04 mov 0x4(%eax),%edx
17e8: 8b 45 fc mov -0x4(%ebp),%eax
17eb: 8b 00 mov (%eax),%eax
17ed: 8b 40 04 mov 0x4(%eax),%eax
17f0: 01 c2 add %eax,%edx
17f2: 8b 45 f8 mov -0x8(%ebp),%eax
17f5: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
17f8: 8b 45 fc mov -0x4(%ebp),%eax
17fb: 8b 00 mov (%eax),%eax
17fd: 8b 10 mov (%eax),%edx
17ff: 8b 45 f8 mov -0x8(%ebp),%eax
1802: 89 10 mov %edx,(%eax)
1804: eb 0a jmp 1810 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
1806: 8b 45 fc mov -0x4(%ebp),%eax
1809: 8b 10 mov (%eax),%edx
180b: 8b 45 f8 mov -0x8(%ebp),%eax
180e: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
1810: 8b 45 fc mov -0x4(%ebp),%eax
1813: 8b 40 04 mov 0x4(%eax),%eax
1816: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
181d: 8b 45 fc mov -0x4(%ebp),%eax
1820: 01 d0 add %edx,%eax
1822: 3b 45 f8 cmp -0x8(%ebp),%eax
1825: 75 20 jne 1847 <free+0xcf>
p->s.size += bp->s.size;
1827: 8b 45 fc mov -0x4(%ebp),%eax
182a: 8b 50 04 mov 0x4(%eax),%edx
182d: 8b 45 f8 mov -0x8(%ebp),%eax
1830: 8b 40 04 mov 0x4(%eax),%eax
1833: 01 c2 add %eax,%edx
1835: 8b 45 fc mov -0x4(%ebp),%eax
1838: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
183b: 8b 45 f8 mov -0x8(%ebp),%eax
183e: 8b 10 mov (%eax),%edx
1840: 8b 45 fc mov -0x4(%ebp),%eax
1843: 89 10 mov %edx,(%eax)
1845: eb 08 jmp 184f <free+0xd7>
} else
p->s.ptr = bp;
1847: 8b 45 fc mov -0x4(%ebp),%eax
184a: 8b 55 f8 mov -0x8(%ebp),%edx
184d: 89 10 mov %edx,(%eax)
freep = p;
184f: 8b 45 fc mov -0x4(%ebp),%eax
1852: a3 00 20 00 00 mov %eax,0x2000
}
1857: c9 leave
1858: c3 ret
00001859 <morecore>:
static Header*
morecore(uint nu)
{
1859: 55 push %ebp
185a: 89 e5 mov %esp,%ebp
185c: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
185f: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
1866: 77 07 ja 186f <morecore+0x16>
nu = 4096;
1868: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
186f: 8b 45 08 mov 0x8(%ebp),%eax
1872: c1 e0 03 shl $0x3,%eax
1875: 89 04 24 mov %eax,(%esp)
1878: e8 27 fc ff ff call 14a4 <sbrk>
187d: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
1880: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
1884: 75 07 jne 188d <morecore+0x34>
return 0;
1886: b8 00 00 00 00 mov $0x0,%eax
188b: eb 22 jmp 18af <morecore+0x56>
hp = (Header*)p;
188d: 8b 45 f4 mov -0xc(%ebp),%eax
1890: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
1893: 8b 45 f0 mov -0x10(%ebp),%eax
1896: 8b 55 08 mov 0x8(%ebp),%edx
1899: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
189c: 8b 45 f0 mov -0x10(%ebp),%eax
189f: 83 c0 08 add $0x8,%eax
18a2: 89 04 24 mov %eax,(%esp)
18a5: e8 ce fe ff ff call 1778 <free>
return freep;
18aa: a1 00 20 00 00 mov 0x2000,%eax
}
18af: c9 leave
18b0: c3 ret
000018b1 <malloc>:
void*
malloc(uint nbytes)
{
18b1: 55 push %ebp
18b2: 89 e5 mov %esp,%ebp
18b4: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
18b7: 8b 45 08 mov 0x8(%ebp),%eax
18ba: 83 c0 07 add $0x7,%eax
18bd: c1 e8 03 shr $0x3,%eax
18c0: 83 c0 01 add $0x1,%eax
18c3: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
18c6: a1 00 20 00 00 mov 0x2000,%eax
18cb: 89 45 f0 mov %eax,-0x10(%ebp)
18ce: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
18d2: 75 23 jne 18f7 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
18d4: c7 45 f0 f8 1f 00 00 movl $0x1ff8,-0x10(%ebp)
18db: 8b 45 f0 mov -0x10(%ebp),%eax
18de: a3 00 20 00 00 mov %eax,0x2000
18e3: a1 00 20 00 00 mov 0x2000,%eax
18e8: a3 f8 1f 00 00 mov %eax,0x1ff8
base.s.size = 0;
18ed: c7 05 fc 1f 00 00 00 movl $0x0,0x1ffc
18f4: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
18f7: 8b 45 f0 mov -0x10(%ebp),%eax
18fa: 8b 00 mov (%eax),%eax
18fc: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
18ff: 8b 45 f4 mov -0xc(%ebp),%eax
1902: 8b 40 04 mov 0x4(%eax),%eax
1905: 3b 45 ec cmp -0x14(%ebp),%eax
1908: 72 4d jb 1957 <malloc+0xa6>
if(p->s.size == nunits)
190a: 8b 45 f4 mov -0xc(%ebp),%eax
190d: 8b 40 04 mov 0x4(%eax),%eax
1910: 3b 45 ec cmp -0x14(%ebp),%eax
1913: 75 0c jne 1921 <malloc+0x70>
prevp->s.ptr = p->s.ptr;
1915: 8b 45 f4 mov -0xc(%ebp),%eax
1918: 8b 10 mov (%eax),%edx
191a: 8b 45 f0 mov -0x10(%ebp),%eax
191d: 89 10 mov %edx,(%eax)
191f: eb 26 jmp 1947 <malloc+0x96>
else {
p->s.size -= nunits;
1921: 8b 45 f4 mov -0xc(%ebp),%eax
1924: 8b 40 04 mov 0x4(%eax),%eax
1927: 2b 45 ec sub -0x14(%ebp),%eax
192a: 89 c2 mov %eax,%edx
192c: 8b 45 f4 mov -0xc(%ebp),%eax
192f: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
1932: 8b 45 f4 mov -0xc(%ebp),%eax
1935: 8b 40 04 mov 0x4(%eax),%eax
1938: c1 e0 03 shl $0x3,%eax
193b: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
193e: 8b 45 f4 mov -0xc(%ebp),%eax
1941: 8b 55 ec mov -0x14(%ebp),%edx
1944: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
1947: 8b 45 f0 mov -0x10(%ebp),%eax
194a: a3 00 20 00 00 mov %eax,0x2000
return (void*)(p + 1);
194f: 8b 45 f4 mov -0xc(%ebp),%eax
1952: 83 c0 08 add $0x8,%eax
1955: eb 38 jmp 198f <malloc+0xde>
}
if(p == freep)
1957: a1 00 20 00 00 mov 0x2000,%eax
195c: 39 45 f4 cmp %eax,-0xc(%ebp)
195f: 75 1b jne 197c <malloc+0xcb>
if((p = morecore(nunits)) == 0)
1961: 8b 45 ec mov -0x14(%ebp),%eax
1964: 89 04 24 mov %eax,(%esp)
1967: e8 ed fe ff ff call 1859 <morecore>
196c: 89 45 f4 mov %eax,-0xc(%ebp)
196f: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1973: 75 07 jne 197c <malloc+0xcb>
return 0;
1975: b8 00 00 00 00 mov $0x0,%eax
197a: eb 13 jmp 198f <malloc+0xde>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
197c: 8b 45 f4 mov -0xc(%ebp),%eax
197f: 89 45 f0 mov %eax,-0x10(%ebp)
1982: 8b 45 f4 mov -0xc(%ebp),%eax
1985: 8b 00 mov (%eax),%eax
1987: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
198a: e9 70 ff ff ff jmp 18ff <malloc+0x4e>
}
198f: c9 leave
1990: c3 ret
1991: 66 90 xchg %ax,%ax
1993: 90 nop
00001994 <xchg>:
asm volatile("sti");
}
static inline uint
xchg(volatile uint *addr, uint newval)
{
1994: 55 push %ebp
1995: 89 e5 mov %esp,%ebp
1997: 83 ec 10 sub $0x10,%esp
uint result;
// The + in "+m" denotes a read-modify-write operand.
asm volatile("lock; xchgl %0, %1" :
199a: 8b 55 08 mov 0x8(%ebp),%edx
199d: 8b 45 0c mov 0xc(%ebp),%eax
19a0: 8b 4d 08 mov 0x8(%ebp),%ecx
19a3: f0 87 02 lock xchg %eax,(%edx)
19a6: 89 45 fc mov %eax,-0x4(%ebp)
"+m" (*addr), "=a" (result) :
"1" (newval) :
"cc");
return result;
19a9: 8b 45 fc mov -0x4(%ebp),%eax
}
19ac: c9 leave
19ad: c3 ret
000019ae <lock_init>:
#include "x86.h"
#include "proc.h"
unsigned long rands = 1;
void lock_init(lock_t *lock){
19ae: 55 push %ebp
19af: 89 e5 mov %esp,%ebp
lock->locked = 0;
19b1: 8b 45 08 mov 0x8(%ebp),%eax
19b4: c7 00 00 00 00 00 movl $0x0,(%eax)
}
19ba: 5d pop %ebp
19bb: c3 ret
000019bc <lock_acquire>:
void lock_acquire(lock_t *lock){
19bc: 55 push %ebp
19bd: 89 e5 mov %esp,%ebp
19bf: 83 ec 08 sub $0x8,%esp
while(xchg(&lock->locked,1) != 0);
19c2: 90 nop
19c3: 8b 45 08 mov 0x8(%ebp),%eax
19c6: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
19cd: 00
19ce: 89 04 24 mov %eax,(%esp)
19d1: e8 be ff ff ff call 1994 <xchg>
19d6: 85 c0 test %eax,%eax
19d8: 75 e9 jne 19c3 <lock_acquire+0x7>
}
19da: c9 leave
19db: c3 ret
000019dc <lock_release>:
void lock_release(lock_t *lock){
19dc: 55 push %ebp
19dd: 89 e5 mov %esp,%ebp
19df: 83 ec 08 sub $0x8,%esp
xchg(&lock->locked,0);
19e2: 8b 45 08 mov 0x8(%ebp),%eax
19e5: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
19ec: 00
19ed: 89 04 24 mov %eax,(%esp)
19f0: e8 9f ff ff ff call 1994 <xchg>
}
19f5: c9 leave
19f6: c3 ret
000019f7 <thread_create>:
void *thread_create(void(*start_routine)(void*), void *arg){
19f7: 55 push %ebp
19f8: 89 e5 mov %esp,%ebp
19fa: 83 ec 28 sub $0x28,%esp
int tid;
void * stack = malloc(2 * 4096);
19fd: c7 04 24 00 20 00 00 movl $0x2000,(%esp)
1a04: e8 a8 fe ff ff call 18b1 <malloc>
1a09: 89 45 f4 mov %eax,-0xc(%ebp)
void *garbage_stack = stack;
1a0c: 8b 45 f4 mov -0xc(%ebp),%eax
1a0f: 89 45 f0 mov %eax,-0x10(%ebp)
// printf(1,"start routine addr : %d\n",(uint)start_routine);
if((uint)stack % 4096){
1a12: 8b 45 f4 mov -0xc(%ebp),%eax
1a15: 25 ff 0f 00 00 and $0xfff,%eax
1a1a: 85 c0 test %eax,%eax
1a1c: 74 14 je 1a32 <thread_create+0x3b>
stack = stack + (4096 - (uint)stack % 4096);
1a1e: 8b 45 f4 mov -0xc(%ebp),%eax
1a21: 25 ff 0f 00 00 and $0xfff,%eax
1a26: 89 c2 mov %eax,%edx
1a28: b8 00 10 00 00 mov $0x1000,%eax
1a2d: 29 d0 sub %edx,%eax
1a2f: 01 45 f4 add %eax,-0xc(%ebp)
}
if (stack == 0){
1a32: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1a36: 75 1b jne 1a53 <thread_create+0x5c>
printf(1,"malloc fail \n");
1a38: c7 44 24 04 2f 1c 00 movl $0x1c2f,0x4(%esp)
1a3f: 00
1a40: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1a47: e8 78 fb ff ff call 15c4 <printf>
return 0;
1a4c: b8 00 00 00 00 mov $0x0,%eax
1a51: eb 6f jmp 1ac2 <thread_create+0xcb>
}
tid = clone((uint)stack,PSIZE,(uint)start_routine,(int)arg);
1a53: 8b 4d 0c mov 0xc(%ebp),%ecx
1a56: 8b 55 08 mov 0x8(%ebp),%edx
1a59: 8b 45 f4 mov -0xc(%ebp),%eax
1a5c: 89 4c 24 0c mov %ecx,0xc(%esp)
1a60: 89 54 24 08 mov %edx,0x8(%esp)
1a64: c7 44 24 04 00 10 00 movl $0x1000,0x4(%esp)
1a6b: 00
1a6c: 89 04 24 mov %eax,(%esp)
1a6f: e8 48 fa ff ff call 14bc <clone>
1a74: 89 45 ec mov %eax,-0x14(%ebp)
if(tid < 0){
1a77: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1a7b: 79 1b jns 1a98 <thread_create+0xa1>
printf(1,"clone fails\n");
1a7d: c7 44 24 04 3d 1c 00 movl $0x1c3d,0x4(%esp)
1a84: 00
1a85: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1a8c: e8 33 fb ff ff call 15c4 <printf>
return 0;
1a91: b8 00 00 00 00 mov $0x0,%eax
1a96: eb 2a jmp 1ac2 <thread_create+0xcb>
}
if(tid > 0){
1a98: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1a9c: 7e 05 jle 1aa3 <thread_create+0xac>
//store threads on thread table
return garbage_stack;
1a9e: 8b 45 f0 mov -0x10(%ebp),%eax
1aa1: eb 1f jmp 1ac2 <thread_create+0xcb>
}
if(tid == 0){
1aa3: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1aa7: 75 14 jne 1abd <thread_create+0xc6>
printf(1,"tid = 0 return \n");
1aa9: c7 44 24 04 4a 1c 00 movl $0x1c4a,0x4(%esp)
1ab0: 00
1ab1: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1ab8: e8 07 fb ff ff call 15c4 <printf>
}
// wait();
// free(garbage_stack);
return 0;
1abd: b8 00 00 00 00 mov $0x0,%eax
}
1ac2: c9 leave
1ac3: c3 ret
00001ac4 <random>:
// generate 0 -> max random number exclude max.
int random(int max){
1ac4: 55 push %ebp
1ac5: 89 e5 mov %esp,%ebp
rands = rands * 1664525 + 1013904233;
1ac7: a1 f4 1f 00 00 mov 0x1ff4,%eax
1acc: 69 c0 0d 66 19 00 imul $0x19660d,%eax,%eax
1ad2: 05 69 f3 6e 3c add $0x3c6ef369,%eax
1ad7: a3 f4 1f 00 00 mov %eax,0x1ff4
return (int)(rands % max);
1adc: a1 f4 1f 00 00 mov 0x1ff4,%eax
1ae1: 8b 4d 08 mov 0x8(%ebp),%ecx
1ae4: ba 00 00 00 00 mov $0x0,%edx
1ae9: f7 f1 div %ecx
1aeb: 89 d0 mov %edx,%eax
}
1aed: 5d pop %ebp
1aee: c3 ret
1aef: 90 nop
00001af0 <init_q>:
#include "queue.h"
#include "types.h"
#include "user.h"
void init_q(struct queue *q){
1af0: 55 push %ebp
1af1: 89 e5 mov %esp,%ebp
q->size = 0;
1af3: 8b 45 08 mov 0x8(%ebp),%eax
1af6: c7 00 00 00 00 00 movl $0x0,(%eax)
q->head = 0;
1afc: 8b 45 08 mov 0x8(%ebp),%eax
1aff: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
q->tail = 0;
1b06: 8b 45 08 mov 0x8(%ebp),%eax
1b09: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
1b10: 5d pop %ebp
1b11: c3 ret
00001b12 <add_q>:
void add_q(struct queue *q, int v){
1b12: 55 push %ebp
1b13: 89 e5 mov %esp,%ebp
1b15: 83 ec 28 sub $0x28,%esp
struct node * n = malloc(sizeof(struct node));
1b18: c7 04 24 08 00 00 00 movl $0x8,(%esp)
1b1f: e8 8d fd ff ff call 18b1 <malloc>
1b24: 89 45 f4 mov %eax,-0xc(%ebp)
n->next = 0;
1b27: 8b 45 f4 mov -0xc(%ebp),%eax
1b2a: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
n->value = v;
1b31: 8b 45 f4 mov -0xc(%ebp),%eax
1b34: 8b 55 0c mov 0xc(%ebp),%edx
1b37: 89 10 mov %edx,(%eax)
if(q->head == 0){
1b39: 8b 45 08 mov 0x8(%ebp),%eax
1b3c: 8b 40 04 mov 0x4(%eax),%eax
1b3f: 85 c0 test %eax,%eax
1b41: 75 0b jne 1b4e <add_q+0x3c>
q->head = n;
1b43: 8b 45 08 mov 0x8(%ebp),%eax
1b46: 8b 55 f4 mov -0xc(%ebp),%edx
1b49: 89 50 04 mov %edx,0x4(%eax)
1b4c: eb 0c jmp 1b5a <add_q+0x48>
}else{
q->tail->next = n;
1b4e: 8b 45 08 mov 0x8(%ebp),%eax
1b51: 8b 40 08 mov 0x8(%eax),%eax
1b54: 8b 55 f4 mov -0xc(%ebp),%edx
1b57: 89 50 04 mov %edx,0x4(%eax)
}
q->tail = n;
1b5a: 8b 45 08 mov 0x8(%ebp),%eax
1b5d: 8b 55 f4 mov -0xc(%ebp),%edx
1b60: 89 50 08 mov %edx,0x8(%eax)
q->size++;
1b63: 8b 45 08 mov 0x8(%ebp),%eax
1b66: 8b 00 mov (%eax),%eax
1b68: 8d 50 01 lea 0x1(%eax),%edx
1b6b: 8b 45 08 mov 0x8(%ebp),%eax
1b6e: 89 10 mov %edx,(%eax)
}
1b70: c9 leave
1b71: c3 ret
00001b72 <empty_q>:
int empty_q(struct queue *q){
1b72: 55 push %ebp
1b73: 89 e5 mov %esp,%ebp
if(q->size == 0)
1b75: 8b 45 08 mov 0x8(%ebp),%eax
1b78: 8b 00 mov (%eax),%eax
1b7a: 85 c0 test %eax,%eax
1b7c: 75 07 jne 1b85 <empty_q+0x13>
return 1;
1b7e: b8 01 00 00 00 mov $0x1,%eax
1b83: eb 05 jmp 1b8a <empty_q+0x18>
else
return 0;
1b85: b8 00 00 00 00 mov $0x0,%eax
}
1b8a: 5d pop %ebp
1b8b: c3 ret
00001b8c <pop_q>:
int pop_q(struct queue *q){
1b8c: 55 push %ebp
1b8d: 89 e5 mov %esp,%ebp
1b8f: 83 ec 28 sub $0x28,%esp
int val;
struct node *destroy;
if(!empty_q(q)){
1b92: 8b 45 08 mov 0x8(%ebp),%eax
1b95: 89 04 24 mov %eax,(%esp)
1b98: e8 d5 ff ff ff call 1b72 <empty_q>
1b9d: 85 c0 test %eax,%eax
1b9f: 75 5d jne 1bfe <pop_q+0x72>
val = q->head->value;
1ba1: 8b 45 08 mov 0x8(%ebp),%eax
1ba4: 8b 40 04 mov 0x4(%eax),%eax
1ba7: 8b 00 mov (%eax),%eax
1ba9: 89 45 f4 mov %eax,-0xc(%ebp)
destroy = q->head;
1bac: 8b 45 08 mov 0x8(%ebp),%eax
1baf: 8b 40 04 mov 0x4(%eax),%eax
1bb2: 89 45 f0 mov %eax,-0x10(%ebp)
q->head = q->head->next;
1bb5: 8b 45 08 mov 0x8(%ebp),%eax
1bb8: 8b 40 04 mov 0x4(%eax),%eax
1bbb: 8b 50 04 mov 0x4(%eax),%edx
1bbe: 8b 45 08 mov 0x8(%ebp),%eax
1bc1: 89 50 04 mov %edx,0x4(%eax)
free(destroy);
1bc4: 8b 45 f0 mov -0x10(%ebp),%eax
1bc7: 89 04 24 mov %eax,(%esp)
1bca: e8 a9 fb ff ff call 1778 <free>
q->size--;
1bcf: 8b 45 08 mov 0x8(%ebp),%eax
1bd2: 8b 00 mov (%eax),%eax
1bd4: 8d 50 ff lea -0x1(%eax),%edx
1bd7: 8b 45 08 mov 0x8(%ebp),%eax
1bda: 89 10 mov %edx,(%eax)
if(q->size == 0){
1bdc: 8b 45 08 mov 0x8(%ebp),%eax
1bdf: 8b 00 mov (%eax),%eax
1be1: 85 c0 test %eax,%eax
1be3: 75 14 jne 1bf9 <pop_q+0x6d>
q->head = 0;
1be5: 8b 45 08 mov 0x8(%ebp),%eax
1be8: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax)
q->tail = 0;
1bef: 8b 45 08 mov 0x8(%ebp),%eax
1bf2: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax)
}
return val;
1bf9: 8b 45 f4 mov -0xc(%ebp),%eax
1bfc: eb 05 jmp 1c03 <pop_q+0x77>
}
return -1;
1bfe: b8 ff ff ff ff mov $0xffffffff,%eax
}
1c03: c9 leave
1c04: c3 ret
| 36.65006
| 64
| 0.429896
|
a492c2178ea10c1484dfbac1a721d012b7f2d783
| 1,072
|
asm
|
Assembly
|
ppu/stripes.asm
|
michelhe/gba-suite
|
854c1fb3a02fc8d94d04041b2948826708d81011
|
[
"MIT"
] | null | null | null |
ppu/stripes.asm
|
michelhe/gba-suite
|
854c1fb3a02fc8d94d04041b2948826708d81011
|
[
"MIT"
] | null | null | null |
ppu/stripes.asm
|
michelhe/gba-suite
|
854c1fb3a02fc8d94d04041b2948826708d81011
|
[
"MIT"
] | null | null | null |
format binary as 'gba'
include '../lib/arm.inc'
include '../lib/memory.inc'
header:
include '../lib/header.asm'
main:
; Setup DISPCNT
mov r0, 1 shl 8
mov r1, IO
str r0, [r1, DISPCNT]
; Setup BG0CNT
mov r0, 0x41 shl 2
mov r1, IO
str r0, [r1, BG0CNT]
; Setup red color
mov r0, 0x1F
mov r1, PALETTE
strh r0, [r1]
; Setup green color
mov r0, 0x1F shl 5
mov r1, PALETTE
strh r0, [r1, 2]
; Generate green tile
immw r0, 0x11111111
mov r1, VRAM
add r1, 0x4000
mov r2, 32
loop_tile:
subs r2, 4
str r0, [r1, r2]
bne loop_tile
; Generate map in alternating order
mov r0, 1
mov r1, VRAM
add r1, 0x800
mov r2, 0x800
loop_map:
strh r0, [r1]
add r1, 4
subs r2, 4
bne loop_map
loop:
b loop
| 19.851852
| 43
| 0.4375
|
1659f7f4aaf83bd3760da93ed64c7f1820cf66cf
| 3,792
|
asm
|
Assembly
|
src/x86-64/loader/sysvar.asm
|
redteamcaliber/BareMetal-kernel
|
e7293701a914b1bf6b6021a9afd97f8cb8b9fecf
|
[
"BSD-2-Clause"
] | 1
|
2021-05-08T04:01:03.000Z
|
2021-05-08T04:01:03.000Z
|
src/x86-64/loader/sysvar.asm
|
redteamcaliber/BareMetal-kernel
|
e7293701a914b1bf6b6021a9afd97f8cb8b9fecf
|
[
"BSD-2-Clause"
] | null | null | null |
src/x86-64/loader/sysvar.asm
|
redteamcaliber/BareMetal-kernel
|
e7293701a914b1bf6b6021a9afd97f8cb8b9fecf
|
[
"BSD-2-Clause"
] | null | null | null |
; =============================================================================
; Pure64 -- a 64-bit OS loader written in Assembly for x86-64 systems
; Copyright (C) 2008-2016 Return Infinity -- see LICENSE.TXT
;
; System Variables
; =============================================================================
;CONFIG
cfg_smpinit: db 1 ; By default SMP is enabled. Set to 0 to disable.
cfg_mbr: db 0 ; Did we boot off of a disk with a proper MBR
cfg_hdd: db 0 ; Was a bootable drive detected
; Memory locations
E820Map: equ 0x0000000000004000
InfoMap: equ 0x0000000000005000
SystemVariables: equ 0x0000000000005A00
VBEModeInfoBlock: equ 0x0000000000005C00 ; 256 bytes
ahci_cmdlist: equ 0x0000000000070000 ; 4096 bytes 0x070000 -> 0x071FFF
ahci_cmdtable: equ 0x0000000000072000 ; 57344 bytes 0x072000 -> 0x07FFFF
; DQ - Starting at offset 0, increments by 0x8
os_ACPITableAddress: equ SystemVariables + 0x00
screen_cursor_offset: equ SystemVariables + 0x08
os_LocalX2APICAddress: equ SystemVariables + 0x10
os_Counter_Timer: equ SystemVariables + 0x18
os_Counter_RTC: equ SystemVariables + 0x20
os_LocalAPICAddress: equ SystemVariables + 0x28
os_IOAPICAddress: equ SystemVariables + 0x30
os_HPETAddress: equ SystemVariables + 0x38
; DD - Starting at offset 128, increments by 4
os_BSP: equ SystemVariables + 128
mem_amount: equ SystemVariables + 132
os_VideoBase: equ SystemVariables + 136
; DW - Starting at offset 256, increments by 2
cpu_speed: equ SystemVariables + 256
cpu_activated: equ SystemVariables + 258
cpu_detected: equ SystemVariables + 260
; DB - Starting at offset 384, increments by 1
screen_cursor_x: equ SystemVariables + 386
screen_cursor_y: equ SystemVariables + 387
memtempstring: equ SystemVariables + 390
speedtempstring: equ SystemVariables + 400
cpu_amount_string: equ SystemVariables + 410
os_key: equ SystemVariables + 421
os_IOAPICCount: equ SystemVariables + 424
;MISC
screen_cols: db 80
screen_rows: db 25
hextable: db '0123456789ABCDEF'
;STRINGS
msg_initializing: db 'Pure64 v0.6.1 - www.returninfinity.com', 13, 10, 13, 10, 'Initializing system... ', 0
msg_done: db ' Done', 0
msg_CPU: db '[CPU: ', 0
msg_mhz: db 'MHz x', 0
msg_MEM: db '] [MEM: ', 0
msg_mb: db ' MiB]', 0
msg_startingkernel: db 'Starting kernel...', 13, 13, 0
msg_no64: db 'ERROR: This computer does not support 64-bit mode.', 0
msg_novesa: db 'VESA error', 0
; -----------------------------------------------------------------------------
align 16
GDTR32: ; Global Descriptors Table Register
dw gdt32_end - gdt32 - 1 ; limit of GDT (size minus one)
dq gdt32 ; linear address of GDT
align 16
gdt32:
dw 0x0000, 0x0000 ; Null desciptor
dw 0x0000, 0x0000
dw 0xFFFF, 0x0000 ; 32-bit code descriptor
dw 0x9A00, 0x00CF
dw 0xFFFF, 0x0000 ; 32-bit data descriptor
dw 0x9200, 0x00CF
gdt32_end:
; -----------------------------------------------------------------------------
align 16
GDTR64: ; Global Descriptors Table Register
dw gdt64_end - gdt64 - 1 ; limit of GDT (size minus one)
dq 0x0000000000001000 ; linear address of GDT
gdt64: ; This structure is copied to 0x0000000000001000
SYS64_NULL_SEL equ $-gdt64 ; Null Segment
dq 0x0000000000000000
SYS64_CODE_SEL equ $-gdt64 ; Code segment, read/execute, nonconforming
dq 0x0020980000000000 ; 0x00209A0000000000
SYS64_DATA_SEL equ $-gdt64 ; Data segment, read/write, expand down
dq 0x0000900000000000 ; 0x0020920000000000
gdt64_end:
IDTR64: ; Interrupt Descriptor Table Register
dw 256*16-1 ; limit of IDT (size minus one) (4096 bytes - 1)
dq 0x0000000000000000 ; linear address of IDT
; -----------------------------------------------------------------------------
; =============================================================================
; EOF
| 35.111111
| 107
| 0.662711
|
b5cc4575c77f5502a334174f92f5a24f8542c14f
| 6,707
|
asm
|
Assembly
|
kernel/mm/slab.asm
|
TheMachine02/Sorcery
|
ee657f5a64049bee0c947add7ff2cb92d7281ec1
|
[
"MIT"
] | 14
|
2020-05-27T13:20:35.000Z
|
2022-02-10T01:19:54.000Z
|
kernel/mm/slab.asm
|
TheMachine02/Sorcery
|
ee657f5a64049bee0c947add7ff2cb92d7281ec1
|
[
"MIT"
] | 10
|
2020-06-12T20:53:03.000Z
|
2021-03-21T23:11:44.000Z
|
kernel/mm/slab.asm
|
TheMachine02/Sorcery
|
ee657f5a64049bee0c947add7ff2cb92d7281ec1
|
[
"MIT"
] | 84
|
2020-06-11T06:27:03.000Z
|
2021-05-29T17:06:24.000Z
|
; 8 bytes per cache structure
define KERNEL_SLAB_CACHE 0
define KERNEL_SLAB_CACHE_SIZE 8
define KERNEL_SLAB_CACHE_COUNT 0 ; queue info
define KERNEL_SLAB_CACHE_QUEUE 1 ; queue info
define KERNEL_SLAB_CACHE_DATA_SIZE 4 ; size of block (2 bytes)
define KERNEL_SLAB_CACHE_DATA_COUNT 6 ; maximum number of block
define KERNEL_SLAB_CACHE_DATA_PAGE 7 ; number of page currently used
; per slab structure
; 7 bytes + 3 special
define KERNEL_SLAB_PAGE_HEADER 0 ; header
define KERNEL_SLAB_PAGE_HEADER_SIZE 8 ; size
define KERNEL_SLAB_PAGE_PTLB 0 ; ptlb identifier
define KERNEL_SLAB_PAGE_NEXT 1 ; queue pointer
define KERNEL_SLAB_PAGE_PREVIOUS 4 ; queue pointer
define KERNEL_SLAB_PAGE_POINTER 8 ; free pointer reside in the *next* free block
; as such :
; if we are allocating
; count = 2, return the pointer free block and decrement (should point to itself)
; count = 1, free from the queue and return the header block
; if we are freeing
; count = 0, create the header block and add slab to the structure queue
; count = 1, create the free pointer and made it point itself
; count > 1, update the free pointer
; count = max_count, free the slab entirely and remove it from queue
kmalloc = kmem.cache_malloc
kfree = kmem.cache_free
kmem:
.__cache_malloc_error_null:
pop af
scf
sbc hl, hl
ret
.cache_malloc:
; hl is size
; find highest bit set, and if lower bit are set, do + 1
push af
ld a, l
or a, a
jr z, .__cache_malloc_error_null
ld hl, kmem_cache_buffctl shr 3 + 5 ; no 1, 2, 4 bytes caches
.__get_cache_log:
dec l
add a, a
jr nc, .__get_cache_log
jr z, .__get_cache_lowbit
inc l
.__get_cache_lowbit:
; can get l < 0
ld a, l
add a, a
jr nc, .__get_cache_default
xor a, a
ld l, a
.__get_cache_default:
add hl, hl
add hl, hl
add hl, hl
pop af
.cache_alloc:
push af
push de
push bc
push iy
tsti
; allocate from cache pointed by hl
; first, check if there is some free pages to use
; just ld a, (hl) / inc a, but we also need to clear carry flag in case of nz
xor a, a
or a, (hl)
inc a
call z, .cache_grow
; return z if allocated, nz if not
jr c, .__cache_alloc_error
inc hl
ld iy, (hl)
; block size now
ld bc, 3
add hl, bc
ld c, (hl)
inc hl
ld b, (hl)
; quickly save hl, we may not be using it, but anyway
ex de, hl
; get the ptlb of the page and the count
ld hl, kmm_ptlb_map + 256
ld l, (iy+KERNEL_SLAB_PAGE_PTLB)
dec (hl)
jr z, .__cache_alloc_full_page
; grab the current free pointer and write the next free pointer
ld hl, (iy+KERNEL_SLAB_PAGE_POINTER)
ld de, (hl)
ld (iy+KERNEL_SLAB_PAGE_POINTER), de
ex de, hl
.__cache_alloc_zero:
; we can restore interrupts now
rsti
push de
ld hl, KERNEL_MM_NULL
ldir
pop hl
.__cache_alloc_restore:
pop iy
pop bc
pop de
pop af
or a, a
ret
.__cache_alloc_full_page:
ex de, hl
ld de, -5
add hl, de
call kqueue.remove_head
; the last one in the slab
lea de, iy+KERNEL_SLAB_PAGE_HEADER
jr .__cache_alloc_zero
.__cache_alloc_error:
rsti
pop iy
pop bc
pop de
pop af
scf
sbc hl, hl
ret
.__cache_grow_error:
pop ix
pop hl
scf
ret
.cache_grow:
; hl is cache structure
di
; save the cache structure for later
push hl
ex (sp), ix
; ix = cache structure
ld a, (ix+KERNEL_SLAB_CACHE_DATA_PAGE)
inc a
jp m, .__cache_grow_error
ld (ix+KERNEL_SLAB_CACHE_DATA_PAGE), a
ld a, l
rra
rra
rra
and a, KERNEL_MM_PAGE_USER_MASK
or a, KERNEL_MM_PAGE_CACHE_MASK or KERNEL_MM_PAGE_UNEVICTABLE_MASK
ld e, a
ld d, (ix+KERNEL_SLAB_CACHE_DATA_COUNT)
; we'll map a page in kernel mode, with cache and unevictable set and data count within tlb
ld b, KERNEL_MM_GFP_KERNEL
call kmm.map_page
jr c, .__cache_grow_error
push hl
ld bc, -$D00000
add hl, bc
ex (sp), hl
inc sp
pop bc
dec sp
ld a, c
srl b
rra
srl b
rra
; a is tlb, hl is page, ix is our cache structure
; write KERNEL_SLAB_PAGE_PTLB
ld (hl), a
ld de, KERNEL_MM_PAGE_SIZE
add hl, de
ex de, hl
sbc hl, hl
ld bc, 0
ld c, (ix+KERNEL_SLAB_CACHE_DATA_SIZE)
ld b, (ix+KERNEL_SLAB_CACHE_DATA_SIZE+1)
sbc hl, bc
; hl = negated bloc size
ex de, hl
; hl = end, de = page pointer
ld b, (ix+KERNEL_SLAB_CACHE_DATA_COUNT)
dec b
; hl = end of page, de offset, b size
add hl, de
push hl
ex (sp), iy
push hl
add hl, de
.__cache_grow_init:
ld (iy+0), hl
add iy, de
add hl, de
djnz .__cache_grow_init
; mark the KERNEL_SLAB_PAGE_POINTER with the *last* page block
pop hl
ld (iy+KERNEL_SLAB_PAGE_POINTER), hl
lea hl, ix+KERNEL_SLAB_CACHE
call kqueue.insert_head
pop iy
pop ix
or a, a
ret
.cache_free:
; hl is free data adress
push af
tsti
push bc
push de
push hl
ld bc, -$D00000
add hl, bc
ex (sp), hl
ex de, hl
inc sp
pop hl
dec sp
ld a, l
srl h
rra
srl h
rra
ld hl, KERNEL_MM_PHY_RAM shr 2
ld h, a
add hl, hl
add hl, hl
push hl
ex (sp), iy
ld bc, kmm_ptlb_map
ld c, a
ld a, (bc)
and a, KERNEL_MM_PAGE_USER_MASK
ld hl, kmem_cache_buffctl shr 3
or a, l
ld l, a
add hl, hl
add hl, hl
add hl, hl
push hl
ex (sp), ix
inc b
; de is pointer, hl is our slab, bc is ptlb
; iy is our *base* page adress
; de is pointer, hl is our slab, bc is ptlb
ld a, (bc)
; count = 0, create the header block and add slab to the structure queue
; count = 1, create the free pointer and made it point itself
; count > 1, update the free pointer
inc a
ld (bc), a
dec b
dec a
jr z, .__cache_free_link
dec a
jr z, .__cache_free_ptr
inc a
inc a
cp a, (ix+KERNEL_SLAB_CACHE_DATA_COUNT)
jr z, .__cache_shrink
; default pointer updating
; grab page base adress (mask 1024)
; hl = our free pointer
ex de, hl
ld bc, (iy+KERNEL_SLAB_PAGE_POINTER)
ld (hl), bc
ld (iy+KERNEL_SLAB_PAGE_POINTER), hl
.__cache_free_restore:
pop ix
pop iy
pop de
pop bc
rsti
pop af
or a, a
sbc hl, hl
ret
.__cache_free_ptr:
ld (iy+KERNEL_SLAB_PAGE_POINTER), de
jr .__cache_free_restore
.__cache_free_link:
lea hl, ix+KERNEL_SLAB_CACHE
call kqueue.insert_head
ld (iy+KERNEL_SLAB_PAGE_PTLB), b
jr .__cache_free_restore
.__cache_shrink:
lea hl, ix+KERNEL_SLAB_CACHE
call kqueue.remove
sbc hl, hl
adc hl, bc
call kmm.flush_page
jr .__cache_free_restore
.cache_create:
push iy
push bc
ld iy, kmem_cache_user
; 9 users defined cache are possible
ld b, 9
xor a, a
.__find_free:
cp a, (iy+KERNEL_SLAB_CACHE_DATA_COUNT)
jr z, .__find_slot
lea iy, iy+KERNEL_SLAB_CACHE_SIZE
djnz .__find_free
pop bc
pop iy
sbc hl, hl
scf
ret
.__find_slot:
; hl is the block size of the cache
ld (iy+KERNEL_SLAB_CACHE_COUNT), $FF
ld (iy+KERNEL_SLAB_CACHE_DATA_SIZE), hl
ld (iy+KERNEL_SLAB_CACHE_DATA_PAGE), a
; TODO : KERNEL_SLAB_CACHE_DATA_COUNT= 1024 / hl rounded to down
pop bc
pop iy
ret
; kmem_cache_destroy:
; ; hl is cache, just null it and free all the page allocate to it ?
; ret
| 20.020896
| 91
| 0.726703
|
ef1a9adccdc97f3cb7a5dcea311eb30295f8d02f
| 267
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/l_f32_f2long.asm
|
ahjelm/z88dk
|
c4de367f39a76b41f6390ceeab77737e148178fa
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/l_f32_f2long.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/math/float/am9511/lam32/c/sccz80/l_f32_f2long.asm
|
C-Chads/z88dk
|
a4141a8e51205c6414b4ae3263b633c4265778e6
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_fp_am9511
PUBLIC l_f32_f2slong
PUBLIC l_f32_f2ulong
EXTERN asm_am9511_f2slong
EXTERN asm_am9511_f2ulong
; Convert floating polong number to long
defc l_f32_f2slong = asm_am9511_f2slong
defc l_f32_f2ulong = asm_am9511_f2ulong
| 19.071429
| 40
| 0.786517
|
1fba446a2f043b988b3b7984b83da93e3124af8d
| 1,737
|
asm
|
Assembly
|
programs/oeis/244/A244802.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/244/A244802.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/244/A244802.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A244802: The 60 degree spoke (or ray) of a hexagonal spiral of Ulam.
; 1,10,43,100,181,286,415,568,745,946,1171,1420,1693,1990,2311,2656,3025,3418,3835,4276,4741,5230,5743,6280,6841,7426,8035,8668,9325,10006,10711,11440,12193,12970,13771,14596,15445,16318,17215,18136,19081,20050,21043,22060,23101,24166,25255,26368,27505,28666,29851,31060,32293,33550,34831,36136,37465,38818,40195,41596,43021,44470,45943,47440,48961,50506,52075,53668,55285,56926,58591,60280,61993,63730,65491,67276,69085,70918,72775,74656,76561,78490,80443,82420,84421,86446,88495,90568,92665,94786,96931,99100,101293,103510,105751,108016,110305,112618,114955,117316,119701,122110,124543,127000,129481,131986,134515,137068,139645,142246,144871,147520,150193,152890,155611,158356,161125,163918,166735,169576,172441,175330,178243,181180,184141,187126,190135,193168,196225,199306,202411,205540,208693,211870,215071,218296,221545,224818,228115,231436,234781,238150,241543,244960,248401,251866,255355,258868,262405,265966,269551,273160,276793,280450,284131,287836,291565,295318,299095,302896,306721,310570,314443,318340,322261,326206,330175,334168,338185,342226,346291,350380,354493,358630,362791,366976,371185,375418,379675,383956,388261,392590,396943,401320,405721,410146,414595,419068,423565,428086,432631,437200,441793,446410,451051,455716,460405,465118,469855,474616,479401,484210,489043,493900,498781,503686,508615,513568,518545,523546,528571,533620,538693,543790,548911,554056,559225,564418,569635,574876,580141,585430,590743,596080,601441,606826,612235,617668,623125,628606,634111,639640,645193,650770,656371,661996,667645,673318,679015,684736,690481,696250,702043,707860,713701,719566,725455,731368,737305,743266
mov $1,$0
mul $0,12
sub $0,3
mul $1,$0
add $1,1
| 193
| 1,616
| 0.830743
|
26273fecd31c8e9156c956d43ffd3ecb770cc238
| 1,479
|
asm
|
Assembly
|
asm/dos_fix_first_ability_soul.asm
|
Iemnur/DSVEdit
|
1f52feb6de8a47c7d223a17d739e69bb40aedd3f
|
[
"MIT"
] | 70
|
2017-02-25T15:06:47.000Z
|
2022-03-16T03:05:35.000Z
|
asm/dos_fix_first_ability_soul.asm
|
Iemnur/DSVEdit
|
1f52feb6de8a47c7d223a17d739e69bb40aedd3f
|
[
"MIT"
] | 58
|
2017-03-12T21:34:50.000Z
|
2022-01-31T17:22:36.000Z
|
asm/dos_fix_first_ability_soul.asm
|
Iemnur/DSVEdit
|
1f52feb6de8a47c7d223a17d739e69bb40aedd3f
|
[
"MIT"
] | 26
|
2017-03-04T16:35:13.000Z
|
2021-11-24T20:52:19.000Z
|
.nds
.relativeinclude on
.erroronwarning on
.open "ftc/arm9.bin", 02000000h
; This fixes a bug in the original game that occurs when you get your first ability soul. It activates more ability souls than you actually possess.
;
; The bug works like this: The first time you get an ability soul, the same function that equips the first bullet/guardian/enchant souls you get in the tutorial tries to run on the ability soul you get too. But this is a problem, because while your equipped bullet/guardian/enchant souls are stored as an integer representing the ID of the soul you have equipped, the ability souls you have equipped is stored as a bit field.
; For example, Doppelganger is the 2nd ability soul (counting from 0, not from 1). 2 in binary is 00000010. When it tries to store this in the bitfield representing the ability souls you have activated, it activates the 1st ability soul, Malphas. In other words, if your first ability soul is Doppelganger you gain both Doppelganger and Malphas. (Though Malphas doesn't show up in the list of ability souls you own, so you can't deactivate it.)
; This bug isn't noticeable in a normal playthrough because the first ability soul you get is always Balore. Balore is the 0th ability soul, and 0 in binary is still 0, so no extra souls get activated.
.org 0x0202E258 ; Run the first time you get an ability soul. This branches to the bugged code.
b 0202E300h ; Replace with a branch to after the bugged code is over.
.close
| 87
| 444
| 0.783638
|
3180d3b12edb7a272805eb1d5517a007146b946c
| 165
|
asm
|
Assembly
|
tests/t02.asm
|
mras0/sasm
|
342f57570e79b2aa1c42a9064aaea4d198577be2
|
[
"MIT"
] | 26
|
2019-08-13T19:54:42.000Z
|
2022-03-11T16:58:31.000Z
|
tests/t02.asm
|
mras0/sasm
|
342f57570e79b2aa1c42a9064aaea4d198577be2
|
[
"MIT"
] | null | null | null |
tests/t02.asm
|
mras0/sasm
|
342f57570e79b2aa1c42a9064aaea4d198577be2
|
[
"MIT"
] | 2
|
2019-08-20T10:23:56.000Z
|
2020-09-24T20:08:00.000Z
|
org 0x100
mov ah, 0x09
mov dx, msg
int 0x21
mov ax, 0x4c00
int 0x21
msg: db 'Hello world!', 13, 10, '$'
| 15
| 36
| 0.418182
|
e6061a866b46579e846532cc11744f516696d054
| 1,866
|
asm
|
Assembly
|
untested/ARM/avx512_random_stuff.asm
|
GabrielRavier/Generic-Assembly-Samples
|
fbf803960a14307b7fce0165058d0d4048abaf42
|
[
"Unlicense"
] | null | null | null |
untested/ARM/avx512_random_stuff.asm
|
GabrielRavier/Generic-Assembly-Samples
|
fbf803960a14307b7fce0165058d0d4048abaf42
|
[
"Unlicense"
] | null | null | null |
untested/ARM/avx512_random_stuff.asm
|
GabrielRavier/Generic-Assembly-Samples
|
fbf803960a14307b7fce0165058d0d4048abaf42
|
[
"Unlicense"
] | null | null | null |
code32
format ELF
public _ternlogd_scalar
public _ternlogq_scalar
public _pmadd52luq_scalar
section '.text' executable align 16
_ternlogd_scalar:
push {r4, r5, lr}
mov r5, r0
mov lr, #0
mov r0, lr
.loop:
lsr r4, r5, lr
lsl r4, #1
and r4, #2
lsr ip, r1, lr
and ip, #3
orr r4, ip, r4
lsr ip, r2, lr
and ip, #1
orr ip, r4, lsl #1
lsr ip, r3, ip
and ip, #1
orr r0, ip, lsl lr
add lr, #1
cmp lr, #32
bne .loop
pop {r4, r5, pc}
_ternlogq_scalar:
push {r4, r5, r6, r7, r8, r9, r10, fp, lr}
mov r8, r0
mov r7, r1
ldr r10, [sp, #36]
add r6, sp, #40
ldm r6, {r6, r9}
mov lr, #0
mov r0, lr
mov r1, lr
.loop:
rsb r5, lr, #32
sub r4, lr, #32
lsr fp, r8, lr
orr fp, r7, lsl r5
orr fp, r7, lsr r4
lsl fp, #1
and fp, #2
lsr ip, r2, lr
orr ip, r3, lsl r5
orr ip, r3, lsr r4
and ip, #3
orr fp, ip, fp
lsr ip, r10, lr
orr ip, r6, lsl r5
orr ip, r6, lsr r4
and ip, #1
orr ip, fp, lsl #1
lsr ip, r9, ip
and ip, #1
lsl r4, ip, r4
orr r4, ip, lsr r5
orr r0, ip, lsl lr
orr r1, r4, r1
add lr, #1
cmp lr, #64
bne .loop
pop {r4, r5, r6, r7, r8, r9, r10, fp, pc}
_pmadd52luq_scalar:
push {r4, r5, r6, r7, r8, r9, r10, fp, lr}
sub sp, #12
mov fp, r2
ldr r7, [sp, #48]
mov r6, #0x100000
sub r6, #1
and r3, r6
ldr r8, [sp, #52]
and r8, r6
mov r9, #0x10000
sub r9, #1
and r2, r9
and ip, r7, r9
mul r4, ip, r2
lsr lr, fp, #16
str lr, [sp, #4]
mul lr, ip, lr
add lr, r4, lsr #16
and r4, r9
add r4, lr, lsl #16
lsr r10, r7, #16
mul r5, r10, r2
add r5, r4, lsr #16
and r4, r9
ldr ip, [sp, #4]
mul ip, r10, ip
add ip, lr, lsr #16
add ip, r5, lsr #16
mla r2, r8, fp, ip
mla ip, r7, r3, r2
add r2, r4, r5, lsl #16
and ip, r6
adds r0, r2, r0
adc r1, ip, r1
add sp, #12
pop {r4, r5, r6, r7, r8, r9, r10, fp, pc}
| 12.780822
| 43
| 0.553055
|
dba3b7aaab997f507e7fca13906b27d4fc2cda32
| 13,210
|
asm
|
Assembly
|
lib/3d/fastmultiply.asm
|
bitshifters/teletextr
|
1bbf9ae4ca8a9c9601be3fe3fff2ed151814e615
|
[
"MIT"
] | 8
|
2016-12-26T19:33:13.000Z
|
2021-02-19T21:01:07.000Z
|
lib/3d/fastmultiply.asm
|
bitshifters/teletextr
|
1bbf9ae4ca8a9c9601be3fe3fff2ed151814e615
|
[
"MIT"
] | 9
|
2016-11-25T00:58:44.000Z
|
2017-06-26T15:22:10.000Z
|
lib/3d/fastmultiply.asm
|
bitshifters/teletextr
|
1bbf9ae4ca8a9c9601be3fe3fff2ed151814e615
|
[
"MIT"
] | null | null | null |
; quarter square lookup tables
; table1 = n*n/4, where n=0..510
; table2 = (n-255)*(n-255)/4, where n=0..510
;
; table2 + table1 origins must be page aligned
ALIGN 256
PRECALC_TABLES = TRUE
IF CONTIGUOUS_TABLES
IF PRECALC_TABLES
.SQUARETABLE2_LSB
FOR i, 0, 255
n = 256-i
EQUB LO( (n*n) /4 )
NEXT
.SQUARETABLE1_LSB
FOR i, 0, 511
EQUB LO( (i*i) /4 )
NEXT
.SQUARETABLE2_MSB
FOR i, 0, 255
n = 256-i
EQUB HI( (n*n) /4 )
NEXT
.SQUARETABLE1_MSB
FOR i, 0, 511
EQUB HI( (i*i) /4 )
NEXT
ELSE
.table_data SKIP 1536
;table_data = &0E00
; specify contiguous tables
SQUARETABLE2_LSB = table_data
SQUARETABLE1_LSB = SQUARETABLE2_LSB+256
SQUARETABLE2_MSB = SQUARETABLE1_LSB+512
SQUARETABLE1_MSB = SQUARETABLE2_MSB+256
ENDIF
ELSE
; msb & lsb tables can be in different memory locations
; enables us to move the program org down a bit
; as we can spread the two 768 bytes tables around the memory map
SQUARETABLE2_LSB = &0E00
SQUARETABLE1_LSB = SQUARETABLE2_LSB+256
SQUARETABLE2_MSB = &0900 ;&1100
SQUARETABLE1_MSB = SQUARETABLE2_MSB+256
ENDIF
;----------------------------------------------------------------------------------------------------------
; setup quarter square multiplication tables
;----------------------------------------------------------------------------------------------------------
; f(x) = x^2 / 4. Then a*b = f(a+b) - f(a-b)
;
; This implementation uses two tables of squares:
; table1 = n*n/4, where n=0..510
; table2 = (n-255)*(n-255)/4, where n=0..510
;
; Unsigned multiplication of two 8-bit terms is computed as:
; r = table1[a+b] - table2[(a EOR 255)+b]
; where r is a 16-bit unsigned result
;----------------------------------------------------------------------------------------------------------
; A clever innovation with this code is that it takes advantage of overlaps in the table
; which means the tables fit into 1536 bytes instead of the usual 2048.
;
; &0000-&01FF = table2 lsb
; &0100-&02FF = table1 lsb
; &0300-&04FF = table2 msb
; &0400-&05FF = table1 msb
;----------------------------------------------------------------------------------------------------------
IF PRECALC_TABLES
.initialise_multiply
{
; set the msb of lmul0, lmul1, rmul0 and rmul1 just once
; for the entire lifecycle of the application
; - the lsb of these 16-bit addresses will be set as the multiplication terms
LDA#HI(SQUARETABLE1_LSB):STA lmul0+1:STA rmul0+1
LDA#HI(SQUARETABLE1_MSB):STA lmul1+1:STA rmul1+1
rts
}
ELSE
.initialise_multiply
{
; set the msb of lmul0, lmul1, rmul0 and rmul1 just once
; for the entire lifecycle of the application
; - the lsb of these 16-bit addresses will be set as the multiplication terms
LDA#HI(SQUARETABLE1_LSB):STA lmul0+1:STA rmul0+1
LDA#HI(SQUARETABLE1_MSB):STA lmul1+1:STA rmul1+1
; compute table1
; x=y=lhs=0
; while y<256:
; if y>0:
; lhs += x
; table1[offset+y] = lhs
; x = x + 1
;
; lhs += x
; offset = y
; table1[offset+y] = lhs
; y = y + 1
; effectively the same as:
; for n in range(0,511): # 0-510
; table1[n] = n*n/4
; initialise counters and indices
LDA#0:TAX:TAY
STX lhs:STY lhs+1
; skip increment on first iteration
CLC
BCC go
.loop2
TXA:ADC lhs:STA lhs:STA(lmul0),Y
LDA#0:ADC lhs+1:STA lhs+1:STA(lmul1),Y
INX
.go
STY lmul0:STY lmul1
TXA:ADC lhs:STA lhs:STA(lmul0),Y
LDA#0:ADC lhs+1:STA lhs+1:STA(lmul1),Y
INY
BNE loop2
; compute table2
; for x in range(0,256):
; table2[x] = table1[255-x]
; table2[x+256] = table1[x+1]
;
; effectively the same as:
; for n in range(0,511): # 0-510
; table2[n] = (n-255)*(n-255)/4
LDX#0:LDY#&FF
.loop3
LDA SQUARETABLE1_LSB+1,Y:STA SQUARETABLE2_LSB,X
LDA SQUARETABLE1_MSB+1,Y:STA SQUARETABLE2_MSB,X
DEY:INX:BNE loop3
rts
}
ENDIF
; SM: I wanted to use the same multiply tables as the 3D stuff for general multiply routines
; however I cannot fathom out how Nick built his multiply tables in 768 bytes rather than 1024
; as there is some wierd compensation happening for the single byte where the overlapping tables do not marry
; I've spent far too long on this now so I'm running with a solution I know works at the expense of 1Kb extra ram.
; The SQUARETABLE1_LSB/SQUARETABLE1_MSB are fine (n*n/4), its the otehrs that are knacked
; so I'm computing my own versions here that are used by the general multiply routines below.
ALIGN 256
xsquare1_lo = SQUARETABLE1_LSB
xsquare1_hi = SQUARETABLE1_MSB
.xsquare2_lo
FOR i, 0, 511
EQUB LO((i-255)*(i-255)/4)
NEXT
.xsquare2_hi
FOR i, 0, 511
EQUB HI((i-255)*(i-255)/4)
NEXT
.maths_fastmul_t1 SKIP 2
.maths_fastmul_t2 SKIP 2
.maths_fastmul_res SKIP 4
T1 = maths_fastmul_t1
T2 = maths_fastmul_t2
PRODUCT = maths_fastmul_res
; Description: Unsigned 16-bit multiplication with unsigned 32-bit result.
;
; Input: 16-bit unsigned value in T1
; 16-bit unsigned value in T2
; Carry=0: Re-use T1 from previous multiplication (faster)
; Carry=1: Set T1 (slower)
;
; Output: 32-bit unsigned value in PRODUCT
;
; Clobbered: PRODUCT, X, A, C
;
; Allocation setup: T1,T2 and PRODUCT preferably on Zero-page.
.maths_multiply_16bit_unsigned
{
; <T1 * <T2 = AAaa
; <T1 * >T2 = BBbb
; >T1 * <T2 = CCcc
; >T1 * >T2 = DDdd
;
; AAaa
; BBbb
; CCcc
; + DDdd
; ----------
; PRODUCT!
; Setup T1 if changed
bcc skipt1
lda T1+0
sta sm1a+1
sta sm3a+1
sta sm5a+1
sta sm7a+1
eor #$ff
sta sm2a+1
sta sm4a+1
sta sm6a+1
sta sm8a+1
lda T1+1
sta sm1b+1
sta sm3b+1
sta sm5b+1
sta sm7b+1
eor #$ff
sta sm2b+1
sta sm4b+1
sta sm6b+1
sta sm8b+1
.skipt1
; Perform <T1 * <T2 = AAaa
ldx T2+0
sec
.sm1a lda xsquare1_lo,x
.sm2a sbc xsquare2_lo,x
sta PRODUCT+0
.sm3a lda xsquare1_hi,x
.sm4a sbc xsquare2_hi,x
sta _AA+1
; Perform >T1_hi * <T2 = CCcc
sec
.sm1b lda xsquare1_lo,x
.sm2b sbc xsquare2_lo,x
sta _cc+1
.sm3b lda xsquare1_hi,x
.sm4b sbc xsquare2_hi,x
sta _CC+1
; Perform <T1 * >T2 = BBbb
ldx T2+1
sec
.sm5a lda xsquare1_lo,x
.sm6a sbc xsquare2_lo,x
sta _bb+1
.sm7a lda xsquare1_hi,x
.sm8a sbc xsquare2_hi,x
sta _BB+1
; Perform >T1 * >T2 = DDdd
sec
.sm5b lda xsquare1_lo,x
.sm6b sbc xsquare2_lo,x
sta _dd+1
.sm7b lda xsquare1_hi,x
.sm8b sbc xsquare2_hi,x
sta PRODUCT+3
; Add the separate multiplications together
clc
._AA lda #0
._bb adc #0
sta PRODUCT+1
._BB lda #0
._CC adc #0
sta PRODUCT+2
bcc skip1
inc PRODUCT+3
clc
.skip1
._cc lda #0
adc PRODUCT+1
sta PRODUCT+1
._dd lda #0
adc PRODUCT+2
sta PRODUCT+2
bcc skip2
inc PRODUCT+3
.skip2
rts
}
; Description: Signed 16-bit multiplication with signed 32-bit result.
;
; Input: 16-bit signed value in T1
; 16-bit signed value in T2
; Carry=0: Re-use T1 from previous multiplication (faster)
; Carry=1: Set T1 (slower)
;
; Output: 32-bit signed value in PRODUCT
;
; Clobbered: PRODUCT, X, A, C
.maths_multiply_16bit_signed
{
jsr maths_multiply_16bit_unsigned
; Apply sign (See C=Hacking16 for details).
lda T1+1
bpl positive0
sec
lda PRODUCT+2
sbc T2+0
sta PRODUCT+2
lda PRODUCT+3
sbc T2+1
sta PRODUCT+3
.positive0
lda T2+1
bpl positive1
sec
lda PRODUCT+2
sbc T1+0
sta PRODUCT+2
lda PRODUCT+3
sbc T1+1
sta PRODUCT+3
.positive1
rts
}
; Description: Unsigned 8-bit multiplication with unsigned 16-bit result.
;
; Input: 8-bit unsigned value in T1
; 8-bit unsigned value in T2
; Carry=0: Re-use T1 from previous multiplication (faster)
; Carry=1: Set T1 (slower)
;
; Output: 16-bit unsigned value in PRODUCT
;
; Clobbered: PRODUCT, X, A, C
;
; Allocation setup: T1,T2 and PRODUCT preferably on Zero-page.
.maths_multiply_8bit_unsigned
{
bcc skipt1
lda T1
sta sm1+1
sta sm3+1
eor #255
sta sm2+1
sta sm4+1
.skipt1
ldx T2
sec
.sm1 lda xsquare1_lo,x
.sm2 sbc xsquare2_lo,x
sta PRODUCT+0
.sm3: lda xsquare1_hi,x
.sm4: sbc xsquare2_hi,x
sta PRODUCT+1
rts
}
; Description: Signed 8-bit multiplication with signed 16-bit result.
;
; Input: 8-bit signed value in T1
; 8-bit signed value in T2
; Carry=0: Re-use T1 from previous multiplication (faster)
; Carry=1: Set T1 (slower)
;
; Output: 16-bit signed value in PRODUCT
;
; Clobbered: PRODUCT, X, A, C
.maths_multiply_8bit_signed
{
jsr maths_multiply_8bit_unsigned
; Apply sign (See C=Hacking16 for details).
lda T1
bpl positive0
sec
lda PRODUCT+1
sbc T2
sta PRODUCT+1
.positive0
lda T2
bpl positive1
sec
lda PRODUCT+1
sbc T1
sta PRODUCT+1
.positive1
rts
}
| 30.864486
| 114
| 0.422104
|
68cf448c7aa438c7bf4e0bfdd6ae6bb2232ae904
| 17,443
|
asm
|
Assembly
|
impossiblator_3/allparts/kefrens.asm
|
viznut/demoscene
|
0a9b663a18ce5c31a1243fbdb85794325eeed1d8
|
[
"CC0-1.0"
] | 14
|
2021-01-06T12:13:48.000Z
|
2021-02-10T20:39:48.000Z
|
impossiblator_3/allparts/kefrens.asm
|
viznut/demoscene
|
0a9b663a18ce5c31a1243fbdb85794325eeed1d8
|
[
"CC0-1.0"
] | null | null | null |
impossiblator_3/allparts/kefrens.asm
|
viznut/demoscene
|
0a9b663a18ce5c31a1243fbdb85794325eeed1d8
|
[
"CC0-1.0"
] | null | null | null |
!cpu 6510
; start at 1010
; init at $1380
!source "font.inc"
;;;;;;;;;;;;;;;;;;;;; some macros and stuff ;;;;;;;;;;;;;;;;;;;;;;;;;;;
; undocumented opcodes
!zone macros
!macro AXSabs .axst {
!byte $8f
!word .axst
}
!macro ASO0 .asot {
!byte $07,.asot
}
!macro wait .clocks { ; safe with 14..80
jsr wait14-(.clocks-14)
}
!macro nocross .length {
!if ((*&255)>255-.length) {
!align $ff,0
}
}
; taustakuvio ei juuri riipu luettavista osoitteista vaan ohjelmakoodin
; sijainnista muistissa!
ddlo_ulo=$9a
ddlo_u=$9b
dhi=$9d
dlo=$9c
foox=$90
; ddlo=$fc
; ddhi=$fb
texts
;01234567890123456789
; that will be all
; fitts for fight
; george w bush
; tanja saarela
; tea hiilloste
; timbaland
; greetings to
; aspekt
; ate bit
; cosine
; cpu
; creators
; dekadence
; fairlight
; goto80
; pu 239
; vvv team
; aspekt, ate bit, dekadence,
texts
greetings_to
!byte 4
!scrxor $40, "greetings"
!byte 1
!scrxor $40, "to"
!byte 0
fuckings_to
!byte 5
!scrxor $40, "fuckings"
!byte 1
!scrxor $40, "to"
!byte 0
greetings0
!byte 7
!scrxor $40, "aspekt"
!byte 0
!byte 7
!scrxor $40, "ate"
!byte 1
!scrxor $40, "bit"
!byte 0
!byte 7
!scrxor $40, "cosine"
!byte 0
!byte 6
!scrxor $40, "carillon"
!byte 0
!byte 8
!scrxor $40, "cpu"
!byte 0
!byte 6
!scrxor $40, "creators"
!byte 0
!byte 6
!scrxor $40, "dekadence"
!byte 0
!byte 6
!scrxor $40, "fairlight"
!byte 0
!byte 7
!scrxor $40, "goto"
!byte $40+31,$40+28,0
!byte 8
!scrxor $40, "k"
!byte $40+27,0
!byte 7
!scrxor $40, "pu"
!byte 1,$40+27,$40+29,$40+30,0
!byte 8
!scrxor $40, "rno"
!byte 0
!byte 6
!scrxor $40, "trilobit"
!byte 0
!byte 6
!scrxor $40, "vvv"
!byte 1
!scrxor $40, "team"
!byte 0
fuckings0
!byte 0 ; filler
!byte 3
!scrxor $40, "fitts"
!byte 1
!scrxor $40, "for"
!byte 1
!scrxor $40, "fight"
!byte 0
!byte 4
!scrxor $40, "george"
!byte 1
!scrxor $40, "w"
!byte 1
!scrxor $40, "bush"
!byte 0
!byte 4
!scrxor $40, "tanja"
!byte 1
!scrxor $40, "saarela"
!byte 0
!byte 4
!scrxor $40, "tea"
!byte 1
!scrxor $40, "hiilloste"
!byte 0
!byte 6
!scrxor $40, "timbaland"
!byte 0
endofmessages
thatsall
!byte 1
!scrxor $40, "end"
!byte 1
!scrxor $40, "of"
!byte 1
!scrxor $40, "transmission"
!byte 0
clrscr
txa
pha
ldx #59
lda #0
.clr0 sta $1e00,x
dex
bpl .clr0
tax
pla
rts
writetext
txa
clc
adc texts,y
tax
iny
.gl1 lda texts,y
beq .rtso
sta $1e00,x
iny
inx
bne .gl1
.rtso iny
rts
greet
tya
pha
jsr clrscr
ldx #20
pla
pha
ldy #greetings_to-texts
cmp #fuckings0-texts
bne .zzzz
pla
tay
iny
rts
.zzzz
bcc .hiphop
ldy #fuckings_to-texts
.hiphop
jsr writetext
ldx #40
pla
tay
jsr writetext
rts
greet000:
jsr clrscr
ldy #greetings0-texts
.phokki=*-1
cpy #endofmessages-texts
beq greet001
jsr greet
sty .phokki
rts
greet001:
ldy #thatsall-texts
ldx #20
jsr writetext
rts
; in memoriam
; xaztur of pwp
; 1979 - 2007
*=$1380
mcstart sei
; let
lda #0
sta ddlo_u
sta ddlo_ulo
sta dlo0
sta foox
lda #$19
sta $900f
lda #$c8
sta $900e
lda #20+128
sta $9002
lda #$ff
sta $9003
; lda #56
; sta $9001
lda #14
sta $9000
ldx #0
.l0 lda #$f
sta $9400,x
sta $9500,x
lda #$0
sta $9600,x
sta $9700,x
lda #$00
sta $1e00,x
sta $1f00,x
dex
bne .l0
; lda #$41
; sta $1e00+20*6+5
; lda #$42
; sta $1e00+20*6+6
; lda #$43
; sta $1e00+20*6+7
lda #$fb
sta $9005
STMP=$fd
mainloop:
jsr musicplayer
lda foox
bne .tsip
jsr greet000
.tsip lda foox
bpl .zi0
eor #$ff
.zi0 cmp #64
bcs .zih
sta $9001
.zih inc foox
inc foox
rasta
lda #56 ; = start of screen
ll0 cmp $9004 ; wait until at given rasterline
bne ll0 ; bail out 3..9 clocks after $9004 change
; first cmp must occur 71-3-4=64 clks later
lda $9003 ; -4 (60)
ldy #11 ; -2 (58) -1 no matter
nop
m1 ldx #16 ; wait 57
m2 dex
dex
bne m2
cmp $9003 ; +4
beq *+2 ; +3 if equal, +2 if not equal
eor #$80 ; +2
dey ; +2
bne m1 ; +3 -> total 71 if adjusted, 70 if not
; cmp 0
pha
pla
pha
pla
pha
pla
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
;nop
;nop
;nop
tsx
stx STMP
ldx #128 ; 96
lda #$19
sta $900f
lineloop:
txs ; 2
ldy pointlist,x ; 4
ldx xtolineloopptr,y ; 4
lda linebuf,x ; 4
ora xxorrer,y ; 4 ; or maybe and+or
sta linebuf,x ; 5
tsx ; 2 tot 25
linebuf:
cmp #0 ; may spend 71-25-5 = 41 clox here
; if two dots per line: 71-50-5 = 16 clox :(
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp #0
cmp 0
dex ; 2
bne lineloop ; 3 tot 5
ldx STMP
txs
ldx #8
stx $900f
;inc $900f
; framebuffer init:
lda #$00
sta linebuf+1
sta linebuf+3
sta linebuf+5
sta linebuf+7
sta linebuf+9
sta linebuf+11
sta linebuf+13
sta linebuf+15
sta linebuf+17
sta linebuf+19
sta linebuf+21
sta linebuf+23
sta linebuf+25
sta linebuf+27
sta linebuf+29
sta linebuf+31
sta linebuf+33
sta linebuf+35
sta linebuf+37
sta linebuf+39
clc
lda ddlo_ulo
adc #<2730
sta ddlo_ulo
lda ddlo_u
adc #>2730
sta ddlo_u
;asl
;asl
bpl .tooto
eor #$ff
.tooto lsr
lsr
eor #$ff
sta ddlo
lda #$ff
sta ddhi
ldy #0
lda #0
dlo0=*-1
bpl .zizi
eor #$7f
.zizi bpl .zixx
ldy #$ff
.zixx sta dlo
sty dhi
; inc ddlo ;.dlo
; bne .zog
; lda ddhi ;.dhi
; clc
; adc #1
; and #7
; sta dhi;.dhi
; PAH
lda #0
;sta ddlo
;sta ddhi
;;; ;;;
ldx #128
ldy #0
.pff=*-1
sty $fe
inc .pff
.zoo clc
lda dlo
adc #0
ddlo=*-1
sta dlo
lda dhi
adc #0
ddhi=*-1
sta dhi
tya ; y.$fe
clc
adc dlo ; #0
;.dlo=*-1
tay
lda $fe
adc dhi;#0
;.dhi=*-1
sta $fe
sta pointlist,x
dex
tya ; y.$fe
clc
adc dlo ; #0
;.dlo=*-1
tay
lda $fe
adc dhi;#0
;.dhi=*-1
sta $fe
sta pointlist,x
dex
bne .zoo
.zog ;dec $900f
jmp mainloop
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
NUMCH = 5
chstat = 248 ; NUMCH bytes
!zone musicplayer
musicplayer:
ldx #NUMCH-1
.chans dec chctr,x
bne .nxch
ldy chptr,x ; x = kanavaid
.read lda songdata,y
bpl .note
clc
adc chptr,x ; negatiiviset = taaksepäinhyppyjä
tay
bcs .read
.note lsr ; alin bitti = tuplaus
sta chstat,x
; clear chsubstat
lda chtempo,x
bcc .nodbl
asl
.nodbl sta chctr,x
iny
tya ; jos chptr nollasivulle niin suora sty
sta chptr,x
.nxch dex
bpl .chans
;;; musicplayer - synth part ;;;
!zone musicsynth
.tmp=255
lda #$7d
sta $900d ; drumwave reset
lda chstat+0
beq .c0ign
bmi .c0set
.c0clr ora #$80
sta chstat+0
lda #$7e
sta $900a
; lda #$7d
sta $900b
bne .c0done
.c0set ;and #$7f
clc
adc chstat+1
tay
ldx npitches-128,y
stx .c0c
ldy #$a
lda #%110 ;;;; 11000 ; 100 ; 100 ; 10 ; 10 ; 100 ; 1110 ; 110 paras?
jsr setwave
lda #00
.c0c=*-1
; clc
; rol
asl
tax
inx ; dex
inx
; pitch 255-x becomes 255-2x
iny
lda #%110 ;;;; 100 ; 1110 ; 11000 ; 1110; 11000 ; 1110 ; ; 1000
jsr setwave
; 1110 parempi kuin 11000
; 100 ~ 110, 1000 parempi
lda #0
sta chstat+0
beq .c0done ; jmp
; yksinäinen basso: 1110?
; 11000 liian takakumea
; 110 kivan matala
.c0ign
.c0done:
lda chstat+3
beq .c1done
bmi .c1set
.c1clr ora #$80
sta chstat+3
cmp #$81
beq .c1cx
;jsr dezignbeat
.c1cx lda #$7b
sta $900c
bne .c1done
.c1set
cmp #$81
beq .c1done
clc
adc chstat+1
; clc
; adc chstat+4 ; shape
tay
ldx npitches-128,y
ldy #$c
lda #%110 ; %10 ; 1000 ; 1011 ; 010 ; 1100 ; %10 kiva
c1wave=*-1
jsr setwave
.c1done:
; drums are simple
ldx chstat+2
lda drums,x
sta $900d
inc chstat+2
.c3done:
ldx chstat+4
beq .c4done
lda #0
sta chstat+4
dex
bne .c4o1
; opcode 1 (2) : start lead0
.c4op1: lda #lead0-songdata
sta chptr+3
bne .c4done ; jmp
.c4o1: dex
bne .c4o2
; opcode 2 (4): start baseshape1
.c4op2: lda #baseshape1-songdata
sta chptr+1
bne .c4done ; jmp
.c4o2: dex
bne .c4o3
; opcode 3 (6): start baseshape0
.c4op3: lda #baseshape0-songdata
sta chptr+1
bne .c4done
.c4o3: dex
bne .c4o4
; opcode 4 (8): start lead1 & baseshape0
.c4op4: lda #lead1-songdata
sta chptr+3
lda #%1011 ; 101100
sta c1wave
bne .c4op3
.c4o4: dex
bne .c4o5
.c4op5: lda #<(lead0final-lead0finaljmp)
sta lead0finaljmp
lda #<(baseshape1b-baseshape1bjmp)
sta baseshape1bjmp
dec $900e
beq demodone
jmp .c4done ; done ; .c4op1
.c4o5: dex
bne .c4o6
.c4op6: lda #noneseq-songdata
sta chptr+3
jmp .c4op3
.c4o6:
.c4done:
synthdone:
rts
demodone:
jmp 64802
npitches
; 0 1 2 3 4 5 6 7 8 9 10 11
!byte 129,136,142,149,155,160,165,170,175,180,184,188
!byte 192,195,198,202,205,207,210,213,215,217,219,221
!byte 223,225,226,228,230,231,232,234,235,236,237,238
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!zone synthtab
;;; song variables ;;;
; ,0,0 ; nollasivulle -> säästyy tavuja
;;; song opcodes ;;;;;
nBASE = 30
nNONE = 0
nMUTE = 2
nC0 = (-24+nBASE)
nCp0 = (-22+nBASE)
nD0 = (-20+nBASE)
nDp0 = (-18+nBASE)
nE0 = (-16+nBASE)
nF0 = (-14+nBASE)
nFp0 = (-12+nBASE)
nG0 = (-10+nBASE)
nGp0 = (-8+nBASE)
nA0 = (-6+nBASE)
nAp0 = (-4+nBASE)
nB0 = (-2+nBASE)
nC1 = (0+nBASE)
nCp1 = (2+nBASE)
nD1 = (4+nBASE)
nDp1 = (6+nBASE)
nE1 = (8+nBASE)
nF1 = (10+nBASE)
nFp1 = (12+nBASE)
nG1 = (14+nBASE)
nGp1 = (16+nBASE)
nA1 = (18+nBASE)
nAp1 = (20+nBASE)
nB1 = (22+nBASE)
nC2 = (24+nBASE)
nDBL = 1
nLO = 16
nHI = 0
nDR0 = 12*0
;nDR1 = 12*1
nDR2a = 12*1
nDR2b = 12*2
nDR3 = 12*3
;;;;; song data ;;;;;;
; **.*!.**.**
songdata:
noneseq:
!byte nMUTE ; NONE
!byte <(noneseq-*)
songseq0: ; tempo 8
; basso
!byte nC1,nC0,nC1,nC0
!byte nC1,nNONE,nC1,nC0
!byte nC1,nC0,nC1,nC0
!byte nC1,nC1,nDp1,nC1
!byte <(songseq0-*)
baseshape0:
; bassokuvio
!byte nC1-nBASE+nDBL
!byte nDp1-nBASE+nDBL
!byte nD1-nBASE+nDBL
!byte nC1-nBASE
!byte nG1-nBASE
!byte <(baseshape0-*)
baseshape1:
!byte nC1-nBASE+nDBL+10
!byte nDp1-nBASE+nDBL+10
baseshape1b:
!byte nD1-nBASE+nDBL+10
!byte nC1-nBASE+10
!byte nG1-nBASE+10
!byte <(baseshape1-*)
baseshape1bjmp=*-1
songseq2:
; rumpukuvio
!byte nDR3,nNONE,nDR2a,nDR2b
!byte nDR3,nDR3,nDR2a,nDR2b
!byte <(songseq2-*)
lead0:
; melodia / C1
!byte nC1,nNONE,nC1,nAp0
!byte nC1,nNONE,nAp0,nC1
!byte nMUTE, nAp0,nC1,nMUTE
!byte nC1,nNONE,nD1,nNONE
; melodia / Dp1 (+3)
!byte nDp1-6,nNONE,nDp1-6,nD1-6
!byte nDp1-6,nNONE,nF1-6,nDp1-6
!byte nMUTE, nD1-6,nAp0-6,nMUTE
!byte nG1-6, nNONE, nAp0-6,nNONE
lead0final:
; melodia / D1 (+2)
!byte nD1-4,nNONE,nD1-4,nC1-4
!byte nD1-4,nNONE,nD1-4,nDp1-4
!byte nF1-4,nDp1-4,nNONE,nD1-4
!byte nMUTE,nDp1-4,nD1-4,nDp1-4
; melodia / C (+0)
!byte nD1,nC1,nNONE,nMUTE
!byte nC1,nMUTE,nAp0,nC1
; melodia / G (+7)
!byte nMUTE,nNONE,nG1-14,nG1-14
!byte nF1-14,nG1-14,nF1-14,nDp1-14
!byte <(lead0-*)
lead0finaljmp=*-1
lead1:
!byte nC1,nC1,nDp1,nMUTE
!byte nMUTE,nMUTE,nC1,nMUTE
!byte nDp1,nMUTE,nG1,nMUTE
!byte nC1,nNONE,nNONE,nMUTE
;;
!byte nC1,nC1,nDp1,nMUTE
!byte nE1,nMUTE,nF1,nMUTE
!byte nC1,nDp1,nG1,nDp1
!byte nC1,nDp1,nG1,nC2
!byte <(lead1-*)
songseq4:
!byte 0,0
songseq4b:
!byte 2, 0, 0, 0
!byte 4, 0, 0, 0
!byte 8, 0, 0, 0 ; 2,8,2 ; ,0 ; 2,8,0
!byte 2, 0, 4, 0
!byte 10,10,10,10,10,10
!byte <(songseq4b-*)
chctr !byte 2,2,2,2,1
chtempo !byte 6,6*8,6,6,6*32
chptr !byte songseq0-songdata
!byte baseshape0-songdata
!byte songseq2-songdata
!byte noneseq-songdata
!byte songseq4-songdata
drums ; 0
!byte 126,126,126,126, 126,126 ; ,126,126
; 1
; !byte 200,180,160,140,126,130
; !byte 210,255,160,255, 126,130 ; ,126,255 ; bass
; 2a-2b
; !byte 250,128,240,128,250,128
; !byte 200,128,220,140,126,128
!byte 250,128,240,128,200,190
!byte 180,170,160,150,140,130
; 3
!byte 210,130,128, 126,126,126
; snare
; paske
; "tsäkä": 250,128,240,128 varsin hyvä "c64-snare"
; jatko 0: 128,126,128,126
; jatko 1: 126,200,230,200
;
; BASSO 210,255,160,255 ELITE jatko: 126,126,130,255
;vols_hi !byte 6,5,4,3, 6,5,4,3 ; 11,6,7,2, 11,6,7,2
;vols_lo !byte 6,5,4,3, 6,5,4,3
!zone setwave
+nocross 45
setwave:
.tmp=255
.tmp2=254
stx .initfreq ; 4
; txa
; jmp .noset
sty .ch0 ; 4 ; x = channel id
sty .ch1 ; 4
ldx .ldfqmasks-$a,y ; 4
sta .tmp ; 3 ; a = waveform
ora #$7f ; 2
;and x, sta $9000,y ??
+AXSabs $900c ; 4 to next store: 3+2+2+5+4 eq 16
.ch0=*-2
sty .tmp2 ; 3 ; save channel id
ldy #7 ; 2
.l0 lda #$7f ; 2
+ASO0 .tmp ; 5 asl tmp; a = [tmp] OR $7f
+AXSabs $900c ; 4 [$900c] = a AND x
.ch1=*-2
dey ; 2
bne .l0 ; 3
lda #128 ; 2
.initfreq=*-1
nop ; 2
ldy .tmp2 ; 3
.noset sta $9000,y ; 5 from prev store: 5+3+2+2+2+2 eq 16
rts ; 6 total cloks 11+4+3+2+16*7+16+6 eq 154
.ldfqmasks
!byte $fe ; $900a - 1 x 16 clocks/bit
!byte $fd ; $900b - 2 x 8 clocks/bit
!byte $fb ; $900c - 4 x 4 clocks/bit
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*=$1b00
pointlist
!byte 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
!byte 21,22,23,24,25,26,27,28,29,30
!byte 31,32,33,34,35,36,37,38,39,40
!byte 41,42,43,44,45,46,47,48,49,50
!byte 51,52,53,54,55,56,57,58,59,60
!byte 61,62,63,64,65,66,67,68,69,70
!byte 71,72,73,74,75,76,77,78,79,80
!byte 81,82,83,84,85,86,87,88,89,90
!byte 91,92,93,94,95,96,97,98,99,100
!byte 159,158,157,156,155,154,153,152,151,150
!byte 149,148,147,146,145,144,143,142,141,140
!byte 139,138,137,136,135,134,133,132,131,130
!byte 129,128,127,126,125,124,123,122,121,120
!byte 119,118,117,116,115,114,113,112,111,110
!byte 109,108,107,106,105,104,103,102,101,100
!byte 99,98,97,96,95,96,97,98,99,98,97,96,95,96,97,98,99,100
!byte 91,92,93,94,95,96,97,98,99,100
!byte 81,82,83,84,85,86,87,88,89,90
!byte 71,72,73,74,75,76,77,78,79,80
!byte 61,62,63,64,65,66,67,68,69,70
!byte 51,52,53,54,55,56,57,58,59,60
!byte 41,42,43,44,45,46,47,48,49,50
*=$1c00
xxorrer
!byte 128, 64, 16, 4, 1, 64, 16, 4, 1, 64, 16, 4, 2, 128, 32, 8, 2, 128, 64, 16
!byte 4, 2, 128, 32, 16, 4, 1, 128, 32, 16, 4, 2, 1, 64, 32, 16, 4, 2, 1, 128, 64
!byte 32, 16, 8, 4, 2, 1, 128, 128, 64, 32, 16, 16, 8, 8, 4, 4, 4, 2, 2, 2, 2, 2
!byte 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 8, 8, 16, 16, 32, 64, 128, 128, 1, 2, 4, 8
!byte 16, 32, 64, 128, 1, 2, 4, 16, 32, 64, 1, 2, 4, 16, 32, 128, 1, 4, 16, 32
!byte 128, 2, 4, 16, 64, 128, 2, 8, 32, 128, 2, 4, 16, 64, 1, 4, 16, 64, 1, 4, 16
!byte 64, 128, 2, 8, 32, 128, 2, 8, 32, 128, 2, 8, 32, 64, 1, 4, 16, 64, 1, 2, 8
!byte 32, 64, 1, 4, 8, 32, 128, 1, 4, 8, 32, 64, 128, 2, 4, 8, 32, 64, 128, 1, 2
!byte 4, 8, 16, 32, 64, 128, 1, 1, 2, 4, 8, 8, 16, 16, 32, 32, 32, 64, 64, 64, 64
!byte 64, 64, 64, 64, 64, 64, 64, 64, 64, 32, 32, 32, 16, 16, 8, 8, 4, 2, 1, 1
!byte 128, 64, 32, 16, 8, 4, 2, 1, 128, 64, 32, 8, 4, 2, 128, 64, 32, 8, 4, 1
!byte 128, 32, 8, 4, 1, 64, 32, 8, 2, 1, 64, 16, 4, 1, 64, 32, 8, 2, 128, 32, 8
!byte 2, 128, 32, 8, 2
*=$1d00
xtolineloopptr
!byte 21, 21, 21, 21, 21, 23, 23, 23, 23, 25, 25, 25, 25, 27, 27, 27, 27, 29, 29
!byte 29, 29, 29, 31, 31, 31, 31, 31, 33, 33, 33, 33, 33, 33, 35, 35, 35, 35, 35
!byte 35, 37, 37, 37, 37, 37, 37, 37, 37, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39
!byte 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39
!byte 39, 39, 39, 39, 39, 39, 37, 37, 37, 37, 37, 37, 37, 37, 35, 35, 35, 35, 35
!byte 35, 33, 33, 33, 33, 33, 33, 31, 31, 31, 31, 31, 29, 29, 29, 29, 29, 27, 27
!byte 27, 27, 25, 25, 25, 25, 23, 23, 23, 23, 21, 21, 21, 21, 21, 19, 19, 19, 19
!byte 17, 17, 17, 17, 15, 15, 15, 15, 13, 13, 13, 13, 11, 11, 11, 11, 11, 9, 9, 9
!byte 9, 9, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1
!byte 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
!byte 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7
!byte 7, 7, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11, 13, 13, 13, 13, 15, 15, 15, 15, 17
!byte 17, 17, 17, 19, 19, 19, 19
; kefrens algo:
; - table precalced with inherent sin lookup
; - function: linear + sintab
| 16.628217
| 81
| 0.545606
|
8ea8c94599e2a09affe512b469f40f858beedd13
| 1,005
|
asm
|
Assembly
|
hw5/danielsawyer-hw5-gcd.asm
|
sawyermade/architecture
|
69194ae5282ab8f3a17a841d6c77212bfbe73038
|
[
"WTFPL"
] | 16
|
2019-03-26T18:15:31.000Z
|
2022-03-07T19:45:34.000Z
|
hw5/danielsawyer-hw5-gcd.asm
|
MajedNabil/architecture
|
69194ae5282ab8f3a17a841d6c77212bfbe73038
|
[
"WTFPL"
] | null | null | null |
hw5/danielsawyer-hw5-gcd.asm
|
MajedNabil/architecture
|
69194ae5282ab8f3a17a841d6c77212bfbe73038
|
[
"WTFPL"
] | 43
|
2018-05-07T22:03:08.000Z
|
2022-03-18T08:57:03.000Z
|
.data
inputx: .asciiz "\nEnter input x: "
inputy: .asciiz "\nEnter input y: "
printgcd: .asciiz "\nGCD = "
repeat: .asciiz "\nEnter 0 to run again: "
.text
main:
#gets x value
li $v0, 4 #loads syscall print_string
la $a0, inputx #gets string
syscall #prints string
li $v0, 5 #loads syscall read int
syscall #reads x into $v0
move $t0, $v0 #$t0=x
#get absolute value
slt $t2, $t0, $zero
beq $t2, $zero, gety
sub $t0, $zero, $t0
#gets y value
gety:
li $v0, 4 #loads print_string syscall
la $a0, inputy #loads string inputy
syscall #prints string
li $v0, 5
syscall
move $t1, $v0
#get absolute value
slt $t2, $t1, $zero
beq $t2, $zero, gcd
sub $t1, $zero, $t1
#find gcd
gcd:
divu $t0, $t1
mfhi $t2
move $t0, $t1
move $t1, $t2
bgt $t1, $zero, gcd
#print gcd
li $v0, 4
la $a0, printgcd
syscall
li $v0, 1
move $a0, $t0
syscall
#ask to repeat
li $v0, 4
la $a0, repeat
syscall
li $v0, 5
syscall
beq $v0, $zero, main
#quits program
li $v0, 10
syscall
| 16.75
| 43
| 0.632836
|
c420f0871bd7d3752a66ce402c061507307daaba
| 717
|
asm
|
Assembly
|
oeis/228/A228958.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/228/A228958.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/228/A228958.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A228958: a(n) = 1*2 + 3*4 + 5*6 + 7*8 + 9*10 + 11*12 + 13*14 + ... + (up to n).
; 1,2,5,14,19,44,51,100,109,190,201,322,335,504,519,744,761,1050,1069,1430,1451,1892,1915,2444,2469,3094,3121,3850,3879,4720,4751,5712,5745,6834,6869,8094,8131,9500,9539,11060,11101,12782,12825,14674,14719,16744,16791,19000,19049,21450,21501,24102,24155,26964,27019,30044,30101,33350,33409,36890,36951,40672,40735,44704,44769,48994,49061,53550,53619,58380,58451,63492,63565,68894,68969,74594,74671,80600,80679,86920,87001,93562,93645,100534,100619,107844,107931,115500,115589,123510,123601,131882
mov $1,$0
div $1,2
lpb $0
mov $2,$0
sub $0,1
seq $2,65599 ; If n odd, a(n) = n^2 else a(n) = n.
add $1,$2
lpe
mov $0,$1
add $0,1
| 51.214286
| 496
| 0.702929
|
90fc9064b30117d8dd7803904f9fb194b05cd196
| 476
|
asm
|
Assembly
|
programs/oeis/127/A127511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/127/A127511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/127/A127511.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A127511: a(n) = mu(n) * 2^(n-1).
; 1,-2,-4,0,-16,32,-64,0,0,512,-1024,0,-4096,8192,16384,0,-65536,0,-262144,0,1048576,2097152,-4194304,0,0,33554432,0,0,-268435456,-536870912,-1073741824,0,4294967296,8589934592,17179869184,0,-68719476736,137438953472,274877906944,0,-1099511627776
mov $1,$0
seq $1,8683 ; Möbius (or Moebius) function mu(n). mu(1) = 1; mu(n) = (-1)^k if n is the product of k different primes; otherwise mu(n) = 0.
lpb $0
sub $0,1
mul $1,2
lpe
mov $0,$1
| 43.272727
| 246
| 0.67437
|
c03bc3b81ba4b7a00f16b85b6edcb58a419cfec2
| 2,815
|
asm
|
Assembly
|
boot/uefi/a64/cpu.asm
|
Tiihala/Dancy
|
75f42246faafed0576d4c41f4e572b400379a98c
|
[
"Unlicense"
] | 11
|
2017-08-24T07:08:04.000Z
|
2022-03-17T22:30:15.000Z
|
boot/uefi/a64/cpu.asm
|
Tiihala/Dancy
|
75f42246faafed0576d4c41f4e572b400379a98c
|
[
"Unlicense"
] | 2
|
2018-03-03T11:20:13.000Z
|
2018-03-11T14:02:08.000Z
|
boot/uefi/a64/cpu.asm
|
Tiihala/Dancy
|
75f42246faafed0576d4c41f4e572b400379a98c
|
[
"Unlicense"
] | 3
|
2017-09-13T02:33:39.000Z
|
2021-09-10T14:37:51.000Z
|
;;
;; Copyright (c) 2019, 2020 Antti Tiihala
;;
;; Permission to use, copy, modify, and/or distribute this software for any
;; purpose with or without fee is hereby granted, provided that the above
;; copyright notice and this permission notice appear in all copies.
;;
;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
;;
;; uefi/a64/cpu.asm
;; Miscellaneous assembly functions (64-bit)
;;
bits 64
section .text
global cpu_rdtsc
global cpu_rdtsc_delay
global cpu_rdtsc_diff
align 16
; void cpu_rdtsc(uint32_t *a, uint32_t *d)
cpu_rdtsc:
push rdx ; save register rdx
rdtsc ; read time-stamp counter
mov [rcx], eax ; *a = eax
pop rax ; restore register rdx to rax
mov [rax], edx ; *d = edx
ret
align 16
; void cpu_rdtsc_delay(uint32_t a, uint32_t d)
cpu_rdtsc_delay:
push rbx ; save register rbx
test edx, edx ; test highest bit (input d)
js short .end
mov r8d, ecx ; r8d = a
mov r9d, edx ; r9d = d
rdtsc ; read time-stamp counter
mov ecx, eax ; ecx = counter (low dword)
mov ebx, edx ; ebx = counter (high dword)
.spin: rdtsc ; read time-stamp counter
sub eax, ecx ; eax = difference (low dword)
sbb edx, ebx ; edx = difference (high dword)
sub eax, r8d ; compare to input a
sbb edx, r9d ; compare to input d
jc short .spin
.end: pop rbx ; restore register rbx
ret
align 16
; void cpu_rdtsc_diff(uint32_t *a, uint32_t *d)
cpu_rdtsc_diff:
push rdx ; save register rdx
rdtsc ; read time-stamp counter
sub eax, [rcx] ; eax -= *a
mov [rcx], eax ; *a = eax
pop rax ; restore register rdx to rax
sbb edx, [rax] ; edx -= *d
mov [rax], edx ; *d = edx
ret
| 40.797101
| 75
| 0.520426
|
29a1b2f77f782478c21cf04e1959e77ef2757456
| 909
|
asm
|
Assembly
|
programs/oeis/025/A025738.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/025/A025738.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/025/A025738.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A025738: Index of 9^n within sequence of numbers of form 8^i*9^j.
; 1,3,6,10,15,21,28,36,45,55,66,78,91,105,120,136,153,171,191,212,234,257,281,306,332,359,387,416,446,477,509,542,576,611,647,684,723,763,804,846,889,933,978,1024,1071,1119,1168,1218,1269,1321,1374,1428,1483,1540,1598
mov $20,$0
mov $22,$0
add $22,1
lpb $22,1
clr $0,20
mov $0,$20
sub $22,1
sub $0,$22
mov $17,$0
mov $19,$0
add $19,1
lpb $19,1
mov $0,$17
sub $19,1
sub $0,$19
mov $13,$0
mov $15,2
lpb $15,1
mov $0,$13
sub $15,1
add $0,$15
sub $0,2
mov $2,$0
mul $2,2
add $2,1
div $2,35
mul $2,2
mov $1,$2
mov $16,$15
lpb $16,1
mov $14,$1
sub $16,1
lpe
lpe
lpb $13,1
mov $13,0
sub $14,$1
lpe
mov $1,$14
div $1,2
add $1,1
add $18,$1
lpe
add $21,$18
lpe
mov $1,$21
| 18.18
| 217
| 0.511551
|
3aec894a39d5b27fd9689b0c79d89f61a5a301e5
| 4,556
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_327.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_327.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_327.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r8
push %r9
lea addresses_WT_ht+0xa321, %r13
nop
nop
nop
cmp %r11, %r11
mov $0x6162636465666768, %r9
movq %r9, %xmm7
vmovups %ymm7, (%r13)
nop
sub %r8, %r8
pop %r9
pop %r8
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %r9
push %rdx
push %rsi
// Store
lea addresses_normal+0x19de5, %rsi
nop
nop
nop
xor %r10, %r10
movb $0x51, (%rsi)
nop
xor %r11, %r11
// Store
lea addresses_WT+0x1770d, %r8
nop
nop
add %r12, %r12
mov $0x5152535455565758, %r10
movq %r10, %xmm0
movntdq %xmm0, (%r8)
nop
nop
dec %rsi
// Faulty Load
lea addresses_WT+0x5f0d, %r10
nop
nop
nop
add %r8, %r8
mov (%r10), %dx
lea oracles, %r12
and $0xff, %rdx
shlq $12, %rdx
mov (%r12,%rdx,1), %rdx
pop %rsi
pop %rdx
pop %r9
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 11, 'size': 16, 'same': False, 'NT': True}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 51.772727
| 2,999
| 0.659131
|
5eceeb25b18ff7783670015892f491d1e84caa78
| 7,937
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_17477_1291.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_17477_1291.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_ht_zr_/i9-9900K_12_0xca_notsx.log_17477_1291.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 %r8
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x12abf, %r13
nop
nop
nop
nop
dec %rbx
movb (%r13), %r12b
nop
nop
nop
nop
and %r8, %r8
lea addresses_A_ht+0x70f, %rsi
nop
nop
inc %r14
mov $0x6162636465666768, %rbx
movq %rbx, %xmm7
movups %xmm7, (%rsi)
add $35820, %rbx
lea addresses_normal_ht+0x7d2f, %rsi
lea addresses_UC_ht+0x812f, %rdi
nop
nop
nop
nop
nop
sub $25194, %rbp
mov $79, %rcx
rep movsq
nop
nop
nop
nop
nop
add %r12, %r12
lea addresses_A_ht+0x446f, %rbp
nop
nop
nop
xor %rsi, %rsi
movw $0x6162, (%rbp)
nop
nop
nop
nop
dec %r13
lea addresses_normal_ht+0x1dbf, %r8
nop
nop
nop
cmp $2548, %r13
mov $0x6162636465666768, %rcx
movq %rcx, %xmm6
movups %xmm6, (%r8)
nop
nop
nop
nop
nop
and $21508, %rdi
lea addresses_WT_ht+0x570f, %rsi
lea addresses_UC_ht+0x181af, %rdi
sub %rbx, %rbx
mov $25, %rcx
rep movsw
add $43553, %rsi
lea addresses_WT_ht+0xdc6f, %rsi
nop
nop
add %rbx, %rbx
mov (%rsi), %r12w
nop
add %rbx, %rbx
lea addresses_normal_ht+0x1612f, %r13
nop
sub %rdi, %rdi
mov $0x6162636465666768, %r8
movq %r8, %xmm3
and $0xffffffffffffffc0, %r13
vmovaps %ymm3, (%r13)
nop
nop
and %rbp, %rbp
lea addresses_WT_ht+0x1c3, %rsi
lea addresses_WT_ht+0x1dcaf, %rdi
nop
sub $28148, %r14
mov $75, %rcx
rep movsw
sub $42033, %r13
lea addresses_WT_ht+0xb52f, %rsi
lea addresses_UC_ht+0x10fcf, %rdi
nop
nop
add %rbx, %rbx
mov $71, %rcx
rep movsw
inc %rdi
lea addresses_D_ht+0xf07, %r8
nop
nop
xor $32550, %rcx
movl $0x61626364, (%r8)
nop
xor $59432, %rbp
lea addresses_normal_ht+0x1466f, %r13
clflush (%r13)
nop
sub %rbx, %rbx
movb $0x61, (%r13)
cmp %r12, %r12
lea addresses_UC_ht+0x2a8f, %rsi
lea addresses_WC_ht+0xbdf, %rdi
clflush (%rsi)
clflush (%rdi)
nop
nop
nop
add %rbx, %rbx
mov $89, %rcx
rep movsq
nop
nop
nop
nop
nop
xor $64845, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r8
pop %r14
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r15
push %r8
push %rax
push %rdi
push %rsi
// Store
lea addresses_WC+0xf26f, %rdi
nop
nop
nop
nop
nop
and %r13, %r13
movb $0x51, (%rdi)
nop
nop
nop
nop
nop
and $45589, %r15
// Store
lea addresses_WC+0x4937, %rsi
nop
nop
nop
dec %rax
mov $0x5152535455565758, %r15
movq %r15, %xmm3
movups %xmm3, (%rsi)
nop
cmp %r15, %r15
// Faulty Load
mov $0x12f, %rax
nop
sub $38424, %rsi
vmovaps (%rax), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %rdi
lea oracles, %r10
and $0xff, %rdi
shlq $12, %rdi
mov (%r10,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rax
pop %r8
pop %r15
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_P', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_P', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 4}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 10, 'type': 'addresses_normal_ht'}, 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_A_ht', 'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 5}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 4}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 6}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_WC_ht'}}
{'49': 8, '00': 107, '44': 17362}
00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 00 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44
*/
| 33.918803
| 2,999
| 0.657301
|
18bbc4a9131d7f7f1f688f78d23ebfeca73dde7a
| 424
|
asm
|
Assembly
|
oeis/178/A178844.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/178/A178844.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/178/A178844.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A178844: First nonzero Fermat quotient mod the n-th prime.
; Submitted by Christian Krause
; 1,1,3,2,5,3,13,3,17,1,6,1,23,25,44,36,8,36,10,2,56,19,48,6,57,92,59,13,67,83,18,17,53,30,96,56,82,67,47,3,50,148,50,104,175,135,109,189,201,68,7,26,142,247,225,128,260,109,70,74,58,78,294,175,120,175,139,153
seq $0,6005 ; The odd prime numbers together with 1.
mov $2,2
pow $2,$0
max $0,2
div $2,$0
dif $2,2
mod $2,$0
mov $0,$2
| 32.615385
| 209
| 0.676887
|
d05371b767b7c7eb81fcfe7199214d19815f9989
| 2,828
|
asm
|
Assembly
|
bfloat/fexp.asm
|
DW0RKiN/Floating-point-Library-for-Z80
|
494add6bc20922f4a634fbbacb32d8bd4dd185a7
|
[
"MIT"
] | 12
|
2020-02-17T09:07:02.000Z
|
2022-02-09T22:15:34.000Z
|
bfloat/fexp.asm
|
DW0RKiN/Floating-point-Library-for-Z80
|
494add6bc20922f4a634fbbacb32d8bd4dd185a7
|
[
"MIT"
] | null | null | null |
bfloat/fexp.asm
|
DW0RKiN/Floating-point-Library-for-Z80
|
494add6bc20922f4a634fbbacb32d8bd4dd185a7
|
[
"MIT"
] | 1
|
2021-06-21T23:30:28.000Z
|
2021-06-21T23:30:28.000Z
|
if not defined @FEXP
include "fmul.asm"
include "color_flow_warning.asm"
; Natural exponential function
; Input: HL
; Output: HL = exp(HL)) +- lowest 2 bit
; e^((2^e)*m) =
; e^((2^e)*(m1+m0.5+m0.25+m0.125+m0.0.0625))
; m1 => b1 = 1, m0.5 => b0.5 = 0 or 1, m0.25 => b0.25 = 0 or 1, ...
; e^( b1* (2^e) + b0.5* (2^e-1) + b0.25* (2^e-2) + b0.125* (2^e-3) + b0.0625* (2^e-4) + ... ) =
; b1*e^(2^e) * b0.5*e^(2^e-1) * b0.25*e^(2^e-2) * b0.125*e^(2^e-3) * b0.0625*e^(2^e-4) * ...
; Pollutes: AF, BC, DE
@FEXP:
if not defined FEXP
; *****************************************
FEXP ; *
; *****************************************
endif
LD A, H ;
CP $77 ;
JR c, FEXP_ONE ;
CP $86 ;
JR nc, FEXP_FLOW ;
SUB $70 ;
LD H, A ;
LD A, L ; fraction
ADD A, A ; sign out
LD L, H ; exp
LD H, high EXP_TAB ;
JR nc, $+4 ;
SET 7, L ;
LD E, (HL) ;
PUSH HL ;
INC H ;
LD D, (HL) ;
FEXP_LOOP:
POP HL ;
FEXP_ZEROBIT:
JR z, FEXP_EXIT ;
DEC L ; exp--
ADD A, A ;
JR nc, FEXP_ZEROBIT ;
LD C, (HL) ;
PUSH HL ;
INC H ;
LD B, (HL) ;
PUSH AF ;
CALL FMUL ; HL = BC * DE
POP AF ;
EX DE, HL ;
JP FEXP_LOOP ;
FEXP_ONE:
LD DE, BIAS*256 ; $7f00
FEXP_EXIT:
EX DE, HL ;
RET ;
FEXP_FLOW:
LD A, L ; fraction
ADD A, A ; sign out
JR c, FEXP_UNDER ;
FEXP_OVER: ;
if color_flow_warning
CALL OVER_COL_WARNING ;
endif
if carry_flow_warning
SCF ;
endif
LD HL, FPMAX ;
RET ;
FEXP_UNDER:
if color_flow_warning
CALL UNDER_COL_WARNING ;
endif
LD HL, FPMIN ;
RET ;
endif
| 31.076923
| 101
| 0.278642
|
b120e217b451d1ee5657f696885b67d098f6e626
| 501
|
asm
|
Assembly
|
oeis/027/A027558.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/027/A027558.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/027/A027558.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A027558: Number of 3-unbalanced strings of length n (= 2^n - A027557(n)).
; Submitted by Christian Krause
; 0,0,0,0,2,6,20,50,126,288,654,1422,3068,6474,13574,28112,57942,118566,241788,490914,994334,2008512,4050398,8154014,16396668,32935194,66104982,132586416,265792070,532579830,1066790972
mov $3,$0
seq $0,27557 ; Number of 3-balanced strings of length n: let d(S)= #(1)'s in S - #(0)'s, then S is k-balanced if every substring T has -k<=d(T)<=k; here k=3.
mul $0,-1
mov $2,2
pow $2,$3
add $0,$2
| 45.545455
| 184
| 0.708583
|
f4593cb25c557fc5a3da25f335f3c12793a11eb1
| 639
|
asm
|
Assembly
|
oeis/030/A030003.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/030/A030003.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/030/A030003.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A030003: (prime(n)-3)(prime(n)-5)(prime(n)-7)/48.
; Submitted by Jamie Morken(s1)
; 0,0,0,4,10,35,56,120,286,364,680,969,1140,1540,2300,3276,3654,4960,5984,6545,8436,9880,12341,16215,18424,19600,22100,23426,26235,37820,41664,47905,50116,62196,64824,73150,82160,88560,98770,109736,113564,134044,138415,147440,152096,182104,215820,227920,234136,246905,266916,273819,310124,333375,357760,383306,392084,419220,437989,447580,497640,573800,596904,608685,632710,721764,762355,833340,848046,877975,924176,988260,1038220,1089836,1125180,1179616,1254890,1293699,1373701,1478256,1499784,1610564
seq $0,5097 ; (Odd primes - 1)/2.
sub $0,1
bin $0,3
| 79.875
| 501
| 0.784038
|
bf4fb1f92fbc3a12d21e3d8a182ec0f2b0dda442
| 158
|
asm
|
Assembly
|
C vs Assembly/factoriel.asm
|
zakarialaoui10/HIGH-TO-LOW
|
6fba545110b1188e1afc72c414fbf4f48f780070
|
[
"MIT"
] | 18
|
2021-07-21T11:01:04.000Z
|
2022-01-19T03:38:41.000Z
|
C vs Assembly/factoriel.asm
|
zakarialaoui10/HIGH-TO-LOW
|
6fba545110b1188e1afc72c414fbf4f48f780070
|
[
"MIT"
] | null | null | null |
C vs Assembly/factoriel.asm
|
zakarialaoui10/HIGH-TO-LOW
|
6fba545110b1188e1afc72c414fbf4f48f780070
|
[
"MIT"
] | 1
|
2021-06-25T19:48:30.000Z
|
2021-06-25T19:48:30.000Z
|
li $v0,5
syscall
la $s0,($v0)
li $s2,1
la $t0,($s0)
loop:
beq $t0,1,print
mult $s2,$t0
mflo $s2
subi $t0,$t0,1
j loop
print :
li $v0,1
la $a0,($s2)
syscall
| 9.875
| 15
| 0.601266
|
8e8d7e7019c16e43b28acef7484a1690e4525ec8
| 665
|
asm
|
Assembly
|
oeis/303/A303915.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/303/A303915.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/303/A303915.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A303915: a(n) = lambda(n)*E(n), where lambda(n) = A008836(n) and E(n) = A005361(n).
; Submitted by Christian Krause
; 1,-1,-1,2,-1,1,-1,-3,2,1,-1,-2,-1,1,1,4,-1,-2,-1,-2,1,1,-1,3,2,1,-3,-2,-1,-1,-1,-5,1,1,1,4,-1,1,1,3,-1,-1,-1,-2,-2,1,-1,-4,2,-2,1,-2,-1,3,1,3,1,1,-1,2,-1,1,-2,6,1,-1,-1,-2,1,-1,-1,-6,-1,1,-2,-2,1,-1,-1,-4,4,1,-1
add $0,1
mov $1,1
lpb $0
mov $3,$0
lpb $3
mov $4,$0
mov $7,$2
cmp $7,0
add $2,$7
mod $4,$2
cmp $4,0
cmp $4,0
mov $5,$2
add $2,1
cmp $5,1
max $4,$5
sub $3,$4
mov $6,1
lpe
cmp $5,2
sub $6,2
lpb $0
dif $0,$2
dif $1,$6
add $5,1
lpe
mul $1,$5
lpe
mov $0,$1
| 19.558824
| 213
| 0.445113
|
e0f1aafb3a17038b714f939267aadad18514f37f
| 219
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/clearerr_unlocked_fastcall.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/clearerr_unlocked_fastcall.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
libsrc/_DEVELOPMENT/stdio/c/sdcc_iy/clearerr_unlocked_fastcall.asm
|
meesokim/z88dk
|
5763c7778f19a71d936b3200374059d267066bb2
|
[
"ClArtistic"
] | null | null | null |
; void clearerr_unlocked_fastcall(FILE *stream)
SECTION code_stdio
PUBLIC _clearerr_unlocked_fastcall
EXTERN asm_clearerr_unlocked
_clearerr_unlocked_fastcall:
push hl
pop ix
jp asm_clearerr_unlocked
| 13.6875
| 47
| 0.812785
|
ee8ca828568c967d7f3d5ea51320893661718619
| 406
|
asm
|
Assembly
|
programs/oeis/324/A324502.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/324/A324502.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/324/A324502.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A324502: a(n) = denominator of Sum_{d|n} (1/pod(d)) where pod(k) = the product of the divisors of k (A007955).
; 1,2,3,8,5,36,7,64,27,100,11,1728,13,196,225,1024,17,5832,19,8000,441,484,23,331776,125,676,729,21952,29,810000,31,32768,1089,1156,1225,10077696,37,1444,1521,2560000,41,3111696,43,85184,91125,2116,47,254803968,343
mov $1,$0
add $0,1
seq $1,7956 ; Product of proper divisors of n.
mul $0,$1
| 50.75
| 214
| 0.70936
|
9d21496e6f8a78d42e44a50d29439b899c98830d
| 40,902
|
asm
|
Assembly
|
ln.asm
|
monamansouri/os2-1
|
0f342897581c2b03e2215219e8bb950cdb5dbad1
|
[
"Xnet",
"X11"
] | null | null | null |
ln.asm
|
monamansouri/os2-1
|
0f342897581c2b03e2215219e8bb950cdb5dbad1
|
[
"Xnet",
"X11"
] | null | null | null |
ln.asm
|
monamansouri/os2-1
|
0f342897581c2b03e2215219e8bb950cdb5dbad1
|
[
"Xnet",
"X11"
] | null | null | null |
_ln: 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)
if(argc != 3){
a: 83 39 03 cmpl $0x3,(%ecx)
{
d: 55 push %ebp
e: 89 e5 mov %esp,%ebp
10: 53 push %ebx
11: 51 push %ecx
12: 8b 59 04 mov 0x4(%ecx),%ebx
if(argc != 3){
15: 74 13 je 2a <main+0x2a>
printf(2, "Usage: ln old new\n");
17: 52 push %edx
18: 52 push %edx
19: 68 98 07 00 00 push $0x798
1e: 6a 02 push $0x2
20: e8 0b 04 00 00 call 430 <printf>
exit();
25: e8 77 02 00 00 call 2a1 <exit>
}
if(link(argv[1], argv[2]) < 0)
2a: 50 push %eax
2b: 50 push %eax
2c: ff 73 08 pushl 0x8(%ebx)
2f: ff 73 04 pushl 0x4(%ebx)
32: e8 ca 02 00 00 call 301 <link>
37: 83 c4 10 add $0x10,%esp
3a: 85 c0 test %eax,%eax
3c: 78 05 js 43 <main+0x43>
printf(2, "link %s %s: failed\n", argv[1], argv[2]);
exit();
3e: e8 5e 02 00 00 call 2a1 <exit>
printf(2, "link %s %s: failed\n", argv[1], argv[2]);
43: ff 73 08 pushl 0x8(%ebx)
46: ff 73 04 pushl 0x4(%ebx)
49: 68 ab 07 00 00 push $0x7ab
4e: 6a 02 push $0x2
50: e8 db 03 00 00 call 430 <printf>
55: 83 c4 10 add $0x10,%esp
58: eb e4 jmp 3e <main+0x3e>
5a: 66 90 xchg %ax,%ax
5c: 66 90 xchg %ax,%ax
5e: 66 90 xchg %ax,%ax
00000060 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
60: 55 push %ebp
char *os;
os = s;
while((*s++ = *t++) != 0)
61: 31 d2 xor %edx,%edx
{
63: 89 e5 mov %esp,%ebp
65: 53 push %ebx
66: 8b 45 08 mov 0x8(%ebp),%eax
69: 8b 5d 0c mov 0xc(%ebp),%ebx
6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
while((*s++ = *t++) != 0)
70: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx
74: 88 0c 10 mov %cl,(%eax,%edx,1)
77: 83 c2 01 add $0x1,%edx
7a: 84 c9 test %cl,%cl
7c: 75 f2 jne 70 <strcpy+0x10>
;
return os;
}
7e: 5b pop %ebx
7f: 5d pop %ebp
80: c3 ret
81: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
88: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
8f: 90 nop
00000090 <strcmp>:
int
strcmp(const char *p, const char *q)
{
90: 55 push %ebp
91: 89 e5 mov %esp,%ebp
93: 56 push %esi
94: 53 push %ebx
95: 8b 5d 08 mov 0x8(%ebp),%ebx
98: 8b 75 0c mov 0xc(%ebp),%esi
while(*p && *p == *q)
9b: 0f b6 13 movzbl (%ebx),%edx
9e: 0f b6 0e movzbl (%esi),%ecx
a1: 84 d2 test %dl,%dl
a3: 74 1e je c3 <strcmp+0x33>
a5: b8 01 00 00 00 mov $0x1,%eax
aa: 38 ca cmp %cl,%dl
ac: 74 09 je b7 <strcmp+0x27>
ae: eb 20 jmp d0 <strcmp+0x40>
b0: 83 c0 01 add $0x1,%eax
b3: 38 ca cmp %cl,%dl
b5: 75 19 jne d0 <strcmp+0x40>
b7: 0f b6 14 03 movzbl (%ebx,%eax,1),%edx
bb: 0f b6 0c 06 movzbl (%esi,%eax,1),%ecx
bf: 84 d2 test %dl,%dl
c1: 75 ed jne b0 <strcmp+0x20>
c3: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
}
c5: 5b pop %ebx
c6: 5e pop %esi
return (uchar)*p - (uchar)*q;
c7: 29 c8 sub %ecx,%eax
}
c9: 5d pop %ebp
ca: c3 ret
cb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
cf: 90 nop
d0: 0f b6 c2 movzbl %dl,%eax
d3: 5b pop %ebx
d4: 5e pop %esi
return (uchar)*p - (uchar)*q;
d5: 29 c8 sub %ecx,%eax
}
d7: 5d pop %ebp
d8: c3 ret
d9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000000e0 <strlen>:
int
strlen(const char *s)
{
e0: 55 push %ebp
int n;
for(n = 0; s[n]; n++)
e1: 31 c0 xor %eax,%eax
{
e3: 89 e5 mov %esp,%ebp
e5: 8b 55 08 mov 0x8(%ebp),%edx
for(n = 0; s[n]; n++)
e8: 80 3a 00 cmpb $0x0,(%edx)
eb: 74 0c je f9 <strlen+0x19>
ed: 8d 76 00 lea 0x0(%esi),%esi
f0: 83 c0 01 add $0x1,%eax
f3: 80 3c 02 00 cmpb $0x0,(%edx,%eax,1)
f7: 75 f7 jne f0 <strlen+0x10>
;
return n;
}
f9: 5d pop %ebp
fa: c3 ret
fb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
ff: 90 nop
00000100 <memset>:
void*
memset(void *dst, int c, int n)
{
100: 55 push %ebp
101: 89 e5 mov %esp,%ebp
103: 57 push %edi
104: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
107: 8b 4d 10 mov 0x10(%ebp),%ecx
10a: 8b 45 0c mov 0xc(%ebp),%eax
10d: 89 d7 mov %edx,%edi
10f: fc cld
110: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
112: 89 d0 mov %edx,%eax
114: 5f pop %edi
115: 5d pop %ebp
116: c3 ret
117: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
11e: 66 90 xchg %ax,%ax
00000120 <strchr>:
char*
strchr(const char *s, char c)
{
120: 55 push %ebp
121: 89 e5 mov %esp,%ebp
123: 53 push %ebx
124: 8b 45 08 mov 0x8(%ebp),%eax
127: 8b 55 0c mov 0xc(%ebp),%edx
for(; *s; s++)
12a: 0f b6 18 movzbl (%eax),%ebx
12d: 84 db test %bl,%bl
12f: 74 1d je 14e <strchr+0x2e>
131: 89 d1 mov %edx,%ecx
if(*s == c)
133: 38 d3 cmp %dl,%bl
135: 75 0d jne 144 <strchr+0x24>
137: eb 17 jmp 150 <strchr+0x30>
139: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
140: 38 ca cmp %cl,%dl
142: 74 0c je 150 <strchr+0x30>
for(; *s; s++)
144: 83 c0 01 add $0x1,%eax
147: 0f b6 10 movzbl (%eax),%edx
14a: 84 d2 test %dl,%dl
14c: 75 f2 jne 140 <strchr+0x20>
return (char*)s;
return 0;
14e: 31 c0 xor %eax,%eax
}
150: 5b pop %ebx
151: 5d pop %ebp
152: c3 ret
153: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
15a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
00000160 <gets>:
char*
gets(char *buf, int max)
{
160: 55 push %ebp
161: 89 e5 mov %esp,%ebp
163: 57 push %edi
164: 56 push %esi
int i, cc;
char c;
for(i=0; i+1 < max; ){
165: 31 f6 xor %esi,%esi
{
167: 53 push %ebx
168: 89 f3 mov %esi,%ebx
16a: 83 ec 1c sub $0x1c,%esp
16d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
170: eb 2f jmp 1a1 <gets+0x41>
172: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
178: 83 ec 04 sub $0x4,%esp
17b: 8d 45 e7 lea -0x19(%ebp),%eax
17e: 6a 01 push $0x1
180: 50 push %eax
181: 6a 00 push $0x0
183: e8 31 01 00 00 call 2b9 <read>
if(cc < 1)
188: 83 c4 10 add $0x10,%esp
18b: 85 c0 test %eax,%eax
18d: 7e 1c jle 1ab <gets+0x4b>
break;
buf[i++] = c;
18f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
193: 83 c7 01 add $0x1,%edi
196: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
199: 3c 0a cmp $0xa,%al
19b: 74 23 je 1c0 <gets+0x60>
19d: 3c 0d cmp $0xd,%al
19f: 74 1f je 1c0 <gets+0x60>
for(i=0; i+1 < max; ){
1a1: 83 c3 01 add $0x1,%ebx
1a4: 89 fe mov %edi,%esi
1a6: 3b 5d 0c cmp 0xc(%ebp),%ebx
1a9: 7c cd jl 178 <gets+0x18>
1ab: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
1ad: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
1b0: c6 03 00 movb $0x0,(%ebx)
}
1b3: 8d 65 f4 lea -0xc(%ebp),%esp
1b6: 5b pop %ebx
1b7: 5e pop %esi
1b8: 5f pop %edi
1b9: 5d pop %ebp
1ba: c3 ret
1bb: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1bf: 90 nop
1c0: 8b 75 08 mov 0x8(%ebp),%esi
1c3: 8b 45 08 mov 0x8(%ebp),%eax
1c6: 01 de add %ebx,%esi
1c8: 89 f3 mov %esi,%ebx
buf[i] = '\0';
1ca: c6 03 00 movb $0x0,(%ebx)
}
1cd: 8d 65 f4 lea -0xc(%ebp),%esp
1d0: 5b pop %ebx
1d1: 5e pop %esi
1d2: 5f pop %edi
1d3: 5d pop %ebp
1d4: c3 ret
1d5: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
000001e0 <stat>:
int
stat(const char *n, struct stat *st)
{
1e0: 55 push %ebp
1e1: 89 e5 mov %esp,%ebp
1e3: 56 push %esi
1e4: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
1e5: 83 ec 08 sub $0x8,%esp
1e8: 6a 00 push $0x0
1ea: ff 75 08 pushl 0x8(%ebp)
1ed: e8 ef 00 00 00 call 2e1 <open>
if(fd < 0)
1f2: 83 c4 10 add $0x10,%esp
1f5: 85 c0 test %eax,%eax
1f7: 78 27 js 220 <stat+0x40>
return -1;
r = fstat(fd, st);
1f9: 83 ec 08 sub $0x8,%esp
1fc: ff 75 0c pushl 0xc(%ebp)
1ff: 89 c3 mov %eax,%ebx
201: 50 push %eax
202: e8 f2 00 00 00 call 2f9 <fstat>
close(fd);
207: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
20a: 89 c6 mov %eax,%esi
close(fd);
20c: e8 b8 00 00 00 call 2c9 <close>
return r;
211: 83 c4 10 add $0x10,%esp
}
214: 8d 65 f8 lea -0x8(%ebp),%esp
217: 89 f0 mov %esi,%eax
219: 5b pop %ebx
21a: 5e pop %esi
21b: 5d pop %ebp
21c: c3 ret
21d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
220: be ff ff ff ff mov $0xffffffff,%esi
225: eb ed jmp 214 <stat+0x34>
227: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
22e: 66 90 xchg %ax,%ax
00000230 <atoi>:
int
atoi(const char *s)
{
230: 55 push %ebp
231: 89 e5 mov %esp,%ebp
233: 53 push %ebx
234: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
237: 0f be 11 movsbl (%ecx),%edx
23a: 8d 42 d0 lea -0x30(%edx),%eax
23d: 3c 09 cmp $0x9,%al
n = 0;
23f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
244: 77 1f ja 265 <atoi+0x35>
246: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
24d: 8d 76 00 lea 0x0(%esi),%esi
n = n*10 + *s++ - '0';
250: 83 c1 01 add $0x1,%ecx
253: 8d 04 80 lea (%eax,%eax,4),%eax
256: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
25a: 0f be 11 movsbl (%ecx),%edx
25d: 8d 5a d0 lea -0x30(%edx),%ebx
260: 80 fb 09 cmp $0x9,%bl
263: 76 eb jbe 250 <atoi+0x20>
return n;
}
265: 5b pop %ebx
266: 5d pop %ebp
267: c3 ret
268: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
26f: 90 nop
00000270 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
270: 55 push %ebp
271: 89 e5 mov %esp,%ebp
273: 57 push %edi
274: 8b 55 10 mov 0x10(%ebp),%edx
277: 8b 45 08 mov 0x8(%ebp),%eax
27a: 56 push %esi
27b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
27e: 85 d2 test %edx,%edx
280: 7e 13 jle 295 <memmove+0x25>
282: 01 c2 add %eax,%edx
dst = vdst;
284: 89 c7 mov %eax,%edi
286: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
28d: 8d 76 00 lea 0x0(%esi),%esi
*dst++ = *src++;
290: a4 movsb %ds:(%esi),%es:(%edi)
while(n-- > 0)
291: 39 fa cmp %edi,%edx
293: 75 fb jne 290 <memmove+0x20>
return vdst;
}
295: 5e pop %esi
296: 5f pop %edi
297: 5d pop %ebp
298: c3 ret
00000299 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
299: b8 01 00 00 00 mov $0x1,%eax
29e: cd 40 int $0x40
2a0: c3 ret
000002a1 <exit>:
SYSCALL(exit)
2a1: b8 02 00 00 00 mov $0x2,%eax
2a6: cd 40 int $0x40
2a8: c3 ret
000002a9 <wait>:
SYSCALL(wait)
2a9: b8 03 00 00 00 mov $0x3,%eax
2ae: cd 40 int $0x40
2b0: c3 ret
000002b1 <pipe>:
SYSCALL(pipe)
2b1: b8 04 00 00 00 mov $0x4,%eax
2b6: cd 40 int $0x40
2b8: c3 ret
000002b9 <read>:
SYSCALL(read)
2b9: b8 05 00 00 00 mov $0x5,%eax
2be: cd 40 int $0x40
2c0: c3 ret
000002c1 <write>:
SYSCALL(write)
2c1: b8 10 00 00 00 mov $0x10,%eax
2c6: cd 40 int $0x40
2c8: c3 ret
000002c9 <close>:
SYSCALL(close)
2c9: b8 15 00 00 00 mov $0x15,%eax
2ce: cd 40 int $0x40
2d0: c3 ret
000002d1 <kill>:
SYSCALL(kill)
2d1: b8 06 00 00 00 mov $0x6,%eax
2d6: cd 40 int $0x40
2d8: c3 ret
000002d9 <exec>:
SYSCALL(exec)
2d9: b8 07 00 00 00 mov $0x7,%eax
2de: cd 40 int $0x40
2e0: c3 ret
000002e1 <open>:
SYSCALL(open)
2e1: b8 0f 00 00 00 mov $0xf,%eax
2e6: cd 40 int $0x40
2e8: c3 ret
000002e9 <mknod>:
SYSCALL(mknod)
2e9: b8 11 00 00 00 mov $0x11,%eax
2ee: cd 40 int $0x40
2f0: c3 ret
000002f1 <unlink>:
SYSCALL(unlink)
2f1: b8 12 00 00 00 mov $0x12,%eax
2f6: cd 40 int $0x40
2f8: c3 ret
000002f9 <fstat>:
SYSCALL(fstat)
2f9: b8 08 00 00 00 mov $0x8,%eax
2fe: cd 40 int $0x40
300: c3 ret
00000301 <link>:
SYSCALL(link)
301: b8 13 00 00 00 mov $0x13,%eax
306: cd 40 int $0x40
308: c3 ret
00000309 <mkdir>:
SYSCALL(mkdir)
309: b8 14 00 00 00 mov $0x14,%eax
30e: cd 40 int $0x40
310: c3 ret
00000311 <chdir>:
SYSCALL(chdir)
311: b8 09 00 00 00 mov $0x9,%eax
316: cd 40 int $0x40
318: c3 ret
00000319 <dup>:
SYSCALL(dup)
319: b8 0a 00 00 00 mov $0xa,%eax
31e: cd 40 int $0x40
320: c3 ret
00000321 <getpid>:
SYSCALL(getpid)
321: b8 0b 00 00 00 mov $0xb,%eax
326: cd 40 int $0x40
328: c3 ret
00000329 <sbrk>:
SYSCALL(sbrk)
329: b8 0c 00 00 00 mov $0xc,%eax
32e: cd 40 int $0x40
330: c3 ret
00000331 <sleep>:
SYSCALL(sleep)
331: b8 0d 00 00 00 mov $0xd,%eax
336: cd 40 int $0x40
338: c3 ret
00000339 <uptime>:
SYSCALL(uptime)
339: b8 0e 00 00 00 mov $0xe,%eax
33e: cd 40 int $0x40
340: c3 ret
00000341 <getChild>:
SYSCALL(getChild)
341: b8 16 00 00 00 mov $0x16,%eax
346: cd 40 int $0x40
348: c3 ret
00000349 <getCount>:
SYSCALL(getCount)
349: b8 17 00 00 00 mov $0x17,%eax
34e: cd 40 int $0x40
350: c3 ret
00000351 <getppid>:
SYSCALL(getppid)
351: b8 18 00 00 00 mov $0x18,%eax
356: cd 40 int $0x40
358: c3 ret
00000359 <changePolicy>:
SYSCALL(changePolicy)
359: b8 19 00 00 00 mov $0x19,%eax
35e: cd 40 int $0x40
360: c3 ret
361: 66 90 xchg %ax,%ax
363: 66 90 xchg %ax,%ax
365: 66 90 xchg %ax,%ax
367: 66 90 xchg %ax,%ax
369: 66 90 xchg %ax,%ax
36b: 66 90 xchg %ax,%ax
36d: 66 90 xchg %ax,%ax
36f: 90 nop
00000370 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
370: 55 push %ebp
371: 89 e5 mov %esp,%ebp
373: 57 push %edi
374: 56 push %esi
375: 53 push %ebx
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
376: 89 d3 mov %edx,%ebx
{
378: 83 ec 3c sub $0x3c,%esp
37b: 89 45 bc mov %eax,-0x44(%ebp)
if(sgn && xx < 0){
37e: 85 d2 test %edx,%edx
380: 0f 89 92 00 00 00 jns 418 <printint+0xa8>
386: f6 45 08 01 testb $0x1,0x8(%ebp)
38a: 0f 84 88 00 00 00 je 418 <printint+0xa8>
neg = 1;
390: c7 45 c0 01 00 00 00 movl $0x1,-0x40(%ebp)
x = -xx;
397: f7 db neg %ebx
} else {
x = xx;
}
i = 0;
399: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
3a0: 8d 75 d7 lea -0x29(%ebp),%esi
3a3: eb 08 jmp 3ad <printint+0x3d>
3a5: 8d 76 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
3a8: 89 7d c4 mov %edi,-0x3c(%ebp)
}while((x /= base) != 0);
3ab: 89 c3 mov %eax,%ebx
buf[i++] = digits[x % base];
3ad: 89 d8 mov %ebx,%eax
3af: 31 d2 xor %edx,%edx
3b1: 8b 7d c4 mov -0x3c(%ebp),%edi
3b4: f7 f1 div %ecx
3b6: 83 c7 01 add $0x1,%edi
3b9: 0f b6 92 c8 07 00 00 movzbl 0x7c8(%edx),%edx
3c0: 88 14 3e mov %dl,(%esi,%edi,1)
}while((x /= base) != 0);
3c3: 39 d9 cmp %ebx,%ecx
3c5: 76 e1 jbe 3a8 <printint+0x38>
if(neg)
3c7: 8b 45 c0 mov -0x40(%ebp),%eax
3ca: 85 c0 test %eax,%eax
3cc: 74 0d je 3db <printint+0x6b>
buf[i++] = '-';
3ce: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
3d3: ba 2d 00 00 00 mov $0x2d,%edx
buf[i++] = digits[x % base];
3d8: 89 7d c4 mov %edi,-0x3c(%ebp)
3db: 8b 45 c4 mov -0x3c(%ebp),%eax
3de: 8b 7d bc mov -0x44(%ebp),%edi
3e1: 8d 5c 05 d7 lea -0x29(%ebp,%eax,1),%ebx
3e5: eb 0f jmp 3f6 <printint+0x86>
3e7: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
3ee: 66 90 xchg %ax,%ax
3f0: 0f b6 13 movzbl (%ebx),%edx
3f3: 83 eb 01 sub $0x1,%ebx
write(fd, &c, 1);
3f6: 83 ec 04 sub $0x4,%esp
3f9: 88 55 d7 mov %dl,-0x29(%ebp)
3fc: 6a 01 push $0x1
3fe: 56 push %esi
3ff: 57 push %edi
400: e8 bc fe ff ff call 2c1 <write>
while(--i >= 0)
405: 83 c4 10 add $0x10,%esp
408: 39 de cmp %ebx,%esi
40a: 75 e4 jne 3f0 <printint+0x80>
putc(fd, buf[i]);
}
40c: 8d 65 f4 lea -0xc(%ebp),%esp
40f: 5b pop %ebx
410: 5e pop %esi
411: 5f pop %edi
412: 5d pop %ebp
413: c3 ret
414: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
418: c7 45 c0 00 00 00 00 movl $0x0,-0x40(%ebp)
41f: e9 75 ff ff ff jmp 399 <printint+0x29>
424: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
42b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
42f: 90 nop
00000430 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
430: 55 push %ebp
431: 89 e5 mov %esp,%ebp
433: 57 push %edi
434: 56 push %esi
435: 53 push %ebx
436: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
439: 8b 75 0c mov 0xc(%ebp),%esi
43c: 0f b6 1e movzbl (%esi),%ebx
43f: 84 db test %bl,%bl
441: 0f 84 b9 00 00 00 je 500 <printf+0xd0>
ap = (uint*)(void*)&fmt + 1;
447: 8d 45 10 lea 0x10(%ebp),%eax
44a: 83 c6 01 add $0x1,%esi
write(fd, &c, 1);
44d: 8d 7d e7 lea -0x19(%ebp),%edi
state = 0;
450: 31 d2 xor %edx,%edx
ap = (uint*)(void*)&fmt + 1;
452: 89 45 d0 mov %eax,-0x30(%ebp)
455: eb 38 jmp 48f <printf+0x5f>
457: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
45e: 66 90 xchg %ax,%ax
460: 89 55 d4 mov %edx,-0x2c(%ebp)
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
state = '%';
463: ba 25 00 00 00 mov $0x25,%edx
if(c == '%'){
468: 83 f8 25 cmp $0x25,%eax
46b: 74 17 je 484 <printf+0x54>
write(fd, &c, 1);
46d: 83 ec 04 sub $0x4,%esp
470: 88 5d e7 mov %bl,-0x19(%ebp)
473: 6a 01 push $0x1
475: 57 push %edi
476: ff 75 08 pushl 0x8(%ebp)
479: e8 43 fe ff ff call 2c1 <write>
47e: 8b 55 d4 mov -0x2c(%ebp),%edx
} else {
putc(fd, c);
481: 83 c4 10 add $0x10,%esp
484: 83 c6 01 add $0x1,%esi
for(i = 0; fmt[i]; i++){
487: 0f b6 5e ff movzbl -0x1(%esi),%ebx
48b: 84 db test %bl,%bl
48d: 74 71 je 500 <printf+0xd0>
c = fmt[i] & 0xff;
48f: 0f be cb movsbl %bl,%ecx
492: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
495: 85 d2 test %edx,%edx
497: 74 c7 je 460 <printf+0x30>
}
} else if(state == '%'){
499: 83 fa 25 cmp $0x25,%edx
49c: 75 e6 jne 484 <printf+0x54>
if(c == 'd'){
49e: 83 f8 64 cmp $0x64,%eax
4a1: 0f 84 99 00 00 00 je 540 <printf+0x110>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
4a7: 81 e1 f7 00 00 00 and $0xf7,%ecx
4ad: 83 f9 70 cmp $0x70,%ecx
4b0: 74 5e je 510 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
4b2: 83 f8 73 cmp $0x73,%eax
4b5: 0f 84 d5 00 00 00 je 590 <printf+0x160>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
4bb: 83 f8 63 cmp $0x63,%eax
4be: 0f 84 8c 00 00 00 je 550 <printf+0x120>
putc(fd, *ap);
ap++;
} else if(c == '%'){
4c4: 83 f8 25 cmp $0x25,%eax
4c7: 0f 84 b3 00 00 00 je 580 <printf+0x150>
write(fd, &c, 1);
4cd: 83 ec 04 sub $0x4,%esp
4d0: c6 45 e7 25 movb $0x25,-0x19(%ebp)
4d4: 6a 01 push $0x1
4d6: 57 push %edi
4d7: ff 75 08 pushl 0x8(%ebp)
4da: e8 e2 fd ff ff call 2c1 <write>
putc(fd, c);
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
4df: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
4e2: 83 c4 0c add $0xc,%esp
4e5: 6a 01 push $0x1
4e7: 83 c6 01 add $0x1,%esi
4ea: 57 push %edi
4eb: ff 75 08 pushl 0x8(%ebp)
4ee: e8 ce fd ff ff call 2c1 <write>
for(i = 0; fmt[i]; i++){
4f3: 0f b6 5e ff movzbl -0x1(%esi),%ebx
putc(fd, c);
4f7: 83 c4 10 add $0x10,%esp
}
state = 0;
4fa: 31 d2 xor %edx,%edx
for(i = 0; fmt[i]; i++){
4fc: 84 db test %bl,%bl
4fe: 75 8f jne 48f <printf+0x5f>
}
}
}
500: 8d 65 f4 lea -0xc(%ebp),%esp
503: 5b pop %ebx
504: 5e pop %esi
505: 5f pop %edi
506: 5d pop %ebp
507: c3 ret
508: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
50f: 90 nop
printint(fd, *ap, 16, 0);
510: 83 ec 0c sub $0xc,%esp
513: b9 10 00 00 00 mov $0x10,%ecx
518: 6a 00 push $0x0
51a: 8b 5d d0 mov -0x30(%ebp),%ebx
51d: 8b 45 08 mov 0x8(%ebp),%eax
520: 8b 13 mov (%ebx),%edx
522: e8 49 fe ff ff call 370 <printint>
ap++;
527: 89 d8 mov %ebx,%eax
529: 83 c4 10 add $0x10,%esp
state = 0;
52c: 31 d2 xor %edx,%edx
ap++;
52e: 83 c0 04 add $0x4,%eax
531: 89 45 d0 mov %eax,-0x30(%ebp)
534: e9 4b ff ff ff jmp 484 <printf+0x54>
539: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
printint(fd, *ap, 10, 1);
540: 83 ec 0c sub $0xc,%esp
543: b9 0a 00 00 00 mov $0xa,%ecx
548: 6a 01 push $0x1
54a: eb ce jmp 51a <printf+0xea>
54c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
putc(fd, *ap);
550: 8b 5d d0 mov -0x30(%ebp),%ebx
write(fd, &c, 1);
553: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
556: 8b 03 mov (%ebx),%eax
write(fd, &c, 1);
558: 6a 01 push $0x1
ap++;
55a: 83 c3 04 add $0x4,%ebx
write(fd, &c, 1);
55d: 57 push %edi
55e: ff 75 08 pushl 0x8(%ebp)
putc(fd, *ap);
561: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
564: e8 58 fd ff ff call 2c1 <write>
ap++;
569: 89 5d d0 mov %ebx,-0x30(%ebp)
56c: 83 c4 10 add $0x10,%esp
state = 0;
56f: 31 d2 xor %edx,%edx
571: e9 0e ff ff ff jmp 484 <printf+0x54>
576: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
57d: 8d 76 00 lea 0x0(%esi),%esi
putc(fd, c);
580: 88 5d e7 mov %bl,-0x19(%ebp)
write(fd, &c, 1);
583: 83 ec 04 sub $0x4,%esp
586: e9 5a ff ff ff jmp 4e5 <printf+0xb5>
58b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
58f: 90 nop
s = (char*)*ap;
590: 8b 45 d0 mov -0x30(%ebp),%eax
593: 8b 18 mov (%eax),%ebx
ap++;
595: 83 c0 04 add $0x4,%eax
598: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
59b: 85 db test %ebx,%ebx
59d: 74 17 je 5b6 <printf+0x186>
while(*s != 0){
59f: 0f b6 03 movzbl (%ebx),%eax
state = 0;
5a2: 31 d2 xor %edx,%edx
while(*s != 0){
5a4: 84 c0 test %al,%al
5a6: 0f 84 d8 fe ff ff je 484 <printf+0x54>
5ac: 89 75 d4 mov %esi,-0x2c(%ebp)
5af: 89 de mov %ebx,%esi
5b1: 8b 5d 08 mov 0x8(%ebp),%ebx
5b4: eb 1a jmp 5d0 <printf+0x1a0>
s = "(null)";
5b6: bb bf 07 00 00 mov $0x7bf,%ebx
while(*s != 0){
5bb: 89 75 d4 mov %esi,-0x2c(%ebp)
5be: b8 28 00 00 00 mov $0x28,%eax
5c3: 89 de mov %ebx,%esi
5c5: 8b 5d 08 mov 0x8(%ebp),%ebx
5c8: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
5cf: 90 nop
write(fd, &c, 1);
5d0: 83 ec 04 sub $0x4,%esp
s++;
5d3: 83 c6 01 add $0x1,%esi
5d6: 88 45 e7 mov %al,-0x19(%ebp)
write(fd, &c, 1);
5d9: 6a 01 push $0x1
5db: 57 push %edi
5dc: 53 push %ebx
5dd: e8 df fc ff ff call 2c1 <write>
while(*s != 0){
5e2: 0f b6 06 movzbl (%esi),%eax
5e5: 83 c4 10 add $0x10,%esp
5e8: 84 c0 test %al,%al
5ea: 75 e4 jne 5d0 <printf+0x1a0>
5ec: 8b 75 d4 mov -0x2c(%ebp),%esi
state = 0;
5ef: 31 d2 xor %edx,%edx
5f1: e9 8e fe ff ff jmp 484 <printf+0x54>
5f6: 66 90 xchg %ax,%ax
5f8: 66 90 xchg %ax,%ax
5fa: 66 90 xchg %ax,%ax
5fc: 66 90 xchg %ax,%ax
5fe: 66 90 xchg %ax,%ax
00000600 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
600: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
601: a1 6c 0a 00 00 mov 0xa6c,%eax
{
606: 89 e5 mov %esp,%ebp
608: 57 push %edi
609: 56 push %esi
60a: 53 push %ebx
60b: 8b 5d 08 mov 0x8(%ebp),%ebx
60e: 8b 10 mov (%eax),%edx
bp = (Header*)ap - 1;
610: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
613: 39 c8 cmp %ecx,%eax
615: 73 19 jae 630 <free+0x30>
617: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
61e: 66 90 xchg %ax,%ax
620: 39 d1 cmp %edx,%ecx
622: 72 14 jb 638 <free+0x38>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
624: 39 d0 cmp %edx,%eax
626: 73 10 jae 638 <free+0x38>
{
628: 89 d0 mov %edx,%eax
62a: 8b 10 mov (%eax),%edx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
62c: 39 c8 cmp %ecx,%eax
62e: 72 f0 jb 620 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
630: 39 d0 cmp %edx,%eax
632: 72 f4 jb 628 <free+0x28>
634: 39 d1 cmp %edx,%ecx
636: 73 f0 jae 628 <free+0x28>
break;
if(bp + bp->s.size == p->s.ptr){
638: 8b 73 fc mov -0x4(%ebx),%esi
63b: 8d 3c f1 lea (%ecx,%esi,8),%edi
63e: 39 fa cmp %edi,%edx
640: 74 1e je 660 <free+0x60>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
642: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
645: 8b 50 04 mov 0x4(%eax),%edx
648: 8d 34 d0 lea (%eax,%edx,8),%esi
64b: 39 f1 cmp %esi,%ecx
64d: 74 28 je 677 <free+0x77>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
64f: 89 08 mov %ecx,(%eax)
freep = p;
}
651: 5b pop %ebx
freep = p;
652: a3 6c 0a 00 00 mov %eax,0xa6c
}
657: 5e pop %esi
658: 5f pop %edi
659: 5d pop %ebp
65a: c3 ret
65b: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
65f: 90 nop
bp->s.size += p->s.ptr->s.size;
660: 03 72 04 add 0x4(%edx),%esi
663: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
666: 8b 10 mov (%eax),%edx
668: 8b 12 mov (%edx),%edx
66a: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
66d: 8b 50 04 mov 0x4(%eax),%edx
670: 8d 34 d0 lea (%eax,%edx,8),%esi
673: 39 f1 cmp %esi,%ecx
675: 75 d8 jne 64f <free+0x4f>
p->s.size += bp->s.size;
677: 03 53 fc add -0x4(%ebx),%edx
freep = p;
67a: a3 6c 0a 00 00 mov %eax,0xa6c
p->s.size += bp->s.size;
67f: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
682: 8b 53 f8 mov -0x8(%ebx),%edx
685: 89 10 mov %edx,(%eax)
}
687: 5b pop %ebx
688: 5e pop %esi
689: 5f pop %edi
68a: 5d pop %ebp
68b: c3 ret
68c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000690 <malloc>:
return freep;
}
void*
malloc(int nbytes)
{
690: 55 push %ebp
691: 89 e5 mov %esp,%ebp
693: 57 push %edi
694: 56 push %esi
695: 53 push %ebx
696: 83 ec 1c sub $0x1c,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
699: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
69c: 8b 3d 6c 0a 00 00 mov 0xa6c,%edi
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
6a2: 8d 70 07 lea 0x7(%eax),%esi
6a5: c1 ee 03 shr $0x3,%esi
6a8: 83 c6 01 add $0x1,%esi
if((prevp = freep) == 0){
6ab: 85 ff test %edi,%edi
6ad: 0f 84 ad 00 00 00 je 760 <malloc+0xd0>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
6b3: 8b 17 mov (%edi),%edx
if(p->s.size >= nunits){
6b5: 8b 4a 04 mov 0x4(%edx),%ecx
6b8: 39 f1 cmp %esi,%ecx
6ba: 73 72 jae 72e <malloc+0x9e>
6bc: 81 fe 00 10 00 00 cmp $0x1000,%esi
6c2: bb 00 10 00 00 mov $0x1000,%ebx
6c7: 0f 43 de cmovae %esi,%ebx
p = sbrk(nu * sizeof(Header));
6ca: 8d 04 dd 00 00 00 00 lea 0x0(,%ebx,8),%eax
6d1: 89 45 e4 mov %eax,-0x1c(%ebp)
6d4: eb 1b jmp 6f1 <malloc+0x61>
6d6: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
6dd: 8d 76 00 lea 0x0(%esi),%esi
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
6e0: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
6e2: 8b 48 04 mov 0x4(%eax),%ecx
6e5: 39 f1 cmp %esi,%ecx
6e7: 73 4f jae 738 <malloc+0xa8>
6e9: 8b 3d 6c 0a 00 00 mov 0xa6c,%edi
6ef: 89 c2 mov %eax,%edx
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
6f1: 39 d7 cmp %edx,%edi
6f3: 75 eb jne 6e0 <malloc+0x50>
p = sbrk(nu * sizeof(Header));
6f5: 83 ec 0c sub $0xc,%esp
6f8: ff 75 e4 pushl -0x1c(%ebp)
6fb: e8 29 fc ff ff call 329 <sbrk>
if(p == (char*)-1)
700: 83 c4 10 add $0x10,%esp
703: 83 f8 ff cmp $0xffffffff,%eax
706: 74 1c je 724 <malloc+0x94>
hp->s.size = nu;
708: 89 58 04 mov %ebx,0x4(%eax)
free((void*)(hp + 1));
70b: 83 ec 0c sub $0xc,%esp
70e: 83 c0 08 add $0x8,%eax
711: 50 push %eax
712: e8 e9 fe ff ff call 600 <free>
return freep;
717: 8b 15 6c 0a 00 00 mov 0xa6c,%edx
if((p = morecore(nunits)) == 0)
71d: 83 c4 10 add $0x10,%esp
720: 85 d2 test %edx,%edx
722: 75 bc jne 6e0 <malloc+0x50>
return 0;
}
}
724: 8d 65 f4 lea -0xc(%ebp),%esp
return 0;
727: 31 c0 xor %eax,%eax
}
729: 5b pop %ebx
72a: 5e pop %esi
72b: 5f pop %edi
72c: 5d pop %ebp
72d: c3 ret
if(p->s.size >= nunits){
72e: 89 d0 mov %edx,%eax
730: 89 fa mov %edi,%edx
732: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
if(p->s.size == nunits)
738: 39 ce cmp %ecx,%esi
73a: 74 54 je 790 <malloc+0x100>
p->s.size -= nunits;
73c: 29 f1 sub %esi,%ecx
73e: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
741: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
744: 89 70 04 mov %esi,0x4(%eax)
freep = prevp;
747: 89 15 6c 0a 00 00 mov %edx,0xa6c
}
74d: 8d 65 f4 lea -0xc(%ebp),%esp
return (void*)(p + 1);
750: 83 c0 08 add $0x8,%eax
}
753: 5b pop %ebx
754: 5e pop %esi
755: 5f pop %edi
756: 5d pop %ebp
757: c3 ret
758: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
75f: 90 nop
base.s.ptr = freep = prevp = &base;
760: c7 05 6c 0a 00 00 70 movl $0xa70,0xa6c
767: 0a 00 00
base.s.size = 0;
76a: bf 70 0a 00 00 mov $0xa70,%edi
base.s.ptr = freep = prevp = &base;
76f: c7 05 70 0a 00 00 70 movl $0xa70,0xa70
776: 0a 00 00
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
779: 89 fa mov %edi,%edx
base.s.size = 0;
77b: c7 05 74 0a 00 00 00 movl $0x0,0xa74
782: 00 00 00
if(p->s.size >= nunits){
785: e9 32 ff ff ff jmp 6bc <malloc+0x2c>
78a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
prevp->s.ptr = p->s.ptr;
790: 8b 08 mov (%eax),%ecx
792: 89 0a mov %ecx,(%edx)
794: eb b1 jmp 747 <malloc+0xb7>
| 33.915423
| 60
| 0.411545
|
620d8a9ba3d8b858a9a71414f1fbc43788c8211a
| 366
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/wa_priority_queue/c/sccz80/wa_priority_queue_data.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/adt/wa_priority_queue/c/sccz80/wa_priority_queue_data.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/adt/wa_priority_queue/c/sccz80/wa_priority_queue_data.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; void *wa_priority_queue_data(wa_priority_queue_t *q)
SECTION code_clib
SECTION code_adt_wa_priority_queue
PUBLIC wa_priority_queue_data
EXTERN asm_wa_priority_queue_data
defc wa_priority_queue_data = asm_wa_priority_queue_data
; SDCC bridge for Classic
IF __CLASSIC
PUBLIC _wa_priority_queue_data
defc _wa_priority_queue_data = wa_priority_queue_data
ENDIF
| 19.263158
| 56
| 0.877049
|
391f63d3f265d80ab544ffca8ef519011de57ac2
| 6,945
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1004.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_1004.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_1004.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x165a7, %rsi
lea addresses_UC_ht+0x82fb, %rdi
nop
nop
nop
nop
add %rdx, %rdx
mov $46, %rcx
rep movsb
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_UC_ht+0xf2a7, %rsi
lea addresses_WC_ht+0x4ce7, %rdi
clflush (%rdi)
nop
and %rax, %rax
mov $87, %rcx
rep movsl
nop
nop
xor $40072, %rdi
lea addresses_UC_ht+0x45a7, %rsi
lea addresses_normal_ht+0x114a7, %rdi
nop
nop
nop
xor %r14, %r14
mov $69, %rcx
rep movsq
nop
nop
nop
nop
nop
dec %rax
lea addresses_WC_ht+0x17fed, %rsi
lea addresses_UC_ht+0xdca7, %rdi
and %rbx, %rbx
mov $37, %rcx
rep movsw
nop
nop
nop
nop
add %r14, %r14
lea addresses_WC_ht+0x67a7, %r14
nop
nop
nop
cmp %rdx, %rdx
movl $0x61626364, (%r14)
nop
nop
nop
nop
sub %rdx, %rdx
lea addresses_WC_ht+0xaba7, %rax
nop
nop
nop
nop
nop
add $32567, %rdx
mov (%rax), %ecx
nop
dec %r14
lea addresses_D_ht+0xf827, %rsi
lea addresses_WT_ht+0x123a7, %rdi
nop
nop
nop
nop
nop
add $60349, %r10
mov $78, %rcx
rep movsq
nop
nop
nop
xor %r14, %r14
lea addresses_D_ht+0xc863, %rax
nop
nop
nop
nop
dec %rcx
mov $0x6162636465666768, %rdx
movq %rdx, %xmm4
vmovups %ymm4, (%rax)
nop
nop
add %r10, %r10
lea addresses_normal_ht+0x1b527, %rcx
nop
xor %rdi, %rdi
movl $0x61626364, (%rcx)
nop
nop
nop
sub $36056, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_WT+0x18b7, %r12
nop
nop
inc %r15
mov $0x5152535455565758, %rcx
movq %rcx, (%r12)
// Exception!!!
nop
nop
nop
nop
nop
mov (0), %r15
add %r12, %r12
// REPMOV
lea addresses_normal+0xb3a7, %rsi
lea addresses_RW+0x35a7, %rdi
clflush (%rdi)
nop
and $41972, %r15
mov $62, %rcx
rep movsb
nop
nop
nop
sub $42005, %r13
// Faulty Load
lea addresses_normal+0xb3a7, %rdi
xor %r15, %r15
mov (%rdi), %ebp
lea oracles, %r15
and $0xff, %rbp
shlq $12, %rbp
mov (%r15,%rbp,1), %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'same': False, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 8, 'congruent': 4, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_RW', 'congruent': 9, 'same': False}, 'OP': 'REPM'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': True}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 4, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 32, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 34.211823
| 2,999
| 0.661051
|
256d86186dffe5937fafd3a5046ed9f45d175393
| 1,855
|
asm
|
Assembly
|
ayfx_drv/ayfx-working-border.asm
|
remy/z80-wip
|
561356737540803aa7ced4a36f7ca176683412a9
|
[
"MIT"
] | null | null | null |
ayfx_drv/ayfx-working-border.asm
|
remy/z80-wip
|
561356737540803aa7ced4a36f7ca176683412a9
|
[
"MIT"
] | null | null | null |
ayfx_drv/ayfx-working-border.asm
|
remy/z80-wip
|
561356737540803aa7ced4a36f7ca176683412a9
|
[
"MIT"
] | null | null | null |
DEVICE ZXSPECTRUMNEXT
ORG $0000
; **************************************************************
; * API
; - 0: set bank id
; - 1: set effect
; **************************************************************
api_entry:
jr ayfx_api
nop
; At $0003 is the entry point for the interrupt handler. This will only be
; called if bit 7 of the driver id byte has been set in your .DRV file, so
; need not be implemented otherwise.
im1_entry:
reloc_1:
ld a,(value1)
add a,a
jr z,skip
reloc_2:
call rotate
skip:
ret
ayfx_api:
djnz bnot1 ; On if B<>1
; B=1: set values.
ld a, e
reloc_3:
ld (value1),a
and a ; clear carry to indicate success
ret
bnot1:
api_error:
xor a ; A=0, unsupported call id
scf ; Fc=1, signals error
ret
rotate:
reloc_4:
ld a, (value1)
and $07
inc a
reloc_5:
ld (value1),a
out (254),a
ret
; **************************************************************
; Backup and restore whatever is in MMU6
;
; uses: a, bc
; **************************************************************
backup_bank:
ld bc,$243b ; select NEXT register
ld a, $56
out (c),a
inc b ; $253b to access (read or write) value
in b,(c)
push bc
ret
restore_bank:
pop bc
ld a, b
nextreg $56, a
ret
; **************************************************************
; * data
; **************************************************************
value1:
defb 0
IF $ > 512
DISPLAY "Driver code exceeds 512 bytes"
shellexec "exit", "1" ; couldn't work out how to error ¯\_(ツ)_/¯
ELSE
defs 512-$
ENDIF
reloc_start:
defw reloc_1+2
defw reloc_2+2
defw reloc_3+2
defw reloc_4+2
defw reloc_5+2
reloc_end:
| 19.123711
| 74
| 0.447439
|
6725cc68f8c35b833a5648bb8fd7ed10ed205f97
| 5,760
|
asm
|
Assembly
|
Transynther/x86/_processed/NC/_ht_zr_/i7-7700_9_0xca.log_21829_1808.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NC/_ht_zr_/i7-7700_9_0xca.log_21829_1808.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NC/_ht_zr_/i7-7700_9_0xca.log_21829_1808.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 %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0xe48f, %rbp
nop
nop
nop
sub %rax, %rax
mov (%rbp), %rdi
nop
nop
nop
nop
sub $25332, %r11
lea addresses_WC_ht+0x134ff, %r10
nop
inc %rsi
movw $0x6162, (%r10)
nop
add $30307, %rsi
lea addresses_UC_ht+0x1348f, %rax
nop
nop
add %rsi, %rsi
movb $0x61, (%rax)
cmp $22652, %rsi
lea addresses_WC_ht+0x38af, %rsi
lea addresses_normal_ht+0x19c93, %rdi
nop
nop
nop
add %rbp, %rbp
mov $38, %rcx
rep movsq
nop
nop
nop
nop
sub $39237, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r15
push %r8
push %rbp
push %rdx
push %rsi
// Load
lea addresses_WC+0xf0a7, %rsi
nop
nop
nop
and %r8, %r8
vmovups (%rsi), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $1, %xmm1, %r15
nop
nop
nop
nop
nop
inc %r15
// Store
lea addresses_UC+0xa6ef, %r13
nop
nop
sub %r14, %r14
mov $0x5152535455565758, %rdx
movq %rdx, %xmm4
vmovups %ymm4, (%r13)
nop
nop
add $26219, %r14
// Store
lea addresses_D+0x508f, %rbp
nop
nop
add $27330, %r14
mov $0x5152535455565758, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%rbp)
nop
nop
xor %rbp, %rbp
// Faulty Load
mov $0x1c0aff0000000c8f, %rdx
nop
and $45127, %rbp
vmovups (%rdx), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $1, %xmm2, %rsi
lea oracles, %r13
and $0xff, %rsi
shlq $12, %rsi
mov (%r13,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rbp
pop %r8
pop %r15
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_UC'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 32, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': True, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 4, 'same': True, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}}
{'48': 14408, '00': 7421}
00 48 00 00 00 00 00 00 00 48 48 00 48 48 48 48 00 48 48 00 48 48 48 00 48 00 00 48 48 00 48 48 00 00 48 48 48 48 48 48 00 00 48 48 48 00 00 48 00 48 48 48 48 48 48 00 48 48 00 00 48 48 48 00 48 48 00 48 00 48 48 48 48 48 48 00 48 48 00 00 00 48 00 48 48 48 48 00 00 48 48 00 00 48 48 00 48 48 00 48 48 48 48 48 48 48 48 48 00 48 48 48 00 00 48 48 00 00 48 00 48 48 48 00 48 00 00 00 48 48 00 00 48 00 48 00 48 48 00 00 48 48 48 00 48 48 48 00 48 48 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 00 48 00 48 00 00 00 00 00 48 00 48 48 00 48 48 48 00 00 00 00 00 00 48 48 00 48 00 48 00 48 48 48 48 00 00 00 00 48 48 48 48 48 48 00 48 00 48 48 00 48 00 48 00 48 48 48 48 48 48 00 48 48 00 48 00 48 48 48 00 00 00 48 48 00 48 48 48 00 48 00 48 48 48 48 48 48 00 48 00 48 00 48 48 48 48 00 00 48 48 00 48 48 00 48 48 48 48 00 48 48 00 48 48 48 48 48 48 00 48 48 00 48 00 48 48 48 00 48 00 48 00 00 00 48 00 48 00 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 48 00 48 48 48 48 48 48 00 48 48 00 00 48 48 00 48 48 48 00 48 48 48 00 00 00 48 48 48 00 48 48 48 48 48 48 00 00 48 00 48 00 48 48 48 48 48 00 48 48 48 48 48 00 00 00 48 48 48 00 48 00 00 48 00 48 48 48 00 48 00 48 48 48 00 48 48 48 48 00 48 48 48 00 48 00 48 48 00 48 00 00 48 48 00 00 48 48 48 48 00 48 48 48 00 00 00 00 00 48 00 00 48 48 00 00 48 00 48 48 48 48 48 00 48 48 00 48 48 00 00 48 48 48 48 48 00 48 00 48 48 48 00 00 48 48 00 00 48 48 48 00 48 00 48 48 00 48 48 48 48 00 00 00 48 48 48 48 48 00 48 48 00 48 48 48 48 48 48 48 48 48 48 48 48 48 00 48 48 48 00 00 48 48 48 00 48 48 48 48 48 48 00 48 48 48 48 00 48 48 48 48 48 00 48 48 00 48 00 48 48 00 00 48 48 00 00 48 48 48 48 48 00 48 48 48 00 48 48 00 48 48 48 00 48 48 48 48 00 48 48 00 00 48 48 48 48 48 00 00 48 48 00 48 48 00 00 00 00 48 00 48 48 48 00 48 48 48 48 00 48 48 48 48 48 48 48 00 00 48 00 00 48 00 48 48 48 00 48 00 48 48 00 48 48 48 48 00 00 00 00 00 48 00 48 00 00 00 00 00 48 48 48 48 00 00 48 48 00 00 48 00 00 00 48 48 48 00 48 48 00 00 48 48 48 48 48 00 48 48 48 00 48 48 00 48 48 48 48 00 48 48 48 48 48 48 48 00 48 00 00 48 48 00 00 48 48 48 48 00 00 00 00 48 48 00 00 48 00 48 48 48 48 00 48 48 48 48 00 48 48 48 48 00 00 48 48 00 48 00 48 48 48 00 48 48 00 48 00 48 48 00 48 48 48 48 48 48 48 48 48 00 48 48 48 48 48 00 48 00 00 00 00 00 00 00 48 48 00 00 00 48 00 00 48 48 00 48 00 00 48 48 48 48 00 48 00 00 48 48 48 48 48 48 48 48 00 48 00 48 48 48 48 48 48 48 48 00 00 48 00 00 48 48 48 48 48 48 48 48 48 48 48 00 48 00 48 00 48 48 48 48 48 00 48 48 48 48 00 00 00 48 48 00 48 00 00 00 00 48 00 48 48 48 48 48 00 48 00 00 48 00 00 48 00 00 00 48 00 48 00 00 48 48 48 48 48 48 48 00 00 48 48 48 00 00 00 48 48 48 00 48 48 48 48 00 48 48 00 48 00 48 00 48 48 00 00 48 48 48 00 48 48 48 48 48 48 00 00 00 48 00 48 00 00 00 00 48 00 48 48 00 48 48 48 00 48 48 48 48 48 00 48 48 48 48 00 00 48 00 00 48 48 48 48 00 48 48 48 48 00 48 00 48 48 00 00 48 48 48 48 00 00 00 48 48 48 48 48 48 48 48 48 00 00 48 48 48 00 48 48 00 48 48 48 48 48 00 48 48
*/
| 40
| 2,999
| 0.657813
|
ffd4edfa09edf750e625dc2335d0b17964424df1
| 231
|
asm
|
Assembly
|
templates/vc.asm
|
RV8V/asm-code
|
4570af8c0b4cf3216b77a8247364f27dd103888d
|
[
"Xnet",
"X11"
] | 1
|
2022-02-09T22:16:02.000Z
|
2022-02-09T22:16:02.000Z
|
templates/vc.asm
|
RV8V/asm-code
|
4570af8c0b4cf3216b77a8247364f27dd103888d
|
[
"Xnet",
"X11"
] | 2
|
2020-12-18T17:56:03.000Z
|
2020-12-18T17:56:29.000Z
|
templates/vc.asm
|
RV8V/asm-code
|
4570af8c0b4cf3216b77a8247364f27dd103888d
|
[
"Xnet",
"X11"
] | null | null | null |
.global _start
.data
s: .ascii "testing string\n\0"
len = . - s
.text
_start:
mov $s, %r8
movb $'a', 4(%r8)
mov $1, %rax
mov $1, %rdi
mov $s, %rsi
mov $len, %rdx
syscall
mov $60, %rax
mov $0, %rdi
syscall
| 10.5
| 30
| 0.536797
|
7fa6d4bf01092e5eafd1bfe48c90a0e4b1793233
| 1,172
|
asm
|
Assembly
|
QSS/src/kernel/process/procint.asm
|
vbmacher/qsOS
|
40ee57c1aaa9849a62057f4e7d7770e8661f60ba
|
[
"Apache-2.0"
] | 1
|
2019-09-19T04:27:54.000Z
|
2019-09-19T04:27:54.000Z
|
QSS/src/kernel/process/procint.asm
|
vbmacher/qsOS
|
40ee57c1aaa9849a62057f4e7d7770e8661f60ba
|
[
"Apache-2.0"
] | null | null | null |
QSS/src/kernel/process/procint.asm
|
vbmacher/qsOS
|
40ee57c1aaa9849a62057f4e7d7770e8661f60ba
|
[
"Apache-2.0"
] | null | null | null |
;
; PROCINT.ASM
;
; (c) Copyright 2005, vbmacher
;
;
; Kazdy proces po svojom ukonceni by mal zavolat toto prerusenie
; inak sa system zblazni...
; Zvolil som prerusenie napr. 21h (take iste ma dos hehe), aby som
; mal istotu ze funguje a nie je priradene nejakej inej veci
;
.model compact
.386
.data
XoldINT dd ?
.code
extrn _main_loop:near
extrn _freePROCESS: near
_procINT proc
call _freePROCESS
; navrat do OS - pouzijem fintu - skok na mainloop
; tak sa nic nestane ani keby som toto prerusenie
; volal z hocikade aj len tak bez priciny...
pop ax ;cs
pop ax ;ip
pop ax ;flags
clc
jmp _main_loop
_procINT endp
public _procSET_INT
_procSET_INT proc
push es
xor ax,ax
mov es,ax
mov bx, 21h ;store old int
shl bx, 2
cli
mov ax, es:[bx]
mov word ptr [XoldINT], ax
mov ax, es:[bx+2]
mov word ptr [XoldINT+2], ax
mov bx, 21h ;nothing yet
shl bx,2
mov ax, offset _procINT
mov es:[bx], ax
mov ax, cs
mov es:[bx+2], ax
sti
pop es
ret
_procSET_INT endp
end
| 19.864407
| 66
| 0.59727
|
8d3df2320bded1142e2598b6d9df69038a0e1ade
| 458
|
asm
|
Assembly
|
programs/oeis/307/A307989.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/307/A307989.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/307/A307989.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A307989: a(n) = n - pi(2*n) + pi(n-1), where pi is the prime counting function.
; 0,0,1,2,3,4,4,6,6,6,7,8,9,11,11,11,12,14,14,16,16,16,17,18,19,20,20,21,22,23,23,25,26,26,27,27,27,29,30,30,31,32,33,35,35,36,37,39,39,40,40,40,41,42,42,43,43,44,45,47,48,50,51,51,52,52,53,55
mov $2,$0
add $2,2
mov $4,1
mov $5,$0
lpb $2
sub $2,1
mov $3,$5
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $5,1
lpe
add $0,$4
| 28.625
| 192
| 0.613537
|
ca9e3cc4e30dcab2cafd2ca1a66a9e597fbc8d89
| 485
|
asm
|
Assembly
|
kernel/arch/x86_shared/sse.asm
|
feliwir/benny
|
b5960339facfe6cbe0f66b3766c06fdf2123aa8c
|
[
"MIT"
] | 3
|
2016-10-03T20:48:18.000Z
|
2021-01-23T20:17:15.000Z
|
kernel/arch/x86_shared/sse.asm
|
feliwir/benny
|
b5960339facfe6cbe0f66b3766c06fdf2123aa8c
|
[
"MIT"
] | 5
|
2016-10-03T22:56:39.000Z
|
2018-06-17T09:54:08.000Z
|
kernel/arch/x86_shared/sse.asm
|
feliwir/benny
|
b5960339facfe6cbe0f66b3766c06fdf2123aa8c
|
[
"MIT"
] | 4
|
2016-09-12T10:50:13.000Z
|
2020-08-25T09:05:55.000Z
|
.code32
.global setup_SSE
.section .text
setup_SSE:
# check for SSE
movl $0x1, %eax
cpuid
test $(1<<25), %edx
jz .no_SSE
# enable SSE
movl %cr0, %eax
and $0xFFFB, %ax # clear coprocessor emulation CR0.EM
or $0x2, %ax # set coprocessor monitoring CR0.MP
mov %eax, %cr0
mov %cr4, %eax
or $(3 << 9),%ax # set CR4.OSFXSR and CR4.OSXMMEXCPT at the same time
mov %eax, %cr4
ret
.no_SSE:
movb $'0', %al
jmp error
| 21.086957
| 76
| 0.575258
|
66cd4f3bf0f3d44208c984ffcf5397815ed74861
| 583
|
asm
|
Assembly
|
tests/Interrupt/int3_test.asm
|
ZubinGou/8086-emulator
|
5087be61609fa571d16f34280211830746beaef1
|
[
"MIT"
] | 39
|
2020-09-09T00:04:18.000Z
|
2022-03-26T13:12:47.000Z
|
tests/Interrupt/int3_test.asm
|
ZubinGou/8086-emulator
|
5087be61609fa571d16f34280211830746beaef1
|
[
"MIT"
] | null | null | null |
tests/Interrupt/int3_test.asm
|
ZubinGou/8086-emulator
|
5087be61609fa571d16f34280211830746beaef1
|
[
"MIT"
] | 8
|
2020-05-06T07:35:40.000Z
|
2021-08-13T14:00:49.000Z
|
ASSUME CS:CODE, DS:DATA
DATA SEGMENT
STR1 DB 01H,02H,05H,03H,04H
STR2 DB 5 DUP(?)
DATA ENDS
CODE SEGMENT
START:
MOV AX, DATA
MOV DS, AX
LEA SI, STR1
int ; 测试断点
int ; 测试断点
LEA DI, STR2 + 4
MOV CX, 05H
int 03h ; 测试断点
BACK: CLD
MOV AL, [SI]
MOV [DI], AL
INC SI
DEC DI
DEC CX
JNZ BACK
INT 3
mov ax,4c00h
int 21h
CODE ENDS
END START
| 19.433333
| 32
| 0.394511
|
fad62e8dabaa3c8a3bb7e99c0f4877e495484d04
| 52,167
|
asm
|
Assembly
|
main.asm
|
linxon/toggle_pin
|
f63cd2e9ff69b0df0e850a98ca6854a9c4e24082
|
[
"MIT"
] | null | null | null |
main.asm
|
linxon/toggle_pin
|
f63cd2e9ff69b0df0e850a98ca6854a9c4e24082
|
[
"MIT"
] | null | null | null |
main.asm
|
linxon/toggle_pin
|
f63cd2e9ff69b0df0e850a98ca6854a9c4e24082
|
[
"MIT"
] | null | null | null |
;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 4.1.0 #12072 (MINGW64)
;--------------------------------------------------------
.module main
.optsdcc -mmcs51 --model-small
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
.globl _main
.globl _cmd_handler
.globl _strtok
.globl _strcmp
.globl _getchar
.globl _putchar
.globl _inituart
.globl _SIO_SM0
.globl _SIO_SM1
.globl _SIO_SM2
.globl _SIO_REN
.globl _SIO_TB8
.globl _SIO_RB8
.globl _SIO_TI
.globl _SIO_RI
.globl _SIO_TR1
.globl _CY
.globl _AC
.globl _F0
.globl _RS1
.globl _RS0
.globl _OV
.globl _FL
.globl _P
.globl _PS
.globl _PT1
.globl _PX1
.globl _PT0
.globl _PX0
.globl _RD
.globl _WR
.globl _T1
.globl _T0
.globl _INT1
.globl _INT0
.globl _TXD
.globl _RXD
.globl _P3_7
.globl _P3_6
.globl _P3_5
.globl _P3_4
.globl _P3_3
.globl _P3_2
.globl _P3_1
.globl _P3_0
.globl _EA
.globl _ES
.globl _ET1
.globl _EX1
.globl _ET0
.globl _EX0
.globl _P2_7
.globl _P2_6
.globl _P2_5
.globl _P2_4
.globl _P2_3
.globl _P2_2
.globl _P2_1
.globl _P2_0
.globl _SM0
.globl _SM1
.globl _SM2
.globl _REN
.globl _TB8
.globl _RB8
.globl _TI
.globl _RI
.globl _P1_7
.globl _P1_6
.globl _P1_5
.globl _P1_4
.globl _P1_3
.globl _P1_2
.globl _P1_1
.globl _P1_0
.globl _TF1
.globl _TR1
.globl _TF0
.globl _TR0
.globl _IE1
.globl _IT1
.globl _IE0
.globl _IT0
.globl _P0_7
.globl _P0_6
.globl _P0_5
.globl _P0_4
.globl _P0_3
.globl _P0_2
.globl _P0_1
.globl _P0_0
.globl _SIO_SBUF
.globl _SIO_SCON
.globl _SIO_TL1
.globl _SIO_TH1
.globl _SIO_TMOD
.globl _SIO_PCON
.globl _B
.globl _A
.globl _ACC
.globl _PSW
.globl _IP
.globl _P3
.globl _IE
.globl _P2
.globl _SBUF
.globl _SCON
.globl _P1
.globl _TH1
.globl _TH0
.globl _TL1
.globl _TL0
.globl _TMOD
.globl _TCON
.globl _PCON
.globl _DPH
.globl _DPL
.globl _SP
.globl _P0
.globl _SHELL_STATE
.globl _cmd_res
.globl _cmd_buff
.globl _last_cmd_index
.globl _cmd_index
.globl _g_char
.globl _s_printf
.globl _delay_us
.globl _delay_ms
.globl _delay_sec
.globl _setup
.globl _at_p0
.globl _at_p3
.globl _at_p0_0
.globl _at_p0_1
.globl _at_p0_2
.globl _at_p0_3
.globl _at_p0_4
.globl _at_p0_5
.globl _at_p0_6
.globl _at_p0_7
.globl _at_p3_2
.globl _at_p3_4
.globl _at_p3_5
.globl _at_p3_6
.globl _at_p3_7
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
.area RSEG (ABS,DATA)
.org 0x0000
_P0 = 0x0080
_SP = 0x0081
_DPL = 0x0082
_DPH = 0x0083
_PCON = 0x0087
_TCON = 0x0088
_TMOD = 0x0089
_TL0 = 0x008a
_TL1 = 0x008b
_TH0 = 0x008c
_TH1 = 0x008d
_P1 = 0x0090
_SCON = 0x0098
_SBUF = 0x0099
_P2 = 0x00a0
_IE = 0x00a8
_P3 = 0x00b0
_IP = 0x00b8
_PSW = 0x00d0
_ACC = 0x00e0
_A = 0x00e0
_B = 0x00f0
_SIO_PCON = 0x0087
_SIO_TMOD = 0x0089
_SIO_TH1 = 0x008d
_SIO_TL1 = 0x008b
_SIO_SCON = 0x0098
_SIO_SBUF = 0x0099
;--------------------------------------------------------
; special function bits
;--------------------------------------------------------
.area RSEG (ABS,DATA)
.org 0x0000
_P0_0 = 0x0080
_P0_1 = 0x0081
_P0_2 = 0x0082
_P0_3 = 0x0083
_P0_4 = 0x0084
_P0_5 = 0x0085
_P0_6 = 0x0086
_P0_7 = 0x0087
_IT0 = 0x0088
_IE0 = 0x0089
_IT1 = 0x008a
_IE1 = 0x008b
_TR0 = 0x008c
_TF0 = 0x008d
_TR1 = 0x008e
_TF1 = 0x008f
_P1_0 = 0x0090
_P1_1 = 0x0091
_P1_2 = 0x0092
_P1_3 = 0x0093
_P1_4 = 0x0094
_P1_5 = 0x0095
_P1_6 = 0x0096
_P1_7 = 0x0097
_RI = 0x0098
_TI = 0x0099
_RB8 = 0x009a
_TB8 = 0x009b
_REN = 0x009c
_SM2 = 0x009d
_SM1 = 0x009e
_SM0 = 0x009f
_P2_0 = 0x00a0
_P2_1 = 0x00a1
_P2_2 = 0x00a2
_P2_3 = 0x00a3
_P2_4 = 0x00a4
_P2_5 = 0x00a5
_P2_6 = 0x00a6
_P2_7 = 0x00a7
_EX0 = 0x00a8
_ET0 = 0x00a9
_EX1 = 0x00aa
_ET1 = 0x00ab
_ES = 0x00ac
_EA = 0x00af
_P3_0 = 0x00b0
_P3_1 = 0x00b1
_P3_2 = 0x00b2
_P3_3 = 0x00b3
_P3_4 = 0x00b4
_P3_5 = 0x00b5
_P3_6 = 0x00b6
_P3_7 = 0x00b7
_RXD = 0x00b0
_TXD = 0x00b1
_INT0 = 0x00b2
_INT1 = 0x00b3
_T0 = 0x00b4
_T1 = 0x00b5
_WR = 0x00b6
_RD = 0x00b7
_PX0 = 0x00b8
_PT0 = 0x00b9
_PX1 = 0x00ba
_PT1 = 0x00bb
_PS = 0x00bc
_P = 0x00d0
_FL = 0x00d1
_OV = 0x00d2
_RS0 = 0x00d3
_RS1 = 0x00d4
_F0 = 0x00d5
_AC = 0x00d6
_CY = 0x00d7
_SIO_TR1 = 0x008e
_SIO_RI = 0x0098
_SIO_TI = 0x0099
_SIO_RB8 = 0x009a
_SIO_TB8 = 0x009b
_SIO_REN = 0x009c
_SIO_SM2 = 0x009d
_SIO_SM1 = 0x009e
_SIO_SM0 = 0x009f
;--------------------------------------------------------
; overlayable register banks
;--------------------------------------------------------
.area REG_BANK_0 (REL,OVR,DATA)
.ds 8
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
.area DSEG (DATA)
_g_char::
.ds 1
_cmd_index::
.ds 1
_last_cmd_index::
.ds 1
_cmd_buff::
.ds 81
_cmd_res::
.ds 1
_SHELL_STATE::
.ds 1
_cmd_handler_cmd_65536_63:
.ds 3
;--------------------------------------------------------
; overlayable items in internal ram
;--------------------------------------------------------
.area OSEG (OVR,DATA)
.area OSEG (OVR,DATA)
;--------------------------------------------------------
; Stack segment in internal ram
;--------------------------------------------------------
.area SSEG
__start__stack:
.ds 1
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
.area ISEG (DATA)
;--------------------------------------------------------
; absolute internal ram data
;--------------------------------------------------------
.area IABS (ABS,DATA)
.area IABS (ABS,DATA)
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
.area BSEG (BIT)
;--------------------------------------------------------
; paged external ram data
;--------------------------------------------------------
.area PSEG (PAG,XDATA)
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
.area XSEG (XDATA)
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
.area XABS (ABS,XDATA)
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
.area XISEG (XDATA)
.area HOME (CODE)
.area GSINIT0 (CODE)
.area GSINIT1 (CODE)
.area GSINIT2 (CODE)
.area GSINIT3 (CODE)
.area GSINIT4 (CODE)
.area GSINIT5 (CODE)
.area GSINIT (CODE)
.area GSFINAL (CODE)
.area CSEG (CODE)
;--------------------------------------------------------
; interrupt vector
;--------------------------------------------------------
.area HOME (CODE)
__interrupt_vect:
ljmp __sdcc_gsinit_startup
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
.area HOME (CODE)
.area GSINIT (CODE)
.area GSFINAL (CODE)
.area GSINIT (CODE)
.globl __sdcc_gsinit_startup
.globl __sdcc_program_startup
.globl __start__stack
.globl __mcs51_genXINIT
.globl __mcs51_genXRAMCLEAR
.globl __mcs51_genRAMCLEAR
; main.h:31: byte cmd_index, last_cmd_index = 0;
mov _last_cmd_index,#0x00
; main.h:35: bool SHELL_STATE = LOW;
mov _SHELL_STATE,#0x00
.area GSFINAL (CODE)
ljmp __sdcc_program_startup
;--------------------------------------------------------
; Home
;--------------------------------------------------------
.area HOME (CODE)
.area HOME (CODE)
__sdcc_program_startup:
ljmp _main
; return from main will return to caller
;--------------------------------------------------------
; code
;--------------------------------------------------------
.area CSEG (CODE)
;------------------------------------------------------------
;Allocation info for local variables in function 'inituart'
;------------------------------------------------------------
;t1_reload Allocated to registers r7
;------------------------------------------------------------
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:50: void inituart (unsigned char t1_reload)
; -----------------------------------------
; function inituart
; -----------------------------------------
_inituart:
ar7 = 0x07
ar6 = 0x06
ar5 = 0x05
ar4 = 0x04
ar3 = 0x03
ar2 = 0x02
ar1 = 0x01
ar0 = 0x00
mov r7,dpl
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:52: SIO_TR1=0;
; assignBit
clr _SIO_TR1
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:53: SIO_TMOD=(SIO_TMOD&0x0f)|0x20;
mov a,_SIO_TMOD
anl a,#0x0f
orl a,#0x20
mov _SIO_TMOD,a
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:54: SIO_PCON|=0x80;
orl _SIO_PCON,#0x80
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:55: SIO_TH1=SIO_TL1=t1_reload;
mov _SIO_TL1,r7
mov _SIO_TH1,r7
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:56: SIO_TR1=1;
; assignBit
setb _SIO_TR1
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:57: SIO_SCON=0x52;
mov _SIO_SCON,#0x52
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:58: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'putchar'
;------------------------------------------------------------
;c Allocated to registers r7
;------------------------------------------------------------
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:60: void putchar (char c)
; -----------------------------------------
; function putchar
; -----------------------------------------
_putchar:
mov r7,dpl
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:62: if((!SIO_SM0)&&(!SIO_SM1)) inituart(0xff);
jb _SIO_SM0,00102$
jb _SIO_SM1,00102$
mov dpl,#0xff
push ar7
lcall _inituart
pop ar7
00102$:
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:63: if (c=='\n')
cjne r7,#0x0a,00109$
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:65: while (!SIO_TI);
00104$:
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:66: SIO_TI=0;
; assignBit
jbc _SIO_TI,00142$
sjmp 00104$
00142$:
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:67: SIO_SBUF='\r';
mov _SIO_SBUF,#0x0d
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:69: while (!SIO_TI);
00109$:
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:70: SIO_TI=0;
; assignBit
jbc _SIO_TI,00143$
sjmp 00109$
00143$:
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:71: SIO_SBUF=c;
mov _SIO_SBUF,r7
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:72: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'getchar'
;------------------------------------------------------------
;c Allocated to registers
;------------------------------------------------------------
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:74: char getchar (void)
; -----------------------------------------
; function getchar
; -----------------------------------------
_getchar:
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:78: if((!SIO_SM0)&&(!SIO_SM1)) inituart(0xff);
jb _SIO_SM0,00104$
jb _SIO_SM1,00104$
mov dpl,#0xff
lcall _inituart
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:80: while (!SIO_RI);
00104$:
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:81: SIO_RI=0;
; assignBit
jbc _SIO_RI,00127$
sjmp 00104$
00127$:
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:82: c=SIO_SBUF;
mov dpl,_SIO_SBUF
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:83: return c;
; D:/Tools/SDCC/bin/../include/mcs51/serial_IO.h:84: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 's_printf'
;------------------------------------------------------------
;str Allocated to registers
;------------------------------------------------------------
; main.c:23: void s_printf(char *str) {
; -----------------------------------------
; function s_printf
; -----------------------------------------
_s_printf:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:24: while (*str)
00101$:
mov dpl,r5
mov dph,r6
mov b,r7
lcall __gptrget
mov r4,a
jz 00104$
; main.c:25: putchar(*str++);
mov dpl,r4
inc r5
cjne r5,#0x00,00116$
inc r6
00116$:
push ar7
push ar6
push ar5
lcall _putchar
pop ar5
pop ar6
pop ar7
sjmp 00101$
00104$:
; main.c:26: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'delay_us'
;------------------------------------------------------------
;us_count Allocated to registers
;------------------------------------------------------------
; main.c:28: void delay_us(uint16_t us_count) {
; -----------------------------------------
; function delay_us
; -----------------------------------------
_delay_us:
mov r6,dpl
mov r7,dph
; main.c:29: while(us_count!=0)
00101$:
mov a,r6
orl a,r7
jz 00104$
; main.c:30: us_count--;
dec r6
cjne r6,#0xff,00116$
dec r7
00116$:
sjmp 00101$
00104$:
; main.c:31: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'delay_ms'
;------------------------------------------------------------
;ms_count Allocated to registers
;------------------------------------------------------------
; main.c:33: void delay_ms(uint16_t ms_count) {
; -----------------------------------------
; function delay_ms
; -----------------------------------------
_delay_ms:
mov r6,dpl
mov r7,dph
; main.c:34: while(ms_count!=0) {
00101$:
mov a,r6
orl a,r7
jz 00104$
; main.c:35: delay_us(112);
mov dptr,#0x0070
push ar7
push ar6
lcall _delay_us
pop ar6
pop ar7
; main.c:36: ms_count--;
dec r6
cjne r6,#0xff,00116$
dec r7
00116$:
sjmp 00101$
00104$:
; main.c:38: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'delay_sec'
;------------------------------------------------------------
;sec_count Allocated to registers
;------------------------------------------------------------
; main.c:40: void delay_sec(unsigned char sec_count) {
; -----------------------------------------
; function delay_sec
; -----------------------------------------
_delay_sec:
mov r7,dpl
; main.c:41: while(sec_count!=0) {
00101$:
mov a,r7
jz 00104$
; main.c:42: delay_ms(1000);
mov dptr,#0x03e8
push ar7
lcall _delay_ms
pop ar7
; main.c:43: sec_count--;
dec r7
sjmp 00101$
00104$:
; main.c:45: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'cmd_handler'
;------------------------------------------------------------
;cmd_buff Allocated to registers r5 r6 r7
;i Allocated to registers r4
;cmd Allocated with name '_cmd_handler_cmd_65536_63'
;------------------------------------------------------------
; main.c:47: int8_t cmd_handler(char *cmd_buff) {
; -----------------------------------------
; function cmd_handler
; -----------------------------------------
_cmd_handler:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:51: cmd = strtok(cmd_buff, CMD_DELIMITER);
mov _strtok_PARM_2,#___str_0
mov (_strtok_PARM_2 + 1),#(___str_0 >> 8)
mov (_strtok_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strtok
mov _cmd_handler_cmd_65536_63,dpl
mov (_cmd_handler_cmd_65536_63 + 1),dph
mov (_cmd_handler_cmd_65536_63 + 2),b
; main.c:52: for (i = 0; i < (sizeof(cmd_list) / sizeof(cmd_list[0]))
mov r4,#0x00
00106$:
; main.c:53: && cmd != NULL; i++) {
cjne r4,#0x0f,00126$
00126$:
jc 00127$
ljmp 00103$
00127$:
mov a,_cmd_handler_cmd_65536_63
orl a,(_cmd_handler_cmd_65536_63 + 1)
jnz 00128$
ljmp 00103$
00128$:
; main.c:55: if (strcmp(cmd_list[i].name, cmd) == 0)
mov a,r4
mov b,#0x05
mul ab
mov r2,a
mov r3,b
add a,#_cmd_list
mov dpl,a
mov a,r3
addc a,#(_cmd_list >> 8)
mov dph,a
clr a
movc a,@a+dptr
mov r0,a
inc dptr
clr a
movc a,@a+dptr
mov r1,a
inc dptr
clr a
movc a,@a+dptr
mov r7,a
mov _strcmp_PARM_2,_cmd_handler_cmd_65536_63
mov (_strcmp_PARM_2 + 1),(_cmd_handler_cmd_65536_63 + 1)
mov (_strcmp_PARM_2 + 2),(_cmd_handler_cmd_65536_63 + 2)
mov dpl,r0
mov dph,r1
mov b,r7
push ar4
push ar3
push ar2
lcall _strcmp
mov a,dpl
mov b,dph
pop ar2
pop ar3
pop ar4
orl a,b
jnz 00107$
; main.c:56: return (int8_t) cmd_list[i].run(strtok(NULL, CMD_DELIMITER)); // запускаем целевую функцию и отдаем ей аргументы команды
mov a,r2
add a,#_cmd_list
mov r2,a
mov a,r3
addc a,#(_cmd_list >> 8)
mov r3,a
mov dpl,r2
mov dph,r3
inc dptr
inc dptr
inc dptr
clr a
movc a,@a+dptr
mov r6,a
inc dptr
clr a
movc a,@a+dptr
mov r7,a
mov _strtok_PARM_2,#___str_0
mov (_strtok_PARM_2 + 1),#(___str_0 >> 8)
mov (_strtok_PARM_2 + 2),#0x80
mov dptr,#0x0000
mov b,#0x00
push ar7
push ar6
lcall _strtok
mov r2,dpl
mov r3,dph
mov r5,b
pop ar6
pop ar7
push ar7
push ar6
lcall 00130$
sjmp 00131$
00130$:
push ar6
push ar7
mov dpl,r2
mov dph,r3
mov b,r5
ret
00131$:
pop ar6
pop ar7
ret
00107$:
; main.c:53: && cmd != NULL; i++) {
inc r4
ljmp 00106$
00103$:
; main.c:59: return CMD_GEN_ERROR;
mov dpl,#0xff
; main.c:60: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'setup'
;------------------------------------------------------------
; main.c:62: void setup() {
; -----------------------------------------
; function setup
; -----------------------------------------
_setup:
; main.c:63: inituart(0xff);
mov dpl,#0xff
lcall _inituart
; main.c:69: P0_0, P0_1, P0_2, P0_3, P0_4, P0_5, P0_6, P0_7 = 0x00; // пины как OUTPUT
; assignBit
clr _P0_7
; main.c:70: P3_2, P3_4, P3_5, P3_6, P3_7 = 0x00; // ^
; assignBit
clr _P3_7
; main.c:72: P0 = 0x00; // LOW на все порты
mov _P0,#0x00
; main.c:73: P3 &= ~((1 << 2) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7));
anl _P3,#0x0b
; main.c:74: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'main'
;------------------------------------------------------------
; main.c:76: void main(void) {
; -----------------------------------------
; function main
; -----------------------------------------
_main:
; main.c:77: setup();
lcall _setup
; main.c:79: s_printf("Toggle PIN v0.1 alpha by Yury Martynov (email@linxon.ru)\n\n");
mov dptr,#___str_1
mov b,#0x80
lcall _s_printf
; main.c:80: s_printf("Наберите 'shell', чтобы перейти в режим управления\n");
mov dptr,#___str_2
mov b,#0x80
lcall _s_printf
00126$:
; main.c:82: if (SIO_RI) { // если у нас есть новые данные в RX, то...
jnb _SIO_RI,00126$
; main.c:83: g_char = getchar();
lcall _getchar
mov _g_char,dpl
; main.c:84: SIO_RI = 0; // сбрасываем RX флаг как написано по документации
; assignBit
clr _SIO_RI
; main.c:86: putchar(g_char);
mov dpl,_g_char
lcall _putchar
; main.c:88: if ((g_char == 0x0d) || (g_char == 0x0a)) {
mov a,#0x0d
cjne a,_g_char,00174$
sjmp 00118$
00174$:
mov a,#0x0a
cjne a,_g_char,00175$
sjmp 00176$
00175$:
ljmp 00119$
00176$:
00118$:
; main.c:89: putchar(0xd); // CR (винда!!)
mov dpl,#0x0d
lcall _putchar
; main.c:90: putchar(0xa); // LF
mov dpl,#0x0a
lcall _putchar
; main.c:92: cmd_buff[cmd_index] = 0;
mov a,_cmd_index
add a,#_cmd_buff
mov r0,a
mov @r0,#0x00
; main.c:93: cmd_index = 0;
mov _cmd_index,#0x00
; main.c:95: cmd_res = cmd_handler(cmd_buff);
mov dptr,#_cmd_buff
mov b,#0x40
lcall _cmd_handler
; main.c:97: if (cmd_res == CMD_ERROR)
mov a,dpl
mov _cmd_res,a
jnz 00102$
; main.c:98: s_printf("Команда сообщила об ошибке!");
mov dptr,#___str_3
mov b,#0x80
lcall _s_printf
00102$:
; main.c:100: if (strcmp(cmd_buff, "shell") == 0 && SHELL_STATE == LOW) {
mov _strcmp_PARM_2,#___str_4
mov (_strcmp_PARM_2 + 1),#(___str_4 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dptr,#_cmd_buff
mov b,#0x40
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00104$
mov a,_SHELL_STATE
jnz 00104$
; main.c:101: SHELL_STATE = HIGH;
mov _SHELL_STATE,#0x01
; main.c:102: s_printf("Вы сейчас в 'shell' режме. Введите 'help', чтобы увидеть список команд\n");
mov dptr,#___str_5
mov b,#0x80
lcall _s_printf
00104$:
; main.c:105: if (SHELL_STATE) {
mov a,_SHELL_STATE
jnz 00180$
ljmp 00126$
00180$:
; main.c:106: if (strcmp(cmd_buff, "help") == 0) {
mov _strcmp_PARM_2,#___str_6
mov (_strcmp_PARM_2 + 1),#(___str_6 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dptr,#_cmd_buff
mov b,#0x40
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:107: s_printf(" help - показать справку\n");
mov dptr,#___str_7
mov b,#0x80
lcall _s_printf
; main.c:108: s_printf(" exit - выйти из оболочки\n");
mov dptr,#___str_8
mov b,#0x80
lcall _s_printf
sjmp 00110$
00109$:
; main.c:109: } else if (strcmp(cmd_buff, "exit") == 0) {
mov _strcmp_PARM_2,#___str_9
mov (_strcmp_PARM_2 + 1),#(___str_9 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dptr,#_cmd_buff
mov b,#0x40
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
; main.c:110: SHELL_STATE = LOW;
jnz 00110$
mov _SHELL_STATE,a
; main.c:111: continue;
ljmp 00126$
00110$:
; main.c:114: s_printf(CMD_PROMT_CHAR);
mov dptr,#___str_10
mov b,#0x80
lcall _s_printf
ljmp 00126$
00119$:
; main.c:116: } else if (g_char == 0x7f) { // клавиша "Delete"
mov a,#0x7f
cjne a,_g_char,00116$
; main.c:117: --cmd_index;
dec _cmd_index
ljmp 00126$
00116$:
; main.c:119: cmd_buff[cmd_index] = g_char;
mov a,_cmd_index
add a,#_cmd_buff
mov r0,a
mov @r0,_g_char
; main.c:120: if (cmd_index < (MAX_CMD_LINE_BUFF + 1))
mov a,#0x100 - 0x51
add a,_cmd_index
jnc 00185$
ljmp 00126$
00185$:
; main.c:121: ++cmd_index;
inc _cmd_index
; main.c:125: }
ljmp 00126$
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:127: int8_t at_p0(char *args) {
; -----------------------------------------
; function at_p0
; -----------------------------------------
_at_p0:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:128: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:129: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:130: P0 = 0xFF;
mov _P0,#0xff
00102$:
; main.c:131: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
; main.c:132: P0 = 0x00;
jnz 00109$
mov _P0,a
sjmp 00109$
00108$:
; main.c:134: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:135: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:138: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:139: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p3'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:141: int8_t at_p3(char *args) {
; -----------------------------------------
; function at_p3
; -----------------------------------------
_at_p3:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:142: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:143: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:144: P3 |= (1 << 2) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7);
orl _P3,#0xf4
00102$:
; main.c:145: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:146: P3 &= ~((1 << 2) | (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7));
anl _P3,#0x0b
sjmp 00109$
00108$:
; main.c:148: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:149: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:152: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:153: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0_0'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:155: int8_t at_p0_0(char *args) {
; -----------------------------------------
; function at_p0_0
; -----------------------------------------
_at_p0_0:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:156: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:157: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:158: P0 |= (1 << 0);
orl _P0,#0x01
00102$:
; main.c:159: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:160: P0 &= ~(1 << 0);
anl _P0,#0xfe
sjmp 00109$
00108$:
; main.c:162: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:163: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:166: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:167: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0_1'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:169: int8_t at_p0_1(char *args) {
; -----------------------------------------
; function at_p0_1
; -----------------------------------------
_at_p0_1:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:170: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:171: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:172: P0 |= (1 << 1);
orl _P0,#0x02
00102$:
; main.c:173: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:174: P0 &= ~(1 << 1);
anl _P0,#0xfd
sjmp 00109$
00108$:
; main.c:176: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:177: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:180: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:181: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0_2'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:183: int8_t at_p0_2(char *args) {
; -----------------------------------------
; function at_p0_2
; -----------------------------------------
_at_p0_2:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:184: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:185: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:186: P0 |= (1 << 2);
orl _P0,#0x04
00102$:
; main.c:187: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:188: P0 &= ~(1 << 2);
anl _P0,#0xfb
sjmp 00109$
00108$:
; main.c:190: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:191: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:194: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:195: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0_3'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:197: int8_t at_p0_3(char *args) {
; -----------------------------------------
; function at_p0_3
; -----------------------------------------
_at_p0_3:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:198: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:199: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:200: P0 |= (1 << 3);
orl _P0,#0x08
00102$:
; main.c:201: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:202: P0 &= ~(1 << 3);
anl _P0,#0xf7
sjmp 00109$
00108$:
; main.c:204: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:205: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:208: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:209: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0_4'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:211: int8_t at_p0_4(char *args) {
; -----------------------------------------
; function at_p0_4
; -----------------------------------------
_at_p0_4:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:212: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:213: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:214: P0 |= (1 << 4);
orl _P0,#0x10
00102$:
; main.c:215: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:216: P0 &= ~(1 << 4);
anl _P0,#0xef
sjmp 00109$
00108$:
; main.c:218: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:219: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:222: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:223: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0_5'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:225: int8_t at_p0_5(char *args) {
; -----------------------------------------
; function at_p0_5
; -----------------------------------------
_at_p0_5:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:226: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:227: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:228: P0 |= (1 << 5);
orl _P0,#0x20
00102$:
; main.c:229: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:230: P0 &= ~(1 << 5);
anl _P0,#0xdf
sjmp 00109$
00108$:
; main.c:232: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:233: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:236: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:237: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0_6'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:239: int8_t at_p0_6(char *args) {
; -----------------------------------------
; function at_p0_6
; -----------------------------------------
_at_p0_6:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:240: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:241: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:242: P0 |= (1 << 6);
orl _P0,#0x40
00102$:
; main.c:243: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:244: P0 &= ~(1 << 6);
anl _P0,#0xbf
sjmp 00109$
00108$:
; main.c:246: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:247: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:250: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:251: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p0_7'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:253: int8_t at_p0_7(char *args) {
; -----------------------------------------
; function at_p0_7
; -----------------------------------------
_at_p0_7:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:254: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:255: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:256: P0 |= (1 << 7);
orl _P0,#0x80
00102$:
; main.c:257: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:258: P0 &= ~(1 << 7);
anl _P0,#0x7f
sjmp 00109$
00108$:
; main.c:260: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:261: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:264: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:265: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p3_2'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:267: int8_t at_p3_2(char *args) {
; -----------------------------------------
; function at_p3_2
; -----------------------------------------
_at_p3_2:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:268: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:269: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:270: P3 |= (1 << 2);
orl _P3,#0x04
00102$:
; main.c:271: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:272: P3 &= ~(1 << 2);
anl _P3,#0xfb
sjmp 00109$
00108$:
; main.c:274: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:275: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:278: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:279: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p3_4'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:281: int8_t at_p3_4(char *args) {
; -----------------------------------------
; function at_p3_4
; -----------------------------------------
_at_p3_4:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:282: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:283: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:284: P3 |= (1 << 4);
orl _P3,#0x10
00102$:
; main.c:285: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:286: P3 &= ~(1 << 4);
anl _P3,#0xef
sjmp 00109$
00108$:
; main.c:288: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:289: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:292: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:293: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p3_5'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:295: int8_t at_p3_5(char *args) {
; -----------------------------------------
; function at_p3_5
; -----------------------------------------
_at_p3_5:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:296: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:297: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:298: P3 |= (1 << 5);
orl _P3,#0x20
00102$:
; main.c:299: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:300: P3 &= ~(1 << 5);
anl _P3,#0xdf
sjmp 00109$
00108$:
; main.c:302: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:303: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:306: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:307: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p3_6'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:309: int8_t at_p3_6(char *args) {
; -----------------------------------------
; function at_p3_6
; -----------------------------------------
_at_p3_6:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:310: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:311: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:312: P3 |= (1 << 6);
orl _P3,#0x40
00102$:
; main.c:313: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:314: P3 &= ~(1 << 6);
anl _P3,#0xbf
sjmp 00109$
00108$:
; main.c:316: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:317: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:320: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:321: }
ret
;------------------------------------------------------------
;Allocation info for local variables in function 'at_p3_7'
;------------------------------------------------------------
;args Allocated to registers r5 r6 r7
;------------------------------------------------------------
; main.c:323: int8_t at_p3_7(char *args) {
; -----------------------------------------
; function at_p3_7
; -----------------------------------------
_at_p3_7:
mov r5,dpl
mov r6,dph
mov r7,b
; main.c:324: if (args != NULL) {
mov a,r5
orl a,r6
jz 00108$
; main.c:325: if (strcmp(args, "HIGH") == 0)
mov _strcmp_PARM_2,#___str_11
mov (_strcmp_PARM_2 + 1),#(___str_11 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
push ar7
push ar6
push ar5
lcall _strcmp
mov a,dpl
mov b,dph
pop ar5
pop ar6
pop ar7
orl a,b
jnz 00102$
; main.c:326: P3 |= (1 << 7);
orl _P3,#0x80
00102$:
; main.c:327: if (strcmp(args, "LOW") == 0)
mov _strcmp_PARM_2,#___str_12
mov (_strcmp_PARM_2 + 1),#(___str_12 >> 8)
mov (_strcmp_PARM_2 + 2),#0x80
mov dpl,r5
mov dph,r6
mov b,r7
lcall _strcmp
mov a,dpl
mov b,dph
orl a,b
jnz 00109$
; main.c:328: P3 &= ~(1 << 7);
anl _P3,#0x7f
sjmp 00109$
00108$:
; main.c:330: if (SHELL_STATE)
mov a,_SHELL_STATE
jz 00109$
; main.c:331: return CMD_ERROR;
mov dpl,#0x00
ret
00109$:
; main.c:334: return CMD_SUCCESS;
mov dpl,#0x01
; main.c:335: }
ret
.area CSEG (CODE)
.area CONST (CODE)
_cmd_list:
.byte __str_13, (__str_13 >> 8),#0x80
.byte _at_p0, (_at_p0 >> 8)
.byte __str_14, (__str_14 >> 8),#0x80
.byte _at_p3, (_at_p3 >> 8)
.byte __str_15, (__str_15 >> 8),#0x80
.byte _at_p0_0, (_at_p0_0 >> 8)
.byte __str_16, (__str_16 >> 8),#0x80
.byte _at_p0_1, (_at_p0_1 >> 8)
.byte __str_17, (__str_17 >> 8),#0x80
.byte _at_p0_2, (_at_p0_2 >> 8)
.byte __str_18, (__str_18 >> 8),#0x80
.byte _at_p0_3, (_at_p0_3 >> 8)
.byte __str_19, (__str_19 >> 8),#0x80
.byte _at_p0_4, (_at_p0_4 >> 8)
.byte __str_20, (__str_20 >> 8),#0x80
.byte _at_p0_5, (_at_p0_5 >> 8)
.byte __str_21, (__str_21 >> 8),#0x80
.byte _at_p0_6, (_at_p0_6 >> 8)
.byte __str_22, (__str_22 >> 8),#0x80
.byte _at_p0_7, (_at_p0_7 >> 8)
.byte __str_23, (__str_23 >> 8),#0x80
.byte _at_p3_2, (_at_p3_2 >> 8)
.byte __str_24, (__str_24 >> 8),#0x80
.byte _at_p3_4, (_at_p3_4 >> 8)
.byte __str_25, (__str_25 >> 8),#0x80
.byte _at_p3_5, (_at_p3_5 >> 8)
.byte __str_26, (__str_26 >> 8),#0x80
.byte _at_p3_6, (_at_p3_6 >> 8)
.byte __str_27, (__str_27 >> 8),#0x80
.byte _at_p3_7, (_at_p3_7 >> 8)
.area CONST (CODE)
___str_0:
.ascii "="
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_1:
.ascii "Toggle PIN v0.1 alpha by Yury Martynov (email@linxon.ru)"
.db 0x0a
.db 0x0a
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_2:
.db 0xd0
.db 0x9d
.db 0xd0
.db 0xb0
.db 0xd0
.db 0xb1
.db 0xd0
.db 0xb5
.db 0xd1
.db 0x80
.db 0xd0
.db 0xb8
.db 0xd1
.db 0x82
.db 0xd0
.db 0xb5
.ascii " 'shell', "
.db 0xd1
.db 0x87
.db 0xd1
.db 0x82
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xb1
.db 0xd1
.db 0x8b
.ascii " "
.db 0xd0
.db 0xbf
.db 0xd0
.db 0xb5
.db 0xd1
.db 0x80
.db 0xd0
.db 0xb5
.db 0xd0
.db 0xb9
.db 0xd1
.db 0x82
.db 0xd0
.db 0xb8
.ascii " "
.db 0xd0
.db 0xb2
.ascii " "
.db 0xd1
.db 0x80
.db 0xd0
.db 0xb5
.db 0xd0
.db 0xb6
.db 0xd0
.db 0xb8
.db 0xd0
.db 0xbc
.ascii " "
.db 0xd1
.db 0x83
.db 0xd0
.db 0xbf
.db 0xd1
.db 0x80
.db 0xd0
.db 0xb0
.db 0xd0
.db 0xb2
.db 0xd0
.db 0xbb
.db 0xd0
.db 0xb5
.db 0xd0
.db 0xbd
.db 0xd0
.db 0xb8
.db 0xd1
.db 0x8f
.db 0x0a
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_3:
.db 0xd0
.db 0x9a
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xbc
.db 0xd0
.db 0xb0
.db 0xd0
.db 0xbd
.db 0xd0
.db 0xb4
.db 0xd0
.db 0xb0
.ascii " "
.db 0xd1
.db 0x81
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xb1
.db 0xd1
.db 0x89
.db 0xd0
.db 0xb8
.db 0xd0
.db 0xbb
.db 0xd0
.db 0xb0
.ascii " "
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xb1
.ascii " "
.db 0xd0
.db 0xbe
.db 0xd1
.db 0x88
.db 0xd0
.db 0xb8
.db 0xd0
.db 0xb1
.db 0xd0
.db 0xba
.db 0xd0
.db 0xb5
.ascii "!"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_4:
.ascii "shell"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_5:
.db 0xd0
.db 0x92
.db 0xd1
.db 0x8b
.ascii " "
.db 0xd1
.db 0x81
.db 0xd0
.db 0xb5
.db 0xd0
.db 0xb9
.db 0xd1
.db 0x87
.db 0xd0
.db 0xb0
.db 0xd1
.db 0x81
.ascii " "
.db 0xd0
.db 0xb2
.ascii " 'shell' "
.db 0xd1
.db 0x80
.db 0xd0
.db 0xb5
.db 0xd0
.db 0xb6
.db 0xd0
.db 0xbc
.db 0xd0
.db 0xb5
.ascii ". "
.db 0xd0
.db 0x92
.db 0xd0
.db 0xb2
.db 0xd0
.db 0xb5
.db 0xd0
.db 0xb4
.db 0xd0
.db 0xb8
.db 0xd1
.db 0x82
.db 0xd0
.db 0xb5
.ascii " 'help', "
.db 0xd1
.db 0x87
.db 0xd1
.db 0x82
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xb1
.db 0xd1
.db 0x8b
.ascii " "
.db 0xd1
.db 0x83
.db 0xd0
.db 0xb2
.db 0xd0
.db 0xb8
.db 0xd0
.db 0xb4
.db 0xd0
.db 0xb5
.db 0xd1
.db 0x82
.db 0xd1
.db 0x8c
.ascii " "
.db 0xd1
.db 0x81
.db 0xd0
.db 0xbf
.db 0xd0
.db 0xb8
.db 0xd1
.db 0x81
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xba
.ascii " "
.db 0xd0
.db 0xba
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xbc
.db 0xd0
.db 0xb0
.db 0xd0
.db 0xbd
.db 0xd0
.db 0xb4
.db 0x0a
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_6:
.ascii "help"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_7:
.ascii " help - "
.db 0xd0
.db 0xbf
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xba
.db 0xd0
.db 0xb0
.db 0xd0
.db 0xb7
.db 0xd0
.db 0xb0
.db 0xd1
.db 0x82
.db 0xd1
.db 0x8c
.ascii " "
.db 0xd1
.db 0x81
.db 0xd0
.db 0xbf
.db 0xd1
.db 0x80
.db 0xd0
.db 0xb0
.db 0xd0
.db 0xb2
.db 0xd0
.db 0xba
.db 0xd1
.db 0x83
.db 0x0a
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_8:
.ascii " exit - "
.db 0xd0
.db 0xb2
.db 0xd1
.db 0x8b
.db 0xd0
.db 0xb9
.db 0xd1
.db 0x82
.db 0xd0
.db 0xb8
.ascii " "
.db 0xd0
.db 0xb8
.db 0xd0
.db 0xb7
.ascii " "
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xb1
.db 0xd0
.db 0xbe
.db 0xd0
.db 0xbb
.db 0xd0
.db 0xbe
.db 0xd1
.db 0x87
.db 0xd0
.db 0xba
.db 0xd0
.db 0xb8
.db 0x0a
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_9:
.ascii "exit"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_10:
.ascii "> "
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_11:
.ascii "HIGH"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
___str_12:
.ascii "LOW"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_13:
.ascii "AT+P0"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_14:
.ascii "AT+P3"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_15:
.ascii "AT+P0.0"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_16:
.ascii "AT+P0.1"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_17:
.ascii "AT+P0.2"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_18:
.ascii "AT+P0.3"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_19:
.ascii "AT+P0.4"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_20:
.ascii "AT+P0.5"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_21:
.ascii "AT+P0.6"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_22:
.ascii "AT+P0.7"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_23:
.ascii "AT+P3.2"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_24:
.ascii "AT+P3.4"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_25:
.ascii "AT+P3.5"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_26:
.ascii "AT+P3.6"
.db 0x00
.area CSEG (CODE)
.area CONST (CODE)
__str_27:
.ascii "AT+P3.7"
.db 0x00
.area CSEG (CODE)
.area XINIT (CODE)
.area CABS (ABS,CODE)
| 21.955808
| 134
| 0.516227
|
ff94ec36d36179505094660d4869da55b998f7b9
| 1,962
|
asm
|
Assembly
|
programs/oeis/270/A270867.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/270/A270867.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/270/A270867.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A270867: a(n) = n^3 + 2*n^2 + 4*n + 1.
; 1,8,25,58,113,196,313,470,673,928,1241,1618,2065,2588,3193,3886,4673,5560,6553,7658,8881,10228,11705,13318,15073,16976,19033,21250,23633,26188,28921,31838,34945,38248,41753,45466,49393,53540,57913,62518,67361,72448,77785,83378,89233,95356,101753,108430,115393,122648,130201,138058,146225,154708,163513,172646,182113,191920,202073,212578,223441,234668,246265,258238,270593,283336,296473,310010,323953,338308,353081,368278,383905,399968,416473,433426,450833,468700,487033,505838,525121,544888,565145,585898,607153,628916,651193,673990,697313,721168,745561,770498,795985,822028,848633,875806,903553,931880,960793,990298,1020401,1051108,1082425,1114358,1146913,1180096,1213913,1248370,1283473,1319228,1355641,1392718,1430465,1468888,1507993,1547786,1588273,1629460,1671353,1713958,1757281,1801328,1846105,1891618,1937873,1984876,2032633,2081150,2130433,2180488,2231321,2282938,2335345,2388548,2442553,2497366,2552993,2609440,2666713,2724818,2783761,2843548,2904185,2965678,3028033,3091256,3155353,3220330,3286193,3352948,3420601,3489158,3558625,3629008,3700313,3772546,3845713,3919820,3994873,4070878,4147841,4225768,4304665,4384538,4465393,4547236,4630073,4713910,4798753,4884608,4971481,5059378,5148305,5238268,5329273,5421326,5514433,5608600,5703833,5800138,5897521,5995988,6095545,6196198,6297953,6400816,6504793,6609890,6716113,6823468,6931961,7041598,7152385,7264328,7377433,7491706,7607153,7723780,7841593,7960598,8080801,8202208,8324825,8448658,8573713,8699996,8827513,8956270,9086273,9217528,9350041,9483818,9618865,9755188,9892793,10031686,10171873,10313360,10456153,10600258,10745681,10892428,11040505,11189918,11340673,11492776,11646233,11801050,11957233,12114788,12273721,12434038,12595745,12758848,12923353,13089266,13256593,13425340,13595513,13767118,13940161,14114648,14290585,14467978,14646833,14827156,15008953,15192230,15376993,15563248
add $0,1
mov $1,$0
mul $1,$0
sub $0,1
add $1,3
mul $1,$0
add $1,1
| 178.363636
| 1,853
| 0.843017
|
9aad4015124bae8b86a56b8aa6c491b47be0ddcc
| 93
|
asm
|
Assembly
|
flame32-libs/unit-tests/test-ldm-1.asm
|
drako0812/flame32
|
cf79e5fc14838cc3ca0dbe702bbdb8f157a587ab
|
[
"MIT"
] | 2
|
2019-08-21T09:16:32.000Z
|
2020-08-12T12:56:08.000Z
|
flame32-libs/unit-tests/test-ldm-1.asm
|
drako0812/flame32
|
cf79e5fc14838cc3ca0dbe702bbdb8f157a587ab
|
[
"MIT"
] | null | null | null |
flame32-libs/unit-tests/test-ldm-1.asm
|
drako0812/flame32
|
cf79e5fc14838cc3ca0dbe702bbdb8f157a587ab
|
[
"MIT"
] | null | null | null |
#include "../../flame32.asm"
; Tests LDM
ldm A, TEST_VALUE
TEST_VALUE:
#d32 0x12345678
| 11.625
| 28
| 0.666667
|
95e6c7e37bd353195b75f34439883b95ebd757b8
| 48,055
|
asm
|
Assembly
|
prog1.asm
|
mmend175/xv6_OS
|
9f446f254ef3bc85800c5daafbb92fb19011cb31
|
[
"MIT-0"
] | null | null | null |
prog1.asm
|
mmend175/xv6_OS
|
9f446f254ef3bc85800c5daafbb92fb19011cb31
|
[
"MIT-0"
] | null | null | null |
prog1.asm
|
mmend175/xv6_OS
|
9f446f254ef3bc85800c5daafbb92fb19011cb31
|
[
"MIT-0"
] | null | null | null |
_prog1: 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: 51 push %ecx
e: 83 ec 04 sub $0x4,%esp
int Scheduler(void);
Scheduler();
11: e8 0a 00 00 00 call 20 <Scheduler>
16: 66 90 xchg %ax,%ax
18: 66 90 xchg %ax,%ax
1a: 66 90 xchg %ax,%ax
1c: 66 90 xchg %ax,%ax
1e: 66 90 xchg %ax,%ax
00000020 <Scheduler>:
return 0;
}
int Scheduler(void)
{
20: 55 push %ebp
21: 89 e5 mov %esp,%ebp
23: 53 push %ebx
int pid;
int i, j, k;
/*Replace YOUR_SYSCALL_TO_ASSIGN_TICKET with what you implement to assign ticket */
tickets(60);
for (i = 0; i < 3; i++)
24: 31 db xor %ebx,%ebx
Scheduler();
return 0;
}
int Scheduler(void)
{
26: 83 ec 20 sub $0x20,%esp
int pid;
int i, j, k;
/*Replace YOUR_SYSCALL_TO_ASSIGN_TICKET with what you implement to assign ticket */
tickets(60);
29: 6a 3c push $0x3c
2b: e8 7a 03 00 00 call 3aa <tickets>
30: 83 c4 10 add $0x10,%esp
for (i = 0; i < 3; i++)
{
pid = fork();
33: e8 c2 02 00 00 call 2fa <fork>
if (pid > 0)
38: 83 f8 00 cmp $0x0,%eax
3b: 7e 20 jle 5d <Scheduler+0x3d>
int pid;
int i, j, k;
/*Replace YOUR_SYSCALL_TO_ASSIGN_TICKET with what you implement to assign ticket */
tickets(60);
for (i = 0; i < 3; i++)
3d: 83 c3 01 add $0x1,%ebx
40: 83 fb 03 cmp $0x3,%ebx
43: 75 ee jne 33 <Scheduler+0x13>
{
printf(2, " \n Error \n ");
}
}
if (pid > 0)
45: 85 c0 test %eax,%eax
47: 7e 0f jle 58 <Scheduler+0x38>
{
for (i = 0; i < 3; i++)
{
wait();
49: e8 bc 02 00 00 call 30a <wait>
4e: e8 b7 02 00 00 call 30a <wait>
53: e8 b2 02 00 00 call 30a <wait>
}
}
exit();
58: e8 a5 02 00 00 call 302 <exit>
pid = fork();
if (pid > 0)
{
continue;
}
else if (pid == 0)
5d: 74 1a je 79 <Scheduler+0x59>
printf(1, "\n child# %d with %d tickets has finished! \n", getpid(), 30 - 10 * i);
exit();
}
else
{
printf(2, " \n Error \n ");
5f: 83 ec 08 sub $0x8,%esp
62: 89 45 f4 mov %eax,-0xc(%ebp)
65: 68 b0 07 00 00 push $0x7b0
6a: 6a 02 push $0x2
6c: e8 ef 03 00 00 call 460 <printf>
71: 83 c4 10 add $0x10,%esp
74: 8b 45 f4 mov -0xc(%ebp),%eax
77: eb c4 jmp 3d <Scheduler+0x1d>
continue;
}
else if (pid == 0)
{
tickets(30 - 10 * i);
79: 6b db f6 imul $0xfffffff6,%ebx,%ebx
7c: 83 ec 0c sub $0xc,%esp
7f: 83 c3 1e add $0x1e,%ebx
82: 53 push %ebx
83: e8 22 03 00 00 call 3aa <tickets>
88: 83 c4 10 add $0x10,%esp
8b: ba 50 c3 00 00 mov $0xc350,%edx
int pid;
int i, j, k;
/*Replace YOUR_SYSCALL_TO_ASSIGN_TICKET with what you implement to assign ticket */
tickets(60);
for (i = 0; i < 3; i++)
90: b8 50 c3 00 00 mov $0xc350,%eax
95: 8d 76 00 lea 0x0(%esi),%esi
tickets(30 - 10 * i);
for (j = 0; j < 50000; j++)
{
for (k = 0; k < 50000; k++)
{
asm("nop");
98: 90 nop
{
tickets(30 - 10 * i);
for (j = 0; j < 50000; j++)
{
for (k = 0; k < 50000; k++)
99: 83 e8 01 sub $0x1,%eax
9c: 75 fa jne 98 <Scheduler+0x78>
}
else if (pid == 0)
{
tickets(30 - 10 * i);
for (j = 0; j < 50000; j++)
9e: 83 ea 01 sub $0x1,%edx
a1: 75 ed jne 90 <Scheduler+0x70>
for (k = 0; k < 50000; k++)
{
asm("nop");
}
}
printf(1, "\n child# %d with %d tickets has finished! \n", getpid(), 30 - 10 * i);
a3: e8 da 02 00 00 call 382 <getpid>
a8: 53 push %ebx
a9: 50 push %eax
aa: 68 80 07 00 00 push $0x780
af: 6a 01 push $0x1
b1: e8 aa 03 00 00 call 460 <printf>
exit();
b6: e8 47 02 00 00 call 302 <exit>
bb: 66 90 xchg %ax,%ax
bd: 66 90 xchg %ax,%ax
bf: 90 nop
000000c0 <strcpy>:
//}
char*
strcpy(char *s, const char *t)
{
c0: 55 push %ebp
c1: 89 e5 mov %esp,%ebp
c3: 53 push %ebx
c4: 8b 45 08 mov 0x8(%ebp),%eax
c7: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
ca: 89 c2 mov %eax,%edx
cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
d0: 83 c1 01 add $0x1,%ecx
d3: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
d7: 83 c2 01 add $0x1,%edx
da: 84 db test %bl,%bl
dc: 88 5a ff mov %bl,-0x1(%edx)
df: 75 ef jne d0 <strcpy+0x10>
;
return os;
}
e1: 5b pop %ebx
e2: 5d pop %ebp
e3: c3 ret
e4: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
ea: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
000000f0 <strcmp>:
int
strcmp(const char *p, const char *q)
{
f0: 55 push %ebp
f1: 89 e5 mov %esp,%ebp
f3: 56 push %esi
f4: 53 push %ebx
f5: 8b 55 08 mov 0x8(%ebp),%edx
f8: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
fb: 0f b6 02 movzbl (%edx),%eax
fe: 0f b6 19 movzbl (%ecx),%ebx
101: 84 c0 test %al,%al
103: 75 1e jne 123 <strcmp+0x33>
105: eb 29 jmp 130 <strcmp+0x40>
107: 89 f6 mov %esi,%esi
109: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
110: 83 c2 01 add $0x1,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
113: 0f b6 02 movzbl (%edx),%eax
p++, q++;
116: 8d 71 01 lea 0x1(%ecx),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
119: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
11d: 84 c0 test %al,%al
11f: 74 0f je 130 <strcmp+0x40>
121: 89 f1 mov %esi,%ecx
123: 38 d8 cmp %bl,%al
125: 74 e9 je 110 <strcmp+0x20>
p++, q++;
return (uchar)*p - (uchar)*q;
127: 29 d8 sub %ebx,%eax
}
129: 5b pop %ebx
12a: 5e pop %esi
12b: 5d pop %ebp
12c: c3 ret
12d: 8d 76 00 lea 0x0(%esi),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
130: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
132: 29 d8 sub %ebx,%eax
}
134: 5b pop %ebx
135: 5e pop %esi
136: 5d pop %ebp
137: c3 ret
138: 90 nop
139: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000140 <strlen>:
uint
strlen(const char *s)
{
140: 55 push %ebp
141: 89 e5 mov %esp,%ebp
143: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
146: 80 39 00 cmpb $0x0,(%ecx)
149: 74 12 je 15d <strlen+0x1d>
14b: 31 d2 xor %edx,%edx
14d: 8d 76 00 lea 0x0(%esi),%esi
150: 83 c2 01 add $0x1,%edx
153: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
157: 89 d0 mov %edx,%eax
159: 75 f5 jne 150 <strlen+0x10>
;
return n;
}
15b: 5d pop %ebp
15c: c3 ret
uint
strlen(const char *s)
{
int n;
for(n = 0; s[n]; n++)
15d: 31 c0 xor %eax,%eax
;
return n;
}
15f: 5d pop %ebp
160: c3 ret
161: eb 0d jmp 170 <memset>
163: 90 nop
164: 90 nop
165: 90 nop
166: 90 nop
167: 90 nop
168: 90 nop
169: 90 nop
16a: 90 nop
16b: 90 nop
16c: 90 nop
16d: 90 nop
16e: 90 nop
16f: 90 nop
00000170 <memset>:
void*
memset(void *dst, int c, uint n)
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 57 push %edi
174: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
177: 8b 4d 10 mov 0x10(%ebp),%ecx
17a: 8b 45 0c mov 0xc(%ebp),%eax
17d: 89 d7 mov %edx,%edi
17f: fc cld
180: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
182: 89 d0 mov %edx,%eax
184: 5f pop %edi
185: 5d pop %ebp
186: c3 ret
187: 89 f6 mov %esi,%esi
189: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000190 <strchr>:
char*
strchr(const char *s, char c)
{
190: 55 push %ebp
191: 89 e5 mov %esp,%ebp
193: 53 push %ebx
194: 8b 45 08 mov 0x8(%ebp),%eax
197: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
19a: 0f b6 10 movzbl (%eax),%edx
19d: 84 d2 test %dl,%dl
19f: 74 1d je 1be <strchr+0x2e>
if(*s == c)
1a1: 38 d3 cmp %dl,%bl
1a3: 89 d9 mov %ebx,%ecx
1a5: 75 0d jne 1b4 <strchr+0x24>
1a7: eb 17 jmp 1c0 <strchr+0x30>
1a9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
1b0: 38 ca cmp %cl,%dl
1b2: 74 0c je 1c0 <strchr+0x30>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
1b4: 83 c0 01 add $0x1,%eax
1b7: 0f b6 10 movzbl (%eax),%edx
1ba: 84 d2 test %dl,%dl
1bc: 75 f2 jne 1b0 <strchr+0x20>
if(*s == c)
return (char*)s;
return 0;
1be: 31 c0 xor %eax,%eax
}
1c0: 5b pop %ebx
1c1: 5d pop %ebp
1c2: c3 ret
1c3: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
1c9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000001d0 <gets>:
char*
gets(char *buf, int max)
{
1d0: 55 push %ebp
1d1: 89 e5 mov %esp,%ebp
1d3: 57 push %edi
1d4: 56 push %esi
1d5: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
1d6: 31 f6 xor %esi,%esi
cc = read(0, &c, 1);
1d8: 8d 7d e7 lea -0x19(%ebp),%edi
return 0;
}
char*
gets(char *buf, int max)
{
1db: 83 ec 1c sub $0x1c,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
1de: eb 29 jmp 209 <gets+0x39>
cc = read(0, &c, 1);
1e0: 83 ec 04 sub $0x4,%esp
1e3: 6a 01 push $0x1
1e5: 57 push %edi
1e6: 6a 00 push $0x0
1e8: e8 2d 01 00 00 call 31a <read>
if(cc < 1)
1ed: 83 c4 10 add $0x10,%esp
1f0: 85 c0 test %eax,%eax
1f2: 7e 1d jle 211 <gets+0x41>
break;
buf[i++] = c;
1f4: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
1f8: 8b 55 08 mov 0x8(%ebp),%edx
1fb: 89 de mov %ebx,%esi
if(c == '\n' || c == '\r')
1fd: 3c 0a cmp $0xa,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
1ff: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
203: 74 1b je 220 <gets+0x50>
205: 3c 0d cmp $0xd,%al
207: 74 17 je 220 <gets+0x50>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
209: 8d 5e 01 lea 0x1(%esi),%ebx
20c: 3b 5d 0c cmp 0xc(%ebp),%ebx
20f: 7c cf jl 1e0 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
211: 8b 45 08 mov 0x8(%ebp),%eax
214: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
218: 8d 65 f4 lea -0xc(%ebp),%esp
21b: 5b pop %ebx
21c: 5e pop %esi
21d: 5f pop %edi
21e: 5d pop %ebp
21f: c3 ret
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
220: 8b 45 08 mov 0x8(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
223: 89 de mov %ebx,%esi
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
225: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
229: 8d 65 f4 lea -0xc(%ebp),%esp
22c: 5b pop %ebx
22d: 5e pop %esi
22e: 5f pop %edi
22f: 5d pop %ebp
230: c3 ret
231: eb 0d jmp 240 <stat>
233: 90 nop
234: 90 nop
235: 90 nop
236: 90 nop
237: 90 nop
238: 90 nop
239: 90 nop
23a: 90 nop
23b: 90 nop
23c: 90 nop
23d: 90 nop
23e: 90 nop
23f: 90 nop
00000240 <stat>:
int
stat(const char *n, struct stat *st)
{
240: 55 push %ebp
241: 89 e5 mov %esp,%ebp
243: 56 push %esi
244: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
245: 83 ec 08 sub $0x8,%esp
248: 6a 00 push $0x0
24a: ff 75 08 pushl 0x8(%ebp)
24d: e8 f0 00 00 00 call 342 <open>
if(fd < 0)
252: 83 c4 10 add $0x10,%esp
255: 85 c0 test %eax,%eax
257: 78 27 js 280 <stat+0x40>
return -1;
r = fstat(fd, st);
259: 83 ec 08 sub $0x8,%esp
25c: ff 75 0c pushl 0xc(%ebp)
25f: 89 c3 mov %eax,%ebx
261: 50 push %eax
262: e8 f3 00 00 00 call 35a <fstat>
267: 89 c6 mov %eax,%esi
close(fd);
269: 89 1c 24 mov %ebx,(%esp)
26c: e8 b9 00 00 00 call 32a <close>
return r;
271: 83 c4 10 add $0x10,%esp
274: 89 f0 mov %esi,%eax
}
276: 8d 65 f8 lea -0x8(%ebp),%esp
279: 5b pop %ebx
27a: 5e pop %esi
27b: 5d pop %ebp
27c: c3 ret
27d: 8d 76 00 lea 0x0(%esi),%esi
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
280: b8 ff ff ff ff mov $0xffffffff,%eax
285: eb ef jmp 276 <stat+0x36>
287: 89 f6 mov %esi,%esi
289: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000290 <atoi>:
return r;
}
int
atoi(const char *s)
{
290: 55 push %ebp
291: 89 e5 mov %esp,%ebp
293: 53 push %ebx
294: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
297: 0f be 11 movsbl (%ecx),%edx
29a: 8d 42 d0 lea -0x30(%edx),%eax
29d: 3c 09 cmp $0x9,%al
29f: b8 00 00 00 00 mov $0x0,%eax
2a4: 77 1f ja 2c5 <atoi+0x35>
2a6: 8d 76 00 lea 0x0(%esi),%esi
2a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
2b0: 8d 04 80 lea (%eax,%eax,4),%eax
2b3: 83 c1 01 add $0x1,%ecx
2b6: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
2ba: 0f be 11 movsbl (%ecx),%edx
2bd: 8d 5a d0 lea -0x30(%edx),%ebx
2c0: 80 fb 09 cmp $0x9,%bl
2c3: 76 eb jbe 2b0 <atoi+0x20>
n = n*10 + *s++ - '0';
return n;
}
2c5: 5b pop %ebx
2c6: 5d pop %ebp
2c7: c3 ret
2c8: 90 nop
2c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000002d0 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
2d0: 55 push %ebp
2d1: 89 e5 mov %esp,%ebp
2d3: 56 push %esi
2d4: 53 push %ebx
2d5: 8b 5d 10 mov 0x10(%ebp),%ebx
2d8: 8b 45 08 mov 0x8(%ebp),%eax
2db: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2de: 85 db test %ebx,%ebx
2e0: 7e 14 jle 2f6 <memmove+0x26>
2e2: 31 d2 xor %edx,%edx
2e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
2e8: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
2ec: 88 0c 10 mov %cl,(%eax,%edx,1)
2ef: 83 c2 01 add $0x1,%edx
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2f2: 39 da cmp %ebx,%edx
2f4: 75 f2 jne 2e8 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
2f6: 5b pop %ebx
2f7: 5e pop %esi
2f8: 5d pop %ebp
2f9: c3 ret
000002fa <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2fa: b8 01 00 00 00 mov $0x1,%eax
2ff: cd 40 int $0x40
301: c3 ret
00000302 <exit>:
SYSCALL(exit)
302: b8 02 00 00 00 mov $0x2,%eax
307: cd 40 int $0x40
309: c3 ret
0000030a <wait>:
SYSCALL(wait)
30a: b8 03 00 00 00 mov $0x3,%eax
30f: cd 40 int $0x40
311: c3 ret
00000312 <pipe>:
SYSCALL(pipe)
312: b8 04 00 00 00 mov $0x4,%eax
317: cd 40 int $0x40
319: c3 ret
0000031a <read>:
SYSCALL(read)
31a: b8 05 00 00 00 mov $0x5,%eax
31f: cd 40 int $0x40
321: c3 ret
00000322 <write>:
SYSCALL(write)
322: b8 10 00 00 00 mov $0x10,%eax
327: cd 40 int $0x40
329: c3 ret
0000032a <close>:
SYSCALL(close)
32a: b8 15 00 00 00 mov $0x15,%eax
32f: cd 40 int $0x40
331: c3 ret
00000332 <kill>:
SYSCALL(kill)
332: b8 06 00 00 00 mov $0x6,%eax
337: cd 40 int $0x40
339: c3 ret
0000033a <exec>:
SYSCALL(exec)
33a: b8 07 00 00 00 mov $0x7,%eax
33f: cd 40 int $0x40
341: c3 ret
00000342 <open>:
SYSCALL(open)
342: b8 0f 00 00 00 mov $0xf,%eax
347: cd 40 int $0x40
349: c3 ret
0000034a <mknod>:
SYSCALL(mknod)
34a: b8 11 00 00 00 mov $0x11,%eax
34f: cd 40 int $0x40
351: c3 ret
00000352 <unlink>:
SYSCALL(unlink)
352: b8 12 00 00 00 mov $0x12,%eax
357: cd 40 int $0x40
359: c3 ret
0000035a <fstat>:
SYSCALL(fstat)
35a: b8 08 00 00 00 mov $0x8,%eax
35f: cd 40 int $0x40
361: c3 ret
00000362 <link>:
SYSCALL(link)
362: b8 13 00 00 00 mov $0x13,%eax
367: cd 40 int $0x40
369: c3 ret
0000036a <mkdir>:
SYSCALL(mkdir)
36a: b8 14 00 00 00 mov $0x14,%eax
36f: cd 40 int $0x40
371: c3 ret
00000372 <chdir>:
SYSCALL(chdir)
372: b8 09 00 00 00 mov $0x9,%eax
377: cd 40 int $0x40
379: c3 ret
0000037a <dup>:
SYSCALL(dup)
37a: b8 0a 00 00 00 mov $0xa,%eax
37f: cd 40 int $0x40
381: c3 ret
00000382 <getpid>:
SYSCALL(getpid)
382: b8 0b 00 00 00 mov $0xb,%eax
387: cd 40 int $0x40
389: c3 ret
0000038a <sbrk>:
SYSCALL(sbrk)
38a: b8 0c 00 00 00 mov $0xc,%eax
38f: cd 40 int $0x40
391: c3 ret
00000392 <sleep>:
SYSCALL(sleep)
392: b8 0d 00 00 00 mov $0xd,%eax
397: cd 40 int $0x40
399: c3 ret
0000039a <uptime>:
SYSCALL(uptime)
39a: b8 0e 00 00 00 mov $0xe,%eax
39f: cd 40 int $0x40
3a1: c3 ret
000003a2 <info>:
SYSCALL(info) // LAB-1
3a2: b8 16 00 00 00 mov $0x16,%eax
3a7: cd 40 int $0x40
3a9: c3 ret
000003aa <tickets>:
SYSCALL(tickets) // LAB-2
3aa: b8 17 00 00 00 mov $0x17,%eax
3af: cd 40 int $0x40
3b1: c3 ret
000003b2 <clone>:
SYSCALL(clone) // LAB-3
3b2: b8 18 00 00 00 mov $0x18,%eax
3b7: cd 40 int $0x40
3b9: c3 ret
3ba: 66 90 xchg %ax,%ax
3bc: 66 90 xchg %ax,%ax
3be: 66 90 xchg %ax,%ax
000003c0 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
3c0: 55 push %ebp
3c1: 89 e5 mov %esp,%ebp
3c3: 57 push %edi
3c4: 56 push %esi
3c5: 53 push %ebx
3c6: 89 c6 mov %eax,%esi
3c8: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
3cb: 8b 5d 08 mov 0x8(%ebp),%ebx
3ce: 85 db test %ebx,%ebx
3d0: 74 7e je 450 <printint+0x90>
3d2: 89 d0 mov %edx,%eax
3d4: c1 e8 1f shr $0x1f,%eax
3d7: 84 c0 test %al,%al
3d9: 74 75 je 450 <printint+0x90>
neg = 1;
x = -xx;
3db: 89 d0 mov %edx,%eax
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
neg = 1;
3dd: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
x = -xx;
3e4: f7 d8 neg %eax
3e6: 89 75 c0 mov %esi,-0x40(%ebp)
} else {
x = xx;
}
i = 0;
3e9: 31 ff xor %edi,%edi
3eb: 8d 5d d7 lea -0x29(%ebp),%ebx
3ee: 89 ce mov %ecx,%esi
3f0: eb 08 jmp 3fa <printint+0x3a>
3f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
do{
buf[i++] = digits[x % base];
3f8: 89 cf mov %ecx,%edi
3fa: 31 d2 xor %edx,%edx
3fc: 8d 4f 01 lea 0x1(%edi),%ecx
3ff: f7 f6 div %esi
401: 0f b6 92 c8 07 00 00 movzbl 0x7c8(%edx),%edx
}while((x /= base) != 0);
408: 85 c0 test %eax,%eax
x = xx;
}
i = 0;
do{
buf[i++] = digits[x % base];
40a: 88 14 0b mov %dl,(%ebx,%ecx,1)
}while((x /= base) != 0);
40d: 75 e9 jne 3f8 <printint+0x38>
if(neg)
40f: 8b 45 c4 mov -0x3c(%ebp),%eax
412: 8b 75 c0 mov -0x40(%ebp),%esi
415: 85 c0 test %eax,%eax
417: 74 08 je 421 <printint+0x61>
buf[i++] = '-';
419: c6 44 0d d8 2d movb $0x2d,-0x28(%ebp,%ecx,1)
41e: 8d 4f 02 lea 0x2(%edi),%ecx
421: 8d 7c 0d d7 lea -0x29(%ebp,%ecx,1),%edi
425: 8d 76 00 lea 0x0(%esi),%esi
428: 0f b6 07 movzbl (%edi),%eax
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
42b: 83 ec 04 sub $0x4,%esp
42e: 83 ef 01 sub $0x1,%edi
431: 6a 01 push $0x1
433: 53 push %ebx
434: 56 push %esi
435: 88 45 d7 mov %al,-0x29(%ebp)
438: e8 e5 fe ff ff call 322 <write>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
43d: 83 c4 10 add $0x10,%esp
440: 39 df cmp %ebx,%edi
442: 75 e4 jne 428 <printint+0x68>
putc(fd, buf[i]);
}
444: 8d 65 f4 lea -0xc(%ebp),%esp
447: 5b pop %ebx
448: 5e pop %esi
449: 5f pop %edi
44a: 5d pop %ebp
44b: c3 ret
44c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
if(sgn && xx < 0){
neg = 1;
x = -xx;
} else {
x = xx;
450: 89 d0 mov %edx,%eax
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
452: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
459: eb 8b jmp 3e6 <printint+0x26>
45b: 90 nop
45c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000460 <printf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
460: 55 push %ebp
461: 89 e5 mov %esp,%ebp
463: 57 push %edi
464: 56 push %esi
465: 53 push %ebx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
466: 8d 45 10 lea 0x10(%ebp),%eax
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
469: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
46c: 8b 75 0c mov 0xc(%ebp),%esi
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
46f: 8b 7d 08 mov 0x8(%ebp),%edi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
472: 89 45 d0 mov %eax,-0x30(%ebp)
475: 0f b6 1e movzbl (%esi),%ebx
478: 83 c6 01 add $0x1,%esi
47b: 84 db test %bl,%bl
47d: 0f 84 b0 00 00 00 je 533 <printf+0xd3>
483: 31 d2 xor %edx,%edx
485: eb 39 jmp 4c0 <printf+0x60>
487: 89 f6 mov %esi,%esi
489: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
490: 83 f8 25 cmp $0x25,%eax
493: 89 55 d4 mov %edx,-0x2c(%ebp)
state = '%';
496: ba 25 00 00 00 mov $0x25,%edx
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
49b: 74 18 je 4b5 <printf+0x55>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
49d: 8d 45 e2 lea -0x1e(%ebp),%eax
4a0: 83 ec 04 sub $0x4,%esp
4a3: 88 5d e2 mov %bl,-0x1e(%ebp)
4a6: 6a 01 push $0x1
4a8: 50 push %eax
4a9: 57 push %edi
4aa: e8 73 fe ff ff call 322 <write>
4af: 8b 55 d4 mov -0x2c(%ebp),%edx
4b2: 83 c4 10 add $0x10,%esp
4b5: 83 c6 01 add $0x1,%esi
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
4b8: 0f b6 5e ff movzbl -0x1(%esi),%ebx
4bc: 84 db test %bl,%bl
4be: 74 73 je 533 <printf+0xd3>
c = fmt[i] & 0xff;
if(state == 0){
4c0: 85 d2 test %edx,%edx
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
c = fmt[i] & 0xff;
4c2: 0f be cb movsbl %bl,%ecx
4c5: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
4c8: 74 c6 je 490 <printf+0x30>
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
4ca: 83 fa 25 cmp $0x25,%edx
4cd: 75 e6 jne 4b5 <printf+0x55>
if(c == 'd'){
4cf: 83 f8 64 cmp $0x64,%eax
4d2: 0f 84 f8 00 00 00 je 5d0 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
4d8: 81 e1 f7 00 00 00 and $0xf7,%ecx
4de: 83 f9 70 cmp $0x70,%ecx
4e1: 74 5d je 540 <printf+0xe0>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
4e3: 83 f8 73 cmp $0x73,%eax
4e6: 0f 84 84 00 00 00 je 570 <printf+0x110>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
4ec: 83 f8 63 cmp $0x63,%eax
4ef: 0f 84 ea 00 00 00 je 5df <printf+0x17f>
putc(fd, *ap);
ap++;
} else if(c == '%'){
4f5: 83 f8 25 cmp $0x25,%eax
4f8: 0f 84 c2 00 00 00 je 5c0 <printf+0x160>
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
4fe: 8d 45 e7 lea -0x19(%ebp),%eax
501: 83 ec 04 sub $0x4,%esp
504: c6 45 e7 25 movb $0x25,-0x19(%ebp)
508: 6a 01 push $0x1
50a: 50 push %eax
50b: 57 push %edi
50c: e8 11 fe ff ff call 322 <write>
511: 83 c4 0c add $0xc,%esp
514: 8d 45 e6 lea -0x1a(%ebp),%eax
517: 88 5d e6 mov %bl,-0x1a(%ebp)
51a: 6a 01 push $0x1
51c: 50 push %eax
51d: 57 push %edi
51e: 83 c6 01 add $0x1,%esi
521: e8 fc fd ff ff call 322 <write>
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
526: 0f b6 5e ff movzbl -0x1(%esi),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
52a: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
52d: 31 d2 xor %edx,%edx
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
52f: 84 db test %bl,%bl
531: 75 8d jne 4c0 <printf+0x60>
putc(fd, c);
}
state = 0;
}
}
}
533: 8d 65 f4 lea -0xc(%ebp),%esp
536: 5b pop %ebx
537: 5e pop %esi
538: 5f pop %edi
539: 5d pop %ebp
53a: c3 ret
53b: 90 nop
53c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
540: 83 ec 0c sub $0xc,%esp
543: b9 10 00 00 00 mov $0x10,%ecx
548: 6a 00 push $0x0
54a: 8b 5d d0 mov -0x30(%ebp),%ebx
54d: 89 f8 mov %edi,%eax
54f: 8b 13 mov (%ebx),%edx
551: e8 6a fe ff ff call 3c0 <printint>
ap++;
556: 89 d8 mov %ebx,%eax
558: 83 c4 10 add $0x10,%esp
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
55b: 31 d2 xor %edx,%edx
if(c == 'd'){
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
printint(fd, *ap, 16, 0);
ap++;
55d: 83 c0 04 add $0x4,%eax
560: 89 45 d0 mov %eax,-0x30(%ebp)
563: e9 4d ff ff ff jmp 4b5 <printf+0x55>
568: 90 nop
569: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
} else if(c == 's'){
s = (char*)*ap;
570: 8b 45 d0 mov -0x30(%ebp),%eax
573: 8b 18 mov (%eax),%ebx
ap++;
575: 83 c0 04 add $0x4,%eax
578: 89 45 d0 mov %eax,-0x30(%ebp)
if(s == 0)
s = "(null)";
57b: b8 bf 07 00 00 mov $0x7bf,%eax
580: 85 db test %ebx,%ebx
582: 0f 44 d8 cmove %eax,%ebx
while(*s != 0){
585: 0f b6 03 movzbl (%ebx),%eax
588: 84 c0 test %al,%al
58a: 74 23 je 5af <printf+0x14f>
58c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
590: 88 45 e3 mov %al,-0x1d(%ebp)
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
593: 8d 45 e3 lea -0x1d(%ebp),%eax
596: 83 ec 04 sub $0x4,%esp
599: 6a 01 push $0x1
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
59b: 83 c3 01 add $0x1,%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
59e: 50 push %eax
59f: 57 push %edi
5a0: e8 7d fd ff ff call 322 <write>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
5a5: 0f b6 03 movzbl (%ebx),%eax
5a8: 83 c4 10 add $0x10,%esp
5ab: 84 c0 test %al,%al
5ad: 75 e1 jne 590 <printf+0x130>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
5af: 31 d2 xor %edx,%edx
5b1: e9 ff fe ff ff jmp 4b5 <printf+0x55>
5b6: 8d 76 00 lea 0x0(%esi),%esi
5b9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
5c0: 83 ec 04 sub $0x4,%esp
5c3: 88 5d e5 mov %bl,-0x1b(%ebp)
5c6: 8d 45 e5 lea -0x1b(%ebp),%eax
5c9: 6a 01 push $0x1
5cb: e9 4c ff ff ff jmp 51c <printf+0xbc>
} else {
putc(fd, c);
}
} else if(state == '%'){
if(c == 'd'){
printint(fd, *ap, 10, 1);
5d0: 83 ec 0c sub $0xc,%esp
5d3: b9 0a 00 00 00 mov $0xa,%ecx
5d8: 6a 01 push $0x1
5da: e9 6b ff ff ff jmp 54a <printf+0xea>
5df: 8b 5d d0 mov -0x30(%ebp),%ebx
#include "user.h"
static void
putc(int fd, char c)
{
write(fd, &c, 1);
5e2: 83 ec 04 sub $0x4,%esp
5e5: 8b 03 mov (%ebx),%eax
5e7: 6a 01 push $0x1
5e9: 88 45 e4 mov %al,-0x1c(%ebp)
5ec: 8d 45 e4 lea -0x1c(%ebp),%eax
5ef: 50 push %eax
5f0: 57 push %edi
5f1: e8 2c fd ff ff call 322 <write>
5f6: e9 5b ff ff ff jmp 556 <printf+0xf6>
5fb: 66 90 xchg %ax,%ax
5fd: 66 90 xchg %ax,%ax
5ff: 90 nop
00000600 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
600: 55 push %ebp
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
601: a1 7c 0a 00 00 mov 0xa7c,%eax
static Header base;
static Header *freep;
void
free(void *ap)
{
606: 89 e5 mov %esp,%ebp
608: 57 push %edi
609: 56 push %esi
60a: 53 push %ebx
60b: 8b 5d 08 mov 0x8(%ebp),%ebx
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
60e: 8b 10 mov (%eax),%edx
void
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
610: 8d 4b f8 lea -0x8(%ebx),%ecx
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
613: 39 c8 cmp %ecx,%eax
615: 73 19 jae 630 <free+0x30>
617: 89 f6 mov %esi,%esi
619: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
620: 39 d1 cmp %edx,%ecx
622: 72 1c jb 640 <free+0x40>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
624: 39 d0 cmp %edx,%eax
626: 73 18 jae 640 <free+0x40>
static Header base;
static Header *freep;
void
free(void *ap)
{
628: 89 d0 mov %edx,%eax
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
62a: 39 c8 cmp %ecx,%eax
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
62c: 8b 10 mov (%eax),%edx
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
62e: 72 f0 jb 620 <free+0x20>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
630: 39 d0 cmp %edx,%eax
632: 72 f4 jb 628 <free+0x28>
634: 39 d1 cmp %edx,%ecx
636: 73 f0 jae 628 <free+0x28>
638: 90 nop
639: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
break;
if(bp + bp->s.size == p->s.ptr){
640: 8b 73 fc mov -0x4(%ebx),%esi
643: 8d 3c f1 lea (%ecx,%esi,8),%edi
646: 39 d7 cmp %edx,%edi
648: 74 19 je 663 <free+0x63>
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
64a: 89 53 f8 mov %edx,-0x8(%ebx)
if(p + p->s.size == bp){
64d: 8b 50 04 mov 0x4(%eax),%edx
650: 8d 34 d0 lea (%eax,%edx,8),%esi
653: 39 f1 cmp %esi,%ecx
655: 74 23 je 67a <free+0x7a>
p->s.size += bp->s.size;
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
657: 89 08 mov %ecx,(%eax)
freep = p;
659: a3 7c 0a 00 00 mov %eax,0xa7c
}
65e: 5b pop %ebx
65f: 5e pop %esi
660: 5f pop %edi
661: 5d pop %ebp
662: c3 ret
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
663: 03 72 04 add 0x4(%edx),%esi
666: 89 73 fc mov %esi,-0x4(%ebx)
bp->s.ptr = p->s.ptr->s.ptr;
669: 8b 10 mov (%eax),%edx
66b: 8b 12 mov (%edx),%edx
66d: 89 53 f8 mov %edx,-0x8(%ebx)
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
670: 8b 50 04 mov 0x4(%eax),%edx
673: 8d 34 d0 lea (%eax,%edx,8),%esi
676: 39 f1 cmp %esi,%ecx
678: 75 dd jne 657 <free+0x57>
p->s.size += bp->s.size;
67a: 03 53 fc add -0x4(%ebx),%edx
p->s.ptr = bp->s.ptr;
} else
p->s.ptr = bp;
freep = p;
67d: a3 7c 0a 00 00 mov %eax,0xa7c
bp->s.size += p->s.ptr->s.size;
bp->s.ptr = p->s.ptr->s.ptr;
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
682: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
685: 8b 53 f8 mov -0x8(%ebx),%edx
688: 89 10 mov %edx,(%eax)
} else
p->s.ptr = bp;
freep = p;
}
68a: 5b pop %ebx
68b: 5e pop %esi
68c: 5f pop %edi
68d: 5d pop %ebp
68e: c3 ret
68f: 90 nop
00000690 <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
690: 55 push %ebp
691: 89 e5 mov %esp,%ebp
693: 57 push %edi
694: 56 push %esi
695: 53 push %ebx
696: 83 ec 0c sub $0xc,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
699: 8b 45 08 mov 0x8(%ebp),%eax
if((prevp = freep) == 0){
69c: 8b 15 7c 0a 00 00 mov 0xa7c,%edx
malloc(uint nbytes)
{
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
6a2: 8d 78 07 lea 0x7(%eax),%edi
6a5: c1 ef 03 shr $0x3,%edi
6a8: 83 c7 01 add $0x1,%edi
if((prevp = freep) == 0){
6ab: 85 d2 test %edx,%edx
6ad: 0f 84 a3 00 00 00 je 756 <malloc+0xc6>
6b3: 8b 02 mov (%edx),%eax
6b5: 8b 48 04 mov 0x4(%eax),%ecx
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
6b8: 39 cf cmp %ecx,%edi
6ba: 76 74 jbe 730 <malloc+0xa0>
6bc: 81 ff 00 10 00 00 cmp $0x1000,%edi
6c2: be 00 10 00 00 mov $0x1000,%esi
6c7: 8d 1c fd 00 00 00 00 lea 0x0(,%edi,8),%ebx
6ce: 0f 43 f7 cmovae %edi,%esi
6d1: ba 00 80 00 00 mov $0x8000,%edx
6d6: 81 ff ff 0f 00 00 cmp $0xfff,%edi
6dc: 0f 46 da cmovbe %edx,%ebx
6df: eb 10 jmp 6f1 <malloc+0x61>
6e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
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){
6e8: 8b 02 mov (%edx),%eax
if(p->s.size >= nunits){
6ea: 8b 48 04 mov 0x4(%eax),%ecx
6ed: 39 cf cmp %ecx,%edi
6ef: 76 3f jbe 730 <malloc+0xa0>
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
6f1: 39 05 7c 0a 00 00 cmp %eax,0xa7c
6f7: 89 c2 mov %eax,%edx
6f9: 75 ed jne 6e8 <malloc+0x58>
char *p;
Header *hp;
if(nu < 4096)
nu = 4096;
p = sbrk(nu * sizeof(Header));
6fb: 83 ec 0c sub $0xc,%esp
6fe: 53 push %ebx
6ff: e8 86 fc ff ff call 38a <sbrk>
if(p == (char*)-1)
704: 83 c4 10 add $0x10,%esp
707: 83 f8 ff cmp $0xffffffff,%eax
70a: 74 1c je 728 <malloc+0x98>
return 0;
hp = (Header*)p;
hp->s.size = nu;
70c: 89 70 04 mov %esi,0x4(%eax)
free((void*)(hp + 1));
70f: 83 ec 0c sub $0xc,%esp
712: 83 c0 08 add $0x8,%eax
715: 50 push %eax
716: e8 e5 fe ff ff call 600 <free>
return freep;
71b: 8b 15 7c 0a 00 00 mov 0xa7c,%edx
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
721: 83 c4 10 add $0x10,%esp
724: 85 d2 test %edx,%edx
726: 75 c0 jne 6e8 <malloc+0x58>
return 0;
728: 31 c0 xor %eax,%eax
72a: eb 1c jmp 748 <malloc+0xb8>
72c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
730: 39 cf cmp %ecx,%edi
732: 74 1c je 750 <malloc+0xc0>
prevp->s.ptr = p->s.ptr;
else {
p->s.size -= nunits;
734: 29 f9 sub %edi,%ecx
736: 89 48 04 mov %ecx,0x4(%eax)
p += p->s.size;
739: 8d 04 c8 lea (%eax,%ecx,8),%eax
p->s.size = nunits;
73c: 89 78 04 mov %edi,0x4(%eax)
}
freep = prevp;
73f: 89 15 7c 0a 00 00 mov %edx,0xa7c
return (void*)(p + 1);
745: 83 c0 08 add $0x8,%eax
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
}
748: 8d 65 f4 lea -0xc(%ebp),%esp
74b: 5b pop %ebx
74c: 5e pop %esi
74d: 5f pop %edi
74e: 5d pop %ebp
74f: c3 ret
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
if(p->s.size >= nunits){
if(p->s.size == nunits)
prevp->s.ptr = p->s.ptr;
750: 8b 08 mov (%eax),%ecx
752: 89 0a mov %ecx,(%edx)
754: eb e9 jmp 73f <malloc+0xaf>
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
756: c7 05 7c 0a 00 00 80 movl $0xa80,0xa7c
75d: 0a 00 00
760: c7 05 80 0a 00 00 80 movl $0xa80,0xa80
767: 0a 00 00
base.s.size = 0;
76a: b8 80 0a 00 00 mov $0xa80,%eax
76f: c7 05 84 0a 00 00 00 movl $0x0,0xa84
776: 00 00 00
779: e9 3e ff ff ff jmp 6bc <malloc+0x2c>
| 29.773854
| 96
| 0.411653
|
87ec01cfcd0875563fdd55a8d3c3f313d6c24fa2
| 6,655
|
asm
|
Assembly
|
data/maps/map_header_banks.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | 1
|
2022-02-15T00:19:44.000Z
|
2022-02-15T00:19:44.000Z
|
data/maps/map_header_banks.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | null | null | null |
data/maps/map_header_banks.asm
|
opiter09/ASM-Machina
|
75d8e457b3e82cc7a99b8e70ada643ab02863ada
|
[
"CC0-1.0"
] | null | null | null |
; see also MapHeaderPointers
MapHeaderBanks::
table_width 1, MapHeaderBanks
db BANK(PalletTown_h)
db BANK(ViridianCity_h)
db BANK(PewterCity_h)
db BANK(CeruleanCity_h)
db BANK(LavenderTown_h)
db BANK(VermilionCity_h)
db BANK(CeladonCity_h)
db BANK(FuchsiaCity_h)
db BANK(CinnabarIsland_h)
db BANK(IndigoPlateau_h)
db BANK(SaffronCity_h)
db $01 ; UNUSED_MAP_0B
db BANK(Route1_h)
db BANK(Route2_h)
db BANK(Route3_h)
db BANK(Route4_h)
db BANK(Route5_h)
db BANK(Route6_h)
db BANK(Route7_h)
db BANK(Route8_h)
db BANK(Route9_h)
db BANK(Route10_h)
db BANK(Route11_h)
db BANK(Route12_h)
db BANK(Route13_h)
db BANK(Route14_h)
db BANK(Route15_h)
db BANK(Route16_h)
db BANK(Route17_h)
db BANK(Route18_h)
db BANK(Route19_h)
db BANK(Route20_h)
db BANK(Route21_h)
db BANK(Route22_h)
db BANK(Route23_h)
db BANK(Route24_h)
db BANK(Route25_h)
db BANK(RedsHouse1F_h)
db BANK(RedsHouse2F_h)
db BANK(BluesHouse_h)
db BANK(OaksLab_h)
db BANK(ViridianPokecenter_h)
db BANK(ViridianMart_h)
db BANK(ViridianSchoolHouse_h)
db BANK(ViridianNicknameHouse_h)
db BANK(ViridianGym_h)
db BANK(DiglettsCaveRoute2_h)
db BANK(ViridianForestNorthGate_h)
db BANK(Route2TradeHouse_h)
db BANK(Route2Gate_h)
db BANK(ViridianForestSouthGate_h)
db BANK(ViridianForest_h)
db BANK(Museum1F_h)
db BANK(Museum2F_h)
db BANK(PewterGym_h)
db BANK(PewterNidoranHouse_h)
db BANK(PewterMart_h)
db BANK(PewterSpeechHouse_h)
db BANK(PewterPokecenter_h)
db BANK(MtMoon1F_h)
db BANK(MtMoonB1F_h)
db BANK(MtMoonB2F_h)
db BANK(CeruleanTrashedHouse_h)
db BANK(CeruleanTradeHouse_h)
db BANK(CeruleanPokecenter_h)
db BANK(CeruleanGym_h)
db BANK(BikeShop_h)
db BANK(CeruleanMart_h)
db BANK(MtMoonPokecenter_h)
db BANK(CeruleanTrashedHouse_h)
db BANK(Route5Gate_h)
db BANK(UndergroundPathRoute5_h)
db BANK(Daycare_h)
db BANK(Route6Gate_h)
db BANK(UndergroundPathRoute6_h)
db BANK(UndergroundPathRoute6_h) ; UNDERGROUND_PATH_ROUTE_6_COPY
db BANK(Route7Gate_h)
db BANK(UndergroundPathRoute7_h)
db BANK(UndergroundPathRoute7Copy_h)
db BANK(Route8Gate_h)
db BANK(UndergroundPathRoute8_h)
db BANK(RockTunnelPokecenter_h)
db BANK(RockTunnel1F_h)
db BANK(PowerPlant_h)
db BANK(Route11Gate1F_h)
db BANK(DiglettsCaveRoute11_h)
db BANK(Route11Gate2F_h)
db BANK(Route12Gate1F_h)
db BANK(BillsHouse_h)
db BANK(VermilionPokecenter_h)
db BANK(PokemonFanClub_h)
db BANK(VermilionMart_h)
db BANK(VermilionGym_h)
db BANK(VermilionPidgeyHouse_h)
db BANK(VermilionDock_h)
db BANK(SSAnne1F_h)
db BANK(SSAnne2F_h)
db BANK(SSAnne3F_h)
db BANK(SSAnneB1F_h)
db BANK(SSAnneBow_h)
db BANK(SSAnneKitchen_h)
db BANK(SSAnneCaptainsRoom_h)
db BANK(SSAnne1FRooms_h)
db BANK(SSAnne2FRooms_h)
db BANK(SSAnneB1FRooms_h)
db $1D ; UNUSED_MAP_69
db $1D ; UNUSED_MAP_6A
db $1D ; UNUSED_MAP_6B
db BANK(VictoryRoad1F_h)
db $1D ; UNUSED_MAP_6D
db $1D ; UNUSED_MAP_6E
db $1D ; UNUSED_MAP_6F
db $1D ; UNUSED_MAP_70
db BANK(LancesRoom_h)
db $1D ; UNUSED_MAP_72
db $1D ; UNUSED_MAP_73
db $1D ; UNUSED_MAP_74
db $1D ; UNUSED_MAP_75
db BANK(HallOfFame_h)
db BANK(UndergroundPathNorthSouth_h)
db BANK(ChampionsRoom_h)
db BANK(UndergroundPathWestEast_h)
db BANK(CeladonMart1F_h)
db BANK(CeladonMart2F_h)
db BANK(CeladonMart3F_h)
db BANK(CeladonMart4F_h)
db BANK(CeladonMartRoof_h)
db BANK(CeladonMartElevator_h)
db BANK(CeladonMansion1F_h)
db BANK(CeladonMansion2F_h)
db BANK(CeladonMansion3F_h)
db BANK(CeladonMansionRoof_h)
db BANK(CeladonMansionRoofHouse_h)
db BANK(CeladonPokecenter_h)
db BANK(CeladonGym_h)
db BANK(GameCorner_h)
db BANK(CeladonMart5F_h)
db BANK(GameCornerPrizeRoom_h)
db BANK(CeladonDiner_h)
db BANK(CeladonChiefHouse_h)
db BANK(CeladonHotel_h)
db BANK(LavenderPokecenter_h)
db BANK(PokemonTower1F_h)
db BANK(PokemonTower2F_h)
db BANK(PokemonTower3F_h)
db BANK(PokemonTower4F_h)
db BANK(PokemonTower5F_h)
db BANK(PokemonTower6F_h)
db BANK(PokemonTower7F_h)
db BANK(MrFujisHouse_h)
db BANK(LavenderMart_h)
db BANK(LavenderCuboneHouse_h)
db BANK(FuchsiaMart_h)
db BANK(FuchsiaBillsGrandpasHouse_h)
db BANK(FuchsiaPokecenter_h)
db BANK(WardensHouse_h)
db BANK(SafariZoneGate_h)
db BANK(FuchsiaGym_h)
db BANK(FuchsiaMeetingRoom_h)
db BANK(SeafoamIslandsB1F_h)
db BANK(SeafoamIslandsB2F_h)
db BANK(SeafoamIslandsB3F_h)
db BANK(SeafoamIslandsB4F_h)
db BANK(VermilionOldRodHouse_h)
db BANK(FuchsiaGoodRodHouse_h)
db BANK(PokemonMansion1F_h)
db BANK(CinnabarGym_h)
db BANK(CinnabarLab_h)
db BANK(CinnabarLabTradeRoom_h)
db BANK(CinnabarLabMetronomeRoom_h)
db BANK(CinnabarLabFossilRoom_h)
db BANK(CinnabarPokecenter_h)
db BANK(CinnabarMart_h)
db BANK(CinnabarMart_h)
db BANK(IndigoPlateauLobby_h)
db BANK(CopycatsHouse1F_h)
db BANK(CopycatsHouse2F_h)
db BANK(FightingDojo_h)
db BANK(SaffronGym_h)
db BANK(SaffronPidgeyHouse_h)
db BANK(SaffronMart_h)
db BANK(SilphCo1F_h)
db BANK(SaffronPokecenter_h)
db BANK(MrPsychicsHouse_h)
db BANK(Route15Gate1F_h)
db BANK(Route15Gate2F_h)
db BANK(Route16Gate1F_h)
db BANK(Route16Gate2F_h)
db BANK(Route16FlyHouse_h)
db BANK(Route12SuperRodHouse_h)
db BANK(Route18Gate1F_h)
db BANK(Route18Gate2F_h)
db BANK(SeafoamIslands1F_h)
db BANK(Route22Gate_h)
db BANK(VictoryRoad2F_h)
db BANK(Route12Gate2F_h)
db BANK(VermilionTradeHouse_h)
db BANK(DiglettsCave_h)
db BANK(VictoryRoad3F_h)
db BANK(RocketHideoutB1F_h)
db BANK(RocketHideoutB2F_h)
db BANK(RocketHideoutB3F_h)
db BANK(RocketHideoutB4F_h)
db BANK(RocketHideoutElevator_h)
db $01 ; UNUSED_MAP_CC
db $01 ; UNUSED_MAP_CD
db $01 ; UNUSED_MAP_CE
db BANK(SilphCo2F_h)
db BANK(SilphCo3F_h)
db BANK(SilphCo4F_h)
db BANK(SilphCo5F_h)
db BANK(SilphCo6F_h)
db BANK(SilphCo7F_h)
db BANK(SilphCo8F_h)
db BANK(PokemonMansion2F_h)
db BANK(PokemonMansion3F_h)
db BANK(PokemonMansionB1F_h)
db BANK(SafariZoneEast_h)
db BANK(SafariZoneNorth_h)
db BANK(SafariZoneWest_h)
db BANK(SafariZoneCenter_h)
db BANK(SafariZoneCenterRestHouse_h)
db BANK(SafariZoneSecretHouse_h)
db BANK(SafariZoneWestRestHouse_h)
db BANK(SafariZoneEastRestHouse_h)
db BANK(SafariZoneNorthRestHouse_h)
db BANK(CeruleanCave2F_h)
db BANK(CeruleanCaveB1F_h)
db BANK(CeruleanCave1F_h)
db BANK(NameRatersHouse_h)
db BANK(CeruleanBadgeHouse_h)
db $01 ; UNUSED_MAP_E7
db BANK(RockTunnelB1F_h)
db BANK(SilphCo9F_h)
db BANK(SilphCo10F_h)
db BANK(SilphCo11F_h)
db BANK(SilphCoElevator_h)
db $11 ; UNUSED_MAP_ED
db $11 ; UNUSED_MAP_EE
db BANK(TradeCenter_h)
db BANK(Colosseum_h)
db $11 ; UNUSED_MAP_F1
db $11 ; UNUSED_MAP_F2
db $11 ; UNUSED_MAP_F3
db $11 ; UNUSED_MAP_F4
db BANK(LoreleisRoom_h)
db BANK(BrunosRoom_h)
db BANK(AgathasRoom_h)
assert_table_length NUM_MAPS
| 26.304348
| 65
| 0.804207
|
f83bd9fba60727b1ce25c7a3bc3dfdd7be044b18
| 247
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_next_free.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_next_free.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/alloc/obstack/c/sdcc_iy/obstack_next_free.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; void *obstack_next_free(struct obstack *ob)
SECTION code_clib
SECTION code_alloc_obstack
PUBLIC _obstack_next_free
EXTERN asm_obstack_next_free
_obstack_next_free:
pop af
pop hl
push hl
push af
jp asm_obstack_next_free
| 12.35
| 45
| 0.773279
|
610dc9536b70379d9e99de3db30f6f15f9d92850
| 556
|
asm
|
Assembly
|
oeis/198/A198402.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/198/A198402.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/198/A198402.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A198402: 5^n*n^5.
; 0,5,800,30375,640000,9765625,121500000,1313046875,12800000000,115330078125,976562500000,7863818359375,60750000000000,453238525390625,3282617187500000,23174285888671875,160000000000000000,1083264923095703125,7208129882812500000,47227840423583984375,305175781250000000000,1947451114654541015625,12287216186523437500000,76727187633514404296875,474609375000000000000000,2910383045673370361328125,17704629898071289062500000,106907688081264495849609375,641136169433593750000000000
mov $2,5
pow $2,$0
mov $3,$0
pow $3,5
mul $3,$2
mov $0,$3
| 55.6
| 476
| 0.875899
|
4bd0385efb5b7c9ae46b2b5c169da71e08bd9ad7
| 910
|
asm
|
Assembly
|
wallpaper-one/emulator/Assembler/CharDemo.asm
|
paulscottrobson/assorted-archives
|
87ce21ef1556bed441fffbb5c4c3c11c06324385
|
[
"MIT"
] | null | null | null |
wallpaper-one/emulator/Assembler/CharDemo.asm
|
paulscottrobson/assorted-archives
|
87ce21ef1556bed441fffbb5c4c3c11c06324385
|
[
"MIT"
] | null | null | null |
wallpaper-one/emulator/Assembler/CharDemo.asm
|
paulscottrobson/assorted-archives
|
87ce21ef1556bed441fffbb5c4c3c11c06324385
|
[
"MIT"
] | 1
|
2020-01-02T13:54:19.000Z
|
2020-01-02T13:54:19.000Z
|
; ******************************************************************************************************************
;
; Hardware test.
;
; Displays a checkerboard pattern, alternating pixels, then echos toggles to LEDs.
; if A is pressed, shows ASCII keyboard input on LEDs.
;
; ******************************************************************************************************************
;
; Make keyboard a -ve going strobe keyboard, and check ASCII returned.
;
cpu sc/mp
org 0x0000
nop
ldi 0x0C
xpah p1
ldi 0x41
xpal p1
OutBit macro advance
xpah p3
rrl
xpah p3
xpal p3
st @advance(p1)
rrl
xpal p3
endm
ldi 160
Loop2 xpal p2
ldi 0x7B
xpah p3
ldi 0xCF
xpal p3
ldi 0x10
Loop xae
OutBit 1
OutBit 1
OutBit 30
xae
sr
jnz Loop
ld @-96(p1)
ld @-64+4(p1)
xpal p2
scl
cai 1
jnz Loop2
wait: jmp wait
| 15.423729
| 116
| 0.46044
|
5cfbb2d4be27cc3fb48e127938f8a4134599160e
| 430
|
asm
|
Assembly
|
programs/oeis/008/A008642.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/008/A008642.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/008/A008642.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A008642: Quarter-squares repeated.
; 1,1,2,2,4,4,6,6,9,9,12,12,16,16,20,20,25,25,30,30,36,36,42,42,49,49,56,56,64,64,72,72,81,81,90,90,100,100,110,110,121,121,132,132,144,144,156,156,169,169,182,182,196,196,210,210,225,225,240,240,256,256,272,272,289,289,306,306,324,324,342,342,361,361,380,380,400,400,420,420,441,441,462,462,484,484,506,506,529,529,552,552,576,576,600,600,625,625,650,650
add $0,4
div $0,2
pow $0,2
div $0,4
| 53.75
| 355
| 0.704651
|
78a42d954e7f618e3378be0cf6e79dc62ed9f0e5
| 2,347
|
asm
|
Assembly
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_5_717.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_5_717.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_5_717.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %r9
push %rbp
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x135f8, %rdx
nop
nop
nop
nop
and %rbp, %rbp
movw $0x6162, (%rdx)
nop
nop
add $441, %rsi
lea addresses_D_ht+0xbaf8, %r9
nop
and %r13, %r13
movb $0x61, (%r9)
nop
nop
nop
nop
inc %rbp
lea addresses_WT_ht+0x1b6b2, %rsi
nop
nop
nop
nop
and $53332, %rdi
mov $0x6162636465666768, %r13
movq %r13, (%rsi)
nop
nop
nop
add $37567, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rbp
pop %r9
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r15
push %r9
push %rbp
push %rbx
// Store
lea addresses_RW+0x1baf8, %rbp
nop
nop
nop
nop
sub $2052, %r12
mov $0x5152535455565758, %r14
movq %r14, %xmm4
movntdq %xmm4, (%rbp)
nop
nop
nop
nop
cmp %r9, %r9
// Store
lea addresses_US+0x1ee7a, %r9
and $37356, %rbp
movb $0x51, (%r9)
add $50290, %r12
// Store
mov $0x66a7040000000998, %rbx
nop
and $23726, %r10
mov $0x5152535455565758, %r14
movq %r14, %xmm5
vmovups %ymm5, (%rbx)
xor %r15, %r15
// Faulty Load
lea addresses_A+0x19ef8, %rbx
nop
nop
nop
nop
nop
inc %r10
mov (%rbx), %r15w
lea oracles, %rbp
and $0xff, %r15
shlq $12, %r15
mov (%rbp,%r15,1), %r15
pop %rbx
pop %rbp
pop %r9
pop %r15
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': True, 'size': 16}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_RW', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_US', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_NC', 'AVXalign': False, 'size': 32}}
[Faulty Load]
{'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': True, 'size': 2}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': True, 'same': False, 'congruent': 8, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}}
{'00': 5}
00 00 00 00 00
*/
| 18.193798
| 124
| 0.642948
|
89d8010fac18b831b554666212e631194d827506
| 12,532
|
asm
|
Assembly
|
P6/data_P6_2/ALUTest0.asm
|
alxzzhou/BUAA_CO_2020
|
b54bf367081a5a11701ebc3fc78a23494aecca9e
|
[
"Apache-2.0"
] | 1
|
2022-01-23T09:24:47.000Z
|
2022-01-23T09:24:47.000Z
|
P6/data_P6_2/ALUTest0.asm
|
alxzzhou/BUAA_CO_2020
|
b54bf367081a5a11701ebc3fc78a23494aecca9e
|
[
"Apache-2.0"
] | null | null | null |
P6/data_P6_2/ALUTest0.asm
|
alxzzhou/BUAA_CO_2020
|
b54bf367081a5a11701ebc3fc78a23494aecca9e
|
[
"Apache-2.0"
] | null | null | null |
xori $6,$3,33678
sll $3,$1,15
srl $3,$4,7
lb $6,2($0)
addu $4,$5,$3
addiu $5,$1,-4022
sh $1,8($0)
sb $5,3($0)
lw $5,12($0)
nor $3,$0,$3
sltiu $1,$1,-20774
nor $3,$5,$3
nor $3,$4,$3
xor $3,$4,$3
sltu $1,$1,$3
lb $1,8($0)
sltiu $1,$3,441
lhu $4,14($0)
lh $1,2($0)
xori $4,$3,50118
nor $6,$1,$3
addiu $0,$5,-13355
subu $1,$1,$3
lb $3,14($0)
lb $1,2($0)
lb $0,1($0)
lw $4,8($0)
srl $5,$4,18
lhu $1,14($0)
slt $3,$3,$3
subu $6,$4,$3
xor $3,$6,$3
srl $3,$1,4
subu $0,$0,$3
ori $4,$4,24300
addiu $3,$3,-26827
srlv $6,$4,$3
sw $1,4($0)
srl $5,$3,21
sltiu $3,$2,-16042
sw $5,16($0)
lhu $3,0($0)
andi $0,$6,2753
srav $3,$3,$3
and $3,$1,$3
srlv $4,$4,$3
lbu $0,0($0)
srav $1,$1,$3
subu $4,$5,$3
lh $4,12($0)
subu $1,$1,$3
slt $3,$3,$3
addiu $0,$3,-5869
lhu $3,16($0)
sb $5,8($0)
xori $0,$1,51568
lhu $5,2($0)
xor $6,$3,$3
srav $3,$1,$3
sltu $1,$2,$3
andi $6,$1,55606
nor $3,$3,$3
sll $3,$3,21
ori $4,$4,532
nor $3,$5,$3
sltu $4,$6,$3
ori $3,$4,60031
srav $3,$4,$3
sll $3,$2,14
lh $1,14($0)
subu $4,$0,$3
addiu $5,$3,14344
srl $3,$0,27
sb $3,4($0)
lbu $3,10($0)
sll $4,$3,25
subu $3,$3,$3
lbu $0,16($0)
sltu $1,$1,$3
lhu $1,12($0)
srl $0,$3,7
sltiu $4,$5,11701
sra $3,$1,19
sll $3,$1,13
sw $1,4($0)
lw $3,4($0)
subu $3,$0,$3
slti $5,$1,32283
lhu $4,2($0)
and $6,$4,$3
slti $4,$5,-18648
subu $5,$4,$3
sh $5,2($0)
ori $4,$3,20222
lw $5,12($0)
ori $4,$4,1585
addu $4,$4,$3
xori $1,$3,14048
lhu $5,14($0)
lb $0,14($0)
sw $3,0($0)
srlv $4,$1,$3
srav $3,$2,$3
nor $3,$5,$3
lh $3,14($0)
sb $4,14($0)
addu $1,$4,$3
addiu $5,$3,-31266
or $0,$0,$3
lb $4,5($0)
sltu $4,$5,$3
subu $3,$5,$3
sh $6,10($0)
addiu $0,$4,21574
addiu $5,$4,-4793
sltiu $5,$0,27204
sb $0,9($0)
subu $3,$3,$3
sh $3,16($0)
slti $3,$4,30025
sll $4,$1,25
sb $1,14($0)
and $6,$5,$3
slti $3,$3,-27786
sltu $3,$2,$3
addiu $3,$1,-16492
lb $5,14($0)
sltiu $4,$1,5523
sra $4,$4,9
addiu $1,$1,23249
addu $1,$4,$3
sltiu $5,$4,-19015
addu $5,$2,$3
sllv $6,$5,$3
nor $4,$4,$3
sltiu $3,$3,-28060
addu $1,$3,$3
sllv $5,$3,$3
slti $0,$4,-32674
slt $3,$0,$3
ori $0,$6,4546
lhu $3,4($0)
srl $3,$4,31
xori $1,$1,14340
lhu $3,6($0)
slt $1,$6,$3
lhu $1,14($0)
sb $6,0($0)
andi $3,$3,54298
srl $4,$1,28
sllv $4,$4,$3
xori $3,$3,36557
sll $3,$1,15
sllv $4,$4,$3
srl $3,$5,25
sra $3,$5,0
sltu $3,$3,$3
sw $3,0($0)
lbu $3,13($0)
addiu $2,$2,-7371
and $0,$3,$3
srlv $4,$5,$3
addiu $5,$6,25798
or $6,$5,$3
srl $1,$4,7
sw $3,16($0)
slt $1,$1,$3
sb $3,16($0)
lb $1,13($0)
slt $4,$3,$3
sltiu $1,$1,3261
nor $5,$3,$3
nor $4,$3,$3
subu $0,$0,$3
or $6,$0,$3
lh $3,16($0)
nor $4,$4,$3
lh $3,6($0)
sra $4,$5,13
sh $3,12($0)
sw $3,8($0)
sll $3,$3,23
addu $4,$5,$3
sltu $4,$4,$3
xori $5,$3,11080
srlv $3,$3,$3
addiu $0,$5,-20264
xor $3,$1,$3
lbu $4,7($0)
srav $1,$1,$3
lhu $1,16($0)
sltu $4,$4,$3
subu $0,$6,$3
addu $6,$3,$3
sh $3,8($0)
lh $1,4($0)
addiu $0,$5,-6743
sw $4,0($0)
sh $4,8($0)
sltu $3,$4,$3
subu $0,$3,$3
lbu $6,13($0)
lbu $1,1($0)
lh $4,6($0)
xori $3,$1,26006
sltiu $3,$0,12640
andi $4,$0,3956
sb $1,13($0)
subu $5,$2,$3
addiu $1,$2,-21935
addu $3,$4,$3
slti $3,$4,10980
slt $6,$5,$3
subu $3,$0,$3
sb $5,11($0)
addiu $3,$3,-1576
srav $0,$4,$3
slti $1,$3,12497
addu $5,$2,$3
and $1,$3,$3
slt $4,$0,$3
xori $4,$4,18541
addu $6,$3,$3
slt $1,$3,$3
sll $5,$5,11
sra $3,$3,2
lb $3,11($0)
sw $4,4($0)
subu $4,$1,$3
addiu $3,$4,14976
srav $0,$4,$3
xori $3,$0,47497
lhu $4,2($0)
srl $3,$0,16
sw $4,0($0)
lbu $0,7($0)
slti $6,$6,-18982
slti $4,$5,-16842
slti $4,$6,-24220
lhu $3,14($0)
lhu $3,4($0)
andi $3,$3,35658
addu $1,$3,$3
ori $4,$3,48098
srav $3,$4,$3
subu $4,$4,$3
slti $3,$3,-2145
lhu $4,12($0)
sb $4,13($0)
lhu $5,16($0)
sllv $5,$6,$3
and $4,$4,$3
slt $4,$1,$3
sh $1,10($0)
nor $4,$3,$3
addiu $4,$4,-18648
slti $1,$5,-28343
lw $3,12($0)
slt $3,$0,$3
addiu $1,$4,-7413
subu $1,$5,$3
addiu $4,$1,-1331
and $4,$3,$3
sll $3,$1,0
lw $1,16($0)
subu $3,$2,$3
nor $1,$4,$3
addu $4,$3,$3
lbu $4,11($0)
lh $5,8($0)
slti $5,$5,-6542
or $0,$3,$3
addiu $4,$5,13711
lbu $3,5($0)
sh $4,16($0)
slti $4,$1,-15883
sltiu $3,$5,24418
or $4,$4,$3
sra $5,$5,26
lbu $1,0($0)
sh $0,14($0)
addiu $3,$4,16903
addu $4,$5,$3
sh $3,8($0)
sw $1,12($0)
nor $4,$0,$3
nor $1,$4,$3
lw $5,0($0)
addiu $4,$4,29858
addu $4,$3,$3
or $0,$4,$3
subu $4,$1,$3
lb $3,12($0)
srl $1,$4,30
lhu $4,12($0)
sra $5,$1,8
andi $1,$0,52186
ori $3,$6,55552
slt $3,$5,$3
andi $1,$5,55816
addu $1,$4,$3
xori $4,$0,57758
sltiu $6,$3,-5155
sh $4,2($0)
addiu $4,$1,-18648
addu $5,$4,$3
sll $4,$4,5
subu $1,$1,$3
xor $6,$4,$3
slti $6,$3,-26959
sltu $5,$6,$3
subu $5,$3,$3
lhu $3,0($0)
lb $4,5($0)
sllv $4,$4,$3
or $4,$5,$3
or $1,$5,$3
addiu $3,$3,23874
addu $1,$3,$3
lhu $4,14($0)
srlv $1,$3,$3
srlv $3,$1,$3
addiu $3,$4,-30526
lhu $5,6($0)
andi $5,$5,27977
lw $1,12($0)
and $5,$4,$3
ori $6,$3,2655
lbu $4,13($0)
slti $4,$3,22716
ori $0,$5,9122
sll $4,$3,2
addu $5,$5,$3
addiu $3,$3,-25256
subu $0,$4,$3
srlv $1,$2,$3
sltu $5,$4,$3
addiu $1,$5,22115
lbu $6,15($0)
sra $3,$3,21
lb $1,8($0)
srlv $3,$3,$3
nor $4,$6,$3
sb $3,9($0)
lb $5,3($0)
ori $1,$4,43734
sh $6,14($0)
slt $4,$1,$3
sw $3,8($0)
sllv $4,$0,$3
xori $0,$0,49117
slti $3,$1,27436
lb $1,13($0)
xor $4,$4,$3
lb $1,13($0)
sb $3,1($0)
xori $4,$0,64077
subu $3,$3,$3
xori $1,$5,46688
subu $3,$3,$3
lw $3,0($0)
slti $5,$5,-31788
lhu $4,2($0)
slt $5,$5,$3
and $1,$4,$3
lbu $3,9($0)
lbu $4,6($0)
slt $1,$4,$3
subu $5,$0,$3
sb $3,12($0)
srl $1,$3,19
sb $1,4($0)
sltu $4,$3,$3
sw $3,16($0)
srav $4,$3,$3
xor $3,$4,$3
sllv $3,$4,$3
srlv $4,$4,$3
srlv $6,$3,$3
srav $4,$4,$3
sltiu $4,$3,14156
lhu $4,14($0)
slt $4,$4,$3
or $5,$4,$3
addiu $1,$1,14196
slti $6,$6,13794
sllv $1,$3,$3
slti $3,$1,-24060
srl $3,$3,29
andi $4,$4,622
xor $4,$4,$3
lbu $1,7($0)
subu $4,$4,$3
lbu $5,10($0)
srl $3,$6,24
srl $4,$2,0
sh $4,10($0)
slt $1,$5,$3
xor $6,$4,$3
addiu $4,$1,32636
ori $6,$4,21856
addu $3,$3,$3
sllv $3,$3,$3
ori $4,$5,46323
lhu $5,0($0)
lw $4,8($0)
nor $3,$5,$3
lb $1,4($0)
sltu $4,$3,$3
subu $4,$3,$3
ori $1,$1,50015
lw $3,0($0)
xori $0,$3,3755
srl $3,$4,28
slt $4,$3,$3
slt $1,$3,$3
and $0,$0,$3
sra $3,$3,0
nor $4,$4,$3
srav $5,$5,$3
sllv $3,$3,$3
addu $5,$2,$3
subu $3,$1,$3
srav $3,$5,$3
subu $0,$5,$3
addu $4,$1,$3
addu $4,$3,$3
addu $3,$3,$3
addu $3,$4,$3
andi $3,$5,56924
or $3,$3,$3
ori $4,$4,5133
xori $3,$4,38416
andi $6,$5,25755
slti $3,$3,31496
addu $3,$1,$3
sra $4,$6,31
xor $1,$3,$3
xor $4,$0,$3
srlv $3,$5,$3
lh $3,12($0)
ori $1,$5,23848
srav $4,$1,$3
srl $1,$1,21
sra $3,$4,28
lb $4,16($0)
sll $3,$1,27
xor $4,$4,$3
sll $4,$0,3
sllv $0,$3,$3
addiu $0,$2,-27628
subu $3,$3,$3
or $0,$1,$3
sb $0,10($0)
subu $4,$3,$3
nor $4,$1,$3
slti $4,$0,22107
lhu $0,4($0)
and $1,$3,$3
lhu $0,8($0)
sh $5,10($0)
sllv $1,$1,$3
subu $5,$3,$3
nor $4,$5,$3
lbu $1,4($0)
lw $0,12($0)
sltiu $1,$1,11123
sll $3,$3,19
slti $3,$3,5876
sb $4,13($0)
addiu $4,$6,-27247
xor $6,$4,$3
sll $3,$3,20
subu $5,$3,$3
addiu $3,$3,-26825
subu $3,$3,$3
addu $4,$4,$3
sltiu $4,$4,-19832
sllv $4,$3,$3
xori $1,$0,45743
srlv $1,$0,$3
subu $1,$3,$3
sltiu $4,$3,17403
sltiu $3,$3,22737
sllv $4,$3,$3
andi $3,$3,48064
srl $5,$5,6
srav $3,$0,$3
sw $5,12($0)
srav $5,$1,$3
srav $3,$3,$3
andi $6,$3,16659
xor $4,$4,$3
sra $4,$5,30
sra $5,$5,4
srlv $0,$3,$3
addu $4,$3,$3
andi $5,$5,33901
subu $3,$3,$3
srl $5,$3,8
slt $1,$2,$3
lbu $1,7($0)
addu $3,$5,$3
srav $5,$3,$3
nor $1,$6,$3
sb $3,4($0)
xor $5,$5,$3
srav $1,$0,$3
slt $5,$6,$3
sb $6,2($0)
xori $5,$3,32131
slt $4,$1,$3
lw $6,12($0)
nor $4,$3,$3
or $5,$2,$3
and $3,$5,$3
lb $3,15($0)
sll $4,$5,2
slt $5,$4,$3
addiu $5,$5,-11758
sltiu $6,$6,24729
xor $5,$3,$3
sll $1,$3,10
subu $3,$4,$3
sltiu $1,$4,522
srlv $6,$3,$3
and $1,$1,$3
or $3,$3,$3
addiu $1,$3,-12523
addu $4,$5,$3
slt $3,$3,$3
addu $3,$5,$3
srl $3,$6,10
sb $5,3($0)
nor $0,$3,$3
subu $4,$2,$3
andi $4,$4,17725
addu $3,$5,$3
sw $1,12($0)
sra $4,$6,7
subu $3,$0,$3
addu $3,$3,$3
sh $0,10($0)
sra $4,$4,31
sll $1,$0,15
lw $3,0($0)
srav $1,$0,$3
srl $4,$3,7
sh $5,14($0)
addiu $1,$1,21705
sw $6,12($0)
ori $3,$0,44336
sra $1,$3,13
ori $4,$6,55094
lh $3,8($0)
nor $3,$3,$3
lb $4,4($0)
sllv $3,$3,$3
and $0,$6,$3
slt $3,$5,$3
subu $4,$6,$3
addu $0,$1,$3
srl $1,$1,10
nor $4,$4,$3
and $0,$4,$3
and $3,$3,$3
sltu $1,$2,$3
sb $5,14($0)
slti $0,$4,21857
sra $4,$4,25
sltu $0,$3,$3
or $1,$5,$3
lh $3,10($0)
addiu $1,$6,-10115
sll $5,$5,7
nor $3,$6,$3
srl $1,$5,13
sltu $3,$1,$3
lhu $0,8($0)
lb $0,15($0)
sllv $5,$6,$3
sltiu $3,$4,13939
andi $0,$5,54849
lb $6,4($0)
lb $4,15($0)
sltu $4,$1,$3
subu $5,$3,$3
sltu $3,$3,$3
lhu $1,4($0)
subu $1,$3,$3
sltu $1,$3,$3
lw $1,8($0)
sw $3,4($0)
srlv $4,$3,$3
sllv $3,$4,$3
sll $3,$6,29
sltu $4,$3,$3
sllv $3,$3,$3
addu $4,$3,$3
and $3,$4,$3
lh $4,4($0)
slti $1,$6,12267
addiu $1,$4,30656
subu $3,$4,$3
sb $5,1($0)
sltiu $4,$4,-29125
lb $0,2($0)
sllv $1,$3,$3
and $3,$5,$3
sh $4,0($0)
or $5,$3,$3
addu $0,$1,$3
xori $1,$3,20779
addu $1,$1,$3
lb $3,8($0)
sra $5,$4,24
ori $6,$3,60811
slt $1,$6,$3
addiu $3,$3,-28247
lbu $4,16($0)
srav $1,$1,$3
or $4,$4,$3
lw $4,0($0)
srl $4,$4,28
subu $3,$3,$3
lbu $4,15($0)
sll $5,$5,11
and $4,$4,$3
or $1,$2,$3
sb $1,15($0)
sh $6,16($0)
sra $4,$5,19
sltu $3,$3,$3
ori $3,$5,49459
sh $3,14($0)
addu $4,$4,$3
srl $4,$4,24
lhu $3,0($0)
slt $4,$3,$3
ori $3,$3,15084
sltiu $5,$5,-23352
lbu $1,2($0)
sh $3,16($0)
srlv $3,$3,$3
lbu $4,11($0)
sllv $4,$4,$3
sh $3,0($0)
slt $6,$4,$3
sh $3,14($0)
subu $3,$3,$3
srl $3,$4,0
sllv $3,$0,$3
lhu $3,14($0)
xor $5,$5,$3
or $3,$2,$3
xor $4,$4,$3
sll $4,$3,13
subu $5,$1,$3
sh $3,2($0)
and $5,$0,$3
slti $3,$1,18736
lb $1,4($0)
sltu $1,$4,$3
or $4,$6,$3
addiu $1,$5,9621
lh $0,0($0)
srl $3,$6,15
subu $4,$0,$3
sw $3,12($0)
sll $5,$5,1
sltiu $4,$4,-29104
addiu $4,$4,-16291
sra $5,$2,18
sllv $3,$3,$3
srl $3,$3,4
and $5,$5,$3
andi $4,$2,59637
andi $4,$3,65275
slt $4,$1,$3
lbu $5,8($0)
addiu $6,$2,13661
subu $0,$4,$3
srav $3,$4,$3
xori $4,$5,9432
srav $3,$4,$3
sra $3,$3,5
sll $0,$2,22
slti $3,$3,-25491
lbu $4,11($0)
sltiu $6,$1,1086
lh $3,8($0)
lh $3,8($0)
addu $1,$3,$3
sra $3,$3,18
srav $4,$3,$3
lbu $4,15($0)
sll $1,$1,20
addu $3,$3,$3
ori $5,$5,28181
sltiu $3,$3,11988
sb $1,1($0)
sltiu $5,$5,-9488
lw $1,16($0)
xori $5,$5,60679
sb $3,16($0)
and $3,$1,$3
srl $4,$3,5
sltu $5,$5,$3
lh $4,6($0)
sltiu $1,$5,11676
sb $3,15($0)
and $0,$3,$3
subu $3,$6,$3
sw $4,0($0)
slti $3,$4,9958
and $4,$3,$3
andi $3,$3,73
addiu $3,$5,15990
xor $1,$4,$3
sb $5,11($0)
andi $4,$0,63361
srl $1,$1,27
sll $4,$5,9
xori $1,$0,5710
lhu $6,16($0)
addu $3,$3,$3
addiu $4,$3,-12971
sll $3,$3,28
xor $3,$2,$3
sra $3,$3,27
lbu $3,6($0)
addiu $5,$5,-13451
sw $4,0($0)
srlv $6,$6,$3
xori $6,$3,5041
sw $0,4($0)
lhu $4,16($0)
xori $3,$3,45667
lw $5,0($0)
subu $3,$3,$3
ori $5,$5,1025
srl $5,$5,5
ori $3,$5,47286
xor $4,$4,$3
sw $4,4($0)
sb $4,10($0)
xori $5,$4,6594
sw $4,16($0)
and $4,$3,$3
xori $6,$1,30884
addu $0,$0,$3
sll $3,$5,12
sllv $3,$3,$3
addu $6,$4,$3
lh $3,6($0)
sw $4,16($0)
slt $1,$5,$3
sra $6,$4,30
xori $1,$4,11844
sw $1,4($0)
lb $1,9($0)
sll $5,$4,28
sw $4,0($0)
subu $3,$1,$3
subu $4,$3,$3
srlv $3,$2,$3
addiu $0,$6,8478
addiu $5,$4,-17055
sw $3,0($0)
addu $4,$4,$3
subu $4,$5,$3
xor $4,$1,$3
lhu $5,6($0)
sb $1,7($0)
srlv $3,$3,$3
lhu $0,8($0)
ori $0,$5,24312
srl $0,$0,5
slti $4,$3,-22517
sllv $3,$3,$3
subu $1,$3,$3
subu $3,$3,$3
sh $1,4($0)
subu $3,$3,$3
addiu $3,$4,3760
srlv $4,$2,$3
sllv $3,$0,$3
lb $3,13($0)
lhu $3,16($0)
slt $1,$3,$3
sll $1,$6,8
addiu $3,$5,-3360
subu $4,$0,$3
sltu $4,$3,$3
sltiu $3,$0,4177
addu $3,$2,$3
sra $3,$1,19
lhu $4,10($0)
slti $4,$3,31292
srav $3,$4,$3
slt $4,$3,$3
nor $1,$1,$3
xor $3,$0,$3
andi $3,$2,45849
ori $0,$5,35202
addu $5,$5,$3
addu $6,$3,$3
and $0,$0,$3
lb $6,13($0)
nor $6,$6,$3
slt $6,$4,$3
xori $1,$4,40570
and $3,$5,$3
addu $1,$1,$3
lhu $3,6($0)
andi $1,$5,53391
sb $4,5($0)
srl $3,$3,25
srav $3,$4,$3
lw $3,12($0)
andi $4,$4,64033
srav $1,$4,$3
addu $5,$5,$3
slt $1,$1,$3
sll $5,$3,13
lbu $6,6($0)
subu $3,$5,$3
sra $1,$3,30
addiu $4,$3,28594
xori $5,$5,50033
lh $1,6($0)
lh $5,10($0)
andi $3,$4,60853
subu $3,$3,$3
slt $1,$0,$3
addu $3,$3,$3
srlv $3,$3,$3
lh $5,16($0)
lb $3,16($0)
sllv $1,$1,$3
andi $3,$4,46896
srav $5,$0,$3
xori $5,$0,19304
srlv $5,$5,$3
addu $3,$4,$3
addiu $4,$2,12061
sltiu $3,$4,16764
sltiu $5,$3,-991
and $3,$3,$3
sltiu $4,$4,-17493
sllv $4,$1,$3
sltu $3,$3,$3
or $1,$1,$3
andi $3,$1,51826
addiu $5,$0,-18869
sb $0,15($0)
lbu $5,2($0)
sw $1,16($0)
lh $5,8($0)
srlv $3,$3,$3
lb $4,12($0)
xor $3,$3,$3
srl $3,$1,6
xori $1,$5,54473
lw $2,12($0)
lhu $4,10($0)
xori $1,$3,17848
or $4,$3,$3
lbu $5,7($0)
nor $5,$5,$3
addu $1,$2,$3
addu $4,$5,$3
addu $3,$3,$3
ori $0,$4,46893
subu $6,$4,$3
ori $3,$3,2362
sra $3,$4,6
sltu $3,$0,$3
sra $4,$3,27
slt $3,$3,$3
or $6,$5,$3
srlv $3,$1,$3
lb $1,10($0)
srav $3,$1,$3
srav $3,$0,$3
addu $4,$3,$3
sltiu $5,$6,27491
srl $1,$1,2
| 14.096738
| 18
| 0.522981
|
1f9baa34d18670fa6a900c59f594d82035cb83a7
| 38
|
asm
|
Assembly
|
codigo/ej5/COM/ex_com.asm
|
IgnacioPardo/TD2_TP1
|
6da33225a3d92ff4966b82923e90104bbd5b422e
|
[
"MIT"
] | null | null | null |
codigo/ej5/COM/ex_com.asm
|
IgnacioPardo/TD2_TP1
|
6da33225a3d92ff4966b82923e90104bbd5b422e
|
[
"MIT"
] | null | null | null |
codigo/ej5/COM/ex_com.asm
|
IgnacioPardo/TD2_TP1
|
6da33225a3d92ff4966b82923e90104bbd5b422e
|
[
"MIT"
] | null | null | null |
SET R0, 0x99
SET R1, 0xD2
COM R0, R1
| 7.6
| 12
| 0.657895
|
943abc79f617aeebf3aee535b30f3375072c35e1
| 522
|
asm
|
Assembly
|
lib/math/divide.asm
|
msiemens/rust-tinyasm
|
1549d75260b9d523d4ecebd2033b098ef5e5f156
|
[
"MIT",
"Unlicense"
] | 14
|
2015-02-24T01:39:42.000Z
|
2022-03-30T10:55:55.000Z
|
lib/math/divide.asm
|
msiemens/rust-tinyasm
|
1549d75260b9d523d4ecebd2033b098ef5e5f156
|
[
"MIT",
"Unlicense"
] | null | null | null |
lib/math/divide.asm
|
msiemens/rust-tinyasm
|
1549d75260b9d523d4ecebd2033b098ef5e5f156
|
[
"MIT",
"Unlicense"
] | 2
|
2021-01-19T20:52:32.000Z
|
2022-03-30T10:55:56.000Z
|
; SUBROUTINE: Divide two integers
; ---------------------------------
; Input: $arg0: dividend as int, $arg1: divisor as int
; Output: $return's the arg0/arg1 as int division
; Algorithm: TODO
@start(divide, 2)
math_div_loop:
; arg0 < arg1 → break
JLS :math_div_done $arg0 $arg1
ADD $return 1
SUB $arg0 $arg1
JMP :math_div_loop ; Loop iteration
math_div_done:
@end()
| 27.473684
| 62
| 0.465517
|
9515090c9027d2b123089f18a42651b16535d233
| 484
|
asm
|
Assembly
|
oeis/073/A073996.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/073/A073996.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/073/A073996.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A073996: Number of strings of length n over GF(4) with trace 0 and subtrace 1.
; Submitted by Christian Krause
; 0,1,3,12,60,256,1008,4032,16320,65536,261888,1047552,4193280,16777216,67104768,268419072,1073725440,4294967296,17179803648,68719214592,274877644800,1099511627776,4398045462528,17592181850112,70368739983360,281474976710656,1125899890065408,4503599560261632,18014398442373120
mov $1,2
pow $1,$0
pow $0,7
add $0,1
mod $0,4
sub $0,2
add $0,$1
mul $1,$0
mov $0,$1
div $0,4
| 32.266667
| 275
| 0.78719
|
5da2e449424654612976379943d210a45eb86fb4
| 3,724
|
asm
|
Assembly
|
os/drivers/pci.asm
|
sirupsen/flying-cat
|
d6e1640c63cc4c67ba18d4008556589dccbef233
|
[
"BSD-3-Clause"
] | 7
|
2017-08-16T10:39:19.000Z
|
2022-02-06T10:38:17.000Z
|
os/drivers/pci.asm
|
Sirupsen/flying-cat
|
d6e1640c63cc4c67ba18d4008556589dccbef233
|
[
"BSD-3-Clause"
] | 1
|
2018-11-20T04:08:58.000Z
|
2018-11-20T04:08:58.000Z
|
os/drivers/pci.asm
|
jakiki6/flying-cat
|
d6e1640c63cc4c67ba18d4008556589dccbef233
|
[
"BSD-3-Clause"
] | 5
|
2020-04-19T19:42:05.000Z
|
2021-06-16T08:32:22.000Z
|
; =============================================================================
; BareMetal -- a 64-bit OS written in Assembly for x86-64 systems
; Copyright (C) 2008-2010 Return Infinity -- see LICENSE.TXT
;
; PCI Functions. http://wiki.osdev.org/PCI
; =============================================================================
align 16
db 'DEBUG: PCI '
align 16
init_pci:
xor rcx, rcx
;poo123:
; xor rax, rax
; xor rdx, rdx
; mov eax, [address]
; mov dx, PCI_CONFIG_PORT_ADDRESS ;0x0CF8
; out dx, eax
; add eax, 4
; mov [address], eax
; xor rax, rax
; mov dx, PCI_CONFIG_PORT_DATA
; in eax, dx
; call os_dump_rax
; call os_print_newline
; inc rcx
; cmp rcx, 20
; jne poo123
xor rdx, rdx
nextdevice:
cmp rcx, 32
je pci_End
inc rcx
xor rax, rax
mov eax, [address]
mov dx, PCI_CONFIG_PORT_ADDRESS
out dx, eax
add eax, 0x0800 ; to get the next device
mov [address], eax
xor rax, rax
mov dx, PCI_CONFIG_PORT_DATA
in eax, dx
cmp eax, 0xFFFFFFFF ; no device there.. skip it!
je nextdevice
shr eax, 24
; call os_dump_rax
pcicheck00:
cmp eax, 0
jne pcicheck01
mov rsi, pciclass00
call os_print_string
jmp nextdevice
pcicheck01:
cmp eax, 1
jne pcicheck02
mov rsi, pciclass01
call os_print_string
jmp nextdevice
pcicheck02:
cmp eax, 2
jne pcicheck03
mov rsi, pciclass02
call os_print_string
jmp nextdevice
pcicheck03:
cmp eax, 3
jne pcicheck04
mov rsi, pciclass03
call os_print_string
jmp nextdevice
pcicheck04:
cmp eax, 4
jne pcicheck05
mov rsi, pciclass05
call os_print_string
jmp nextdevice
pcicheck05:
cmp eax, 5
jne pcicheck06
mov rsi, pciclass05
call os_print_string
jmp nextdevice
pcicheck06:
cmp eax, 6
jne nextdevice
mov rsi, pciclass06
call os_print_string
jmp nextdevice
jmp nextdevice
pci_End:
ret
address dd 10000000000000000000000000001000b
; /\ /\ /\ /\ /\ /\
; E Res Bus Dev F Reg 0
; Bits
; 31 Enable bit = set to 1
; 30 - 24 Reserved = set to 0
; 23 - 16 Bus number = 256 options
; 15 - 11 Device number = 32 options
; 10 - 8 Function number = will leave at 0 (8 options)
; 7 - 2 Register number = will leave at 0 (64 options) 64 x 4 bytes = 256 bytes worth of accessible registers
; 1 - 0 Set to 0
;
; ---------------------------------------------------------------
; al = busnumber
; bl = devnumber
; cl = func number
; dl = reg number
os_pci_read_reg:
ret
; ---------------------------------------------------------------
; ---------------------------------------------------------------
os_pci_write_reg:
ret
; ---------------------------------------------------------------
; ---------------------------------------------------------------
; eax = device and vendor ID (ie: 0x70008086)
;return = bus and device num
os_pci_find_device:
ret
; ---------------------------------------------------------------
;Configuration Mechanism One has two IO port rages associated with it.
;The address port (0xcf8-0xcfb) and the data port (0xcfc-0xcff).
;A configuration cycle consists of writing to the address port to specify which device and register you want to access and then reading or writing the data to the data port.
;
PCI_CONFIG_PORT_ADDRESS EQU 0x0CF8
PCI_CONFIG_PORT_DATA EQU 0x0CFC
pciclass00 db '[Unclassified] ', 0
pciclass01 db '[Mass Storage] ', 0
pciclass02 db '[Network ] ', 0
pciclass03 db '[Display ] ', 0
pciclass04 db '[Multimedia ] ', 0
pciclass05 db '[Memory ] ', 0
pciclass06 db '[Bridge ] ', 0
; =============================================================================
; EOF
| 22.987654
| 174
| 0.55666
|
8c8e3fb68e347acae840e13b197e6491fcb7ac3e
| 254
|
asm
|
Assembly
|
programs/oeis/159/A159333.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/159/A159333.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/159/A159333.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A159333: Roman factorial of n.
; -1,1,1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368000,20922789888000,355687428096000,6402373705728000
sub $2,$0
trn $0,2
fac $0
mov $1,$0
cmp $2,0
mul $2,2
sub $1,$2
| 23.090909
| 155
| 0.748031
|
48d8830736d3f6ea5797cddcc5acf9070bec04da
| 254
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc/zx_saddrpright.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc/zx_saddrpright.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/_DEVELOPMENT/arch/zx/display/c/sdcc/zx_saddrpright.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; void *zx_saddrpright(void *saddr, uint bitmask)
SECTION code_clib
SECTION code_arch
PUBLIC _zx_saddrpright
EXTERN asm_zx_saddrpright
_zx_saddrpright:
pop af
pop hl
pop de
push de
push hl
push af
jp asm_zx_saddrpright
| 11.545455
| 49
| 0.720472
|
2000ee5926818324da816b5df0b6679056792235
| 10,497
|
asm
|
Assembly
|
Galaga on FPGA/MIPS port/SimpleGame_01.asm
|
Interestle/Misc
|
a94bd476a5f42971869338689e0c25d01487915f
|
[
"MIT"
] | null | null | null |
Galaga on FPGA/MIPS port/SimpleGame_01.asm
|
Interestle/Misc
|
a94bd476a5f42971869338689e0c25d01487915f
|
[
"MIT"
] | null | null | null |
Galaga on FPGA/MIPS port/SimpleGame_01.asm
|
Interestle/Misc
|
a94bd476a5f42971869338689e0c25d01487915f
|
[
"MIT"
] | null | null | null |
.data
### Bitmap Display ###
# There are 2048 pixels that are each a word in length,
# but expects a 24-bit color value.
# There are 32 columns and 64 rows.
#
# Settings to use: (small display) (big display)
# Unit Width in Pixels: 8 (16)
# Unit Height in Pixels: 8 (16)
# Display Width in Pixels: 256 (512)
# Display Height in Pixels: 512 (1024)
# Base address for display: 0x10010000 (static data)
frameBuffer: .space 0x2000 # 2048 words = 8192 bytes
### Hex colors ###
purple: .word 0x32174d # Russian violet
blue: .word 0x0000FF
navy: .word 0x000080
steel: .word 0x4b5f81
black: .word 0x000000
white: .word 0xFFFFFF
silver: .word 0xC0C0C0
yellow: .word 0xFFFF00
### Flowers ###
flowers: .space 40 # 10 flowers. A flower has a pixel location. (Non-adjusted)
### Player ###
# How to decompose player position:
# rowIndex * numberOfColumns + columnIndex
playerPos: .word 1936 # Default Player Position: 60 * 32 + 16
### Player Bullets ###
# Probably want a way to shoot multiple bullets at a time, but this currently works.
bulletPos: .space 8 # Shoot a single bullet. The first word represents if a bullet exists. The second word is the position.
.text
# Procedure where execution begins.
# It does initial execution, and controls the game loop.
Main:
jal GenerateFlowers
addi $s0, $0, 0 # frame counter
addi $s1, $0, 1000 # max number of frames
# Given basic generation, this procdure is where the main loop of the game exists.
# The loop only runs for so many frames
GameLoop:
############################################################################################
# NOT what you want to do for a game, but this is a simple way to make frames #
# and control the speed of the program. Relies on Java's sleep method, so it has overhead! #
# Sleep for sbout 50 milliseconds #
addi $a0, $0, 50 #
addi $v0, $0, 32 #
syscall #
############################################################################################
# Update logic for everything.
addi $s0, $s0, 1
jal Update
# Draw everything
jal Draw
# Only update/draw so many frames for right now.
# (It's so I can let the program end naturally without having to interrupt it if I forget about it.)
bne $s0, $s1, GameLoop
j Exit
# Routine that updates all data.
Update:
addi $sp, $sp, -4
sw $ra, 0($sp)
jal GetInput
move $a0, $v0
jal UpdateBullets
# Bullet Control. Only create bullets with proper input.
bne $a0, 0x1000, noShoot
jal CreateBullet
noShoot:
# Player Control
jal UpdatePlayer
# Background Control
jal UpdateFlowers
lw $ra, 0($sp)
addi $sp, $sp, 4
jr $ra
# Routine that draws all objects.
Draw:
addi $sp, $sp, -4
sw $ra 0($sp)
# Draw the background
lw $a0, purple
jal DrawBackground
# Draw the flowers.
lw $a0, steel
jal DrawFlowers
# Draw the Player.
jal DrawPlayer
jal DrawBullets
lw $ra, 0($sp)
addi $sp, $sp, 4
jr $ra
### Generation / Creation Procedures ###
# Creates 10 words representing pixel location of flowers.
# Affects $v0, $a0, $a1, $t0
GenerateFlowers:
addi $t0, $0, 0
GFLoop:
# Generate a location for the flower (randomly)
addi $v0, $0, 42
addi $a1, $0, 2048
syscall
# Put pixel location into array.
sw $a0, flowers($t0)
addi $t0, $t0, 4
bne $t0, 40, GFLoop
jr $ra
# Creates a bullet. If a bullet already exists, don't make another.
CreateBullet:
la $t0, bulletPos
lw $t1, playerPos
lw $t2, 0($t0) # If there is already a bullet
bne $t2, $0, cNoBullet # Don't create another.
addi $t2, $0, 0x1
sw $t2, 0($t0)
addi $t1, $t1, -32 # Create bullet one pixel above user
sw $t1, 4($t0) # Save position.
cNoBullet:
jr $ra
##### Update Procedures #####
# Gets user's input and stores the value into $v0.
# Do not hold a button for too long, and do not hold multiple buttons down!
# In our project, we will do MMIO differently so that isn't a problem, instead,
# we'll have an 8-bit value representing which buttons are held down.
# Affects registers $v0, $t1, $t2, $t3
GetInput:
addi $v0, $0, 0 # if zero, user isn't inputting something, or input something invalid.
# Make sure we can grab something
lui $t1, 0xFFFF
lw $t2, 0($t1) # Receiver Control is at 0xffff0000 -> if the value is one, new data is in
andi $t2, $t2, 0x1 # if(!in_value)
beqz $t2, inputDone # return 0;
# User has put in something. Sadly, MIPS only allows for one input at a time. Very limiting!
# Do not hold a button down for too long, and do not hold multiple buttons, MIPS will crash and burn!
lw $t2, 4($t1) # Receiver Data is at 0xffff0004
# Could be more optimized, but let's try this first.
beq $t2, 0x77, goUp # w
beq $t2, 0x61, goLeft # a
beq $t2, 0x73, goDown # s
beq $t2, 0x64, goRight # d
beq $t2, 0x20, fireBullet # space bar
# Not a valid input, don't do anything
j inputDone
goUp:
addi $v0, $0, -32
j inputDone
goLeft:
addi $v0, $0, -1
j inputDone
goRight:
addi $v0, $0, 1
j inputDone
goDown:
addi $v0, $0, 32
j inputDone
fireBullet:
addi $v0, $0, 0x1000 # 4096, something way outside of the the range of movement.
#jal CreateBullet # I don't want to do this. GetInput should only get input, nothing more.
#j inputDone # Last instructions don't need a jump, uncomment if more functionality is added
inputDone:
jr $ra
# Update the player's position.
# Parameters: $a0: The offset for next movement.
# Only accepts moving up, down, left, right by one pixel.
# Affects: $a0, $t0, $t1, $t2,
UpdatePlayer:
#addi $sp, $sp, -4
#sw $ra 0($sp)
lw $t0, playerPos
beq $a0, $0, updatePos # if(!dp) return 0;
add $t1, $t0, $a0 # Next position = current position + dp
beq $a0, -32, moveUp
beq $a0, -1, moveLeft
beq $a0, 1, moveRight
beq $a0, 32, moveDown
j updatePos # no valid movement, don't go anywhere, skip everything else
moveUp:
# Top wall is from 0 to 31. To prevent silly errors, only allows player to go to second row.
blt $t1, 32, updatePos # if(next_pos < 0) return current_pos;
move $t0, $t1
j updatePos
moveLeft:
# Left walls occur on: 0, 32, 64, ...
andi $t2, $t0, 0x1F # if(current_pos % 32) current_pos = next_pos;
beq $t2, $0, updatePos # else current_pos = current_pos;
move $t0, $t1
j updatePos
moveDown:
# Bottom wall is from 2016 to 2047, anything greater is too far.
# Only go to second-to-last row to prevent silly errors. You don't need to buckle against the bottom row.
addi $t2, $0, 2015
bgt $t1, $t2, updatePos
move $t0, $t1
j updatePos
moveRight:
# Right walls occur on: 31, 63, 95, ...
andi $t2, $t1, 0x1F # if(next_pos % 32) current_pos = next_pos;
beq $t2, $0, updatePos # else current_pos = current_pos;
move $t0, $t1
updatePos:
sw $t0, playerPos
#lw $ra 0($sp)
#addi $sp, $sp, 4
jr $ra
# Updates the position of the bullet. Can only do one bullet right now.
UpdateBullets:
la $t0, bulletPos
lw $t1, 0($t0)
beq $t1, $0, uNoBullets
# There are bullets, update them.
lw $t1, 4($t0) # Get only the position.
addi $t1, $t1, -64 # Go up two pixels
# if bullet has gone too far, delete it.
bgt $t1, $0, bulletFits
and $t1, $0, $0
sw $t1, 0($t0)
bulletFits:
sw $t1, 4($t0)
uNoBullets:
jr $ra
# Update flower positions.
# Parameters: None.
# Affects: $t0, $t1, $v0, $a0, $a1
UpdateFlowers:
addi $t0, $0, 0
uFLoop:
# Get Flower.
lw $t1, flowers($t0)
# Move it down one and right one.
addi $t1, $t1, 65
# If it still fits, put it back into array, otherwise give the flower a new location.
blt $t1, 2048, uFOkay
addi $v0, $0, 42 # random int from 0 - 32
addi $a1, $0, 32
syscall
move $t1, $a0
uFOkay:
sw $t1, flowers($t0)
addi $t0, $t0, 4
bne $t0, 40, uFLoop
jr $ra
##### Draw Procedures #####
# Draws the bullet yellow.
DrawBullets:
la $t0, bulletPos
lw $t1, 0($t0)
beq $t1, $0, dNoBullets
lw $t1, 4($t0)
sll $t1, $t1, 2
lw $t2, yellow # Just do a lui $t2, 0x00FFFF
sw $t2, frameBuffer($t1)
dNoBullets:
jr $ra
# Draws the Player.
# Affects $t0, $t1, $t2
DrawPlayer:
# Get player position and adjust for display.
lw $t3, playerPos # $t3 will hold Player's Position
sll $t0, $t3, 2 # $t0 will hold position, adjusted for screen.
# Draw them on screen.
lw $t1, black
sw $t1, frameBuffer($t0)
# Draw other squares white for easy visibility.
lw $t1, white
# Draw white pixels next to player to make a simple character design.
# Obviously make glyphs and things for actual assignment.
# Don't worry about checking bottom/top since update procedure prevents that.
# Draw up square
addi $t2, $t0, -128
sw $t1, frameBuffer($t2)
# Draw down square
addi $t2, $t0, 128
sw $t1, frameBuffer($t2)
# Draw left square - Check for boundary
andi $t4, $t3, 0x1F # if(Player is on left edge)
beq $t4, $0, skipLeft # skip drawing left square
addi $t2, $t0, -4
sw $t1, frameBuffer($t2)
skipLeft:
# Draw right square - Check for boundary
addi $t4, $t3, 1
andi $t4, $t4, 0x1F # if(Player is on right edge)
beq $t4, $0, skipRight # skip drawing right square
addi $t2, $t0, 4
sw $t1, frameBuffer($t2)
skipRight:
jr $ra
# Draws the flowers on the screen.
# Parameters: 24-bit color for flowers, store in $a0
DrawFlowers:
move $t0, $a0
addi $t1, $0, 0
DFLoop:
# Get flower location.
lw $t2, flowers($t1)
# Write color to location.
# Compute offset.
sll $t2, $t2, 2
# update location.
sw $t0, frameBuffer($t2)
addi $t1, $t1, 4
bne $t1, 40, DFLoop
jr $ra
# Draws the background for display. Currently only does one color.
# Parameters: 24-bit color for background, store in $a0
# Affects registers $t0, $t1,
DrawBackground:
move $t0, $a0 # Background color
addi $t1, $0, 0 # offset of display.
DrawBGLoop:
sw $t0, frameBuffer($t1) # Put color into background
addi $t1, $t1, 4
bne $t1, 0x2000, DrawBGLoop
jr $ra
##### EXIT #####
Exit:
li $v0, 10
syscall # return 0;
| 24.411628
| 123
| 0.617319
|
c3c0631f7f967910e73b06747c4ffcf043172368
| 636
|
asm
|
Assembly
|
oeis/010/A010003.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/010/A010003.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/010/A010003.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A010003: a(0) = 1, a(n) = 11*n^2 + 2 for n>0.
; Submitted by Simon Strandgaard
; 1,13,46,101,178,277,398,541,706,893,1102,1333,1586,1861,2158,2477,2818,3181,3566,3973,4402,4853,5326,5821,6338,6877,7438,8021,8626,9253,9902,10573,11266,11981,12718,13477,14258,15061,15886,16733,17602,18493,19406,20341,21298,22277,23278,24301,25346,26413,27502,28613,29746,30901,32078,33277,34498,35741,37006,38293,39602,40933,42286,43661,45058,46477,47918,49381,50866,52373,53902,55453,57026,58621,60238,61877,63538,65221,66926,68653,70402,72173,73966,75781,77618,79477,81358,83261,85186,87133
mov $1,$0
cmp $1,0
pow $0,2
mul $0,11
add $0,2
sub $0,$1
| 57.818182
| 496
| 0.762579
|
b8b38982ba063efeb28840b734dd0a913f8c17f8
| 332
|
asm
|
Assembly
|
oeis/021/A021245.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/021/A021245.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/021/A021245.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A021245: Decimal expansion of 1/241.
; Submitted by Jamie Morken(s2)
; 0,0,4,1,4,9,3,7,7,5,9,3,3,6,0,9,9,5,8,5,0,6,2,2,4,0,6,6,3,9,0,0,4,1,4,9,3,7,7,5,9,3,3,6,0,9,9,5,8,5,0,6,2,2,4,0,6,6,3,9,0,0,4,1,4,9,3,7,7,5,9,3,3,6,0,9,9,5,8,5,0,6,2,2,4,0,6,6,3,9,0,0,4,1,4,9,3,7,7
add $0,1
mov $2,10
pow $2,$0
div $2,241
mov $0,$2
mod $0,10
| 30.181818
| 199
| 0.560241
|
4f6b5b67aae89f658ca802721079f11b3374ebe4
| 217
|
asm
|
Assembly
|
libsrc/gfx/portable/undrawr.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 640
|
2017-01-14T23:33:45.000Z
|
2022-03-30T11:28:42.000Z
|
libsrc/gfx/portable/undrawr.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 1,600
|
2017-01-15T16:12:02.000Z
|
2022-03-31T12:11:12.000Z
|
libsrc/gfx/portable/undrawr.asm
|
Frodevan/z88dk
|
f27af9fe840ff995c63c80a73673ba7ee33fffac
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
SECTION code_graphics
PUBLIC undrawr
PUBLIC _undrawr
EXTERN unplot
EXTERN commondrawr
;void undrawr(int x2, int y2) __smallc
;Note ints are actually uint8_t
undrawr:
_undrawr:
ld hl,unplot
jp commondrawr
| 12.764706
| 39
| 0.778802
|
b1bd93205fd9c8d177db30f701a11de477a6fa4d
| 7,443
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.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_/i9-9900K_12_0xca.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_/i9-9900K_12_0xca.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 %r12
push %r14
push %r15
push %rax
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0xd8cf, %rsi
lea addresses_UC_ht+0x299c, %rdi
nop
nop
nop
inc %rdx
mov $28, %rcx
rep movsb
nop
nop
nop
nop
nop
xor $22690, %r12
lea addresses_A_ht+0x1e25f, %rsi
lea addresses_A_ht+0xc20f, %rdi
dec %r14
mov $23, %rcx
rep movsl
nop
nop
cmp $41782, %r14
lea addresses_UC_ht+0x190f, %rcx
nop
cmp $16473, %r15
movups (%rcx), %xmm5
vpextrq $1, %xmm5, %r12
nop
nop
nop
nop
nop
xor $27175, %rsi
lea addresses_A_ht+0x50f, %r14
nop
nop
nop
nop
nop
xor %rcx, %rcx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm6
and $0xffffffffffffffc0, %r14
movntdq %xmm6, (%r14)
nop
dec %r12
lea addresses_WC_ht+0x588f, %r14
nop
nop
and %r15, %r15
mov (%r14), %r12
nop
nop
nop
nop
xor $12486, %r12
lea addresses_UC_ht+0x90f, %r15
nop
nop
nop
nop
nop
xor %r14, %r14
movb (%r15), %r12b
nop
nop
inc %rsi
lea addresses_WC_ht+0x3b8f, %rdi
nop
nop
nop
nop
lfence
mov (%rdi), %r14d
nop
nop
inc %rdi
lea addresses_UC_ht+0xdd0f, %rsi
lea addresses_normal_ht+0x9ef5, %rdi
nop
nop
nop
nop
and %rax, %rax
mov $57, %rcx
rep movsw
nop
nop
nop
nop
cmp $50852, %rdi
lea addresses_WT_ht+0x124b3, %rcx
inc %r15
mov $0x6162636465666768, %rdi
movq %rdi, (%rcx)
nop
sub %rcx, %rcx
lea addresses_UC_ht+0x1be0f, %r14
nop
sub %rsi, %rsi
mov (%r14), %rax
nop
inc %r12
lea addresses_normal_ht+0x101cf, %rsi
lea addresses_WT_ht+0x143d3, %rdi
nop
sub $37020, %r14
mov $23, %rcx
rep movsb
nop
nop
nop
xor %r15, %r15
lea addresses_WT_ht+0x1771f, %rsi
lea addresses_WT_ht+0x1160f, %rdi
nop
nop
dec %r12
mov $49, %rcx
rep movsb
nop
nop
nop
nop
and %rdx, %rdx
lea addresses_UC_ht+0x18ff7, %r15
cmp $15837, %rax
vmovups (%r15), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %r14
nop
nop
nop
nop
cmp %rax, %rax
lea addresses_WC_ht+0x1734f, %rax
cmp $1502, %rdx
mov (%rax), %r14
and %r12, %r12
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r15
push %r8
push %rax
// Faulty Load
lea addresses_D+0xde0f, %r13
add %r15, %r15
mov (%r13), %r8w
lea oracles, %r14
and $0xff, %r8
shlq $12, %r8
mov (%r14,%r8,1), %r8
pop %rax
pop %r8
pop %r15
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_D', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_D', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 5}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_A_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 9}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': True, 'type': 'addresses_A_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 8}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 8, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 4}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 11}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 1}}
{'OP': 'LOAD', 'src': {'size': 8, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': True, 'congruent': 5}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 35.956522
| 2,999
| 0.657934
|
33650d407ab230f60a10d4da267eb34c2046d0cb
| 600
|
asm
|
Assembly
|
programs/oeis/288/A288994.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/288/A288994.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/288/A288994.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A288994: a(n) = n*(n+3) when n is congruent to 0 or 3 (mod 4), and n*(n+3)/2 otherwise.
; 0,2,5,18,28,20,27,70,88,54,65,154,180,104,119,270,304,170,189,418,460,252,275,598,648,350,377,810,868,464,495,1054,1120,594,629,1330,1404,740,779,1638,1720,902,945,1978,2068,1080,1127,2350,2448,1274,1325,2754,2860,1484,1539,3190,3304,1710,1769,3658,3780,1952,2015,4158,4288,2210,2277,4690,4828,2484,2555,5254,5400,2774,2849,5850,6004,3080,3159,6478,6640,3402,3485,7138,7308,3740,3827,7830,8008,4094,4185,8554,8740,4464,4559,9310,9504,4850,4949,10098
mov $1,$0
add $1,3
mul $0,$1
div $1,2
gcd $1,2
div $0,$1
| 60
| 451
| 0.723333
|
3f5d3e40f34867fcca8b23bea3b8aab98af9a368
| 680
|
asm
|
Assembly
|
oeis/013/A013613.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/013/A013613.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/013/A013613.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A013613: Triangle of coefficients in expansion of (1+6x)^n.
; Submitted by Jamie Morken(s1)
; 1,1,6,1,12,36,1,18,108,216,1,24,216,864,1296,1,30,360,2160,6480,7776,1,36,540,4320,19440,46656,46656,1,42,756,7560,45360,163296,326592,279936,1,48,1008,12096,90720,435456,1306368,2239488,1679616,1,54,1296,18144,163296,979776,3919104,10077696,15116544,10077696,1,60,1620,25920,272160,1959552,9797760,33592320,75582720,100776960,60466176,1,66,1980,35640,427680,3592512,21555072,92378880,277136640,554273280,665127936,362797056,1,72,2376,47520,641520,6158592,43110144,221709312,831409920,2217093120
lpb $0
add $1,1
sub $0,$1
lpe
bin $1,$0
lpb $0
sub $0,1
mul $1,6
lpe
mov $0,$1
| 45.333333
| 497
| 0.767647
|
b3e742d258dabc8bb6ed62d21477130b79b1d180
| 223
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/adt/w_vector/c/sccz80/w_vector_push_back_callee.asm
|
teknoplop/z88dk
|
bb03fbfd6b2ab0f397a1358559089f9cd3706485
|
[
"ClArtistic"
] | 8
|
2017-01-18T12:02:17.000Z
|
2021-06-12T09:40:28.000Z
|
libsrc/_DEVELOPMENT/adt/w_vector/c/sccz80/w_vector_push_back_callee.asm
|
teknoplop/z88dk
|
bb03fbfd6b2ab0f397a1358559089f9cd3706485
|
[
"ClArtistic"
] | 1
|
2017-03-06T07:41:56.000Z
|
2017-03-06T07:41:56.000Z
|
libsrc/_DEVELOPMENT/adt/w_vector/c/sccz80/w_vector_push_back_callee.asm
|
teknoplop/z88dk
|
bb03fbfd6b2ab0f397a1358559089f9cd3706485
|
[
"ClArtistic"
] | 3
|
2017-03-07T03:19:40.000Z
|
2021-09-15T17:59:19.000Z
|
; size_t w_vector_push_back(w_vector_t *v, void *item)
SECTION code_clib
SECTION code_adt_w_vector
PUBLIC w_vector_push_back_callee
EXTERN w_vector_append_callee
defc w_vector_push_back_callee = w_vector_append_callee
| 18.583333
| 55
| 0.865471
|
319f41a1ee4bcebc7cdfddcbf4338954e84a827d
| 436
|
asm
|
Assembly
|
programs/oeis/301/A301719.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/301/A301719.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/301/A301719.asm
|
karttu/loda
|
9c3b0fc57b810302220c044a9d17db733c76a598
|
[
"Apache-2.0"
] | null | null | null |
; A301719: Partial sums of A301718.
; 1,6,17,34,57,85,118,157,202,253,309,370,437,510,589,673,762,857,958,1065,1177,1294,1417,1546,1681,1821,1966,2117,2274,2437,2605,2778,2957,3142,3333,3529,3730,3937,4150,4369,4593,4822,5057,5298,5545,5797,6054,6317,6586,6861,7141,7426,7717,8014,8317,8625
mov $3,$0
add $3,1
mul $3,4
mul $3,$0
add $3,5
div $3,5
mov $1,$3
mov $4,$0
mul $4,2
add $1,$4
mov $2,$0
mul $2,$0
mov $4,$2
mul $4,2
add $1,$4
| 22.947368
| 254
| 0.68578
|
ec9bb776abd6c5cc1f9cb42d7be75e123dcb5315
| 693
|
asm
|
Assembly
|
oeis/232/A232970.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/232/A232970.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/232/A232970.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A232970: Expansion of (1-3*x)/(1-5*x+3*x^2+x^3).
; Submitted by Jamie Morken(s1)
; 1,2,7,28,117,494,2091,8856,37513,158906,673135,2851444,12078909,51167078,216747219,918155952,3889371025,16475640050,69791931223,295643364940,1252365390981,5305104928862,22472785106427,95196245354568,403257766524697,1708227311453354,7236167012338111,30652895360805796,129847748455561293,550043889183050966,2330023305187765155,9870137109934111584,41810571744924211489,177112424089630957538,750260268103448041639,3178153496503423124092,13462874254117140538005,57029650512971985276110
mul $0,3
mov $2,1
lpb $0
sub $0,2
add $1,$2
add $2,$1
lpe
lpb $0
div $0,4
add $2,$1
lpe
mov $0,$2
div $0,2
add $0,1
| 36.473684
| 482
| 0.808081
|
30037efc4ffa8b2986f8113751732a7d43203df0
| 385
|
asm
|
Assembly
|
Irvine/Examples/ch07/32 bit/Bmult.asm
|
alieonsido/ASM_TESTING
|
4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7
|
[
"Apache-2.0"
] | null | null | null |
Irvine/Examples/ch07/32 bit/Bmult.asm
|
alieonsido/ASM_TESTING
|
4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7
|
[
"Apache-2.0"
] | null | null | null |
Irvine/Examples/ch07/32 bit/Bmult.asm
|
alieonsido/ASM_TESTING
|
4d5e2a3e11d921eeb50d69bbe4352cfc0e99afa7
|
[
"Apache-2.0"
] | null | null | null |
; Binary Multiplication (BMult.asm)
; This program demonstrates binary multiplication using SHL.
; It multiplies intval by 36, using SHL instructions.
INCLUDE Irvine32.inc
.data
intval DWORD 123
.code
main PROC
mov eax,intval
mov ebx,eax
shl eax,5 ; multiply by 32
shl ebx,2 ; multiply by 4
add eax,ebx ; sum the products
call DumpRegs
exit
main ENDP
END main
| 16.73913
| 60
| 0.72987
|
89775be13574cb0602b1e2dfdc7a9edae7437a9f
| 349
|
asm
|
Assembly
|
4 专业科目/计算机组成/习题/hw/自己动手写CPU/Code/Chapter5_1/AsmTest/inst_rom.asm
|
ladike/912_project
|
5178c1c93ac6ca30ffc72dd689f5c6932704b4ab
|
[
"MIT"
] | 640
|
2019-03-30T11:32:43.000Z
|
2022-03-31T14:05:18.000Z
|
4 专业科目/计算机组成/习题/hw/自己动手写CPU/Code/Chapter5_1/AsmTest/inst_rom.asm
|
ladike/912_project
|
5178c1c93ac6ca30ffc72dd689f5c6932704b4ab
|
[
"MIT"
] | 6
|
2019-07-22T01:57:24.000Z
|
2022-01-20T15:03:16.000Z
|
4 专业科目/计算机组成/习题/hw/自己动手写CPU/Code/Chapter5_1/AsmTest/inst_rom.asm
|
ladike/912_project
|
5178c1c93ac6ca30ffc72dd689f5c6932704b4ab
|
[
"MIT"
] | 212
|
2019-04-10T02:31:50.000Z
|
2022-03-30T02:32:47.000Z
|
inst_rom.om: file format elf32-tradbigmips
Disassembly of section .text:
00000000 <_start>:
0: 34011100 li at,0x1100
4: 34210020 ori at,at,0x20
8: 34214400 ori at,at,0x4400
c: 34210044 ori at,at,0x44
Disassembly of section .reginfo:
00000000 <_ram_end-0x10>:
0: 00000002 srl zero,zero,0x0
...
00000010 <_ram_end>:
...
| 18.368421
| 46
| 0.690544
|
14823a3a371e61c91ce439fa82d83bd96dab09ce
| 618
|
asm
|
Assembly
|
oeis/058/A058396.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/058/A058396.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/058/A058396.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A058396: Expansion of ((1-x)/(1-2*x))^3.
; 1,3,9,25,66,168,416,1008,2400,5632,13056,29952,68096,153600,344064,765952,1695744,3735552,8192000,17891328,38928384,84410368,182452224,393216000,845152256,1811939328,3875536896,8271167488,17616076800,37446746112,79456894976,168309030912,355945414656,751619276800,1584842932224,3337189588992,7017976561664,14740327759872,30923764531200,64802466562048,135652247076864,283673999966208,592636767371264,1236950581248000,2579454278762496,5374412836569088,11188630324248576,23274462136762368
add $0,5
mov $1,2
pow $1,$0
bin $0,2
sub $0,3
mul $0,$1
sub $0,256
div $0,256
add $0,1
| 47.538462
| 486
| 0.825243
|
a5d271d842c079de57451d19e6ec8643955bb2ac
| 78
|
asm
|
Assembly
|
src/system/fork-bomb.asm
|
Pentium1080Ti/x86-assembly
|
4af3caf07e17bdd23e08b85f6666d67f63f610c2
|
[
"MIT"
] | null | null | null |
src/system/fork-bomb.asm
|
Pentium1080Ti/x86-assembly
|
4af3caf07e17bdd23e08b85f6666d67f63f610c2
|
[
"MIT"
] | null | null | null |
src/system/fork-bomb.asm
|
Pentium1080Ti/x86-assembly
|
4af3caf07e17bdd23e08b85f6666d67f63f610c2
|
[
"MIT"
] | null | null | null |
SECTION .text
global _start
_start:
mov eax, 2
int 80h
jmp _start
| 11.142857
| 14
| 0.653846
|
1482c18e36f9ccb226b2d7b5f0ccc4b2bb593a27
| 640
|
asm
|
Assembly
|
programs/oeis/184/A184540.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | 1
|
2021-03-15T11:38:20.000Z
|
2021-03-15T11:38:20.000Z
|
programs/oeis/184/A184540.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
programs/oeis/184/A184540.asm
|
jmorken/loda
|
99c09d2641e858b074f6344a352d13bc55601571
|
[
"Apache-2.0"
] | null | null | null |
; A184540: Number of (n+2) X 3 binary arrays with each 3 X 3 subblock having rows and columns in lexicographically nondecreasing order.
; 45,89,147,220,309,415,539,682,845,1029,1235,1464,1717,1995,2299,2630,2989,3377,3795,4244,4725,5239,5787,6370,6989,7645,8339,9072,9845,10659,11515,12414,13357,14345,15379,16460,17589,18767,19995,21274,22605,23989
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
mov $3,16
mov $5,4
mul $5,$0
mov $6,2
lpb $0
cmp $7,4
add $7,$0
sub $0,1
gcd $3,$6
add $5,$7
add $5,8
mov $7,6
lpe
add $3,$5
add $3,3
mov $7,$3
add $7,26
add $1,$7
lpe
| 21.333333
| 213
| 0.629688
|
dc065e7043cab36f62efbe2c36fd5b2bdbd1d224
| 152
|
asm
|
Assembly
|
libsrc/_DEVELOPMENT/arch/ts2068/display/c/sdcc/tshc_aaddr2cy.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_aaddr2cy.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_aaddr2cy.asm
|
jpoikela/z88dk
|
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
|
[
"ClArtistic"
] | 215
|
2017-01-17T10:43:03.000Z
|
2022-03-23T17:25:02.000Z
|
; uchar tshc_aaddr2cy(void *aaddr)
SECTION code_clib
SECTION code_arch
PUBLIC _tshc_aaddr2cy
EXTERN _zx_saddr2cy
defc _tshc_aaddr2cy = _zx_saddr2cy
| 13.818182
| 34
| 0.835526
|
42cbdb7d0e3b40d6daa5123bc2d350f3a7f46069
| 8,466
|
asm
|
Assembly
|
Transynther/x86/_processed/US/_ht_zr_un_/i3-7100_9_0x84_notsx.log_21829_2535.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_/i3-7100_9_0x84_notsx.log_21829_2535.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_/i3-7100_9_0x84_notsx.log_21829_2535.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x1e8bd, %rbx
nop
nop
nop
nop
xor %rbp, %rbp
mov $0x6162636465666768, %rdi
movq %rdi, %xmm2
vmovups %ymm2, (%rbx)
nop
nop
nop
sub $12102, %rsi
lea addresses_WC_ht+0xd577, %rsi
lea addresses_WC_ht+0x18215, %rdi
and $28176, %r14
mov $34, %rcx
rep movsl
sub %rbx, %rbx
lea addresses_UC_ht+0x735, %rbx
cmp %r10, %r10
movb $0x61, (%rbx)
cmp $1173, %rcx
lea addresses_WC_ht+0x1988a, %rsi
lea addresses_WC_ht+0x19555, %rdi
clflush (%rsi)
xor %r13, %r13
mov $117, %rcx
rep movsq
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_A_ht+0xd335, %r14
nop
sub %rbp, %rbp
mov (%r14), %ecx
nop
nop
nop
nop
nop
add $40820, %rcx
lea addresses_WT_ht+0x13235, %rbp
nop
nop
nop
nop
and %rbx, %rbx
movups (%rbp), %xmm0
vpextrq $1, %xmm0, %r14
nop
nop
nop
nop
nop
add %r14, %r14
lea addresses_D_ht+0x1503d, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp $51615, %rbp
movw $0x6162, (%rdi)
dec %rbp
lea addresses_WC_ht+0x1b575, %rsi
lea addresses_WT_ht+0x101f5, %rdi
nop
nop
inc %rbx
mov $105, %rcx
rep movsl
nop
nop
nop
cmp $32268, %rdi
lea addresses_A_ht+0x2a95, %r13
and %rbx, %rbx
mov (%r13), %rdi
cmp $56786, %r13
lea addresses_A_ht+0x1dec1, %rbx
nop
and %r10, %r10
mov (%rbx), %rsi
nop
nop
dec %r14
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r15
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
// REPMOV
lea addresses_UC+0x11b35, %rsi
lea addresses_UC+0x1eb35, %rdi
nop
add $34990, %r13
mov $61, %rcx
rep movsw
cmp %rcx, %rcx
// Store
lea addresses_PSE+0x9889, %rdx
nop
and %rcx, %rcx
movl $0x51525354, (%rdx)
nop
nop
nop
nop
nop
xor $23112, %rdi
// Store
lea addresses_US+0x18f35, %rdx
clflush (%rdx)
nop
dec %rsi
mov $0x5152535455565758, %r15
movq %r15, %xmm2
vmovups %ymm2, (%rdx)
nop
add %rdx, %rdx
// Store
lea addresses_US+0x18f35, %r13
nop
nop
nop
nop
xor %rcx, %rcx
movb $0x51, (%r13)
nop
nop
nop
sub $48747, %rdi
// Store
lea addresses_PSE+0x14735, %r15
and $40680, %r13
mov $0x5152535455565758, %rdx
movq %rdx, (%r15)
nop
nop
xor $13813, %rdi
// Store
lea addresses_A+0xf1b5, %rcx
clflush (%rcx)
nop
nop
cmp $39935, %r9
movl $0x51525354, (%rcx)
nop
nop
nop
add $6909, %rdx
// Store
lea addresses_A+0x1b9f5, %r9
nop
nop
inc %rdi
movw $0x5152, (%r9)
and $32748, %r9
// Faulty Load
lea addresses_US+0x18f35, %r13
nop
nop
sub $47482, %r9
vmovups (%r13), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %rdi
lea oracles, %rsi
and $0xff, %rdi
shlq $12, %rdi
mov (%rsi,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_US', 'same': True, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 4, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_US', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_US', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 4, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_A', 'same': False, 'size': 2, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_US', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'same': True, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 4, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'f2': 1, '14': 1, '44': 1, 'ab': 4, '18': 8, '6d': 1, 'e7': 105, '82': 1, '9a': 1, '48': 7548, '03': 1, '41': 1, 'e0': 1, '71': 1, '1c': 1, '17': 3, 'f6': 1, 'cb': 2, '2a': 1, '27': 1, 'f0': 1, '06': 54, '76': 1, 'd6': 9, 'a4': 1, 'b6': 1, '19': 1, '00': 14075, 'da': 1, 'd5': 1}
00 00 00 00 00 00 00 48 00 48 00 00 e7 00 00 00 48 48 48 00 00 00 00 00 00 00 48 48 00 48 00 48 00 00 48 48 48 48 48 00 00 48 48 48 48 48 00 00 00 00 00 00 00 00 00 48 00 00 00 48 48 00 00 00 00 00 00 00 00 00 48 00 00 00 48 00 48 00 48 00 48 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 48 00 00 48 00 06 00 48 00 00 48 48 48 00 00 48 00 00 48 48 00 00 00 48 48 48 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 48 48 00 00 48 00 00 48 00 00 00 00 00 00 00 00 00 06 00 00 48 48 48 00 00 00 00 48 00 00 00 00 00 00 00 00 00 48 48 48 00 00 00 00 00 00 00 00 00 00 00 00 48 48 00 48 00 00 00 48 00 48 06 00 00 48 48 00 00 00 00 00 00 00 00 00 00 00 00 48 00 48 48 00 00 48 00 00 00 00 00 00 00 00 48 48 48 00 00 00 48 00 00 48 48 48 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 48 48 48 00 00 00 00 48 00 00 00 48 00 00 48 48 48 48 00 48 48 00 48 00 00 00 00 00 48 00 00 48 00 48 48 48 48 00 00 00 e7 00 48 00 00 00 48 48 48 00 00 00 00 00 00 00 48 00 00 48 00 48 48 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 48 48 48 48 48 00 48 00 48 00 00 00 00 00 00 00 00 48 00 00 00 00 48 48 00 00 00 00 48 48 48 48 48 00 00 48 48 00 00 48 00 48 48 48 00 48 48 48 00 00 00 48 48 48 00 48 00 00 48 48 48 48 48 48 00 48 00 00 00 00 48 48 00 00 00 00 00 48 48 00 00 48 48 48 48 00 48 00 00 00 00 00 00 48 48 00 00 00 00 00 48 48 00 48 48 48 00 00 48 48 48 00 48 48 48 00 48 00 00 00 48 00 00 48 48 48 00 00 00 00 00 00 00 00 48 00 00 00 48 00 00 48 48 00 48 48 00 48 48 48 00 00 00 00 00 00 48 00 48 00 48 48 48 48 00 00 00 48 00 00 48 48 48 48 48 00 00 00 00 00 48 00 48 00 00 48 48 48 48 00 00 00 00 00 00 00 00 48 48 00 00 00 48 48 00 00 00 00 00 48 48 48 00 00 00 48 00 00 48 48 48 00 00 48 00 00 00 00 48 48 48 00 00 48 48 48 48 48 00 00 00 00 48 00 00 48 48 48 00 00 48 00 00 00 00 48 00 00 48 06 00 48 48 48 00 48 00 48 00 00 00 00 00 48 48 48 00 48 48 48 00 48 00 00 00 48 48 00 00 00 00 00 00 00 00 00 00 48 48 00 00 06 48 00 00 00 00 00 00 48 00 00 48 00 00 00 00 00 00 48 00 00 00 48 00 00 48 00 00 48 00 00 00 00 00 00 a4 00 00 48 48 00 48 00 00 00 00 48 48 48 48 48 00 48 00 48 48 48 48 00 48 00 00 00 00 00 00 00 00 00 00 48 48 00 00 00 00 48 00 00 48 48 48 48 00 00 48 00 00 48 48 48 00 00 00 00 00 00 48 48 00 00 48 48 48 48 48 48 48 48 00 48 48 00 48 00 00 00 48 00 00 48 00 00 00 48 48 00 48 48 00 48 00 00 48 48 00 48 48 48 00 00 00 48 48 48 48 48 00 48 48 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 00 48 48 00 00 00 00 48 00 00 00 00 00 00 00 00 48 00 48 00 00 00 00 48 48 48 00 00 00 48 00 00 00 18 00 00 00 00 48 48 00 00 00 48 00 00 48 00 00 00 00 48 00 00 00 00 48 48 00 48 48 00 00 00 48 00 00 00 48 00 00 00 00 00 00 00 48 48 00 00 00 00 48 48 00 00 00 00 00 00 00 00 48 48 48 48 00 00 00 00 00 00 00 48 48 00 48 00 48 48 48 48 48 00 00 00 48 48 48 00 00 00 00 00 00 e7 00 00 48 48 00 00 00 00 00 48 00 48 48 48 00 00 48 00 00 00 00 48 48 00 48 48 00 00 00 00 00 00 00 00 48 48 48 48 00 00 00 00 00 48 00 48 48 48 48 00 48 48 00 48 00 00 00 00 00 00 00 00 00 00 00 00 e7
*/
| 34.839506
| 2,999
| 0.642098
|
89707b65775455df40afc9cf7b956e9b4f21a019
| 697
|
asm
|
Assembly
|
ffight/lcs/weapon/2E.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | 6
|
2020-10-14T15:29:10.000Z
|
2022-02-12T18:58:54.000Z
|
ffight/lcs/weapon/2E.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | null | null | null |
ffight/lcs/weapon/2E.asm
|
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
|
a4a0c86c200241494b3f1834cd0aef8dc02f7683
|
[
"Apache-2.0"
] | 1
|
2020-12-17T08:59:10.000Z
|
2020-12-17T08:59:10.000Z
|
copyright zengfr site:http://github.com/zengfr/romhack
003A06 movem.l D0-D3, -(A6)
003A0A movem.l D0-D3, -(A6)
004434 move.b ($2e,A0), ($2e,A6) [weapon+ E, weapon+10]
00443A move.b ($2b,A0), D0 [weapon+2E]
009ACA dbra D5, $9ac8
057B8C move.b ($2e,A0), ($36,A6) [weapon+2E]
057DCA eori.b #$1, ($2e,A6) [weapon+2E]
057DD0 move.w ($412,A5), D0
057DEE rts
058DEA move.b ($3e,A6), ($2e,A6)
058DF0 eori.b #$1, ($2e,A6) [weapon+2E]
058DF6 move.w ($412,A5), D0 [weapon+2E]
059672 move.b ($2e,A0), ($36,A6) [weapon+2E]
0597F4 move.b ($2e,A0), ($2e,A6) [weapon+ E, weapon+10]
0597FA move.b ($2b,A0), D0 [weapon+2E]
copyright zengfr site:http://github.com/zengfr/romhack
| 34.85
| 57
| 0.622669
|
f7df3196c134d995347d57135bc2afbe0a215a7c
| 603
|
asm
|
Assembly
|
asm/test.asm
|
Zenith80/initial_emulator
|
2c2bfbed9fe0ed55c856a02b52a5fdd97f328e72
|
[
"Apache-2.0"
] | 9
|
2017-11-12T23:16:14.000Z
|
2017-12-08T19:42:44.000Z
|
asm/test.asm
|
Zenith80/Zenith80
|
2c2bfbed9fe0ed55c856a02b52a5fdd97f328e72
|
[
"Apache-2.0"
] | null | null | null |
asm/test.asm
|
Zenith80/Zenith80
|
2c2bfbed9fe0ed55c856a02b52a5fdd97f328e72
|
[
"Apache-2.0"
] | null | null | null |
jp start
start:
; tests:
;ld r, n
;out (n), a
;ld r, r'
ld a, 12
ld b, 0
out (4), a
ld b, 12
ld a, 0
ld a, b
out (4), a
; tests:
;ld dd, nn
;ld r, (hl)
ld a, 91
out (4), a
ld a, 1
ld hl, t1
ld a, (hl)
out (4), a
; tests:
;ld a, (bc)
ld a, 12
out (4), a
ld bc, t2
ld a, (bc)
out (4), a
; tests: ld hl, (nn)
ld a, 109
out (4), a
ld hl, (t4)
ld a, l
out (4), a
ld a, 0
out (4), a
ld a, h
out (4), a
; tests ld (nn), hl
ld hl, 192
ld a, l
out (4), a
ld (t5), hl
ld hl, t5
ld a, (hl)
out (4), a
halt
t1: .db 91
t2: .db 12
t3: .db t4
t4: .db 109
t5: .db 0x0000
| 10.767857
| 21
| 0.475954
|
ab9fc3e05f398a83da666839f51f7bdbf9edb425
| 297
|
asm
|
Assembly
|
programs/oeis/014/A014038.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 22
|
2018-02-06T19:19:31.000Z
|
2022-01-17T21:53:31.000Z
|
programs/oeis/014/A014038.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 41
|
2021-02-22T19:00:34.000Z
|
2021-08-28T10:47:47.000Z
|
programs/oeis/014/A014038.asm
|
neoneye/loda
|
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
|
[
"Apache-2.0"
] | 5
|
2021-02-24T21:14:16.000Z
|
2021-08-09T19:48:05.000Z
|
; A014038: Inverse of 29th cyclotomic polynomial.
; 1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0,0,0,0,0
sub $1,$0
mod $1,29
pow $1,$1
mov $0,$1
| 37.125
| 205
| 0.542088
|
bbfc8bc6fc652c89edf0178bb3c33b5f742f30ff
| 499
|
asm
|
Assembly
|
oeis/092/A092727.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 11
|
2021-08-22T19:44:55.000Z
|
2022-03-20T16:47:57.000Z
|
oeis/092/A092727.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 9
|
2021-08-29T13:15:54.000Z
|
2022-03-09T19:52:31.000Z
|
oeis/092/A092727.asm
|
neoneye/loda-programs
|
84790877f8e6c2e821b183d2e334d612045d29c0
|
[
"Apache-2.0"
] | 3
|
2021-08-22T20:56:47.000Z
|
2021-09-29T06:26:12.000Z
|
; A092727: Decimal expansion of e^(-1/6).
; Submitted by Jamie Morken(s2)
; 8,4,6,4,8,1,7,2,4,8,9,0,6,1,4,0,7,4,0,4,4,9,1,7,3,9,9,7,9,8,7,5,4,5,7,6,8,8,8,2,9,1,6,2,4,4,2,7,0,5,1,8,3,9,3,2,2,6,5,0,9,1,4,9,8,0,1,4,1,4,7,8,7,0,5,4,6,1,4,7,4,7,4,8,2,1,6,4,7,0,3,4,2,0,1,1,5,7,5,9
mov $1,524288
mov $3,$0
mul $3,3
mov $5,$0
sub $5,$0
cmp $5,0
add $0,$5
lpb $3
mul $1,$3
mul $1,6
div $1,$0
div $2,$0
add $2,$1
sub $3,1
lpe
mov $4,10
pow $4,$0
div $2,$4
add $2,1
div $1,$2
mod $1,10
mov $0,$1
| 18.481481
| 201
| 0.533066
|
6da9b5ca26db9b1a73a501298877b885dc1652e3
| 6,141
|
asm
|
Assembly
|
macros2.asm
|
jsvalenzuela/EA3-ejercicio
|
2e29981b3f5020b466d3892d65c4f8d3801d563c
|
[
"MIT"
] | 1
|
2019-09-11T22:47:22.000Z
|
2019-09-11T22:47:22.000Z
|
macros2.asm
|
FedeAPerez/Compiladores2C2019
|
6efcf209b88150ac331bcf898797648da8222dbd
|
[
"MIT"
] | null | null | null |
macros2.asm
|
FedeAPerez/Compiladores2C2019
|
6efcf209b88150ac331bcf898797648da8222dbd
|
[
"MIT"
] | null | null | null |
;macros2.asm
;These are macros for Assembly Language Programming
;Myron Berg
;Dickinson State University
;4/5/99
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
getString macro string ;read string from keyboard
local label1, label2, label3, label4, label5, label6, label7, label8
pushad
push di
push si
lea si, string
mov bx, si
label1: mov ah, 1
int 21h
cmp al, 0Dh
je label2
cmp al, 8
je label8
jmp label7
label8: dec si
cmp si, bx
jl label6
jmp label1
label6: mov si, bx
jmp label1
label7: mov [si], al
inc si
jmp label1
label2: mov byte ptr [si], '$'
pop si
pop di
popad
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
displayString macro string ;write string on screen
push dx
push ax
lea dx, string
mov ah, 9
int 21h
pop ax
pop dx
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
scrollup macro number ;scroll screen up
pusha
mov ah, 6 ;up
mov al, number ;lines
mov ch, 0 ;starting at 0,0
mov cl, 0
mov dh, 24 ;ending at 24, 79
mov dl, 79
mov bh, 15 ;black background, white fore
int 10h
popa
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
clearScreen macro
scrollup 0
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
newLine macro number ;line feed and carriage return
local Repeat
pusha
ifnb <number>
mov cx, number
endif
Repeat: mov al, 0Dh
mov ah, 0Eh
int 10h
mov al, 0Ah
mov ah, 0Eh
int 10h
ifnb <number>
loop Repeat
endif
popa
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
getdate macro near ;get date
mov ah, 2Ah
Int 21h
;AL = day of week (0-7)
;CX = year (1980-2099)
;DL = month (1-12)
;DH = day (1-31)
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
gettime macro near ;get time
mov ah, 2Ch
Int 21h
;AL = hour (0-23)
;CX = minute (0-59)
;DL = second (0-59)
;DH = hundredth (0-99)
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
setCurPos macro row, column ;sets cursor position
mov dl, row
mov dh, column
mov ah, 2
int 10h
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
beep macro ;beeps speaker
pusha
mov dl, 7
mov ah, 2
int 21h
popa
endm
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
STRCPY MACRO
LOCAL @@OK
STRLEN
CMP BX, 31
JLE @@OK
MOV BX, 31
@@OK:
MOV CX, BX
CLD
REP MOVSB
MOV AL, '$'
MOV BYTE PTR[DI], AL
ENDM
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
STRLEN MACRO
LOCAL @@STRL01, @@STREND
;DEJA EN BX LA CANTIDAD DE CARACTERES DE UNA CADENA
MOV BX, 0
@@STRL01:
CMP BYTE PTR[SI + BX], '$'
JE @@STREND
INC BX
JMP @@STRL01
@@STREND:
NOP
ENDM
STRCAT MACRO
LOCAL @@CONCATSIZEMAL, @@CONCATSIZEOK, @@CONCATSIGO
PUSH DS
PUSH SI
STRLEN
MOV DX, BX
MOV SI, DI
PUSH ES
POP DS
STRLEN
ADD DI, BX
ADD BX, DX
CMP BX, 31
JG @@CONCATSIZEMAL
@@CONCATSIZEOK:
MOV CX, DX
JMP @@CONCATSIGO
@@CONCATSIZEMAL:
SUB BX, 31
SUB DX, BX
MOV CX, DX
@@CONCATSIGO:
PUSH DS
POP ES
POP SI
POP DS
CLD
REP MOVSB
MOV AL,'$'
MOV BYTE PTR [DI], AL
ENDM
STRCMP MACRO
LOCAL @@CICLO, @@NOTEQUAL, @@BYE
DEC DI
@@CICLO:
INC DI ;DS:DI -> SIGUIENTE CHAR EN CAD2
LODSB ;CARGA AL CON EL SIGUIENTE CHAR DE CAD1
CMP [DI], AL ;COMPARA CHARS
JNE @@NOTEQUAL ;SALTA DEL LOOP SI NO SON LOS MISMOS
CMP AL, '$' ;SON LOS MISMOS, VERIFICA EOF
JNE @@CICLO ;NO ES EOF, PASA A LOS SIGUIENTES
MOV BL, 0
TEST BL, BL
JMP @@BYE ;LOS STRING SON IGUALES (ZF = 1)
@@NOTEQUAL:
MOV BL, 1 ;LOS STRING NO SON IGUALES (ZF = 0)
TEST BL, BL
@@BYE:
NOP
ENDM
| 24.862348
| 77
| 0.317864
|
444f3f2a366cfc55987e7060336b85899b96fae8
| 32
|
asm
|
Assembly
|
tests/fn_le/9.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | 414
|
2016-10-14T22:39:20.000Z
|
2022-03-30T07:52:44.000Z
|
tests/fn_le/9.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | 100
|
2018-03-22T16:12:24.000Z
|
2022-03-26T09:19:23.000Z
|
tests/fn_le/9.asm
|
NullMember/customasm
|
6e34d6432583a41278e6b3596f1817ae82149531
|
[
"Apache-2.0"
] | 47
|
2017-06-29T15:12:13.000Z
|
2022-03-10T04:50:51.000Z
|
#d le(0xff000000) ; = 0x000000ff
| 32
| 32
| 0.71875
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.