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
8d894db5da8ec61c5d2f2c5253af5b735d478cad
325
asm
Assembly
CoprocessoreCalcoloAreaCerchio.asm
AntoAndGar/MIPS
776bbf3ca1d9a3184f469a11b5230d4d03622826
[ "MIT" ]
null
null
null
CoprocessoreCalcoloAreaCerchio.asm
AntoAndGar/MIPS
776bbf3ca1d9a3184f469a11b5230d4d03622826
[ "MIT" ]
null
null
null
CoprocessoreCalcoloAreaCerchio.asm
AntoAndGar/MIPS
776bbf3ca1d9a3184f469a11b5230d4d03622826
[ "MIT" ]
null
null
null
.text .globl main main: mtc1 $zero, $f5 li $v0, 6 syscall c.lt.s $f0, $f5 bc1t raggio_neg l.s $f1, pi mul.s $f12, $f0, $f0 mul.s $f12, $f12, $f1 li $v0, 2 syscall j fine raggio_neg: li $v0, 4 la $a0, Msg_Err syscall fine: li $v0, 10 syscall .data pi: .float 3.14 Msg_Err: .asciiz "inserire raggio > 0"
11.607143
38
0.612308
445116053ea4b637a7ece76d69813a108fda1639
372
asm
Assembly
programs/oeis/052/A052984.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/052/A052984.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/052/A052984.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A052984: a(n) = 5*a(n-1) - 2*a(n-2) for n>1, with a(0) = 1, a(1) = 3. ; 1,3,13,59,269,1227,5597,25531,116461,531243,2423293,11053979,50423309,230008587,1049196317,4785964411,21831429421,99585218283,454263232573,2072145726299,9452202166349,43116719379147,196679192563037,897162524056891,4092454235158381 mov $1,1 lpb $0 sub $0,1 add $2,$1 mul $2,2 add $1,$2 lpe
33.818182
232
0.725806
c0c50f55062f25966d5e4c4551c94d1b5f080895
1,145
asm
Assembly
linux/detect-avx512.asm
zhyhang/asm-misc
74e9b9582b53c65e476d3091bea014ea7682754b
[ "MIT" ]
null
null
null
linux/detect-avx512.asm
zhyhang/asm-misc
74e9b9582b53c65e476d3091bea014ea7682754b
[ "MIT" ]
null
null
null
linux/detect-avx512.asm
zhyhang/asm-misc
74e9b9582b53c65e476d3091bea014ea7682754b
[ "MIT" ]
null
null
null
;----------------------------------------------- ; Detect CPU supports AVX512 or not ; Compile(include debug info) >> nasm -F dwarf -g -f elf64 this.asm ; Static Link >> ld this.o /data/clouds/OneDrive/code/assembly/baselibs-2020/cpu2.0/cpu2/cpu2.o this ; Run >> ./this (chmod if needed) ; Ref >> https://stackoverflow.com/questions/6121792/how-to-check-if-a-cpu-supports-the-sse3-instruction-set ; >> https://github.com/Mysticial/FeatureDetector ; >> https://www.youtube.com/watch?v=543a1b-cPmU&t=218s global _start extern prnstrz extern prnline extern exitx section .data msg_support: db 'CPU supports AVX512 foundantion feature.', 0ah, 0 msg_unsuppt: db 'CPU not supports AVX512 feature.', 0ah, 0 section .text _start: mov eax, 07h xor ecx, ecx cpuid shr ebx, 16 test ebx, 1 jz .prn_unsupport mov rdi, msg_support call prnstrz jmp .normal_exit .prn_unsupport: mov rdi, msg_unsuppt call prnstrz .normal_exit: call exitx
27.261905
117
0.579913
660340208c70b3d809f89a9deb78d07e5e393898
768
asm
Assembly
libsrc/stdio/ansi/spectrum/f_ansi_dline.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/stdio/ansi/spectrum/f_ansi_dline.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
libsrc/stdio/ansi/spectrum/f_ansi_dline.asm
meesokim/z88dk
5763c7778f19a71d936b3200374059d267066bb2
[ "ClArtistic" ]
null
null
null
; ; Spectrum C Library ; ; ANSI Video handling for ZX Spectrum ; ; Clean a text line ; ; Stefano Bodrato - Apr. 2000 ; ; in: A = text row number ; ; ; $Id: f_ansi_dline.asm,v 1.3 2015/01/19 01:33:19 pauloscustodio Exp $ ; PUBLIC ansi_del_line .ansi_del_line push af and 24 ld d,a pop af push af and 7 rrca rrca rrca ld e,a ld hl,16384 add hl,de ;Line address in HL ld d,h ld e,l inc de ld b,8 .loop_dl push bc push hl push de ld (hl),0 ld bc,31 ldir pop de pop hl inc d inc h pop bc djnz loop_dl pop af ld d,0 ld e,a rr e rr d rr e rr d rr e rr d ld hl,22528 add hl,de ld d,h ld e,l inc de ld a,(23693) ; Use the default attributes ld (hl),a ld bc,31 ldir ret
11.130435
70
0.595052
77a8095c74f41b20bdbc1e66fc97cb9a12fe1389
2,834
asm
Assembly
Source/GamePositionClip.asm
hhprg/C64Engine
3e23bf2134f1b64aae1fcf502ecf98801bb9764e
[ "MIT" ]
4
2021-09-12T20:39:13.000Z
2022-01-24T11:32:20.000Z
Source/GamePositionClip.asm
hhprg/C64Engine
3e23bf2134f1b64aae1fcf502ecf98801bb9764e
[ "MIT" ]
null
null
null
Source/GamePositionClip.asm
hhprg/C64Engine
3e23bf2134f1b64aae1fcf502ecf98801bb9764e
[ "MIT" ]
null
null
null
// // Define PositionClips here and add them to list of all PositionClips. // { // Define keyframes. .var keyframes = List() .for (var i = 0; i < 33; i++) { .var angle = toRadians(i * 360 / 32) .eval keyframes.add(PosKey(i * 8, round(127 * (cos(angle) + 1)), round(85 * (sin(angle) + 1)))) } // Add to list of all PositionClips. .eval AllPositionClips.add(PositionClip("Circle (127, 85, 256)", keyframes)) } { // Define keyframes. .var keyframes = List() .for (var i = 0; i < 33; i++) { .var angle = toRadians(i * 360 / 32) .eval keyframes.add(PosKey(i * 9, round(100 * (cos(angle) + 1)), round(90 * (sin(angle) + 1)))) } // Add to list of all PositionClips. .eval AllPositionClips.add(PositionClip("Circle (100, 90, 288)", keyframes)) } { // Define keyframes. .var keyframes = List() .for (var i = 0; i < 17; i++) { .var angle = toRadians(i * 360 / 16) .eval keyframes.add(PosKey(i * 8, round(8 * (cos(angle) + 1)), round(32 * (sin(angle) + 1)))) } // Add to list of all PositionClips. .eval AllPositionClips.add(PositionClip("Circle (8, 32, 128)", keyframes)) } { // Define keyframes. .var keyframes = List() .for (var i = 0; i < 17; i++) { .var angle = toRadians(i * 360 / 16) .eval keyframes.add(PosKey(i * 12, round(64 * (cos(angle) + 1)), round(12 * (sin(2 * angle) + 1)))) } // Add to list of all PositionClips. .eval AllPositionClips.add(PositionClip("Circle (64, 12, 128)", keyframes)) } { // Define keyframes. .var keyframes = List() { .var positions = List() .var angle = 0 .var r0 = floor((200 - 21 - 40) / 1.75) .var r1 = r0 * 0.5 .var cx = r0 .var cy = 200 - 21 - r0 .for (var i = 0; i < 33; i++) { .var a0 = toRadians(i * 360.0 / (32.0 / 1)) .var a1 = 2 * a0 .var tween = i / 32.0 .var r = r0 + tween * (r1 - r0) .var a = a0 + tween * (a1 - a0) .eval positions.add(Position(-r * sin(a), r * cos(a))) } .for (var i = 0; i < 32; i++) { .var position = positions.get(31 - i) .eval positions.add(Position(-position.x, position.y)) } .for (var i = 0; i < 65; i++) { .var position = positions.get(i) .eval keyframes.add(PosKey(i * 12, round(1.2 * (position.x + cx)), round(position.y + cy))) } } // Add to list of all PositionClips. .eval AllPositionClips.add(PositionClip("Spiral (768)", keyframes)) }
28.918367
108
0.480946
ebf8e1b3679dc765f569884010d2a38513da7517
135
asm
Assembly
assembly_mips32/labs/lab1/lab1.asm
giannoier/Academic_projects
3bc376914befcc6fc31b01669c041617fd67974b
[ "MIT" ]
null
null
null
assembly_mips32/labs/lab1/lab1.asm
giannoier/Academic_projects
3bc376914befcc6fc31b01669c041617fd67974b
[ "MIT" ]
null
null
null
assembly_mips32/labs/lab1/lab1.asm
giannoier/Academic_projects
3bc376914befcc6fc31b01669c041617fd67974b
[ "MIT" ]
null
null
null
.text .globl main main: addi $t1,$0,20 loop: addi $t0,$t0,2 move $a0,$t0 li $v0,1 li $v0,1 syscall bne $t0,$t1,loop li $v0,10 syscall
9
16
0.651852
60ccbceedaa11ebd3df1f81df18fd296c4085c1b
7,147
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_662.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_662.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_662.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 %r9 push %rax push %rcx push %rdi push %rsi lea addresses_WC_ht+0xc31a, %r10 xor $41423, %rax mov (%r10), %r9d nop nop nop nop xor $51077, %r10 lea addresses_D_ht+0x117c6, %r9 clflush (%r9) nop nop cmp $27478, %r13 movb $0x61, (%r9) nop sub $45958, %r10 lea addresses_WC_ht+0x4a40, %rsi lea addresses_A_ht+0xf9a, %rdi clflush (%rdi) nop cmp %r9, %r9 mov $88, %rcx rep movsl nop nop nop nop nop cmp %rsi, %rsi lea addresses_UC_ht+0x182e2, %rcx nop nop nop add $40530, %rsi movb (%rcx), %r14b nop inc %r14 lea addresses_WC_ht+0x16a1e, %rax sub %rsi, %rsi mov (%rax), %di nop nop xor $29934, %r14 lea addresses_D_ht+0x107c0, %rdi nop nop nop nop and $20815, %r10 movups (%rdi), %xmm4 vpextrq $1, %xmm4, %r14 nop nop cmp $43293, %rcx lea addresses_UC_ht+0x212a, %r10 nop lfence movb $0x61, (%r10) sub %r14, %r14 lea addresses_normal_ht+0x55a, %r9 nop nop nop and %rsi, %rsi movl $0x61626364, (%r9) nop nop add $20465, %rdi lea addresses_A_ht+0x1821a, %rsi lea addresses_normal_ht+0xc01a, %rdi nop nop nop nop add %r14, %r14 mov $82, %rcx rep movsb add %rax, %rax pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r14 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %r9 push %rax push %rbp push %rbx push %rdx push %rsi // Load lea addresses_A+0x619a, %rax nop nop nop cmp $684, %rbp mov (%rax), %esi nop nop nop nop nop dec %rax // Store lea addresses_UC+0x1ecda, %rdx nop nop nop nop nop sub $12219, %r9 movl $0x51525354, (%rdx) nop nop cmp %rbp, %rbp // Store lea addresses_normal+0xc296, %rbp nop nop nop nop xor $15208, %rbx mov $0x5152535455565758, %r14 movq %r14, (%rbp) nop nop nop cmp %rbx, %rbx // Store lea addresses_RW+0x846a, %rbx nop nop nop cmp %rdx, %rdx mov $0x5152535455565758, %r9 movq %r9, %xmm4 movups %xmm4, (%rbx) nop nop add $578, %rdx // Faulty Load lea addresses_WT+0x181a, %r9 nop nop nop cmp %rsi, %rsi vmovups (%r9), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $0, %xmm3, %rbp lea oracles, %rdx and $0xff, %rbp shlq $12, %rbp mov (%rdx,%rbp,1), %rbp pop %rsi pop %rdx pop %rbx pop %rbp pop %rax pop %r9 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_A', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 6}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal', 'NT': True, 'AVXalign': False, 'size': 8, 'congruent': 2}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_RW', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 3}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 7}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}, 'dst': {'same': False, 'congruent': 6, 'type': 'addresses_A_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1}} {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_D_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}} {'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 */
34.360577
2,999
0.653281
007e92189e3c8ce617bcba212b3de6a33a0f75f3
9,846
asm
Assembly
sources/ippcp/asm_ia32/pcprij128ccmg9as.asm
ymarkovitch/ipp-crypto
ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8
[ "Apache-2.0" ]
null
null
null
sources/ippcp/asm_ia32/pcprij128ccmg9as.asm
ymarkovitch/ipp-crypto
ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8
[ "Apache-2.0" ]
null
null
null
sources/ippcp/asm_ia32/pcprij128ccmg9as.asm
ymarkovitch/ipp-crypto
ac8f1c443cc79e9f2f8508f8c707c9ed0caa22c8
[ "Apache-2.0" ]
null
null
null
;=============================================================================== ; Copyright 2014-2019 Intel Corporation ; All Rights Reserved. ; ; If this software was obtained under the Intel Simplified Software License, ; the following terms apply: ; ; The source code, information and material ("Material") contained herein is ; owned by Intel Corporation or its suppliers or licensors, and title to such ; Material remains with Intel Corporation or its suppliers or licensors. The ; Material contains proprietary information of Intel or its suppliers and ; licensors. The Material is protected by worldwide copyright laws and treaty ; provisions. No part of the Material may be used, copied, reproduced, ; modified, published, uploaded, posted, transmitted, distributed or disclosed ; in any way without Intel's prior express written permission. No license under ; any patent, copyright or other intellectual property rights in the Material ; is granted to or conferred upon you, either expressly, by implication, ; inducement, estoppel or otherwise. Any license under such intellectual ; property rights must be express and approved by Intel in writing. ; ; Unless otherwise agreed by Intel in writing, you may not remove or alter this ; notice or any other notice embedded in Materials by Intel or Intel's ; suppliers or licensors in any way. ; ; ; If this software was obtained under the Apache License, Version 2.0 (the ; "License"), the following terms apply: ; ; You may not use this file except in compliance with the License. You may ; obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ; ; ; Unless required by applicable law or agreed to in writing, software ; distributed under the License is distributed on an "AS IS" BASIS, WITHOUT ; WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ; ; See the License for the specific language governing permissions and ; limitations under the License. ;=============================================================================== ; ; ; Purpose: Cryptography Primitive. ; Rijndael Inverse Cipher function ; ; Content: ; AuthEncrypt_RIJ128_AES_NI() ; DecryptAuth_RIJ128_AES_NI() ; .686P .XMM .MODEL FLAT,C include asmdefs.inc include ia_emm.inc IFDEF IPP_PIC LD_ADDR MACRO reg:REQ, addr:REQ LOCAL LABEL call LABEL LABEL: pop reg sub reg, LABEL-addr ENDM ELSE LD_ADDR MACRO reg:REQ, addr:REQ lea reg, addr ENDM ENDIF IPPCODE SEGMENT 'CODE' ALIGN (IPP_ALIGN_FACTOR) IF (_IPP GE _IPP_P8) ALIGN IPP_ALIGN_FACTOR ENCODE_DATA: u128_str DB 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0 increment DQ 1,0 ;*************************************************************** ;* Purpose: Authenticate and Encrypt ;* ;* void AuthEncrypt_RIJ128_AES_NI(Ipp8u* outBlk, ;* const Ipp8u* inpBlk, ;* int nr, ;* const Ipp8u* pRKey, ;* Ipp32u len, ;* Ipp8u* pLocalState) ;* inp localCtx: ;* MAC ;* CTRi ;* CTRi mask ;* ;* out localCtx: ;* new MAC ;* S = enc(CTRi) ;*************************************************************** ;; ;; Lib = P8 ;; ;; Caller = ippsRijndael128CCMEncrypt ;; Caller = ippsRijndael128CCMEncryptMessage ;; ALIGN IPP_ALIGN_FACTOR IPPASM AuthEncrypt_RIJ128_AES_NI PROC NEAR C PUBLIC \ USES esi edi ebx,\ pInpBlk:PTR BYTE,\ ; input blocks address pOutBlk:PTR BYTE,\ ; output blocks address nr:DWORD,\ ; number of rounds pKey:PTR BYTE,\ ; key material address len:DWORD,\ ; length (bytes) pLocCtx:PTR BYTE ; pointer to the localState BYTES_PER_BLK = (16) mov eax, pLocCtx movdqa xmm0, oword ptr [eax] ; MAC movdqa xmm2, oword ptr [eax+sizeof(oword)] ; CTRi block movdqa xmm1, oword ptr [eax+sizeof(oword)*2] ; CTR mask LD_ADDR eax, ENCODE_DATA movdqa xmm7, oword ptr [eax+(u128_str-ENCODE_DATA)] pshufb xmm2, xmm7 ; CTRi block (LE) pshufb xmm1, xmm7 ; CTR mask movdqa xmm3, xmm1 pandn xmm3, xmm2 ; CTR block template pand xmm2, xmm1 ; CTR value mov edx, nr ; number of rounds mov ecx, pKey ; and keys lea edx, [edx*4] ; nrCounter = -nr*16 lea edx, [edx*4] ; pKey += nr*16 lea ecx, [ecx+edx] neg edx mov ebx, edx mov esi, pInpBlk mov edi, pOutBlk ALIGN IPP_ALIGN_FACTOR ;; ;; block-by-block processing ;; blk_loop: movdqu xmm4, oword ptr [esi] ; input block src[i] pxor xmm0, xmm4 ; MAC ^= src[i] movdqa xmm5, xmm3 paddq xmm2, oword ptr [eax+(increment-ENCODE_DATA)] ; advance counter bits pand xmm2, xmm1 ; and mask them por xmm5, xmm2 pshufb xmm5, xmm7 ; CTRi (BE) movdqa xmm6, oword ptr [ecx+edx] ; keys for whitening add edx, 16 pxor xmm5, xmm6 ; whitening (CTRi) pxor xmm0, xmm6 ; whitening (MAC) movdqa xmm6, oword ptr [ecx+edx] ; pre load operation's keys ALIGN IPP_ALIGN_FACTOR cipher_loop: aesenc xmm5, xmm6 ; regular round (CTRi) aesenc xmm0, xmm6 ; regular round (MAC) movdqa xmm6, oword ptr [ecx+edx+16] add edx, 16 jnz cipher_loop aesenclast xmm5, xmm6 ; irregular round (CTRi) aesenclast xmm0, xmm6 ; irregular round (MAC) pxor xmm4, xmm5 ; dst[i] = src[i] ^ ENC(CTRi) movdqu oword ptr[edi], xmm4 mov edx, ebx add esi, BYTES_PER_BLK add edi, BYTES_PER_BLK sub len, BYTES_PER_BLK jnz blk_loop mov eax, pLocCtx movdqu oword ptr[eax], xmm0 ; update MAC value movdqu oword ptr[eax+sizeof(oword)], xmm5 ; update ENC(Ctri) ret IPPASM AuthEncrypt_RIJ128_AES_NI ENDP ;*************************************************************** ;* Purpose: Decrypt and Authenticate ;* ;* void DecryptAuth_RIJ128_AES_NI(Ipp8u* outBlk, ;* const Ipp8u* inpBlk, ;* int nr, ;* const Ipp8u* pRKey, ;* Ipp32u len, ;* Ipp8u* pLocalState) ;* inp localCtx: ;* MAC ;* CTRi ;* CTRi mask ;* ;* out localCtx: ;* new MAC ;* S = enc(CTRi) ;*************************************************************** ;; ;; Lib = P8 ;; ;; Caller = ippsRijndael128CCMDecrypt ;; Caller = ippsRijndael128CCMDecryptMessage ;; ALIGN IPP_ALIGN_FACTOR IPPASM DecryptAuth_RIJ128_AES_NI PROC NEAR C PUBLIC \ USES esi edi ebx,\ pInpBlk:PTR BYTE,\ ; input blocks address pOutBlk:PTR BYTE,\ ; output blocks address nr:DWORD,\ ; number of rounds pKey:PTR BYTE,\ ; key material address len:DWORD,\ ; length (bytes) pLocCtx:PTR BYTE ; pointer to the localState BYTES_PER_BLK = (16) mov eax, pLocCtx movdqa xmm0, oword ptr [eax] ; MAC movdqa xmm2, oword ptr [eax+sizeof(oword)] ; CTRi block movdqa xmm1, oword ptr [eax+sizeof(oword)*2] ; CTR mask LD_ADDR eax, ENCODE_DATA movdqa xmm7, oword ptr [eax+(u128_str-ENCODE_DATA)] pshufb xmm2, xmm7 ; CTRi block (LE) pshufb xmm1, xmm7 ; CTR mask movdqa xmm3, xmm1 pandn xmm3, xmm2 ; CTR block template pand xmm2, xmm1 ; CTR value mov edx, nr ; number of rounds mov ecx, pKey ; and keys lea edx, [edx*4] ; nrCounter = -nr*16 lea edx, [edx*4] ; pKey += nr*16 lea ecx, [ecx+edx] neg edx mov ebx, edx mov esi, pInpBlk mov edi, pOutBlk ALIGN IPP_ALIGN_FACTOR ;; ;; block-by-block processing ;; blk_loop: ;;;;;;;;;;;;;;;;; ;; decryption ;;;;;;;;;;;;;;;;; movdqu xmm4, oword ptr [esi] ; input block src[i] movdqa xmm5, xmm3 paddq xmm2, oword ptr [eax+(increment-ENCODE_DATA)] ; advance counter bits pand xmm2, xmm1 ; and mask them por xmm5, xmm2 pshufb xmm5, xmm7 ; CTRi (BE) movdqa xmm6, oword ptr [ecx+edx] ; keys for whitening add edx, 16 pxor xmm5, xmm6 ; whitening (CTRi) movdqa xmm6, oword ptr [ecx+edx] ; pre load operation's keys ALIGN IPP_ALIGN_FACTOR cipher_loop: aesenc xmm5, xmm6 ; regular round (CTRi) movdqa xmm6, oword ptr [ecx+edx+16] add edx, 16 jnz cipher_loop aesenclast xmm5, xmm6 ; irregular round (CTRi) pxor xmm4, xmm5 ; dst[i] = src[i] ^ ENC(CTRi) movdqu oword ptr[edi], xmm4 ;;;;;;;;;;;;;;;;; ;; update MAC ;;;;;;;;;;;;;;;;; mov edx, ebx movdqa xmm6, oword ptr [ecx+edx] ; keys for whitening add edx, 16 pxor xmm0, xmm4 ; MAC ^= dst[i] pxor xmm0, xmm6 ; whitening (MAC) movdqa xmm6, oword ptr [ecx+edx] ; pre load operation's keys ALIGN IPP_ALIGN_FACTOR auth_loop: aesenc xmm0, xmm6 ; regular round (MAC) movdqa xmm6, oword ptr [ecx+edx+16] add edx, 16 jnz auth_loop aesenclast xmm0, xmm6 ; irregular round (MAC) mov edx, ebx add esi, BYTES_PER_BLK add edi, BYTES_PER_BLK sub len, BYTES_PER_BLK jnz blk_loop mov eax, pLocCtx movdqu oword ptr[eax], xmm0 ; update MAC value movdqu oword ptr[eax+sizeof(oword)], xmm6 ; update ENC(Ctri) ret IPPASM DecryptAuth_RIJ128_AES_NI ENDP ENDIF END
29.303571
80
0.574751
0667eeecadfd4a637e4016d4fd2b8df381963f4d
4,819
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_18587_561.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_18587_561.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_18587_561.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 %r9 push %rax push %rbp push %rcx lea addresses_A_ht+0x14f9b, %r10 nop nop nop dec %rax movb (%r10), %r11b nop nop nop nop nop sub $56648, %rbp lea addresses_WC_ht+0x1674b, %r10 nop nop nop nop dec %r9 mov $0x6162636465666768, %rcx movq %rcx, %xmm3 movups %xmm3, (%r10) nop nop cmp $27233, %rbp pop %rcx pop %rbp pop %rax pop %r9 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r14 push %r8 push %rbp push %rbx // Load lea addresses_WT+0x16c67, %r12 nop nop nop and $61382, %r10 movb (%r12), %r8b nop add $39719, %r10 // Store lea addresses_UC+0x849b, %rbp nop nop nop nop cmp $10058, %r12 movw $0x5152, (%rbp) nop nop sub %r14, %r14 // Faulty Load lea addresses_normal+0xabab, %r8 nop nop nop nop xor $2342, %rbx movb (%r8), %r10b lea oracles, %r14 and $0xff, %r10 shlq $12, %r10 mov (%r14,%r10,1), %r10 pop %rbx pop %rbp pop %r8 pop %r14 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': True}} {'34': 18587} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
44.62037
2,999
0.659265
cbe8f6e98a207a1312561eebcfbac323712ec13e
102
asm
Assembly
PROGS/relativo.asm
carlos-santiago-2017/HC12-MicrocontrollerNotes
76e98b5761eae8c157fc8fd34324bc6c543ca9a3
[ "MIT" ]
null
null
null
PROGS/relativo.asm
carlos-santiago-2017/HC12-MicrocontrollerNotes
76e98b5761eae8c157fc8fd34324bc6c543ca9a3
[ "MIT" ]
null
null
null
PROGS/relativo.asm
carlos-santiago-2017/HC12-MicrocontrollerNotes
76e98b5761eae8c157fc8fd34324bc6c543ca9a3
[ "MIT" ]
null
null
null
ORG $0100 UNO BRA TRES DOS BRA UNO TRES BRA CUATRO CUATRO BRA DOS 
14.571429
23
0.5
e77db17354183aa2f188aa8b7753c0aeb106a27f
359
asm
Assembly
programs/oeis/122/A122620.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/122/A122620.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/122/A122620.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A122620: n_{n+1}. ; 1,2,3,4,5,6,7,8,9,11,13,15,17,19,21,23,25,27,29,42,45,48,51,54,57,60,63,66,69,93,97,101,105,109,113,117,121,125,129,164,169,174,179,184,189,194,199,204,209,255,261,267,273,279,285,291,297,303,309,366,373,380,387,394 mov $4,$0 trn $0,8 mov $2,$0 lpb $0,1 trn $0,10 add $3,$2 lpe mov $1,$3 lpb $4,1 add $1,1 sub $4,1 lpe add $1,1
21.117647
217
0.626741
c73c39ac26dd74a3c796c12475ee956965ba7a40
1,379
asm
Assembly
programs/oeis/062/A062550.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/062/A062550.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/062/A062550.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A062550: Sum_{k = 1..2n} floor(2n/k). ; 0,3,8,14,20,27,35,41,50,58,66,74,84,91,101,111,119,127,140,146,158,168,176,186,198,207,217,227,239,247,261,267,280,292,300,312,326,332,344,356,368,377,391,399,411,425,435,443,459,467,482,492,502,514,528,538,552,562,572,582,602,609,619,635,645,657,671,679,695,705,719,727,746,754,766,780,790,804,820,826,842,856,864,876,894,905,917,927,943,951,971,981,993,1005,1015,1031,1047,1053,1070,1084,1098,1106,1122,1130,1146,1166,1174,1182,1202,1210,1226,1238,1252,1265,1279,1289,1305,1319,1329,1341,1363,1371,1383,1397,1409,1421,1441,1449,1466,1476,1492,1502,1520,1532,1542,1560,1572,1584,1602,1608,1630,1640,1648,1664,1686,1697,1707,1721,1733,1745,1767,1775,1789,1805,1819,1831,1849,1855,1873,1883,1901,1913,1932,1942,1954,1974,1982,1992,2016,2024,2040,2056,2068,2080,2094,2108,2128,2138,2148,2160,2186,2193,2211,2223,2235,2249,2265,2275,2291,2311,2325,2333,2351,2363,2375,2393,2409,2417,2439,2445,2468,2478,2488,2506,2526,2536,2546,2562,2578,2590,2616,2622,2636,2650,2660,2676,2698,2708,2722,2734,2752,2769,2783,2791,2809,2829,2839,2847,2871,2877,2897,2915,2927,2939,2959,2971,2983,2995,3013,3023,3049,3057,3074,3090,3100,3116,3130,3142,3164,3176 mul $0,2 mov $1,$0 mov $2,$0 sub $2,1 mov $3,2 mov $5,3 lpb $2 add $4,$2 lpb $4 add $1,1 trn $4,$3 lpe mul $5,2 lpb $5 add $3,2 mov $5,1 lpe sub $2,1 sub $3,$5 lpe
57.458333
1,141
0.728064
53160e25a2875424c7fe8dfe63ac5f12ed2b2621
108,478
asm
Assembly
sh.asm
ShwetiMahajan/xv6_schedulersOS
35efdf3d33562ec290331a7ee246e65af19e7e2e
[ "MIT-0" ]
null
null
null
sh.asm
ShwetiMahajan/xv6_schedulersOS
35efdf3d33562ec290331a7ee246e65af19e7e2e
[ "MIT-0" ]
null
null
null
sh.asm
ShwetiMahajan/xv6_schedulersOS
35efdf3d33562ec290331a7ee246e65af19e7e2e
[ "MIT-0" ]
null
null
null
_sh: file format elf32-i386 Disassembly of section .text: 00000000 <nulterminate>: } // NUL-terminate all the counted strings. struct cmd* nulterminate(struct cmd *cmd) { 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 53 push %ebx 4: 83 ec 14 sub $0x14,%esp 7: 8b 5d 08 mov 0x8(%ebp),%ebx struct execcmd *ecmd; struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) a: 85 db test %ebx,%ebx c: 74 05 je 13 <nulterminate+0x13> return 0; switch(cmd->type){ e: 83 3b 05 cmpl $0x5,(%ebx) 11: 76 0d jbe 20 <nulterminate+0x20> bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); break; } return cmd; } 13: 89 d8 mov %ebx,%eax 15: 83 c4 14 add $0x14,%esp 18: 5b pop %ebx 19: 5d pop %ebp 1a: c3 ret 1b: 90 nop 1c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi struct redircmd *rcmd; if(cmd == 0) return 0; switch(cmd->type){ 20: 8b 03 mov (%ebx),%eax 22: ff 24 85 08 13 00 00 jmp *0x1308(,%eax,4) 29: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi nulterminate(pcmd->right); break; case LIST: lcmd = (struct listcmd*)cmd; nulterminate(lcmd->left); 30: 8b 43 04 mov 0x4(%ebx),%eax 33: 89 04 24 mov %eax,(%esp) 36: e8 c5 ff ff ff call 0 <nulterminate> nulterminate(lcmd->right); 3b: 8b 43 08 mov 0x8(%ebx),%eax 3e: 89 04 24 mov %eax,(%esp) 41: e8 ba ff ff ff call 0 <nulterminate> bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); break; } return cmd; } 46: 89 d8 mov %ebx,%eax 48: 83 c4 14 add $0x14,%esp 4b: 5b pop %ebx 4c: 5d pop %ebp 4d: c3 ret 4e: 66 90 xchg %ax,%ax nulterminate(lcmd->right); break; case BACK: bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); 50: 8b 43 04 mov 0x4(%ebx),%eax 53: 89 04 24 mov %eax,(%esp) 56: e8 a5 ff ff ff call 0 <nulterminate> break; } return cmd; } 5b: 89 d8 mov %ebx,%eax 5d: 83 c4 14 add $0x14,%esp 60: 5b pop %ebx 61: 5d pop %ebp 62: c3 ret 63: 90 nop 64: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi *ecmd->eargv[i] = 0; break; case REDIR: rcmd = (struct redircmd*)cmd; nulterminate(rcmd->cmd); 68: 8b 43 04 mov 0x4(%ebx),%eax 6b: 89 04 24 mov %eax,(%esp) 6e: e8 8d ff ff ff call 0 <nulterminate> *rcmd->efile = 0; 73: 8b 43 0c mov 0xc(%ebx),%eax 76: c6 00 00 movb $0x0,(%eax) bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); break; } return cmd; } 79: 89 d8 mov %ebx,%eax 7b: 83 c4 14 add $0x14,%esp 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 return 0; switch(cmd->type){ case EXEC: ecmd = (struct execcmd*)cmd; for(i=0; ecmd->argv[i]; i++) 88: 8b 43 04 mov 0x4(%ebx),%eax 8b: 85 c0 test %eax,%eax 8d: 74 84 je 13 <nulterminate+0x13> 8f: 89 d8 mov %ebx,%eax 91: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi *ecmd->eargv[i] = 0; 98: 8b 50 2c mov 0x2c(%eax),%edx 9b: c6 02 00 movb $0x0,(%edx) return 0; switch(cmd->type){ case EXEC: ecmd = (struct execcmd*)cmd; for(i=0; ecmd->argv[i]; i++) 9e: 8b 50 08 mov 0x8(%eax),%edx a1: 83 c0 04 add $0x4,%eax a4: 85 d2 test %edx,%edx a6: 75 f0 jne 98 <nulterminate+0x98> bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); break; } return cmd; } a8: 89 d8 mov %ebx,%eax aa: 83 c4 14 add $0x14,%esp ad: 5b pop %ebx ae: 5d pop %ebp af: c3 ret 000000b0 <peek>: return ret; } int peek(char **ps, char *es, char *toks) { b0: 55 push %ebp b1: 89 e5 mov %esp,%ebp b3: 57 push %edi b4: 56 push %esi b5: 53 push %ebx b6: 83 ec 1c sub $0x1c,%esp b9: 8b 7d 08 mov 0x8(%ebp),%edi bc: 8b 75 0c mov 0xc(%ebp),%esi char *s; s = *ps; bf: 8b 1f mov (%edi),%ebx while(s < es && strchr(whitespace, *s)) c1: 39 f3 cmp %esi,%ebx c3: 72 0a jb cf <peek+0x1f> c5: eb 1f jmp e6 <peek+0x36> c7: 90 nop s++; c8: 83 c3 01 add $0x1,%ebx peek(char **ps, char *es, char *toks) { char *s; s = *ps; while(s < es && strchr(whitespace, *s)) cb: 39 de cmp %ebx,%esi cd: 76 17 jbe e6 <peek+0x36> cf: 0f be 03 movsbl (%ebx),%eax d2: c7 04 24 08 14 00 00 movl $0x1408,(%esp) d9: 89 44 24 04 mov %eax,0x4(%esp) dd: e8 1e 0c 00 00 call d00 <strchr> e2: 85 c0 test %eax,%eax e4: 75 e2 jne c8 <peek+0x18> s++; *ps = s; e6: 89 1f mov %ebx,(%edi) return *s && strchr(toks, *s); e8: 0f b6 13 movzbl (%ebx),%edx eb: 31 c0 xor %eax,%eax ed: 84 d2 test %dl,%dl ef: 75 0f jne 100 <peek+0x50> } f1: 83 c4 1c add $0x1c,%esp f4: 5b pop %ebx f5: 5e pop %esi f6: 5f pop %edi f7: 5d pop %ebp f8: c3 ret f9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi s = *ps; while(s < es && strchr(whitespace, *s)) s++; *ps = s; return *s && strchr(toks, *s); 100: 8b 45 10 mov 0x10(%ebp),%eax 103: 0f be d2 movsbl %dl,%edx 106: 89 54 24 04 mov %edx,0x4(%esp) 10a: 89 04 24 mov %eax,(%esp) 10d: e8 ee 0b 00 00 call d00 <strchr> 112: 85 c0 test %eax,%eax 114: 0f 95 c0 setne %al } 117: 83 c4 1c add $0x1c,%esp s = *ps; while(s < es && strchr(whitespace, *s)) s++; *ps = s; return *s && strchr(toks, *s); 11a: 0f b6 c0 movzbl %al,%eax } 11d: 5b pop %ebx 11e: 5e pop %esi 11f: 5f pop %edi 120: 5d pop %ebp 121: c3 ret 122: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000130 <gettoken>: char whitespace[] = " \t\r\n\v"; char symbols[] = "<|>&;()"; int gettoken(char **ps, char *es, char **q, char **eq) { 130: 55 push %ebp 131: 89 e5 mov %esp,%ebp 133: 57 push %edi 134: 56 push %esi 135: 53 push %ebx 136: 83 ec 1c sub $0x1c,%esp char *s; int ret; s = *ps; 139: 8b 45 08 mov 0x8(%ebp),%eax char whitespace[] = " \t\r\n\v"; char symbols[] = "<|>&;()"; int gettoken(char **ps, char *es, char **q, char **eq) { 13c: 8b 75 0c mov 0xc(%ebp),%esi 13f: 8b 7d 10 mov 0x10(%ebp),%edi char *s; int ret; s = *ps; 142: 8b 18 mov (%eax),%ebx while(s < es && strchr(whitespace, *s)) 144: 39 f3 cmp %esi,%ebx 146: 72 0f jb 157 <gettoken+0x27> 148: eb 24 jmp 16e <gettoken+0x3e> 14a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi s++; 150: 83 c3 01 add $0x1,%ebx { char *s; int ret; s = *ps; while(s < es && strchr(whitespace, *s)) 153: 39 de cmp %ebx,%esi 155: 76 17 jbe 16e <gettoken+0x3e> 157: 0f be 03 movsbl (%ebx),%eax 15a: c7 04 24 08 14 00 00 movl $0x1408,(%esp) 161: 89 44 24 04 mov %eax,0x4(%esp) 165: e8 96 0b 00 00 call d00 <strchr> 16a: 85 c0 test %eax,%eax 16c: 75 e2 jne 150 <gettoken+0x20> s++; if(q) 16e: 85 ff test %edi,%edi 170: 74 02 je 174 <gettoken+0x44> *q = s; 172: 89 1f mov %ebx,(%edi) ret = *s; 174: 0f b6 13 movzbl (%ebx),%edx 177: 0f be fa movsbl %dl,%edi switch(*s){ 17a: 80 fa 3c cmp $0x3c,%dl s = *ps; while(s < es && strchr(whitespace, *s)) s++; if(q) *q = s; ret = *s; 17d: 89 f8 mov %edi,%eax switch(*s){ 17f: 7f 4f jg 1d0 <gettoken+0xa0> 181: 80 fa 3b cmp $0x3b,%dl 184: 0f 8c 9e 00 00 00 jl 228 <gettoken+0xf8> case '(': case ')': case ';': case '&': case '<': s++; 18a: 83 c3 01 add $0x1,%ebx ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) s++; break; } if(eq) 18d: 8b 55 14 mov 0x14(%ebp),%edx 190: 85 d2 test %edx,%edx 192: 74 05 je 199 <gettoken+0x69> *eq = s; 194: 8b 45 14 mov 0x14(%ebp),%eax 197: 89 18 mov %ebx,(%eax) while(s < es && strchr(whitespace, *s)) 199: 39 f3 cmp %esi,%ebx 19b: 72 0a jb 1a7 <gettoken+0x77> 19d: eb 1f jmp 1be <gettoken+0x8e> 19f: 90 nop s++; 1a0: 83 c3 01 add $0x1,%ebx break; } if(eq) *eq = s; while(s < es && strchr(whitespace, *s)) 1a3: 39 de cmp %ebx,%esi 1a5: 76 17 jbe 1be <gettoken+0x8e> 1a7: 0f be 03 movsbl (%ebx),%eax 1aa: c7 04 24 08 14 00 00 movl $0x1408,(%esp) 1b1: 89 44 24 04 mov %eax,0x4(%esp) 1b5: e8 46 0b 00 00 call d00 <strchr> 1ba: 85 c0 test %eax,%eax 1bc: 75 e2 jne 1a0 <gettoken+0x70> s++; *ps = s; 1be: 8b 45 08 mov 0x8(%ebp),%eax 1c1: 89 18 mov %ebx,(%eax) return ret; } 1c3: 83 c4 1c add $0x1c,%esp 1c6: 89 f8 mov %edi,%eax 1c8: 5b pop %ebx 1c9: 5e pop %esi 1ca: 5f pop %edi 1cb: 5d pop %ebp 1cc: c3 ret 1cd: 8d 76 00 lea 0x0(%esi),%esi while(s < es && strchr(whitespace, *s)) s++; if(q) *q = s; ret = *s; switch(*s){ 1d0: 80 fa 3e cmp $0x3e,%dl 1d3: 74 73 je 248 <gettoken+0x118> 1d5: 80 fa 7c cmp $0x7c,%dl 1d8: 74 b0 je 18a <gettoken+0x5a> s++; } break; default: ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) 1da: 39 de cmp %ebx,%esi 1dc: 77 2b ja 209 <gettoken+0xd9> 1de: 66 90 xchg %ax,%ax 1e0: eb 3b jmp 21d <gettoken+0xed> 1e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 1e8: 0f be 03 movsbl (%ebx),%eax 1eb: c7 04 24 0e 14 00 00 movl $0x140e,(%esp) 1f2: 89 44 24 04 mov %eax,0x4(%esp) 1f6: e8 05 0b 00 00 call d00 <strchr> 1fb: 85 c0 test %eax,%eax 1fd: 75 1e jne 21d <gettoken+0xed> s++; 1ff: 83 c3 01 add $0x1,%ebx s++; } break; default: ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) 202: 39 de cmp %ebx,%esi 204: 76 17 jbe 21d <gettoken+0xed> 206: 0f be 03 movsbl (%ebx),%eax 209: 89 44 24 04 mov %eax,0x4(%esp) 20d: c7 04 24 08 14 00 00 movl $0x1408,(%esp) 214: e8 e7 0a 00 00 call d00 <strchr> 219: 85 c0 test %eax,%eax 21b: 74 cb je 1e8 <gettoken+0xb8> 21d: bf 61 00 00 00 mov $0x61,%edi 222: e9 66 ff ff ff jmp 18d <gettoken+0x5d> 227: 90 nop while(s < es && strchr(whitespace, *s)) s++; if(q) *q = s; ret = *s; switch(*s){ 228: 80 fa 29 cmp $0x29,%dl 22b: 7f ad jg 1da <gettoken+0xaa> 22d: 80 fa 28 cmp $0x28,%dl 230: 0f 8d 54 ff ff ff jge 18a <gettoken+0x5a> 236: 84 d2 test %dl,%dl 238: 0f 84 4f ff ff ff je 18d <gettoken+0x5d> 23e: 80 fa 26 cmp $0x26,%dl 241: 75 97 jne 1da <gettoken+0xaa> 243: e9 42 ff ff ff jmp 18a <gettoken+0x5a> case '&': case '<': s++; break; case '>': s++; 248: 83 c3 01 add $0x1,%ebx if(*s == '>'){ 24b: 80 3b 3e cmpb $0x3e,(%ebx) 24e: 66 90 xchg %ax,%ax 250: 0f 85 37 ff ff ff jne 18d <gettoken+0x5d> ret = '+'; s++; 256: 83 c3 01 add $0x1,%ebx 259: bf 2b 00 00 00 mov $0x2b,%edi 25e: e9 2a ff ff ff jmp 18d <gettoken+0x5d> 263: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 269: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000270 <backcmd>: return (struct cmd*)cmd; } struct cmd* backcmd(struct cmd *subcmd) { 270: 55 push %ebp 271: 89 e5 mov %esp,%ebp 273: 53 push %ebx 274: 83 ec 14 sub $0x14,%esp struct backcmd *cmd; cmd = malloc(sizeof(*cmd)); 277: c7 04 24 08 00 00 00 movl $0x8,(%esp) 27e: e8 9d 0f 00 00 call 1220 <malloc> memset(cmd, 0, sizeof(*cmd)); 283: c7 44 24 08 08 00 00 movl $0x8,0x8(%esp) 28a: 00 28b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 292: 00 struct cmd* backcmd(struct cmd *subcmd) { struct backcmd *cmd; cmd = malloc(sizeof(*cmd)); 293: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 295: 89 04 24 mov %eax,(%esp) 298: e8 43 0a 00 00 call ce0 <memset> cmd->type = BACK; 29d: c7 03 05 00 00 00 movl $0x5,(%ebx) cmd->cmd = subcmd; 2a3: 8b 45 08 mov 0x8(%ebp),%eax 2a6: 89 43 04 mov %eax,0x4(%ebx) return (struct cmd*)cmd; } 2a9: 89 d8 mov %ebx,%eax 2ab: 83 c4 14 add $0x14,%esp 2ae: 5b pop %ebx 2af: 5d pop %ebp 2b0: c3 ret 2b1: eb 0d jmp 2c0 <listcmd> 2b3: 90 nop 2b4: 90 nop 2b5: 90 nop 2b6: 90 nop 2b7: 90 nop 2b8: 90 nop 2b9: 90 nop 2ba: 90 nop 2bb: 90 nop 2bc: 90 nop 2bd: 90 nop 2be: 90 nop 2bf: 90 nop 000002c0 <listcmd>: return (struct cmd*)cmd; } struct cmd* listcmd(struct cmd *left, struct cmd *right) { 2c0: 55 push %ebp 2c1: 89 e5 mov %esp,%ebp 2c3: 53 push %ebx 2c4: 83 ec 14 sub $0x14,%esp struct listcmd *cmd; cmd = malloc(sizeof(*cmd)); 2c7: c7 04 24 0c 00 00 00 movl $0xc,(%esp) 2ce: e8 4d 0f 00 00 call 1220 <malloc> memset(cmd, 0, sizeof(*cmd)); 2d3: c7 44 24 08 0c 00 00 movl $0xc,0x8(%esp) 2da: 00 2db: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 2e2: 00 struct cmd* listcmd(struct cmd *left, struct cmd *right) { struct listcmd *cmd; cmd = malloc(sizeof(*cmd)); 2e3: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 2e5: 89 04 24 mov %eax,(%esp) 2e8: e8 f3 09 00 00 call ce0 <memset> cmd->type = LIST; 2ed: c7 03 04 00 00 00 movl $0x4,(%ebx) cmd->left = left; 2f3: 8b 45 08 mov 0x8(%ebp),%eax 2f6: 89 43 04 mov %eax,0x4(%ebx) cmd->right = right; 2f9: 8b 45 0c mov 0xc(%ebp),%eax 2fc: 89 43 08 mov %eax,0x8(%ebx) return (struct cmd*)cmd; } 2ff: 89 d8 mov %ebx,%eax 301: 83 c4 14 add $0x14,%esp 304: 5b pop %ebx 305: 5d pop %ebp 306: c3 ret 307: 89 f6 mov %esi,%esi 309: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000310 <pipecmd>: return (struct cmd*)cmd; } struct cmd* pipecmd(struct cmd *left, struct cmd *right) { 310: 55 push %ebp 311: 89 e5 mov %esp,%ebp 313: 53 push %ebx 314: 83 ec 14 sub $0x14,%esp struct pipecmd *cmd; cmd = malloc(sizeof(*cmd)); 317: c7 04 24 0c 00 00 00 movl $0xc,(%esp) 31e: e8 fd 0e 00 00 call 1220 <malloc> memset(cmd, 0, sizeof(*cmd)); 323: c7 44 24 08 0c 00 00 movl $0xc,0x8(%esp) 32a: 00 32b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 332: 00 struct cmd* pipecmd(struct cmd *left, struct cmd *right) { struct pipecmd *cmd; cmd = malloc(sizeof(*cmd)); 333: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 335: 89 04 24 mov %eax,(%esp) 338: e8 a3 09 00 00 call ce0 <memset> cmd->type = PIPE; 33d: c7 03 03 00 00 00 movl $0x3,(%ebx) cmd->left = left; 343: 8b 45 08 mov 0x8(%ebp),%eax 346: 89 43 04 mov %eax,0x4(%ebx) cmd->right = right; 349: 8b 45 0c mov 0xc(%ebp),%eax 34c: 89 43 08 mov %eax,0x8(%ebx) return (struct cmd*)cmd; } 34f: 89 d8 mov %ebx,%eax 351: 83 c4 14 add $0x14,%esp 354: 5b pop %ebx 355: 5d pop %ebp 356: c3 ret 357: 89 f6 mov %esi,%esi 359: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000360 <redircmd>: return (struct cmd*)cmd; } struct cmd* redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd) { 360: 55 push %ebp 361: 89 e5 mov %esp,%ebp 363: 53 push %ebx 364: 83 ec 14 sub $0x14,%esp struct redircmd *cmd; cmd = malloc(sizeof(*cmd)); 367: c7 04 24 18 00 00 00 movl $0x18,(%esp) 36e: e8 ad 0e 00 00 call 1220 <malloc> memset(cmd, 0, sizeof(*cmd)); 373: c7 44 24 08 18 00 00 movl $0x18,0x8(%esp) 37a: 00 37b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 382: 00 struct cmd* redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd) { struct redircmd *cmd; cmd = malloc(sizeof(*cmd)); 383: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 385: 89 04 24 mov %eax,(%esp) 388: e8 53 09 00 00 call ce0 <memset> cmd->type = REDIR; 38d: c7 03 02 00 00 00 movl $0x2,(%ebx) cmd->cmd = subcmd; 393: 8b 45 08 mov 0x8(%ebp),%eax 396: 89 43 04 mov %eax,0x4(%ebx) cmd->file = file; 399: 8b 45 0c mov 0xc(%ebp),%eax 39c: 89 43 08 mov %eax,0x8(%ebx) cmd->efile = efile; 39f: 8b 45 10 mov 0x10(%ebp),%eax 3a2: 89 43 0c mov %eax,0xc(%ebx) cmd->mode = mode; 3a5: 8b 45 14 mov 0x14(%ebp),%eax 3a8: 89 43 10 mov %eax,0x10(%ebx) cmd->fd = fd; 3ab: 8b 45 18 mov 0x18(%ebp),%eax 3ae: 89 43 14 mov %eax,0x14(%ebx) return (struct cmd*)cmd; } 3b1: 89 d8 mov %ebx,%eax 3b3: 83 c4 14 add $0x14,%esp 3b6: 5b pop %ebx 3b7: 5d pop %ebp 3b8: c3 ret 3b9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000003c0 <execcmd>: //PAGEBREAK! // Constructors struct cmd* execcmd(void) { 3c0: 55 push %ebp 3c1: 89 e5 mov %esp,%ebp 3c3: 53 push %ebx 3c4: 83 ec 14 sub $0x14,%esp struct execcmd *cmd; cmd = malloc(sizeof(*cmd)); 3c7: c7 04 24 54 00 00 00 movl $0x54,(%esp) 3ce: e8 4d 0e 00 00 call 1220 <malloc> memset(cmd, 0, sizeof(*cmd)); 3d3: c7 44 24 08 54 00 00 movl $0x54,0x8(%esp) 3da: 00 3db: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 3e2: 00 struct cmd* execcmd(void) { struct execcmd *cmd; cmd = malloc(sizeof(*cmd)); 3e3: 89 c3 mov %eax,%ebx memset(cmd, 0, sizeof(*cmd)); 3e5: 89 04 24 mov %eax,(%esp) 3e8: e8 f3 08 00 00 call ce0 <memset> cmd->type = EXEC; return (struct cmd*)cmd; } 3ed: 89 d8 mov %ebx,%eax { struct execcmd *cmd; cmd = malloc(sizeof(*cmd)); memset(cmd, 0, sizeof(*cmd)); cmd->type = EXEC; 3ef: c7 03 01 00 00 00 movl $0x1,(%ebx) return (struct cmd*)cmd; } 3f5: 83 c4 14 add $0x14,%esp 3f8: 5b pop %ebx 3f9: 5d pop %ebp 3fa: c3 ret 3fb: 90 nop 3fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000400 <panic>: exit(); } void panic(char *s) { 400: 55 push %ebp 401: 89 e5 mov %esp,%ebp 403: 83 ec 18 sub $0x18,%esp printf(2, "%s\n", s); 406: 8b 45 08 mov 0x8(%ebp),%eax 409: c7 44 24 04 a1 13 00 movl $0x13a1,0x4(%esp) 410: 00 411: c7 04 24 02 00 00 00 movl $0x2,(%esp) 418: 89 44 24 08 mov %eax,0x8(%esp) 41c: e8 7f 0b 00 00 call fa0 <printf> exit(); 421: e8 42 0a 00 00 call e68 <exit> 426: 8d 76 00 lea 0x0(%esi),%esi 429: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000430 <parseredirs>: return cmd; } struct cmd* parseredirs(struct cmd *cmd, char **ps, char *es) { 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 3c sub $0x3c,%esp 439: 8b 7d 0c mov 0xc(%ebp),%edi 43c: 8b 75 10 mov 0x10(%ebp),%esi 43f: 90 nop int tok; char *q, *eq; while(peek(ps, es, "<>")){ 440: c7 44 24 08 55 13 00 movl $0x1355,0x8(%esp) 447: 00 448: 89 74 24 04 mov %esi,0x4(%esp) 44c: 89 3c 24 mov %edi,(%esp) 44f: e8 5c fc ff ff call b0 <peek> 454: 85 c0 test %eax,%eax 456: 0f 84 a4 00 00 00 je 500 <parseredirs+0xd0> tok = gettoken(ps, es, 0, 0); 45c: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 463: 00 464: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 46b: 00 46c: 89 74 24 04 mov %esi,0x4(%esp) 470: 89 3c 24 mov %edi,(%esp) 473: e8 b8 fc ff ff call 130 <gettoken> if(gettoken(ps, es, &q, &eq) != 'a') 478: 89 74 24 04 mov %esi,0x4(%esp) 47c: 89 3c 24 mov %edi,(%esp) { int tok; char *q, *eq; while(peek(ps, es, "<>")){ tok = gettoken(ps, es, 0, 0); 47f: 89 c3 mov %eax,%ebx if(gettoken(ps, es, &q, &eq) != 'a') 481: 8d 45 e0 lea -0x20(%ebp),%eax 484: 89 44 24 0c mov %eax,0xc(%esp) 488: 8d 45 e4 lea -0x1c(%ebp),%eax 48b: 89 44 24 08 mov %eax,0x8(%esp) 48f: e8 9c fc ff ff call 130 <gettoken> 494: 83 f8 61 cmp $0x61,%eax 497: 74 0c je 4a5 <parseredirs+0x75> panic("missing file for redirection"); 499: c7 04 24 38 13 00 00 movl $0x1338,(%esp) 4a0: e8 5b ff ff ff call 400 <panic> switch(tok){ 4a5: 83 fb 3c cmp $0x3c,%ebx 4a8: 74 3e je 4e8 <parseredirs+0xb8> 4aa: 83 fb 3e cmp $0x3e,%ebx 4ad: 74 05 je 4b4 <parseredirs+0x84> 4af: 83 fb 2b cmp $0x2b,%ebx 4b2: 75 8c jne 440 <parseredirs+0x10> break; case '>': cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); break; case '+': // >> cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); 4b4: c7 44 24 10 01 00 00 movl $0x1,0x10(%esp) 4bb: 00 4bc: c7 44 24 0c 01 02 00 movl $0x201,0xc(%esp) 4c3: 00 4c4: 8b 45 e0 mov -0x20(%ebp),%eax 4c7: 89 44 24 08 mov %eax,0x8(%esp) 4cb: 8b 45 e4 mov -0x1c(%ebp),%eax 4ce: 89 44 24 04 mov %eax,0x4(%esp) 4d2: 8b 45 08 mov 0x8(%ebp),%eax 4d5: 89 04 24 mov %eax,(%esp) 4d8: e8 83 fe ff ff call 360 <redircmd> 4dd: 89 45 08 mov %eax,0x8(%ebp) 4e0: e9 5b ff ff ff jmp 440 <parseredirs+0x10> 4e5: 8d 76 00 lea 0x0(%esi),%esi tok = gettoken(ps, es, 0, 0); if(gettoken(ps, es, &q, &eq) != 'a') panic("missing file for redirection"); switch(tok){ case '<': cmd = redircmd(cmd, q, eq, O_RDONLY, 0); 4e8: c7 44 24 10 00 00 00 movl $0x0,0x10(%esp) 4ef: 00 4f0: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 4f7: 00 4f8: eb ca jmp 4c4 <parseredirs+0x94> 4fa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); break; } } return cmd; } 500: 8b 45 08 mov 0x8(%ebp),%eax 503: 83 c4 3c add $0x3c,%esp 506: 5b pop %ebx 507: 5e pop %esi 508: 5f pop %edi 509: 5d pop %ebp 50a: c3 ret 50b: 90 nop 50c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000510 <parseexec>: return cmd; } struct cmd* parseexec(char **ps, char *es) { 510: 55 push %ebp 511: 89 e5 mov %esp,%ebp 513: 57 push %edi 514: 56 push %esi 515: 53 push %ebx 516: 83 ec 3c sub $0x3c,%esp 519: 8b 75 08 mov 0x8(%ebp),%esi 51c: 8b 7d 0c mov 0xc(%ebp),%edi char *q, *eq; int tok, argc; struct execcmd *cmd; struct cmd *ret; if(peek(ps, es, "(")) 51f: c7 44 24 08 58 13 00 movl $0x1358,0x8(%esp) 526: 00 527: 89 34 24 mov %esi,(%esp) 52a: 89 7c 24 04 mov %edi,0x4(%esp) 52e: e8 7d fb ff ff call b0 <peek> 533: 85 c0 test %eax,%eax 535: 0f 85 cd 00 00 00 jne 608 <parseexec+0xf8> return parseblock(ps, es); ret = execcmd(); 53b: e8 80 fe ff ff call 3c0 <execcmd> cmd = (struct execcmd*)ret; argc = 0; ret = parseredirs(ret, ps, es); 540: 31 db xor %ebx,%ebx 542: 89 7c 24 08 mov %edi,0x8(%esp) 546: 89 74 24 04 mov %esi,0x4(%esp) struct cmd *ret; if(peek(ps, es, "(")) return parseblock(ps, es); ret = execcmd(); 54a: 89 45 d4 mov %eax,-0x2c(%ebp) cmd = (struct execcmd*)ret; argc = 0; ret = parseredirs(ret, ps, es); 54d: 89 04 24 mov %eax,(%esp) 550: e8 db fe ff ff call 430 <parseredirs> 555: 89 45 d0 mov %eax,-0x30(%ebp) while(!peek(ps, es, "|)&;")){ 558: eb 1c jmp 576 <parseexec+0x66> 55a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi cmd->argv[argc] = q; cmd->eargv[argc] = eq; argc++; if(argc >= MAXARGS) panic("too many args"); ret = parseredirs(ret, ps, es); 560: 8b 45 d0 mov -0x30(%ebp),%eax 563: 89 7c 24 08 mov %edi,0x8(%esp) 567: 89 74 24 04 mov %esi,0x4(%esp) 56b: 89 04 24 mov %eax,(%esp) 56e: e8 bd fe ff ff call 430 <parseredirs> 573: 89 45 d0 mov %eax,-0x30(%ebp) ret = execcmd(); cmd = (struct execcmd*)ret; argc = 0; ret = parseredirs(ret, ps, es); while(!peek(ps, es, "|)&;")){ 576: c7 44 24 08 6f 13 00 movl $0x136f,0x8(%esp) 57d: 00 57e: 89 7c 24 04 mov %edi,0x4(%esp) 582: 89 34 24 mov %esi,(%esp) 585: e8 26 fb ff ff call b0 <peek> 58a: 85 c0 test %eax,%eax 58c: 75 5a jne 5e8 <parseexec+0xd8> if((tok=gettoken(ps, es, &q, &eq)) == 0) 58e: 8d 45 e0 lea -0x20(%ebp),%eax 591: 8d 55 e4 lea -0x1c(%ebp),%edx 594: 89 44 24 0c mov %eax,0xc(%esp) 598: 89 54 24 08 mov %edx,0x8(%esp) 59c: 89 7c 24 04 mov %edi,0x4(%esp) 5a0: 89 34 24 mov %esi,(%esp) 5a3: e8 88 fb ff ff call 130 <gettoken> 5a8: 85 c0 test %eax,%eax 5aa: 74 3c je 5e8 <parseexec+0xd8> break; if(tok != 'a') 5ac: 83 f8 61 cmp $0x61,%eax 5af: 74 0c je 5bd <parseexec+0xad> panic("syntax"); 5b1: c7 04 24 5a 13 00 00 movl $0x135a,(%esp) 5b8: e8 43 fe ff ff call 400 <panic> cmd->argv[argc] = q; 5bd: 8b 45 e4 mov -0x1c(%ebp),%eax 5c0: 8b 55 d4 mov -0x2c(%ebp),%edx 5c3: 89 44 9a 04 mov %eax,0x4(%edx,%ebx,4) cmd->eargv[argc] = eq; 5c7: 8b 45 e0 mov -0x20(%ebp),%eax 5ca: 89 44 9a 2c mov %eax,0x2c(%edx,%ebx,4) argc++; 5ce: 83 c3 01 add $0x1,%ebx if(argc >= MAXARGS) 5d1: 83 fb 09 cmp $0x9,%ebx 5d4: 7e 8a jle 560 <parseexec+0x50> panic("too many args"); 5d6: c7 04 24 61 13 00 00 movl $0x1361,(%esp) 5dd: e8 1e fe ff ff call 400 <panic> 5e2: e9 79 ff ff ff jmp 560 <parseexec+0x50> 5e7: 90 nop ret = parseredirs(ret, ps, es); } cmd->argv[argc] = 0; 5e8: 8b 55 d4 mov -0x2c(%ebp),%edx 5eb: c7 44 9a 04 00 00 00 movl $0x0,0x4(%edx,%ebx,4) 5f2: 00 cmd->eargv[argc] = 0; 5f3: c7 44 9a 2c 00 00 00 movl $0x0,0x2c(%edx,%ebx,4) 5fa: 00 return ret; } 5fb: 8b 45 d0 mov -0x30(%ebp),%eax 5fe: 83 c4 3c add $0x3c,%esp 601: 5b pop %ebx 602: 5e pop %esi 603: 5f pop %edi 604: 5d pop %ebp 605: c3 ret 606: 66 90 xchg %ax,%ax int tok, argc; struct execcmd *cmd; struct cmd *ret; if(peek(ps, es, "(")) return parseblock(ps, es); 608: 89 7c 24 04 mov %edi,0x4(%esp) 60c: 89 34 24 mov %esi,(%esp) 60f: e8 6c 01 00 00 call 780 <parseblock> 614: 89 45 d0 mov %eax,-0x30(%ebp) ret = parseredirs(ret, ps, es); } cmd->argv[argc] = 0; cmd->eargv[argc] = 0; return ret; } 617: 8b 45 d0 mov -0x30(%ebp),%eax 61a: 83 c4 3c add $0x3c,%esp 61d: 5b pop %ebx 61e: 5e pop %esi 61f: 5f pop %edi 620: 5d pop %ebp 621: c3 ret 622: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 629: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000630 <parsepipe>: return cmd; } struct cmd* parsepipe(char **ps, char *es) { 630: 55 push %ebp 631: 89 e5 mov %esp,%ebp 633: 83 ec 28 sub $0x28,%esp 636: 89 5d f4 mov %ebx,-0xc(%ebp) 639: 8b 5d 08 mov 0x8(%ebp),%ebx 63c: 89 75 f8 mov %esi,-0x8(%ebp) 63f: 8b 75 0c mov 0xc(%ebp),%esi 642: 89 7d fc mov %edi,-0x4(%ebp) struct cmd *cmd; cmd = parseexec(ps, es); 645: 89 1c 24 mov %ebx,(%esp) 648: 89 74 24 04 mov %esi,0x4(%esp) 64c: e8 bf fe ff ff call 510 <parseexec> if(peek(ps, es, "|")){ 651: c7 44 24 08 74 13 00 movl $0x1374,0x8(%esp) 658: 00 659: 89 74 24 04 mov %esi,0x4(%esp) 65d: 89 1c 24 mov %ebx,(%esp) struct cmd* parsepipe(char **ps, char *es) { struct cmd *cmd; cmd = parseexec(ps, es); 660: 89 c7 mov %eax,%edi if(peek(ps, es, "|")){ 662: e8 49 fa ff ff call b0 <peek> 667: 85 c0 test %eax,%eax 669: 75 15 jne 680 <parsepipe+0x50> gettoken(ps, es, 0, 0); cmd = pipecmd(cmd, parsepipe(ps, es)); } return cmd; } 66b: 89 f8 mov %edi,%eax 66d: 8b 5d f4 mov -0xc(%ebp),%ebx 670: 8b 75 f8 mov -0x8(%ebp),%esi 673: 8b 7d fc mov -0x4(%ebp),%edi 676: 89 ec mov %ebp,%esp 678: 5d pop %ebp 679: c3 ret 67a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi { struct cmd *cmd; cmd = parseexec(ps, es); if(peek(ps, es, "|")){ gettoken(ps, es, 0, 0); 680: 89 74 24 04 mov %esi,0x4(%esp) 684: 89 1c 24 mov %ebx,(%esp) 687: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 68e: 00 68f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 696: 00 697: e8 94 fa ff ff call 130 <gettoken> cmd = pipecmd(cmd, parsepipe(ps, es)); 69c: 89 74 24 04 mov %esi,0x4(%esp) 6a0: 89 1c 24 mov %ebx,(%esp) 6a3: e8 88 ff ff ff call 630 <parsepipe> } return cmd; } 6a8: 8b 5d f4 mov -0xc(%ebp),%ebx struct cmd *cmd; cmd = parseexec(ps, es); if(peek(ps, es, "|")){ gettoken(ps, es, 0, 0); cmd = pipecmd(cmd, parsepipe(ps, es)); 6ab: 89 7d 08 mov %edi,0x8(%ebp) } return cmd; } 6ae: 8b 75 f8 mov -0x8(%ebp),%esi 6b1: 8b 7d fc mov -0x4(%ebp),%edi struct cmd *cmd; cmd = parseexec(ps, es); if(peek(ps, es, "|")){ gettoken(ps, es, 0, 0); cmd = pipecmd(cmd, parsepipe(ps, es)); 6b4: 89 45 0c mov %eax,0xc(%ebp) } return cmd; } 6b7: 89 ec mov %ebp,%esp 6b9: 5d pop %ebp struct cmd *cmd; cmd = parseexec(ps, es); if(peek(ps, es, "|")){ gettoken(ps, es, 0, 0); cmd = pipecmd(cmd, parsepipe(ps, es)); 6ba: e9 51 fc ff ff jmp 310 <pipecmd> 6bf: 90 nop 000006c0 <parseline>: return cmd; } struct cmd* parseline(char **ps, char *es) { 6c0: 55 push %ebp 6c1: 89 e5 mov %esp,%ebp 6c3: 57 push %edi 6c4: 56 push %esi 6c5: 53 push %ebx 6c6: 83 ec 1c sub $0x1c,%esp 6c9: 8b 5d 08 mov 0x8(%ebp),%ebx 6cc: 8b 75 0c mov 0xc(%ebp),%esi struct cmd *cmd; cmd = parsepipe(ps, es); 6cf: 89 1c 24 mov %ebx,(%esp) 6d2: 89 74 24 04 mov %esi,0x4(%esp) 6d6: e8 55 ff ff ff call 630 <parsepipe> 6db: 89 c7 mov %eax,%edi while(peek(ps, es, "&")){ 6dd: eb 27 jmp 706 <parseline+0x46> 6df: 90 nop gettoken(ps, es, 0, 0); 6e0: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 6e7: 00 6e8: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 6ef: 00 6f0: 89 74 24 04 mov %esi,0x4(%esp) 6f4: 89 1c 24 mov %ebx,(%esp) 6f7: e8 34 fa ff ff call 130 <gettoken> cmd = backcmd(cmd); 6fc: 89 3c 24 mov %edi,(%esp) 6ff: e8 6c fb ff ff call 270 <backcmd> 704: 89 c7 mov %eax,%edi parseline(char **ps, char *es) { struct cmd *cmd; cmd = parsepipe(ps, es); while(peek(ps, es, "&")){ 706: c7 44 24 08 76 13 00 movl $0x1376,0x8(%esp) 70d: 00 70e: 89 74 24 04 mov %esi,0x4(%esp) 712: 89 1c 24 mov %ebx,(%esp) 715: e8 96 f9 ff ff call b0 <peek> 71a: 85 c0 test %eax,%eax 71c: 75 c2 jne 6e0 <parseline+0x20> gettoken(ps, es, 0, 0); cmd = backcmd(cmd); } if(peek(ps, es, ";")){ 71e: c7 44 24 08 72 13 00 movl $0x1372,0x8(%esp) 725: 00 726: 89 74 24 04 mov %esi,0x4(%esp) 72a: 89 1c 24 mov %ebx,(%esp) 72d: e8 7e f9 ff ff call b0 <peek> 732: 85 c0 test %eax,%eax 734: 75 0a jne 740 <parseline+0x80> gettoken(ps, es, 0, 0); cmd = listcmd(cmd, parseline(ps, es)); } return cmd; } 736: 83 c4 1c add $0x1c,%esp 739: 89 f8 mov %edi,%eax 73b: 5b pop %ebx 73c: 5e pop %esi 73d: 5f pop %edi 73e: 5d pop %ebp 73f: c3 ret while(peek(ps, es, "&")){ gettoken(ps, es, 0, 0); cmd = backcmd(cmd); } if(peek(ps, es, ";")){ gettoken(ps, es, 0, 0); 740: 89 74 24 04 mov %esi,0x4(%esp) 744: 89 1c 24 mov %ebx,(%esp) 747: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 74e: 00 74f: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 756: 00 757: e8 d4 f9 ff ff call 130 <gettoken> cmd = listcmd(cmd, parseline(ps, es)); 75c: 89 74 24 04 mov %esi,0x4(%esp) 760: 89 1c 24 mov %ebx,(%esp) 763: e8 58 ff ff ff call 6c0 <parseline> 768: 89 7d 08 mov %edi,0x8(%ebp) 76b: 89 45 0c mov %eax,0xc(%ebp) } return cmd; } 76e: 83 c4 1c add $0x1c,%esp 771: 5b pop %ebx 772: 5e pop %esi 773: 5f pop %edi 774: 5d pop %ebp gettoken(ps, es, 0, 0); cmd = backcmd(cmd); } if(peek(ps, es, ";")){ gettoken(ps, es, 0, 0); cmd = listcmd(cmd, parseline(ps, es)); 775: e9 46 fb ff ff jmp 2c0 <listcmd> 77a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 00000780 <parseblock>: return cmd; } struct cmd* parseblock(char **ps, char *es) { 780: 55 push %ebp 781: 89 e5 mov %esp,%ebp 783: 83 ec 28 sub $0x28,%esp 786: 89 5d f4 mov %ebx,-0xc(%ebp) 789: 8b 5d 08 mov 0x8(%ebp),%ebx 78c: 89 75 f8 mov %esi,-0x8(%ebp) 78f: 8b 75 0c mov 0xc(%ebp),%esi 792: 89 7d fc mov %edi,-0x4(%ebp) struct cmd *cmd; if(!peek(ps, es, "(")) 795: c7 44 24 08 58 13 00 movl $0x1358,0x8(%esp) 79c: 00 79d: 89 1c 24 mov %ebx,(%esp) 7a0: 89 74 24 04 mov %esi,0x4(%esp) 7a4: e8 07 f9 ff ff call b0 <peek> 7a9: 85 c0 test %eax,%eax 7ab: 0f 84 87 00 00 00 je 838 <parseblock+0xb8> panic("parseblock"); gettoken(ps, es, 0, 0); 7b1: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 7b8: 00 7b9: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 7c0: 00 7c1: 89 74 24 04 mov %esi,0x4(%esp) 7c5: 89 1c 24 mov %ebx,(%esp) 7c8: e8 63 f9 ff ff call 130 <gettoken> cmd = parseline(ps, es); 7cd: 89 74 24 04 mov %esi,0x4(%esp) 7d1: 89 1c 24 mov %ebx,(%esp) 7d4: e8 e7 fe ff ff call 6c0 <parseline> if(!peek(ps, es, ")")) 7d9: c7 44 24 08 94 13 00 movl $0x1394,0x8(%esp) 7e0: 00 7e1: 89 74 24 04 mov %esi,0x4(%esp) 7e5: 89 1c 24 mov %ebx,(%esp) struct cmd *cmd; if(!peek(ps, es, "(")) panic("parseblock"); gettoken(ps, es, 0, 0); cmd = parseline(ps, es); 7e8: 89 c7 mov %eax,%edi if(!peek(ps, es, ")")) 7ea: e8 c1 f8 ff ff call b0 <peek> 7ef: 85 c0 test %eax,%eax 7f1: 75 0c jne 7ff <parseblock+0x7f> panic("syntax - missing )"); 7f3: c7 04 24 83 13 00 00 movl $0x1383,(%esp) 7fa: e8 01 fc ff ff call 400 <panic> gettoken(ps, es, 0, 0); 7ff: 89 74 24 04 mov %esi,0x4(%esp) 803: 89 1c 24 mov %ebx,(%esp) 806: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp) 80d: 00 80e: c7 44 24 08 00 00 00 movl $0x0,0x8(%esp) 815: 00 816: e8 15 f9 ff ff call 130 <gettoken> cmd = parseredirs(cmd, ps, es); 81b: 89 74 24 08 mov %esi,0x8(%esp) 81f: 89 5c 24 04 mov %ebx,0x4(%esp) 823: 89 3c 24 mov %edi,(%esp) 826: e8 05 fc ff ff call 430 <parseredirs> return cmd; } 82b: 8b 5d f4 mov -0xc(%ebp),%ebx 82e: 8b 75 f8 mov -0x8(%ebp),%esi 831: 8b 7d fc mov -0x4(%ebp),%edi 834: 89 ec mov %ebp,%esp 836: 5d pop %ebp 837: c3 ret parseblock(char **ps, char *es) { struct cmd *cmd; if(!peek(ps, es, "(")) panic("parseblock"); 838: c7 04 24 78 13 00 00 movl $0x1378,(%esp) 83f: e8 bc fb ff ff call 400 <panic> 844: e9 68 ff ff ff jmp 7b1 <parseblock+0x31> 849: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 00000850 <parsecmd>: struct cmd *parseexec(char**, char*); struct cmd *nulterminate(struct cmd*); struct cmd* parsecmd(char *s) { 850: 55 push %ebp 851: 89 e5 mov %esp,%ebp 853: 56 push %esi 854: 53 push %ebx 855: 83 ec 10 sub $0x10,%esp char *es; struct cmd *cmd; es = s + strlen(s); 858: 8b 5d 08 mov 0x8(%ebp),%ebx 85b: 89 1c 24 mov %ebx,(%esp) 85e: e8 5d 04 00 00 call cc0 <strlen> 863: 01 c3 add %eax,%ebx cmd = parseline(&s, es); 865: 8d 45 08 lea 0x8(%ebp),%eax 868: 89 5c 24 04 mov %ebx,0x4(%esp) 86c: 89 04 24 mov %eax,(%esp) 86f: e8 4c fe ff ff call 6c0 <parseline> peek(&s, es, ""); 874: c7 44 24 08 c3 13 00 movl $0x13c3,0x8(%esp) 87b: 00 87c: 89 5c 24 04 mov %ebx,0x4(%esp) { char *es; struct cmd *cmd; es = s + strlen(s); cmd = parseline(&s, es); 880: 89 c6 mov %eax,%esi peek(&s, es, ""); 882: 8d 45 08 lea 0x8(%ebp),%eax 885: 89 04 24 mov %eax,(%esp) 888: e8 23 f8 ff ff call b0 <peek> if(s != es){ 88d: 8b 45 08 mov 0x8(%ebp),%eax 890: 39 d8 cmp %ebx,%eax 892: 74 24 je 8b8 <parsecmd+0x68> printf(2, "leftovers: %s\n", s); 894: 89 44 24 08 mov %eax,0x8(%esp) 898: c7 44 24 04 96 13 00 movl $0x1396,0x4(%esp) 89f: 00 8a0: c7 04 24 02 00 00 00 movl $0x2,(%esp) 8a7: e8 f4 06 00 00 call fa0 <printf> panic("syntax"); 8ac: c7 04 24 5a 13 00 00 movl $0x135a,(%esp) 8b3: e8 48 fb ff ff call 400 <panic> } nulterminate(cmd); 8b8: 89 34 24 mov %esi,(%esp) 8bb: e8 40 f7 ff ff call 0 <nulterminate> return cmd; } 8c0: 83 c4 10 add $0x10,%esp 8c3: 89 f0 mov %esi,%eax 8c5: 5b pop %ebx 8c6: 5e pop %esi 8c7: 5d pop %ebp 8c8: c3 ret 8c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 000008d0 <fork1>: exit(); } int fork1(void) { 8d0: 55 push %ebp 8d1: 89 e5 mov %esp,%ebp 8d3: 83 ec 28 sub $0x28,%esp int pid; pid = fork(); 8d6: e8 85 05 00 00 call e60 <fork> if(pid == -1) 8db: 83 f8 ff cmp $0xffffffff,%eax 8de: 74 08 je 8e8 <fork1+0x18> panic("fork"); return pid; } 8e0: c9 leave 8e1: c3 ret 8e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi { int pid; pid = fork(); if(pid == -1) panic("fork"); 8e8: 89 45 f4 mov %eax,-0xc(%ebp) 8eb: c7 04 24 a5 13 00 00 movl $0x13a5,(%esp) 8f2: e8 09 fb ff ff call 400 <panic> 8f7: 8b 45 f4 mov -0xc(%ebp),%eax return pid; } 8fa: c9 leave 8fb: c3 ret 8fc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 00000900 <getcmd>: exit(); } int getcmd(char *buf, int nbuf) { 900: 55 push %ebp 901: 89 e5 mov %esp,%ebp 903: 83 ec 18 sub $0x18,%esp 906: 89 5d f8 mov %ebx,-0x8(%ebp) 909: 8b 5d 08 mov 0x8(%ebp),%ebx 90c: 89 75 fc mov %esi,-0x4(%ebp) 90f: 8b 75 0c mov 0xc(%ebp),%esi printf(2, "$ "); 912: c7 44 24 04 aa 13 00 movl $0x13aa,0x4(%esp) 919: 00 91a: c7 04 24 02 00 00 00 movl $0x2,(%esp) 921: e8 7a 06 00 00 call fa0 <printf> memset(buf, 0, nbuf); 926: 89 74 24 08 mov %esi,0x8(%esp) 92a: 89 1c 24 mov %ebx,(%esp) 92d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) 934: 00 935: e8 a6 03 00 00 call ce0 <memset> gets(buf, nbuf); 93a: 89 74 24 04 mov %esi,0x4(%esp) 93e: 89 1c 24 mov %ebx,(%esp) 941: e8 ba 04 00 00 call e00 <gets> if(buf[0] == 0) // EOF return -1; return 0; } 946: 8b 75 fc mov -0x4(%ebp),%esi getcmd(char *buf, int nbuf) { printf(2, "$ "); memset(buf, 0, nbuf); gets(buf, nbuf); if(buf[0] == 0) // EOF 949: 80 3b 01 cmpb $0x1,(%ebx) return -1; return 0; } 94c: 8b 5d f8 mov -0x8(%ebp),%ebx getcmd(char *buf, int nbuf) { printf(2, "$ "); memset(buf, 0, nbuf); gets(buf, nbuf); if(buf[0] == 0) // EOF 94f: 19 c0 sbb %eax,%eax return -1; return 0; } 951: 89 ec mov %ebp,%esp 953: 5d pop %ebp 954: c3 ret 955: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi 959: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000960 <runcmd>: struct cmd *parsecmd(char*); // Execute cmd. Never returns. void runcmd(struct cmd *cmd) { 960: 55 push %ebp 961: 89 e5 mov %esp,%ebp 963: 53 push %ebx 964: 83 ec 24 sub $0x24,%esp 967: 8b 5d 08 mov 0x8(%ebp),%ebx struct execcmd *ecmd; struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) 96a: 85 db test %ebx,%ebx 96c: 74 42 je 9b0 <runcmd+0x50> exit(); switch(cmd->type){ 96e: 83 3b 05 cmpl $0x5,(%ebx) 971: 76 45 jbe 9b8 <runcmd+0x58> default: panic("runcmd"); 973: c7 04 24 ad 13 00 00 movl $0x13ad,(%esp) 97a: e8 81 fa ff ff call 400 <panic> case EXEC: ecmd = (struct execcmd*)cmd; if(ecmd->argv[0] == 0) 97f: 8b 43 04 mov 0x4(%ebx),%eax 982: 85 c0 test %eax,%eax 984: 74 2a je 9b0 <runcmd+0x50> exit(); exec(ecmd->argv[0], ecmd->argv); 986: 8d 53 04 lea 0x4(%ebx),%edx 989: 89 54 24 04 mov %edx,0x4(%esp) 98d: 89 04 24 mov %eax,(%esp) 990: e8 0b 05 00 00 call ea0 <exec> printf(2, "exec %s failed\n", ecmd->argv[0]); 995: 8b 43 04 mov 0x4(%ebx),%eax 998: c7 44 24 04 b4 13 00 movl $0x13b4,0x4(%esp) 99f: 00 9a0: c7 04 24 02 00 00 00 movl $0x2,(%esp) 9a7: 89 44 24 08 mov %eax,0x8(%esp) 9ab: e8 f0 05 00 00 call fa0 <printf> bcmd = (struct backcmd*)cmd; if(fork1() == 0) runcmd(bcmd->cmd); break; } exit(); 9b0: e8 b3 04 00 00 call e68 <exit> 9b5: 8d 76 00 lea 0x0(%esi),%esi struct redircmd *rcmd; if(cmd == 0) exit(); switch(cmd->type){ 9b8: 8b 03 mov (%ebx),%eax 9ba: ff 24 85 20 13 00 00 jmp *0x1320(,%eax,4) 9c1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi wait(); break; case BACK: bcmd = (struct backcmd*)cmd; if(fork1() == 0) 9c8: e8 03 ff ff ff call 8d0 <fork1> 9cd: 85 c0 test %eax,%eax 9cf: 90 nop 9d0: 0f 84 a7 00 00 00 je a7d <runcmd+0x11d> runcmd(bcmd->cmd); break; } exit(); 9d6: e8 8d 04 00 00 call e68 <exit> 9db: 90 nop 9dc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi runcmd(rcmd->cmd); break; case LIST: lcmd = (struct listcmd*)cmd; if(fork1() == 0) 9e0: e8 eb fe ff ff call 8d0 <fork1> 9e5: 85 c0 test %eax,%eax 9e7: 0f 84 a3 00 00 00 je a90 <runcmd+0x130> 9ed: 8d 76 00 lea 0x0(%esi),%esi runcmd(lcmd->left); wait(); 9f0: e8 7b 04 00 00 call e70 <wait> runcmd(lcmd->right); 9f5: 8b 43 08 mov 0x8(%ebx),%eax 9f8: 89 04 24 mov %eax,(%esp) 9fb: e8 60 ff ff ff call 960 <runcmd> bcmd = (struct backcmd*)cmd; if(fork1() == 0) runcmd(bcmd->cmd); break; } exit(); a00: e8 63 04 00 00 call e68 <exit> a05: 8d 76 00 lea 0x0(%esi),%esi runcmd(lcmd->right); break; case PIPE: pcmd = (struct pipecmd*)cmd; if(pipe(p) < 0) a08: 8d 45 f0 lea -0x10(%ebp),%eax a0b: 89 04 24 mov %eax,(%esp) a0e: e8 65 04 00 00 call e78 <pipe> a13: 85 c0 test %eax,%eax a15: 0f 88 25 01 00 00 js b40 <runcmd+0x1e0> panic("pipe"); if(fork1() == 0){ a1b: e8 b0 fe ff ff call 8d0 <fork1> a20: 85 c0 test %eax,%eax a22: 0f 84 b8 00 00 00 je ae0 <runcmd+0x180> dup(p[1]); close(p[0]); close(p[1]); runcmd(pcmd->left); } if(fork1() == 0){ a28: e8 a3 fe ff ff call 8d0 <fork1> a2d: 85 c0 test %eax,%eax a2f: 90 nop a30: 74 6e je aa0 <runcmd+0x140> dup(p[0]); close(p[0]); close(p[1]); runcmd(pcmd->right); } close(p[0]); a32: 8b 45 f0 mov -0x10(%ebp),%eax a35: 89 04 24 mov %eax,(%esp) a38: e8 53 04 00 00 call e90 <close> close(p[1]); a3d: 8b 45 f4 mov -0xc(%ebp),%eax a40: 89 04 24 mov %eax,(%esp) a43: e8 48 04 00 00 call e90 <close> wait(); a48: e8 23 04 00 00 call e70 <wait> wait(); a4d: e8 1e 04 00 00 call e70 <wait> bcmd = (struct backcmd*)cmd; if(fork1() == 0) runcmd(bcmd->cmd); break; } exit(); a52: e8 11 04 00 00 call e68 <exit> a57: 90 nop printf(2, "exec %s failed\n", ecmd->argv[0]); break; case REDIR: rcmd = (struct redircmd*)cmd; close(rcmd->fd); a58: 8b 43 14 mov 0x14(%ebx),%eax a5b: 89 04 24 mov %eax,(%esp) a5e: e8 2d 04 00 00 call e90 <close> if(open(rcmd->file, rcmd->mode) < 0){ a63: 8b 43 10 mov 0x10(%ebx),%eax a66: 89 44 24 04 mov %eax,0x4(%esp) a6a: 8b 43 08 mov 0x8(%ebx),%eax a6d: 89 04 24 mov %eax,(%esp) a70: e8 33 04 00 00 call ea8 <open> a75: 85 c0 test %eax,%eax a77: 0f 88 a3 00 00 00 js b20 <runcmd+0x1c0> break; case BACK: bcmd = (struct backcmd*)cmd; if(fork1() == 0) runcmd(bcmd->cmd); a7d: 8b 43 04 mov 0x4(%ebx),%eax a80: 89 04 24 mov %eax,(%esp) a83: e8 d8 fe ff ff call 960 <runcmd> break; } exit(); a88: e8 db 03 00 00 call e68 <exit> a8d: 8d 76 00 lea 0x0(%esi),%esi break; case LIST: lcmd = (struct listcmd*)cmd; if(fork1() == 0) runcmd(lcmd->left); a90: 8b 43 04 mov 0x4(%ebx),%eax a93: 89 04 24 mov %eax,(%esp) a96: e8 c5 fe ff ff call 960 <runcmd> a9b: e9 4d ff ff ff jmp 9ed <runcmd+0x8d> close(p[0]); close(p[1]); runcmd(pcmd->left); } if(fork1() == 0){ close(0); aa0: c7 04 24 00 00 00 00 movl $0x0,(%esp) aa7: e8 e4 03 00 00 call e90 <close> dup(p[0]); aac: 8b 45 f0 mov -0x10(%ebp),%eax aaf: 89 04 24 mov %eax,(%esp) ab2: e8 29 04 00 00 call ee0 <dup> close(p[0]); ab7: 8b 45 f0 mov -0x10(%ebp),%eax aba: 89 04 24 mov %eax,(%esp) abd: e8 ce 03 00 00 call e90 <close> close(p[1]); ac2: 8b 45 f4 mov -0xc(%ebp),%eax ac5: 89 04 24 mov %eax,(%esp) ac8: e8 c3 03 00 00 call e90 <close> runcmd(pcmd->right); acd: 8b 43 08 mov 0x8(%ebx),%eax ad0: 89 04 24 mov %eax,(%esp) ad3: e8 88 fe ff ff call 960 <runcmd> ad8: e9 55 ff ff ff jmp a32 <runcmd+0xd2> add: 8d 76 00 lea 0x0(%esi),%esi case PIPE: pcmd = (struct pipecmd*)cmd; if(pipe(p) < 0) panic("pipe"); if(fork1() == 0){ close(1); ae0: c7 04 24 01 00 00 00 movl $0x1,(%esp) ae7: e8 a4 03 00 00 call e90 <close> dup(p[1]); aec: 8b 45 f4 mov -0xc(%ebp),%eax aef: 89 04 24 mov %eax,(%esp) af2: e8 e9 03 00 00 call ee0 <dup> close(p[0]); af7: 8b 45 f0 mov -0x10(%ebp),%eax afa: 89 04 24 mov %eax,(%esp) afd: e8 8e 03 00 00 call e90 <close> close(p[1]); b02: 8b 45 f4 mov -0xc(%ebp),%eax b05: 89 04 24 mov %eax,(%esp) b08: e8 83 03 00 00 call e90 <close> runcmd(pcmd->left); b0d: 8b 43 04 mov 0x4(%ebx),%eax b10: 89 04 24 mov %eax,(%esp) b13: e8 48 fe ff ff call 960 <runcmd> b18: e9 0b ff ff ff jmp a28 <runcmd+0xc8> b1d: 8d 76 00 lea 0x0(%esi),%esi case REDIR: rcmd = (struct redircmd*)cmd; close(rcmd->fd); if(open(rcmd->file, rcmd->mode) < 0){ printf(2, "open %s failed\n", rcmd->file); b20: 8b 43 08 mov 0x8(%ebx),%eax b23: c7 44 24 04 c4 13 00 movl $0x13c4,0x4(%esp) b2a: 00 b2b: c7 04 24 02 00 00 00 movl $0x2,(%esp) b32: 89 44 24 08 mov %eax,0x8(%esp) b36: e8 65 04 00 00 call fa0 <printf> exit(); b3b: e8 28 03 00 00 call e68 <exit> break; case PIPE: pcmd = (struct pipecmd*)cmd; if(pipe(p) < 0) panic("pipe"); b40: c7 04 24 d4 13 00 00 movl $0x13d4,(%esp) b47: e8 b4 f8 ff ff call 400 <panic> b4c: e9 ca fe ff ff jmp a1b <runcmd+0xbb> b51: eb 0d jmp b60 <main> b53: 90 nop b54: 90 nop b55: 90 nop b56: 90 nop b57: 90 nop b58: 90 nop b59: 90 nop b5a: 90 nop b5b: 90 nop b5c: 90 nop b5d: 90 nop b5e: 90 nop b5f: 90 nop 00000b60 <main>: return 0; } int main(void) { b60: 55 push %ebp b61: 89 e5 mov %esp,%ebp b63: 83 e4 f0 and $0xfffffff0,%esp b66: 83 ec 10 sub $0x10,%esp b69: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi static char buf[100]; int fd; // Ensure that three file descriptors are open. while((fd = open("console", O_RDWR)) >= 0){ b70: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp) b77: 00 b78: c7 04 24 d9 13 00 00 movl $0x13d9,(%esp) b7f: e8 24 03 00 00 call ea8 <open> b84: 85 c0 test %eax,%eax b86: 78 28 js bb0 <main+0x50> if(fd >= 3){ b88: 83 f8 02 cmp $0x2,%eax b8b: 7e e3 jle b70 <main+0x10> close(fd); b8d: 89 04 24 mov %eax,(%esp) b90: e8 fb 02 00 00 call e90 <close> break; b95: eb 19 jmp bb0 <main+0x50> if(chdir(buf+3) < 0) printf(2, "cannot cd %s\n", buf+3); continue; } if(fork1() == 0) runcmd(parsecmd(buf)); b97: c7 04 24 20 14 00 00 movl $0x1420,(%esp) b9e: e8 ad fc ff ff call 850 <parsecmd> ba3: 89 04 24 mov %eax,(%esp) ba6: e8 b5 fd ff ff call 960 <runcmd> wait(); bab: e8 c0 02 00 00 call e70 <wait> break; } } // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ bb0: c7 44 24 04 64 00 00 movl $0x64,0x4(%esp) bb7: 00 bb8: c7 04 24 20 14 00 00 movl $0x1420,(%esp) bbf: e8 3c fd ff ff call 900 <getcmd> bc4: 85 c0 test %eax,%eax bc6: 78 70 js c38 <main+0xd8> if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ bc8: 80 3d 20 14 00 00 63 cmpb $0x63,0x1420 bcf: 75 09 jne bda <main+0x7a> bd1: 80 3d 21 14 00 00 64 cmpb $0x64,0x1421 bd8: 74 0e je be8 <main+0x88> buf[strlen(buf)-1] = 0; // chop \n if(chdir(buf+3) < 0) printf(2, "cannot cd %s\n", buf+3); continue; } if(fork1() == 0) bda: e8 f1 fc ff ff call 8d0 <fork1> bdf: 85 c0 test %eax,%eax be1: 75 c8 jne bab <main+0x4b> be3: eb b2 jmp b97 <main+0x37> be5: 8d 76 00 lea 0x0(%esi),%esi } } // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ be8: 80 3d 22 14 00 00 20 cmpb $0x20,0x1422 bef: 90 nop bf0: 75 e8 jne bda <main+0x7a> // Chdir must be called by the parent, not the child. buf[strlen(buf)-1] = 0; // chop \n bf2: c7 04 24 20 14 00 00 movl $0x1420,(%esp) bf9: e8 c2 00 00 00 call cc0 <strlen> if(chdir(buf+3) < 0) bfe: c7 04 24 23 14 00 00 movl $0x1423,(%esp) // Read and run input commands. while(getcmd(buf, sizeof(buf)) >= 0){ if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ // Chdir must be called by the parent, not the child. buf[strlen(buf)-1] = 0; // chop \n c05: c6 80 1f 14 00 00 00 movb $0x0,0x141f(%eax) if(chdir(buf+3) < 0) c0c: e8 c7 02 00 00 call ed8 <chdir> c11: 85 c0 test %eax,%eax c13: 79 9b jns bb0 <main+0x50> printf(2, "cannot cd %s\n", buf+3); c15: c7 44 24 08 23 14 00 movl $0x1423,0x8(%esp) c1c: 00 c1d: c7 44 24 04 e1 13 00 movl $0x13e1,0x4(%esp) c24: 00 c25: c7 04 24 02 00 00 00 movl $0x2,(%esp) c2c: e8 6f 03 00 00 call fa0 <printf> c31: e9 7a ff ff ff jmp bb0 <main+0x50> c36: 66 90 xchg %ax,%ax } if(fork1() == 0) runcmd(parsecmd(buf)); wait(); } exit(); c38: e8 2b 02 00 00 call e68 <exit> c3d: 90 nop c3e: 90 nop c3f: 90 nop 00000c40 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, char *t) { c40: 55 push %ebp c41: 31 d2 xor %edx,%edx c43: 89 e5 mov %esp,%ebp c45: 8b 45 08 mov 0x8(%ebp),%eax c48: 53 push %ebx c49: 8b 5d 0c mov 0xc(%ebp),%ebx c4c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi char *os; os = s; while((*s++ = *t++) != 0) c50: 0f b6 0c 13 movzbl (%ebx,%edx,1),%ecx c54: 88 0c 10 mov %cl,(%eax,%edx,1) c57: 83 c2 01 add $0x1,%edx c5a: 84 c9 test %cl,%cl c5c: 75 f2 jne c50 <strcpy+0x10> ; return os; } c5e: 5b pop %ebx c5f: 5d pop %ebp c60: c3 ret c61: eb 0d jmp c70 <strcmp> c63: 90 nop c64: 90 nop c65: 90 nop c66: 90 nop c67: 90 nop c68: 90 nop c69: 90 nop c6a: 90 nop c6b: 90 nop c6c: 90 nop c6d: 90 nop c6e: 90 nop c6f: 90 nop 00000c70 <strcmp>: int strcmp(const char *p, const char *q) { c70: 55 push %ebp c71: 89 e5 mov %esp,%ebp c73: 8b 4d 08 mov 0x8(%ebp),%ecx c76: 53 push %ebx c77: 8b 55 0c mov 0xc(%ebp),%edx while(*p && *p == *q) c7a: 0f b6 01 movzbl (%ecx),%eax c7d: 84 c0 test %al,%al c7f: 75 14 jne c95 <strcmp+0x25> c81: eb 25 jmp ca8 <strcmp+0x38> c83: 90 nop c84: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p++, q++; c88: 83 c1 01 add $0x1,%ecx c8b: 83 c2 01 add $0x1,%edx } int strcmp(const char *p, const char *q) { while(*p && *p == *q) c8e: 0f b6 01 movzbl (%ecx),%eax c91: 84 c0 test %al,%al c93: 74 13 je ca8 <strcmp+0x38> c95: 0f b6 1a movzbl (%edx),%ebx c98: 38 d8 cmp %bl,%al c9a: 74 ec je c88 <strcmp+0x18> c9c: 0f b6 db movzbl %bl,%ebx c9f: 0f b6 c0 movzbl %al,%eax ca2: 29 d8 sub %ebx,%eax p++, q++; return (uchar)*p - (uchar)*q; } ca4: 5b pop %ebx ca5: 5d pop %ebp ca6: c3 ret ca7: 90 nop } int strcmp(const char *p, const char *q) { while(*p && *p == *q) ca8: 0f b6 1a movzbl (%edx),%ebx cab: 31 c0 xor %eax,%eax cad: 0f b6 db movzbl %bl,%ebx cb0: 29 d8 sub %ebx,%eax p++, q++; return (uchar)*p - (uchar)*q; } cb2: 5b pop %ebx cb3: 5d pop %ebp cb4: c3 ret cb5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi cb9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000cc0 <strlen>: uint strlen(char *s) { cc0: 55 push %ebp int n; for(n = 0; s[n]; n++) cc1: 31 d2 xor %edx,%edx return (uchar)*p - (uchar)*q; } uint strlen(char *s) { cc3: 89 e5 mov %esp,%ebp int n; for(n = 0; s[n]; n++) cc5: 31 c0 xor %eax,%eax return (uchar)*p - (uchar)*q; } uint strlen(char *s) { cc7: 8b 4d 08 mov 0x8(%ebp),%ecx int n; for(n = 0; s[n]; n++) cca: 80 39 00 cmpb $0x0,(%ecx) ccd: 74 0c je cdb <strlen+0x1b> ccf: 90 nop cd0: 83 c2 01 add $0x1,%edx cd3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1) cd7: 89 d0 mov %edx,%eax cd9: 75 f5 jne cd0 <strlen+0x10> ; return n; } cdb: 5d pop %ebp cdc: c3 ret cdd: 8d 76 00 lea 0x0(%esi),%esi 00000ce0 <memset>: void* memset(void *dst, int c, uint n) { ce0: 55 push %ebp ce1: 89 e5 mov %esp,%ebp ce3: 8b 55 08 mov 0x8(%ebp),%edx ce6: 57 push %edi } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : ce7: 8b 4d 10 mov 0x10(%ebp),%ecx cea: 8b 45 0c mov 0xc(%ebp),%eax ced: 89 d7 mov %edx,%edi cef: fc cld cf0: f3 aa rep stos %al,%es:(%edi) stosb(dst, c, n); return dst; } cf2: 89 d0 mov %edx,%eax cf4: 5f pop %edi cf5: 5d pop %ebp cf6: c3 ret cf7: 89 f6 mov %esi,%esi cf9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000d00 <strchr>: char* strchr(const char *s, char c) { d00: 55 push %ebp d01: 89 e5 mov %esp,%ebp d03: 8b 45 08 mov 0x8(%ebp),%eax d06: 0f b6 4d 0c movzbl 0xc(%ebp),%ecx for(; *s; s++) d0a: 0f b6 10 movzbl (%eax),%edx d0d: 84 d2 test %dl,%dl d0f: 75 11 jne d22 <strchr+0x22> d11: eb 15 jmp d28 <strchr+0x28> d13: 90 nop d14: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi d18: 83 c0 01 add $0x1,%eax d1b: 0f b6 10 movzbl (%eax),%edx d1e: 84 d2 test %dl,%dl d20: 74 06 je d28 <strchr+0x28> if(*s == c) d22: 38 ca cmp %cl,%dl d24: 75 f2 jne d18 <strchr+0x18> return (char*)s; return 0; } d26: 5d pop %ebp d27: c3 ret } char* strchr(const char *s, char c) { for(; *s; s++) d28: 31 c0 xor %eax,%eax if(*s == c) return (char*)s; return 0; } d2a: 5d pop %ebp d2b: 90 nop d2c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi d30: c3 ret d31: eb 0d jmp d40 <atoi> d33: 90 nop d34: 90 nop d35: 90 nop d36: 90 nop d37: 90 nop d38: 90 nop d39: 90 nop d3a: 90 nop d3b: 90 nop d3c: 90 nop d3d: 90 nop d3e: 90 nop d3f: 90 nop 00000d40 <atoi>: return r; } int atoi(const char *s) { d40: 55 push %ebp int n; n = 0; while('0' <= *s && *s <= '9') d41: 31 c0 xor %eax,%eax return r; } int atoi(const char *s) { d43: 89 e5 mov %esp,%ebp d45: 8b 4d 08 mov 0x8(%ebp),%ecx d48: 53 push %ebx int n; n = 0; while('0' <= *s && *s <= '9') d49: 0f b6 11 movzbl (%ecx),%edx d4c: 8d 5a d0 lea -0x30(%edx),%ebx d4f: 80 fb 09 cmp $0x9,%bl d52: 77 1c ja d70 <atoi+0x30> d54: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi n = n*10 + *s++ - '0'; d58: 0f be d2 movsbl %dl,%edx d5b: 83 c1 01 add $0x1,%ecx d5e: 8d 04 80 lea (%eax,%eax,4),%eax d61: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax atoi(const char *s) { int n; n = 0; while('0' <= *s && *s <= '9') d65: 0f b6 11 movzbl (%ecx),%edx d68: 8d 5a d0 lea -0x30(%edx),%ebx d6b: 80 fb 09 cmp $0x9,%bl d6e: 76 e8 jbe d58 <atoi+0x18> n = n*10 + *s++ - '0'; return n; } d70: 5b pop %ebx d71: 5d pop %ebp d72: c3 ret d73: 8d b6 00 00 00 00 lea 0x0(%esi),%esi d79: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00000d80 <memmove>: void* memmove(void *vdst, void *vsrc, int n) { d80: 55 push %ebp d81: 89 e5 mov %esp,%ebp d83: 56 push %esi d84: 8b 45 08 mov 0x8(%ebp),%eax d87: 53 push %ebx d88: 8b 5d 10 mov 0x10(%ebp),%ebx d8b: 8b 75 0c mov 0xc(%ebp),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) d8e: 85 db test %ebx,%ebx d90: 7e 14 jle da6 <memmove+0x26> n = n*10 + *s++ - '0'; return n; } void* memmove(void *vdst, void *vsrc, int n) d92: 31 d2 xor %edx,%edx d94: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) *dst++ = *src++; d98: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx d9c: 88 0c 10 mov %cl,(%eax,%edx,1) d9f: 83 c2 01 add $0x1,%edx { char *dst, *src; dst = vdst; src = vsrc; while(n-- > 0) da2: 39 da cmp %ebx,%edx da4: 75 f2 jne d98 <memmove+0x18> *dst++ = *src++; return vdst; } da6: 5b pop %ebx da7: 5e pop %esi da8: 5d pop %ebp da9: c3 ret daa: 8d b6 00 00 00 00 lea 0x0(%esi),%esi 00000db0 <stat>: return buf; } int stat(char *n, struct stat *st) { db0: 55 push %ebp db1: 89 e5 mov %esp,%ebp db3: 83 ec 18 sub $0x18,%esp int fd; int r; fd = open(n, O_RDONLY); db6: 8b 45 08 mov 0x8(%ebp),%eax return buf; } int stat(char *n, struct stat *st) { db9: 89 5d f8 mov %ebx,-0x8(%ebp) dbc: 89 75 fc mov %esi,-0x4(%ebp) int fd; int r; fd = open(n, O_RDONLY); if(fd < 0) dbf: be ff ff ff ff mov $0xffffffff,%esi stat(char *n, struct stat *st) { int fd; int r; fd = open(n, O_RDONLY); dc4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp) dcb: 00 dcc: 89 04 24 mov %eax,(%esp) dcf: e8 d4 00 00 00 call ea8 <open> if(fd < 0) dd4: 85 c0 test %eax,%eax stat(char *n, struct stat *st) { int fd; int r; fd = open(n, O_RDONLY); dd6: 89 c3 mov %eax,%ebx if(fd < 0) dd8: 78 19 js df3 <stat+0x43> return -1; r = fstat(fd, st); dda: 8b 45 0c mov 0xc(%ebp),%eax ddd: 89 1c 24 mov %ebx,(%esp) de0: 89 44 24 04 mov %eax,0x4(%esp) de4: e8 d7 00 00 00 call ec0 <fstat> close(fd); de9: 89 1c 24 mov %ebx,(%esp) int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; r = fstat(fd, st); dec: 89 c6 mov %eax,%esi close(fd); dee: e8 9d 00 00 00 call e90 <close> return r; } df3: 89 f0 mov %esi,%eax df5: 8b 5d f8 mov -0x8(%ebp),%ebx df8: 8b 75 fc mov -0x4(%ebp),%esi dfb: 89 ec mov %ebp,%esp dfd: 5d pop %ebp dfe: c3 ret dff: 90 nop 00000e00 <gets>: return 0; } char* gets(char *buf, int max) { e00: 55 push %ebp e01: 89 e5 mov %esp,%ebp e03: 57 push %edi e04: 56 push %esi e05: 31 f6 xor %esi,%esi e07: 53 push %ebx e08: 83 ec 2c sub $0x2c,%esp e0b: 8b 7d 08 mov 0x8(%ebp),%edi int i, cc; char c; for(i=0; i+1 < max; ){ e0e: eb 06 jmp e16 <gets+0x16> cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; if(c == '\n' || c == '\r') e10: 3c 0a cmp $0xa,%al e12: 74 39 je e4d <gets+0x4d> e14: 89 de mov %ebx,%esi gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ e16: 8d 5e 01 lea 0x1(%esi),%ebx e19: 3b 5d 0c cmp 0xc(%ebp),%ebx e1c: 7d 31 jge e4f <gets+0x4f> cc = read(0, &c, 1); e1e: 8d 45 e7 lea -0x19(%ebp),%eax e21: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) e28: 00 e29: 89 44 24 04 mov %eax,0x4(%esp) e2d: c7 04 24 00 00 00 00 movl $0x0,(%esp) e34: e8 47 00 00 00 call e80 <read> if(cc < 1) e39: 85 c0 test %eax,%eax e3b: 7e 12 jle e4f <gets+0x4f> break; buf[i++] = c; e3d: 0f b6 45 e7 movzbl -0x19(%ebp),%eax e41: 88 44 1f ff mov %al,-0x1(%edi,%ebx,1) if(c == '\n' || c == '\r') e45: 0f b6 45 e7 movzbl -0x19(%ebp),%eax e49: 3c 0d cmp $0xd,%al e4b: 75 c3 jne e10 <gets+0x10> e4d: 89 de mov %ebx,%esi break; } buf[i] = '\0'; e4f: c6 04 37 00 movb $0x0,(%edi,%esi,1) return buf; } e53: 89 f8 mov %edi,%eax e55: 83 c4 2c add $0x2c,%esp e58: 5b pop %ebx e59: 5e pop %esi e5a: 5f pop %edi e5b: 5d pop %ebp e5c: c3 ret e5d: 90 nop e5e: 90 nop e5f: 90 nop 00000e60 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) e60: b8 01 00 00 00 mov $0x1,%eax e65: cd 40 int $0x40 e67: c3 ret 00000e68 <exit>: SYSCALL(exit) e68: b8 02 00 00 00 mov $0x2,%eax e6d: cd 40 int $0x40 e6f: c3 ret 00000e70 <wait>: SYSCALL(wait) e70: b8 03 00 00 00 mov $0x3,%eax e75: cd 40 int $0x40 e77: c3 ret 00000e78 <pipe>: SYSCALL(pipe) e78: b8 04 00 00 00 mov $0x4,%eax e7d: cd 40 int $0x40 e7f: c3 ret 00000e80 <read>: SYSCALL(read) e80: b8 05 00 00 00 mov $0x5,%eax e85: cd 40 int $0x40 e87: c3 ret 00000e88 <write>: SYSCALL(write) e88: b8 10 00 00 00 mov $0x10,%eax e8d: cd 40 int $0x40 e8f: c3 ret 00000e90 <close>: SYSCALL(close) e90: b8 15 00 00 00 mov $0x15,%eax e95: cd 40 int $0x40 e97: c3 ret 00000e98 <kill>: SYSCALL(kill) e98: b8 06 00 00 00 mov $0x6,%eax e9d: cd 40 int $0x40 e9f: c3 ret 00000ea0 <exec>: SYSCALL(exec) ea0: b8 07 00 00 00 mov $0x7,%eax ea5: cd 40 int $0x40 ea7: c3 ret 00000ea8 <open>: SYSCALL(open) ea8: b8 0f 00 00 00 mov $0xf,%eax ead: cd 40 int $0x40 eaf: c3 ret 00000eb0 <mknod>: SYSCALL(mknod) eb0: b8 11 00 00 00 mov $0x11,%eax eb5: cd 40 int $0x40 eb7: c3 ret 00000eb8 <unlink>: SYSCALL(unlink) eb8: b8 12 00 00 00 mov $0x12,%eax ebd: cd 40 int $0x40 ebf: c3 ret 00000ec0 <fstat>: SYSCALL(fstat) ec0: b8 08 00 00 00 mov $0x8,%eax ec5: cd 40 int $0x40 ec7: c3 ret 00000ec8 <link>: SYSCALL(link) ec8: b8 13 00 00 00 mov $0x13,%eax ecd: cd 40 int $0x40 ecf: c3 ret 00000ed0 <mkdir>: SYSCALL(mkdir) ed0: b8 14 00 00 00 mov $0x14,%eax ed5: cd 40 int $0x40 ed7: c3 ret 00000ed8 <chdir>: SYSCALL(chdir) ed8: b8 09 00 00 00 mov $0x9,%eax edd: cd 40 int $0x40 edf: c3 ret 00000ee0 <dup>: SYSCALL(dup) ee0: b8 0a 00 00 00 mov $0xa,%eax ee5: cd 40 int $0x40 ee7: c3 ret 00000ee8 <getpid>: SYSCALL(getpid) ee8: b8 0b 00 00 00 mov $0xb,%eax eed: cd 40 int $0x40 eef: c3 ret 00000ef0 <sbrk>: SYSCALL(sbrk) ef0: b8 0c 00 00 00 mov $0xc,%eax ef5: cd 40 int $0x40 ef7: c3 ret 00000ef8 <sleep>: SYSCALL(sleep) ef8: b8 0d 00 00 00 mov $0xd,%eax efd: cd 40 int $0x40 eff: c3 ret 00000f00 <set_tickets>: SYSCALL(set_tickets) f00: b8 16 00 00 00 mov $0x16,%eax f05: cd 40 int $0x40 f07: c3 ret f08: 90 nop f09: 90 nop f0a: 90 nop f0b: 90 nop f0c: 90 nop f0d: 90 nop f0e: 90 nop f0f: 90 nop 00000f10 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { f10: 55 push %ebp f11: 89 e5 mov %esp,%ebp f13: 57 push %edi f14: 89 cf mov %ecx,%edi f16: 56 push %esi f17: 89 c6 mov %eax,%esi f19: 53 push %ebx f1a: 83 ec 4c sub $0x4c,%esp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ f1d: 8b 4d 08 mov 0x8(%ebp),%ecx f20: 85 c9 test %ecx,%ecx f22: 74 04 je f28 <printint+0x18> f24: 85 d2 test %edx,%edx f26: 78 68 js f90 <printint+0x80> neg = 1; x = -xx; } else { x = xx; f28: 89 d0 mov %edx,%eax f2a: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) f31: 31 c9 xor %ecx,%ecx f33: 8d 5d d7 lea -0x29(%ebp),%ebx f36: 66 90 xchg %ax,%ax } i = 0; do{ buf[i++] = digits[x % base]; f38: 31 d2 xor %edx,%edx f3a: f7 f7 div %edi f3c: 0f b6 92 f6 13 00 00 movzbl 0x13f6(%edx),%edx f43: 88 14 0b mov %dl,(%ebx,%ecx,1) f46: 83 c1 01 add $0x1,%ecx }while((x /= base) != 0); f49: 85 c0 test %eax,%eax f4b: 75 eb jne f38 <printint+0x28> if(neg) f4d: 8b 45 c4 mov -0x3c(%ebp),%eax f50: 85 c0 test %eax,%eax f52: 74 08 je f5c <printint+0x4c> buf[i++] = '-'; f54: c6 44 0d d7 2d movb $0x2d,-0x29(%ebp,%ecx,1) f59: 83 c1 01 add $0x1,%ecx while(--i >= 0) f5c: 8d 79 ff lea -0x1(%ecx),%edi f5f: 90 nop f60: 0f b6 04 3b movzbl (%ebx,%edi,1),%eax f64: 83 ef 01 sub $0x1,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); f67: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) f6e: 00 f6f: 89 34 24 mov %esi,(%esp) buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) f72: 88 45 e7 mov %al,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); f75: 8d 45 e7 lea -0x19(%ebp),%eax f78: 89 44 24 04 mov %eax,0x4(%esp) f7c: e8 07 ff ff ff call e88 <write> buf[i++] = digits[x % base]; }while((x /= base) != 0); if(neg) buf[i++] = '-'; while(--i >= 0) f81: 83 ff ff cmp $0xffffffff,%edi f84: 75 da jne f60 <printint+0x50> putc(fd, buf[i]); } f86: 83 c4 4c add $0x4c,%esp f89: 5b pop %ebx f8a: 5e pop %esi f8b: 5f pop %edi f8c: 5d pop %ebp f8d: c3 ret f8e: 66 90 xchg %ax,%ax uint x; neg = 0; if(sgn && xx < 0){ neg = 1; x = -xx; f90: 89 d0 mov %edx,%eax f92: f7 d8 neg %eax f94: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) f9b: eb 94 jmp f31 <printint+0x21> f9d: 8d 76 00 lea 0x0(%esi),%esi 00000fa0 <printf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { fa0: 55 push %ebp fa1: 89 e5 mov %esp,%ebp fa3: 57 push %edi fa4: 56 push %esi fa5: 53 push %ebx fa6: 83 ec 3c sub $0x3c,%esp int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ fa9: 8b 45 0c mov 0xc(%ebp),%eax fac: 0f b6 10 movzbl (%eax),%edx faf: 84 d2 test %dl,%dl fb1: 0f 84 c1 00 00 00 je 1078 <printf+0xd8> char *s; int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; fb7: 8d 4d 10 lea 0x10(%ebp),%ecx fba: 31 ff xor %edi,%edi fbc: 89 4d d4 mov %ecx,-0x2c(%ebp) fbf: 31 db xor %ebx,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); fc1: 8d 75 e7 lea -0x19(%ebp),%esi fc4: eb 1e jmp fe4 <printf+0x44> fc6: 66 90 xchg %ax,%ax state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ fc8: 83 fa 25 cmp $0x25,%edx fcb: 0f 85 af 00 00 00 jne 1080 <printf+0xe0> fd1: 66 bf 25 00 mov $0x25,%di int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ fd5: 83 c3 01 add $0x1,%ebx fd8: 0f b6 14 18 movzbl (%eax,%ebx,1),%edx fdc: 84 d2 test %dl,%dl fde: 0f 84 94 00 00 00 je 1078 <printf+0xd8> c = fmt[i] & 0xff; if(state == 0){ fe4: 85 ff test %edi,%edi uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; fe6: 0f b6 d2 movzbl %dl,%edx if(state == 0){ fe9: 74 dd je fc8 <printf+0x28> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ feb: 83 ff 25 cmp $0x25,%edi fee: 75 e5 jne fd5 <printf+0x35> if(c == 'd'){ ff0: 83 fa 64 cmp $0x64,%edx ff3: 0f 84 3f 01 00 00 je 1138 <printf+0x198> printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ ff9: 83 fa 70 cmp $0x70,%edx ffc: 0f 84 a6 00 00 00 je 10a8 <printf+0x108> 1002: 83 fa 78 cmp $0x78,%edx 1005: 0f 84 9d 00 00 00 je 10a8 <printf+0x108> printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ 100b: 83 fa 73 cmp $0x73,%edx 100e: 66 90 xchg %ax,%ax 1010: 0f 84 ba 00 00 00 je 10d0 <printf+0x130> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 1016: 83 fa 63 cmp $0x63,%edx 1019: 0f 84 41 01 00 00 je 1160 <printf+0x1c0> putc(fd, *ap); ap++; } else if(c == '%'){ 101f: 83 fa 25 cmp $0x25,%edx 1022: 0f 84 00 01 00 00 je 1128 <printf+0x188> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 1028: 8b 4d 08 mov 0x8(%ebp),%ecx 102b: 89 55 cc mov %edx,-0x34(%ebp) 102e: c6 45 e7 25 movb $0x25,-0x19(%ebp) 1032: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 1039: 00 103a: 89 74 24 04 mov %esi,0x4(%esp) 103e: 89 0c 24 mov %ecx,(%esp) 1041: e8 42 fe ff ff call e88 <write> 1046: 8b 55 cc mov -0x34(%ebp),%edx 1049: 88 55 e7 mov %dl,-0x19(%ebp) 104c: 8b 45 08 mov 0x8(%ebp),%eax int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 104f: 83 c3 01 add $0x1,%ebx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 1052: 31 ff xor %edi,%edi 1054: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 105b: 00 105c: 89 74 24 04 mov %esi,0x4(%esp) 1060: 89 04 24 mov %eax,(%esp) 1063: e8 20 fe ff ff call e88 <write> 1068: 8b 45 0c mov 0xc(%ebp),%eax int c, i, state; uint *ap; state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ 106b: 0f b6 14 18 movzbl (%eax,%ebx,1),%edx 106f: 84 d2 test %dl,%dl 1071: 0f 85 6d ff ff ff jne fe4 <printf+0x44> 1077: 90 nop putc(fd, c); } state = 0; } } } 1078: 83 c4 3c add $0x3c,%esp 107b: 5b pop %ebx 107c: 5e pop %esi 107d: 5f pop %edi 107e: 5d pop %ebp 107f: c3 ret #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 1080: 8b 45 08 mov 0x8(%ebp),%eax state = 0; ap = (uint*)(void*)&fmt + 1; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ 1083: 88 55 e7 mov %dl,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 1086: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 108d: 00 108e: 89 74 24 04 mov %esi,0x4(%esp) 1092: 89 04 24 mov %eax,(%esp) 1095: e8 ee fd ff ff call e88 <write> 109a: 8b 45 0c mov 0xc(%ebp),%eax 109d: e9 33 ff ff ff jmp fd5 <printf+0x35> 10a2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 10a8: 8b 45 d4 mov -0x2c(%ebp),%eax 10ab: b9 10 00 00 00 mov $0x10,%ecx ap++; 10b0: 31 ff xor %edi,%edi } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); 10b2: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10b9: 8b 10 mov (%eax),%edx 10bb: 8b 45 08 mov 0x8(%ebp),%eax 10be: e8 4d fe ff ff call f10 <printint> 10c3: 8b 45 0c mov 0xc(%ebp),%eax ap++; 10c6: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 10ca: e9 06 ff ff ff jmp fd5 <printf+0x35> 10cf: 90 nop } else if(c == 's'){ s = (char*)*ap; 10d0: 8b 55 d4 mov -0x2c(%ebp),%edx ap++; if(s == 0) 10d3: b9 ef 13 00 00 mov $0x13ef,%ecx ap++; } else if(c == 'x' || c == 'p'){ printint(fd, *ap, 16, 0); ap++; } else if(c == 's'){ s = (char*)*ap; 10d8: 8b 3a mov (%edx),%edi ap++; 10da: 83 c2 04 add $0x4,%edx 10dd: 89 55 d4 mov %edx,-0x2c(%ebp) if(s == 0) 10e0: 85 ff test %edi,%edi 10e2: 0f 44 f9 cmove %ecx,%edi s = "(null)"; while(*s != 0){ 10e5: 0f b6 17 movzbl (%edi),%edx 10e8: 84 d2 test %dl,%dl 10ea: 74 33 je 111f <printf+0x17f> 10ec: 89 5d d0 mov %ebx,-0x30(%ebp) 10ef: 8b 5d 08 mov 0x8(%ebp),%ebx 10f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi putc(fd, *s); s++; 10f8: 83 c7 01 add $0x1,%edi } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 10fb: 88 55 e7 mov %dl,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 10fe: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 1105: 00 1106: 89 74 24 04 mov %esi,0x4(%esp) 110a: 89 1c 24 mov %ebx,(%esp) 110d: e8 76 fd ff ff call e88 <write> } else if(c == 's'){ s = (char*)*ap; ap++; if(s == 0) s = "(null)"; while(*s != 0){ 1112: 0f b6 17 movzbl (%edi),%edx 1115: 84 d2 test %dl,%dl 1117: 75 df jne 10f8 <printf+0x158> 1119: 8b 5d d0 mov -0x30(%ebp),%ebx 111c: 8b 45 0c mov 0xc(%ebp),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 111f: 31 ff xor %edi,%edi 1121: e9 af fe ff ff jmp fd5 <printf+0x35> 1126: 66 90 xchg %ax,%ax s++; } } else if(c == 'c'){ putc(fd, *ap); ap++; } else if(c == '%'){ 1128: c6 45 e7 25 movb $0x25,-0x19(%ebp) 112c: e9 1b ff ff ff jmp 104c <printf+0xac> 1131: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 1138: 8b 45 d4 mov -0x2c(%ebp),%eax 113b: b9 0a 00 00 00 mov $0xa,%ecx ap++; 1140: 66 31 ff xor %di,%di } else { putc(fd, c); } } else if(state == '%'){ if(c == 'd'){ printint(fd, *ap, 10, 1); 1143: c7 04 24 01 00 00 00 movl $0x1,(%esp) 114a: 8b 10 mov (%eax),%edx 114c: 8b 45 08 mov 0x8(%ebp),%eax 114f: e8 bc fd ff ff call f10 <printint> 1154: 8b 45 0c mov 0xc(%ebp),%eax ap++; 1157: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 115b: e9 75 fe ff ff jmp fd5 <printf+0x35> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 1160: 8b 55 d4 mov -0x2c(%ebp),%edx putc(fd, *ap); ap++; 1163: 31 ff xor %edi,%edi #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 1165: 8b 4d 08 mov 0x8(%ebp),%ecx s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 1168: 8b 02 mov (%edx),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 116a: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp) 1171: 00 1172: 89 74 24 04 mov %esi,0x4(%esp) 1176: 89 0c 24 mov %ecx,(%esp) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 1179: 88 45 e7 mov %al,-0x19(%ebp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 117c: e8 07 fd ff ff call e88 <write> 1181: 8b 45 0c mov 0xc(%ebp),%eax putc(fd, *s); s++; } } else if(c == 'c'){ putc(fd, *ap); ap++; 1184: 83 45 d4 04 addl $0x4,-0x2c(%ebp) 1188: e9 48 fe ff ff jmp fd5 <printf+0x35> 118d: 90 nop 118e: 90 nop 118f: 90 nop 00001190 <free>: static Header base; static Header *freep; void free(void *ap) { 1190: 55 push %ebp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 1191: a1 8c 14 00 00 mov 0x148c,%eax static Header base; static Header *freep; void free(void *ap) { 1196: 89 e5 mov %esp,%ebp 1198: 57 push %edi 1199: 56 push %esi 119a: 53 push %ebx 119b: 8b 5d 08 mov 0x8(%ebp),%ebx Header *bp, *p; bp = (Header*)ap - 1; 119e: 8d 4b f8 lea -0x8(%ebx),%ecx for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 11a1: 39 c8 cmp %ecx,%eax 11a3: 73 1d jae 11c2 <free+0x32> 11a5: 8d 76 00 lea 0x0(%esi),%esi 11a8: 8b 10 mov (%eax),%edx 11aa: 39 d1 cmp %edx,%ecx 11ac: 72 1a jb 11c8 <free+0x38> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 11ae: 39 d0 cmp %edx,%eax 11b0: 72 08 jb 11ba <free+0x2a> 11b2: 39 c8 cmp %ecx,%eax 11b4: 72 12 jb 11c8 <free+0x38> 11b6: 39 d1 cmp %edx,%ecx 11b8: 72 0e jb 11c8 <free+0x38> 11ba: 89 d0 mov %edx,%eax free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 11bc: 39 c8 cmp %ecx,%eax 11be: 66 90 xchg %ax,%ax 11c0: 72 e6 jb 11a8 <free+0x18> 11c2: 8b 10 mov (%eax),%edx 11c4: eb e8 jmp 11ae <free+0x1e> 11c6: 66 90 xchg %ax,%ax if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 11c8: 8b 71 04 mov 0x4(%ecx),%esi 11cb: 8d 3c f1 lea (%ecx,%esi,8),%edi 11ce: 39 d7 cmp %edx,%edi 11d0: 74 19 je 11eb <free+0x5b> bp->s.size += p->s.ptr->s.size; bp->s.ptr = p->s.ptr->s.ptr; } else bp->s.ptr = p->s.ptr; 11d2: 89 53 f8 mov %edx,-0x8(%ebx) if(p + p->s.size == bp){ 11d5: 8b 50 04 mov 0x4(%eax),%edx 11d8: 8d 34 d0 lea (%eax,%edx,8),%esi 11db: 39 ce cmp %ecx,%esi 11dd: 74 23 je 1202 <free+0x72> p->s.size += bp->s.size; p->s.ptr = bp->s.ptr; } else p->s.ptr = bp; 11df: 89 08 mov %ecx,(%eax) freep = p; 11e1: a3 8c 14 00 00 mov %eax,0x148c } 11e6: 5b pop %ebx 11e7: 5e pop %esi 11e8: 5f pop %edi 11e9: 5d pop %ebp 11ea: 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; 11eb: 03 72 04 add 0x4(%edx),%esi 11ee: 89 71 04 mov %esi,0x4(%ecx) bp->s.ptr = p->s.ptr->s.ptr; 11f1: 8b 10 mov (%eax),%edx 11f3: 8b 12 mov (%edx),%edx 11f5: 89 53 f8 mov %edx,-0x8(%ebx) } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ 11f8: 8b 50 04 mov 0x4(%eax),%edx 11fb: 8d 34 d0 lea (%eax,%edx,8),%esi 11fe: 39 ce cmp %ecx,%esi 1200: 75 dd jne 11df <free+0x4f> p->s.size += bp->s.size; 1202: 03 51 04 add 0x4(%ecx),%edx 1205: 89 50 04 mov %edx,0x4(%eax) p->s.ptr = bp->s.ptr; 1208: 8b 53 f8 mov -0x8(%ebx),%edx 120b: 89 10 mov %edx,(%eax) } else p->s.ptr = bp; freep = p; 120d: a3 8c 14 00 00 mov %eax,0x148c } 1212: 5b pop %ebx 1213: 5e pop %esi 1214: 5f pop %edi 1215: 5d pop %ebp 1216: c3 ret 1217: 89 f6 mov %esi,%esi 1219: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi 00001220 <malloc>: return freep; } void* malloc(uint nbytes) { 1220: 55 push %ebp 1221: 89 e5 mov %esp,%ebp 1223: 57 push %edi 1224: 56 push %esi 1225: 53 push %ebx 1226: 83 ec 2c sub $0x2c,%esp Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 1229: 8b 5d 08 mov 0x8(%ebp),%ebx if((prevp = freep) == 0){ 122c: 8b 0d 8c 14 00 00 mov 0x148c,%ecx malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 1232: 83 c3 07 add $0x7,%ebx 1235: c1 eb 03 shr $0x3,%ebx 1238: 83 c3 01 add $0x1,%ebx if((prevp = freep) == 0){ 123b: 85 c9 test %ecx,%ecx 123d: 0f 84 9b 00 00 00 je 12de <malloc+0xbe> base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 1243: 8b 01 mov (%ecx),%eax if(p->s.size >= nunits){ 1245: 8b 50 04 mov 0x4(%eax),%edx 1248: 39 d3 cmp %edx,%ebx 124a: 76 27 jbe 1273 <malloc+0x53> p->s.size -= nunits; p += p->s.size; p->s.size = nunits; } freep = prevp; return (void*)(p + 1); 124c: 8d 3c dd 00 00 00 00 lea 0x0(,%ebx,8),%edi morecore(uint nu) { char *p; Header *hp; if(nu < 4096) 1253: be 00 80 00 00 mov $0x8000,%esi 1258: 89 7d e4 mov %edi,-0x1c(%ebp) 125b: 90 nop 125c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 1260: 3b 05 8c 14 00 00 cmp 0x148c,%eax 1266: 74 30 je 1298 <malloc+0x78> 1268: 89 c1 mov %eax,%ecx nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 126a: 8b 01 mov (%ecx),%eax if(p->s.size >= nunits){ 126c: 8b 50 04 mov 0x4(%eax),%edx 126f: 39 d3 cmp %edx,%ebx 1271: 77 ed ja 1260 <malloc+0x40> if(p->s.size == nunits) 1273: 39 d3 cmp %edx,%ebx 1275: 74 61 je 12d8 <malloc+0xb8> prevp->s.ptr = p->s.ptr; else { p->s.size -= nunits; 1277: 29 da sub %ebx,%edx 1279: 89 50 04 mov %edx,0x4(%eax) p += p->s.size; 127c: 8d 04 d0 lea (%eax,%edx,8),%eax p->s.size = nunits; 127f: 89 58 04 mov %ebx,0x4(%eax) } freep = prevp; 1282: 89 0d 8c 14 00 00 mov %ecx,0x148c return (void*)(p + 1); 1288: 83 c0 08 add $0x8,%eax } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } } 128b: 83 c4 2c add $0x2c,%esp 128e: 5b pop %ebx 128f: 5e pop %esi 1290: 5f pop %edi 1291: 5d pop %ebp 1292: c3 ret 1293: 90 nop 1294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi morecore(uint nu) { char *p; Header *hp; if(nu < 4096) 1298: 8b 45 e4 mov -0x1c(%ebp),%eax 129b: 81 fb 00 10 00 00 cmp $0x1000,%ebx 12a1: bf 00 10 00 00 mov $0x1000,%edi 12a6: 0f 43 fb cmovae %ebx,%edi 12a9: 0f 42 c6 cmovb %esi,%eax nu = 4096; p = sbrk(nu * sizeof(Header)); 12ac: 89 04 24 mov %eax,(%esp) 12af: e8 3c fc ff ff call ef0 <sbrk> if(p == (char*)-1) 12b4: 83 f8 ff cmp $0xffffffff,%eax 12b7: 74 18 je 12d1 <malloc+0xb1> return 0; hp = (Header*)p; hp->s.size = nu; 12b9: 89 78 04 mov %edi,0x4(%eax) free((void*)(hp + 1)); 12bc: 83 c0 08 add $0x8,%eax 12bf: 89 04 24 mov %eax,(%esp) 12c2: e8 c9 fe ff ff call 1190 <free> return freep; 12c7: 8b 0d 8c 14 00 00 mov 0x148c,%ecx } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 12cd: 85 c9 test %ecx,%ecx 12cf: 75 99 jne 126a <malloc+0x4a> if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 12d1: 31 c0 xor %eax,%eax 12d3: eb b6 jmp 128b <malloc+0x6b> 12d5: 8d 76 00 lea 0x0(%esi),%esi if(p->s.size == nunits) prevp->s.ptr = p->s.ptr; 12d8: 8b 10 mov (%eax),%edx 12da: 89 11 mov %edx,(%ecx) 12dc: eb a4 jmp 1282 <malloc+0x62> Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 12de: c7 05 8c 14 00 00 84 movl $0x1484,0x148c 12e5: 14 00 00 base.s.size = 0; 12e8: b9 84 14 00 00 mov $0x1484,%ecx Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; 12ed: c7 05 84 14 00 00 84 movl $0x1484,0x1484 12f4: 14 00 00 base.s.size = 0; 12f7: c7 05 88 14 00 00 00 movl $0x0,0x1488 12fe: 00 00 00 1301: e9 3d ff ff ff jmp 1243 <malloc+0x23>
32.615153
71
0.417827
2b6a5293fbfa18bbac66936f4ba20c7ea0816050
1,626
asm
Assembly
fasm/count.asm
Kharacternyk/ceto19
80dea5e78204c53d801ce249d7d247b5d0c5ec9a
[ "MIT" ]
null
null
null
fasm/count.asm
Kharacternyk/ceto19
80dea5e78204c53d801ce249d7d247b5d0c5ec9a
[ "MIT" ]
null
null
null
fasm/count.asm
Kharacternyk/ceto19
80dea5e78204c53d801ce249d7d247b5d0c5ec9a
[ "MIT" ]
null
null
null
; The number of arguments to proccess. count=1000000 ; Put the start of the arguments chunk into rax. sub rax, 1 imul rax, count ; The lowest x that should be checked. mov r9, 1 ; Fill `cubes` array. cubes=buffer zer rdi cubesLoop: inc rdi mov rbx, rdi imul rbx, rdi; ^2 imul rbx, rdi; ^3 mov [cubes+rdi*8], rbx mov rcx, rbx imul rcx, 3 cmp rcx, rax ja @f mov r9, rdi @@: sub rbx, count cmp rbx, rax jl cubesLoop ; Store the highest index. mov rcx, rdi ; Prepare `results` array. results=buffer+5000*8 zer r15 zerLoop: mov byte [results+r15], 0 inc r15 cmp r15, count jna zerLoop ; Check every combination, x>=y>=z. mov r12, r9 ; x xLoop: mov r13, 1 ; y yLoop: mov r14, 1 ; z zLoop: mov r15, [cubes+r12*8] add r15, [cubes+r13*8] add r15, [cubes+r14*8] sub r15, rax cmp r15, 0 jl @f cmp r15, count jg @f inc byte [results+r15] @@: inc r14 cmp r14, r13 jna zLoop inc r13 cmp r13, r12 jna yLoop inc r12 cmp r12, rcx jna xLoop ; Push all results. zer r8 pushLoop: movzx rbx, byte [results+r8] cmp rbx, 0 je @f push LF push rbx push TAB mov r9, rax add r9, r8 push r9 @@: inc r8 cmp r8, count jb pushLoop
19.129412
48
0.47294
e14adaf9f97301094e6edea1050c09d62086a596
592
asm
Assembly
oeis/228/A228484.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/228/A228484.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/228/A228484.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A228484: a(n) = 2^n*(3*n)!/(n!*(2*n)!). ; 1,6,60,672,7920,96096,1188096,14883840,188280576,2399654400,30766095360,396363202560,5126871859200,66538909237248,866061993246720,11300615801536512,147773778404769792,1936073567335219200,25408660721789829120,333963051307735449600,4395467544519502725120,57922154192936443576320,764131590198569572761600,10090966738970095575367680,133383257161386635663769600,1764578829026474953115959296,23362704315526994175643877376,309543587576793717379600220160,4104065565677255923023816425472 mov $1,$0 mul $1,3 bin $1,$0 mov $2,2 pow $2,$0 mul $1,$2 mov $0,$1
53.818182
480
0.846284
4fa6c2483a1d4f24865a073ab6efae663b94f8da
975
asm
Assembly
programs/oeis/017/A017139.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/017/A017139.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/017/A017139.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A017139: a(n) = (8*n + 6)^3. ; 216,2744,10648,27000,54872,97336,157464,238328,343000,474552,636056,830584,1061208,1331000,1643032,2000376,2406104,2863288,3375000,3944312,4574296,5268024,6028568,6859000,7762392,8741816,9800344,10941048,12167000,13481272,14886936,16387064,17984728,19683000,21484952,23393656,25412184,27543608,29791000,32157432,34645976,37259704,40001688,42875000,45882712,49027896,52313624,55742968,59319000,63044792,66923416,70957944,75151448,79507000,84027672,88716536,93576664,98611128,103823000,109215352,114791256,120553784,126506008,132651000,138991832,145531576,152273304,159220088,166375000,173741112,181321496,189119224,197137368,205379000,213847192,222545016,231475544,240641848,250047000,259694072,269586136,279726264,290117528,300763000,311665752,322828856,334255384,345948408,357911000,370146232,382657176,395446904,408518488,421875000,435519512,449455096,463684824,478211768,493039000,508169592 mul $0,8 mov $1,6 add $1,$0 pow $1,3 mov $0,$1
108.333333
895
0.853333
d2efeac09ec1a793bc5ec7782c7946771463f134
654
asm
Assembly
oeis/002/A002203.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/002/A002203.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/002/A002203.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A002203: Companion Pell numbers: a(n) = 2*a(n-1) + a(n-2), a(0) = a(1) = 2. ; 2,2,6,14,34,82,198,478,1154,2786,6726,16238,39202,94642,228486,551614,1331714,3215042,7761798,18738638,45239074,109216786,263672646,636562078,1536796802,3710155682,8957108166,21624372014,52205852194,126036076402,304278004998,734592086398,1773462177794,4281516441986,10336495061766,24954506565518,60245508192802,145445522951122,351136554095046,847718631141214,2046573816377474,4940866263896162,11928306344169798,28797478952235758,69523264248641314,167844007449518386,405211279147678086 mov $1,2 lpb $0 sub $0,1 mov $3,$1 add $1,$2 mul $3,2 add $2,$3 lpe mov $0,$1
50.307692
486
0.796636
862bcce306fbb4337fee33506ac04533bd7308f9
39
asm
Assembly
src/main/fragment/mos6502-common/vbsaa=pbsz1_derefidx_vbuyy_plus_pbsz1_derefidx_vbuc1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/vbsaa=pbsz1_derefidx_vbuyy_plus_pbsz1_derefidx_vbuc1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/vbsaa=pbsz1_derefidx_vbuyy_plus_pbsz1_derefidx_vbuc1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
clc lda ({z1}),y ldy #{c1} adc ({z1}),y
9.75
12
0.512821
ba2cc75d057850011736e7bd9faaa6d1cbd33e36
102
asm
Assembly
asm/startup.asm
yoo2001818/rust-pc-emu
88079236b33652fdbde55bea3cb9245614a5cef1
[ "MIT" ]
null
null
null
asm/startup.asm
yoo2001818/rust-pc-emu
88079236b33652fdbde55bea3cb9245614a5cef1
[ "MIT" ]
null
null
null
asm/startup.asm
yoo2001818/rust-pc-emu
88079236b33652fdbde55bea3cb9245614a5cef1
[ "MIT" ]
null
null
null
bits 16 org 0xffff ; Do long jump to 7c00:0000 ; Replace CS to 0x7c00, IP to 0x0000 jmp 0x7c00:0x0000
17
36
0.754902
4e556f4c32ded3aabcc98d5d371f56b6519f8a3b
462
asm
Assembly
programs/oeis/129/A129230.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/129/A129230.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/129/A129230.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A129230: a(n)=Floor(n*r)+Floor((n-2)*r)+Floor((n-4)*r)+...+Floor(k*r), where r = golden mean = (1 + sqrt(5))/2 and k=0 if n is even, k=1 if n is odd. ; 0,1,3,5,9,13,18,24,30,38,46,55,65,76,87,100,112,127,141,157,173,190,208,227,246,267,288,310,333,356,381,406,432,459,487,515,545,574,606,637,670,703,737,772,808,844,882,920,959,999,1039,1081,1123,1166,1210 lpb $0 mov $2,$0 trn $0,2 seq $2,66096 ; Duplicate values in A060143. add $1,$2 lpe mov $0,$1
42
206
0.640693
11981c5379d615451d6381cb2dbe2fc578a8df8a
303
asm
Assembly
programs/oeis/040/A040873.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/040/A040873.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/040/A040873.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A040873: Continued fraction for sqrt(904). ; 30,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60,15,60 add $0,1 mov $1,$0 mul $1,$0 trn $1,3 sub $1,2 gcd $1,8 mul $1,15
27.545455
190
0.646865
9b736343a4225f476a85b37fb302cbbaa9e16a2a
1,478
asm
Assembly
snippets/div10.test.i.asm
ped7g/ZXSpectrumNextMisc
0148cd8f0529bff4451f089fd7106ea06713e766
[ "MIT" ]
15
2019-04-06T20:38:41.000Z
2022-02-27T16:50:31.000Z
snippets/div10.test.i.asm
ped7g/ZXSpectrumNextMisc
0148cd8f0529bff4451f089fd7106ea06713e766
[ "MIT" ]
7
2020-05-01T08:14:54.000Z
2022-03-30T19:54:34.000Z
snippets/div10.test.i.asm
ped7g/ZXSpectrumNextMisc
0148cd8f0529bff4451f089fd7106ea06713e766
[ "MIT" ]
1
2020-08-23T17:36:20.000Z
2020-08-23T17:36:20.000Z
MODULE div10 reportError: nextreg TILEMAP_DEFAULT_ATTR_NR_6C,2 ret test: call test.EDiv10A call test.EDiv10B call test.EDiv10C ret test.EDiv10A: ; only the top 8 bits of 8.5 fixed point results is compared xor a ; A = expected result for D (H div 10) ld h,a ; H = source of test value (L = tens-counter) .outer: ld l,10 .inner: ld e,h call eDiv10A cp d call nz,reportError inc h ret z ; test finished dec l jr nz,.inner inc a jr .outer test.EDiv10B: ; only the top 8 bits of 8.8 fixed point results is compared xor a ld h,a ; H = expected result for D (C div 10) ld c,a ; C = source of test value (B = tens-counter) .outer: ld b,10 .inner: ld e,c call eDiv10B ld a,d cp h call nz,reportError inc c ret z ; test finished djnz .inner inc h jr .outer test.EDiv10C: xor a ; A = expected result for D (H div 10) ld h,a ; H = source of test value (L = tens-counter) .outer: ld l,10 .inner: ld e,h call eDiv10C cp d call nz,reportError inc h ret m ; test finished when H == 128 (0..127 only is valid range) dec l jr nz,.inner inc a jr .outer ENDMODULE
21.735294
78
0.506089
a144a225f3af7077c2700c388fb1e39194bfc3be
195
asm
Assembly
data/battle/stat_names.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
data/battle/stat_names.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
data/battle/stat_names.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
StatNames: ; entries correspond to stat ids db "ATTACK@" db "DEFENSE@" db "SPEED@" db "SPCL.ATK@" db "SPCL.DEF@" db "ACCURACY@" db "EVASION@" db "ABILITY@" ; used for BattleCommand_Curse
17.727273
45
0.671795
6e4b8efcb8f03804383a56eb75ce15e58725c16f
8,300
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_sm_/i3-7100_9_0xca_notsx.log_21829_1995.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i3-7100_9_0xca_notsx.log_21829_1995.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i3-7100_9_0xca_notsx.log_21829_1995.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 %r15 push %r8 push %rbx push %rcx push %rdi push %rsi lea addresses_A_ht+0xf827, %rsi lea addresses_UC_ht+0x2627, %rdi clflush (%rsi) clflush (%rdi) sub %r15, %r15 mov $75, %rcx rep movsb nop nop nop nop nop and $36837, %rsi lea addresses_D_ht+0x1bde7, %rsi nop nop nop inc %r11 movb $0x61, (%rsi) nop nop and %rcx, %rcx lea addresses_WT_ht+0xb2a7, %rdi nop nop nop nop nop add %r8, %r8 movw $0x6162, (%rdi) and %r11, %r11 lea addresses_A_ht+0x14027, %r15 nop xor %rdi, %rdi mov $0x6162636465666768, %rcx movq %rcx, (%r15) nop nop nop cmp %r8, %r8 lea addresses_normal_ht+0x15127, %rcx nop nop nop nop nop add %rbx, %rbx mov (%rcx), %r15 nop xor %r11, %r11 lea addresses_WC_ht+0x12629, %rsi nop nop inc %r8 mov (%rsi), %rbx nop inc %rdi lea addresses_A_ht+0xb511, %rsi clflush (%rsi) nop nop nop nop nop xor $32799, %r15 movb (%rsi), %bl nop sub $45262, %r11 lea addresses_UC_ht+0x167, %rdi nop nop nop nop inc %rbx mov $0x6162636465666768, %rcx movq %rcx, %xmm5 and $0xffffffffffffffc0, %rdi vmovntdq %ymm5, (%rdi) nop nop nop nop nop add $744, %rdi lea addresses_WT_ht+0x2c7, %r15 dec %r8 movb $0x61, (%r15) nop nop nop nop nop cmp $20574, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r15 push %r9 push %rbp push %rdi push %rdx // Store lea addresses_WC+0xb0f8, %rdx nop xor $17449, %r9 movb $0x51, (%rdx) nop nop nop nop nop and %r15, %r15 // Store lea addresses_RW+0x10327, %rdi nop nop sub $56252, %r14 movl $0x51525354, (%rdi) nop nop sub %rdi, %rdi // Store lea addresses_WT+0x12b27, %r12 nop nop sub %r15, %r15 movl $0x51525354, (%r12) nop nop nop nop nop sub $17067, %rdx // Store lea addresses_D+0xe027, %rbp and $35330, %r15 movw $0x5152, (%rbp) nop nop nop nop nop and $12735, %rdx // Store lea addresses_D+0xe027, %r12 clflush (%r12) nop and %rdx, %rdx mov $0x5152535455565758, %rdi movq %rdi, %xmm3 movups %xmm3, (%r12) nop nop nop nop cmp $39103, %r14 // Store lea addresses_D+0x1e827, %r14 nop xor $4432, %r12 mov $0x5152535455565758, %rdx movq %rdx, (%r14) nop and %r12, %r12 // Store lea addresses_WT+0x13e27, %r9 nop nop nop dec %r12 mov $0x5152535455565758, %rdi movq %rdi, (%r9) nop nop nop and %r12, %r12 // Store lea addresses_WC+0x2127, %r15 clflush (%r15) nop nop inc %r12 movb $0x51, (%r15) nop nop nop nop add %rdi, %rdi // Store lea addresses_PSE+0x1b8, %rbp nop nop dec %rdi movb $0x51, (%rbp) xor %r15, %r15 // Faulty Load lea addresses_D+0xe027, %rdx nop nop nop nop nop sub %rbp, %rbp mov (%rdx), %r14 lea oracles, %rdx and $0xff, %r14 shlq $12, %r14 mov (%rdx,%r14,1), %r14 pop %rdx pop %rdi pop %rbp pop %r9 pop %r15 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WC', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_RW', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_WT', 'size': 4, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 16, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 11, 'NT': False, 'type': 'addresses_D', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_WT', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_WC', 'size': 1, 'AVXalign': True}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 1, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': True, 'type': 'addresses_D', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'congruent': 4, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_WT_ht', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}} {'src': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WC_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': True, 'type': 'addresses_UC_ht', 'size': 32, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WT_ht', 'size': 1, 'AVXalign': False}} {'58': 21829} 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 */
30.181818
2,999
0.648916
5592d0712db03cd6241a97a51936952567f7d64a
535
asm
Assembly
oeis/072/A072998.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/072/A072998.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/072/A072998.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A072998: To get a(n), write n in balanced ternary notation (using only digits -1, 0, 1, -1), then change -1's to 0's, 0's to 1's, and 1's to 2's. ; Submitted by Jamie Morken(s4) ; 1,2,20,21,22,200,201,202,210,211,212,220,221,222,2000,2001,2002,2010,2011,2012,2020,2021,2022,2100,2101,2102,2110,2111,2112,2120,2121,2122,2200,2201,2202,2210,2211,2212,2220,2221,2222,20000,20001,20002,20010 bin $2,$0 mov $3,1 lpb $0 mov $2,$0 add $0,1 div $0,3 add $2,7 mod $2,3 mul $2,$3 add $1,$2 mov $2,$1 mul $3,10 lpe mov $0,$2
28.157895
209
0.654206
f475260734f6af78bf3c705562480ad4ca0b66e8
1,530
asm
Assembly
programs/oeis/279/A279054.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/279/A279054.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/279/A279054.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A279054: Largest integer m for which binomial(m,n-1) > binomial(m-1,n). ; 1,4,7,9,12,14,17,20,22,25,28,30,33,35,38,41,43,46,49,51,54,56,59,62,64,67,69,72,75,77,80,83,85,88,90,93,96,98,101,103,106,109,111,114,117,119,122,124,127,130,132,135,138,140,143,145,148,151,153,156,158,161,164,166,169,172,174,177,179,182,185,187,190,193,195,198,200,203,206,208,211,213,216,219,221,224,227,229,232,234,237,240,242,245,247,250,253,255,258,261,263,266,268,271,274,276,279,282,284,287,289,292,295,297,300,302,305,308,310,313,316,318,321,323,326,329,331,334,337,339,342,344,347,350,352,355,357,360,363,365,368,371,373,376,378,381,384,386,389,391,394,397,399,402,405,407,410,412,415,418,420,423,426,428,431,433,436,439,441,444,446,449,452,454,457,460,462,465,467,470,473,475,478,480,483,486,488,491,494,496,499,501,504,507,509,512,515,517,520,522,525,528,530,533,535,538,541,543,546,549,551,554,556,559,562,564,567,570,572,575,577,580,583,585,588,590,593,596,598,601,604,606,609,611,614,617,619,622,624,627,630,632,635,638,640,643,645,648,651,653 mov $7,$0 add $7,1 mov $9,$0 lpb $7,1 mov $0,$9 sub $7,1 sub $0,$7 mov $11,2 mov $12,$0 lpb $11,1 sub $11,1 add $0,$11 sub $0,1 mov $6,1 mul $6,$0 mov $5,$6 add $5,1 mov $3,$5 mul $3,$6 mov $4,$5 lpb $3,1 add $4,2 trn $3,$4 lpe mov $8,$4 mov $10,$11 lpb $10,1 mov $2,$8 sub $10,1 lpe lpe lpb $12,1 sub $2,$8 mov $12,0 lpe mov $8,$2 div $8,2 add $8,2 add $1,$8 lpe sub $1,1
34
959
0.631373
3acd85dd18498c665f86d51f22346c10afe0927c
987
asm
Assembly
solutions/16 - Little Exterminator 2/size-8_speed-11.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
45
2018-09-05T04:56:59.000Z
2021-11-22T08:57:26.000Z
solutions/16 - Little Exterminator 2/size-8_speed-11.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
36
2018-09-01T11:34:26.000Z
2021-05-19T23:20:49.000Z
solutions/16 - Little Exterminator 2/size-8_speed-11.asm
michaelgundlach/7billionhumans
02c6f3963364362c95cb516cbc6ef1efc073bb2e
[ "MIT" ]
36
2018-09-01T07:44:19.000Z
2021-09-10T19:07:35.000Z
-- 7 Billion Humans (2087) -- -- 16: Little Exterminator 2 -- -- Author: landfillbaby -- Size: 8 -- Speed: 11 comment 0 a: step s if c != datacube: jump a endif pickup c b: step e if se != shredder: jump b endif giveto se DEFINE COMMENT 0 eJztkt9LE1AUxz8PPvfQHxA9RAzxYS2h0Nhm2MxtzZSp2zCbQusHhUZlRKMOlbGWv7IVKx1agZVIT+FT xIjRg0T4EEN6EJ8keoieIkKi7y7+GR34cs+995zzPed7bxnZEHssw14GqbcUjRYnaF1ClCjt9Fkbw0KO MLMc4411UrZ+1uwC62SFHCuMsWxTFOwBea3D3CNko/i5zSHL4rVLeOwinhqd6twhRtE6eGrdQlL+CaYZ 4JYNkLE0adXvUy9RejlKXKvM8qQYJcENISv/Gv02ovgr4hth2q4ya9d5xU2WFLek+AUbZ94mKDrey5zh lHCSjKsXIWotHLZmgjSr1wM0sV98++gRUi5nirSyU5TUwzxhe0YrLzTbgs5e6u61uBfVTc0imiqi6WIc FBrooMGO46VbWsbZrVl3Wa/OEtI5KT8p3RPa9+BTjFe6ehRfrzyf8hstTKu14xd80j9sR6REze6KP6/4 MXFM6G6SmDRvkvZBoYuHhCgot6C4R9oXOO/mHdRbDfLL1TjHN87yR2pscVprRqhZJxXxr+rtN4RNzfNT fWy5u5zO83zVW38X919XM0qVNj5Jx4r5eevO/LyXpivOb+Gzuqmq/6qUWVOtDc2zbiH5AT66uvf5wjir +gEVe8w7dzapnIJyi4p5IsxQdvVmWNYvXHR+STzPt+NLfLA59TGnnNpdQH5AnDW/jp0upo4fbv+bHdvr Jv+Nf6x1x9o;
29.029412
80
0.879433
337c4bf3beaf60a84814035c2fb30a8df3e45366
1,256
asm
Assembly
programs/oeis/327/A327672.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/327/A327672.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/327/A327672.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A327672: a(n) = Sum_{k=0..n} ceiling(sqrt(k)). ; 0,1,3,5,7,10,13,16,19,22,26,30,34,38,42,46,50,55,60,65,70,75,80,85,90,95,101,107,113,119,125,131,137,143,149,155,161,168,175,182,189,196,203,210,217,224,231,238,245,252,260,268,276,284,292,300,308,316,324,332,340,348,356,364,372,381,390,399,408,417,426,435,444,453,462,471,480,489,498,507,516,525,535,545,555,565,575,585,595,605,615,625,635,645,655,665,675,685,695,705,715,726,737,748,759,770,781,792,803,814,825,836,847,858,869,880,891,902,913,924,935,946,958,970,982,994,1006,1018,1030,1042,1054,1066,1078,1090,1102,1114,1126,1138,1150,1162,1174,1186,1198,1210,1222,1235,1248,1261,1274,1287,1300,1313,1326,1339,1352,1365,1378,1391,1404,1417,1430,1443,1456,1469,1482,1495,1508,1521,1534,1547,1561,1575,1589,1603,1617,1631,1645,1659,1673,1687,1701,1715,1729,1743,1757,1771,1785,1799,1813,1827,1841,1855,1869,1883,1897,1911,1925,1940,1955,1970,1985,2000,2015,2030,2045,2060,2075,2090,2105,2120,2135,2150,2165,2180,2195,2210,2225,2240,2255,2270,2285,2300,2315,2330,2345,2360,2376,2392,2408,2424,2440,2456,2472,2488,2504,2520,2536,2552,2568,2584,2600,2616,2632,2648,2664,2680,2696,2712,2728,2744 mov $3,$0 lpb $0 add $1,$0 sub $0,1 add $2,2 trn $0,$2 sub $1,1 lpe lpb $3 add $1,1 sub $3,1 lpe
78.5
1,094
0.736465
7241f6554362ee1cbc25c0d4fdadb4d183acfa29
1,488
asm
Assembly
programs/oeis/285/A285009.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/285/A285009.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/285/A285009.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A285009: Subset sums (see Comments). ; 9,17,28,42,59,79,102,128,157,189,224,262,303,347,394,444,497,553,612,674,739,807,878,952,1029,1109,1192,1278,1367,1459,1554,1652,1753,1857,1964,2074,2187,2303,2422,2544,2669,2797,2928,3062,3199,3339,3482,3628,3777,3929,4084,4242,4403,4567,4734,4904,5077,5253,5432,5614,5799,5987,6178,6372,6569,6769,6972,7178,7387,7599,7814,8032,8253,8477,8704,8934,9167,9403,9642,9884,10129,10377,10628,10882,11139,11399,11662,11928,12197,12469,12744,13022,13303,13587,13874,14164,14457,14753,15052,15354,15659,15967,16278,16592,16909,17229,17552,17878,18207,18539,18874,19212,19553,19897,20244,20594,20947,21303,21662,22024,22389,22757,23128,23502,23879,24259,24642,25028,25417,25809,26204,26602,27003,27407,27814,28224,28637,29053,29472,29894,30319,30747,31178,31612,32049,32489,32932,33378,33827,34279,34734,35192,35653,36117,36584,37054,37527,38003,38482,38964,39449,39937,40428,40922,41419,41919,42422,42928,43437,43949,44464,44982,45503,46027,46554,47084,47617,48153,48692,49234,49779,50327,50878,51432,51989,52549,53112,53678,54247,54819,55394,55972,56553,57137,57724,58314,58907,59503,60102,60704,61309,61917,62528,63142,63759,64379,65002,65628,66257,66889,67524,68162,68803,69447,70094,70744,71397,72053,72712,73374,74039,74707,75378,76052,76729,77409,78092,78778,79467,80159,80854,81552,82253,82957,83664,84374,85087,85803,86522,87244,87969,88697,89428,90162,90899,91639,92382,93128,93877,94629 mul $0,6 add $0,13 pow $0,2 mov $1,$0 div $1,24 add $1,2
148.8
1,390
0.80578
302daac381410910bd9bda8000d571c4b1496dee
370
asm
Assembly
Userland/shell/asm/int80.asm
rociodellasala/TPE_Arqui
b87dfc485c40b357ade4892090c7d3ecdfd5f764
[ "BSD-3-Clause" ]
null
null
null
Userland/shell/asm/int80.asm
rociodellasala/TPE_Arqui
b87dfc485c40b357ade4892090c7d3ecdfd5f764
[ "BSD-3-Clause" ]
null
null
null
Userland/shell/asm/int80.asm
rociodellasala/TPE_Arqui
b87dfc485c40b357ade4892090c7d3ecdfd5f764
[ "BSD-3-Clause" ]
1
2018-05-17T19:08:44.000Z
2018-05-17T19:08:44.000Z
section .text GLOBAL int80 ; ----------------------------------------------------------------------------- ; Enables Userland function to make system calls to the Kernel ; Parameters: ; Depends on the command invoked. ; ----------------------------------------------------------------------------- int80: push rbp mov rbp,rsp int 80h mov rsp,rbp pop rbp ret
19.473684
79
0.416216
7b05d1edd6b4b128f3f9eeeeeba9205dc66c787b
242
asm
Assembly
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_resize_callee.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
8
2017-01-18T12:02:17.000Z
2021-06-12T09:40:28.000Z
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_resize_callee.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
1
2017-03-06T07:41:56.000Z
2017-03-06T07:41:56.000Z
libsrc/_DEVELOPMENT/adt/b_vector/c/sccz80/b_vector_resize_callee.asm
teknoplop/z88dk
bb03fbfd6b2ab0f397a1358559089f9cd3706485
[ "ClArtistic" ]
3
2017-03-07T03:19:40.000Z
2021-09-15T17:59:19.000Z
; int b_vector_resize(b_vector_t *v, size_t n) SECTION code_clib SECTION code_adt_b_vector PUBLIC b_vector_resize_callee EXTERN asm_b_vector_resize b_vector_resize_callee: pop hl pop de ex (sp),hl jp asm_b_vector_resize
13.444444
46
0.77686
47d5f4ebedec1123c3b0cbdc82327ad34fcda0df
1,500
asm
Assembly
programs/oeis/015/A015613.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/015/A015613.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/015/A015613.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A015613: a(n) = Sum_{i=1..n} phi(i) * (ceiling(n/i) - floor(n/i)). ; 0,0,1,2,5,6,11,14,19,22,31,34,45,50,57,64,79,84,101,108,119,128,149,156,175,186,203,214,241,248,277,292,311,326,349,360,395,412,435,450,489,500,541,560,583,604,649,664,705,724,755,778,829,846,885,908,943,970,1027,1042,1101,1130,1165,1196,1243,1262,1327,1358,1401,1424,1493,1516,1587,1622,1661,1696,1755,1778,1855,1886,1939,1978,2059,2082,2145,2186,2241,2280,2367,2390,2461,2504,2563,2608,2679,2710,2805,2846,2905,2944,3043,3074,3175,3222,3269,3320,3425,3460,3567,3606,3677,3724,3835,3870,3957,4012,4083,4140,4235,4266,4375,4434,4513,4572,4671,4706,4831,4894,4977,5024,5153,5192,5299,5364,5435,5498,5633,5676,5813,5860,5951,6020,6139,6186,6297,6368,6451,6522,6669,6708,6857,6928,7023,7082,7201,7248,7403,7480,7583,7646,7777,7830,7991,8070,8149,8230,8395,8442,8597,8660,8767,8850,9021,9076,9195,9274,9389,9476,9653,9700,9879,9950,10069,10156,10299,10358,10517,10608,10715,10786,10975,11038,11229,11324,11419,11502,11697,11756,11953,12032,12163,12262,12429,12492,12651,12752,12883,12978,13157,13204,13413,13516,13655,13760,13927,13998,14177,14284,14427,14506,14697,14768,14989,15084,15203,15314,15539,15610,15837,15924,16043,16154,16385,16456,16639,16754,16909,17004,17241,17304,17543,17652,17813,17932,18099,18178,18393,18512,18675,18774 mov $2,$0 mov $4,$0 lpb $2 mov $0,$4 sub $2,1 sub $0,$2 cal $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n. add $0,2 mov $3,$0 sub $3,3 add $1,$3 lpe
93.75
1,237
0.752
48026fe00d773546a413e430323499a914487641
545
asm
Assembly
programs/oeis/260/A260307.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/260/A260307.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/260/A260307.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A260307: a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-6) - a(n-7) - a(n-8) + a(n-9) with a(0) - a(8) as shown below. ; 1,2,3,4,6,5,8,7,10,9,13,10,15,12,17,14,20,15,22,17,24,19,27,20,29,22,31,24,34,25,36,27,38,29,41,30,43,32,45,34,48,35,50,37,52,39,55,40,57,42,59,44,62,45,64,47,66,49,69,50,71,52,73,54,76,55,78,57,80,59,83,60,85,62,87,64,90,65,92,67,94,69,97,70,99,72,101,74,104,75,106,77,108,79,111,80,113,82,115,84 mov $2,$0 mov $3,$0 gcd $0,2 mul $0,$3 mul $0,2 div $0,3 mov $1,2 add $1,$2 add $1,6 add $1,$0 add $1,3 div $1,2 sub $1,4 mov $0,$1
30.277778
299
0.583486
d9e35a224ad7a6dab3f2c9126446034638906763
3,402
asm
Assembly
src/math.asm
freem/nes_corelib
a890aa3c436e931a765866265f24ccf3c432f71d
[ "0BSD" ]
16
2015-06-23T03:17:40.000Z
2021-10-05T23:40:28.000Z
nes_corelib/src/math.asm
master-g/childhood
7cd2a6a13f7e862df6d239e78371df6222b30a53
[ "Apache-2.0" ]
null
null
null
nes_corelib/src/math.asm
master-g/childhood
7cd2a6a13f7e862df6d239e78371df6222b30a53
[ "Apache-2.0" ]
3
2015-11-12T01:29:55.000Z
2020-07-06T05:15:06.000Z
; File: math.asm ; Shared math code ;==============================================================================; ; Routines: Quick Division routines ; Shifts values to the right. ; ; div_32 - Divide by 32. ; div_16 - Divide by 16. ; div_8 - Divide by 8. ; ; Parameters: ; - *A* - value to divide. div_32: lsr div_16: lsr div_8: lsr lsr lsr rts ;==============================================================================; ; Routines: Quick Multiply routines ; Shifts values to the left. ; ; mul_32 - Multiply by 32. ; mul_16 - Multiply by 16. ; mul_8 - Multiply by 8. ; ; Parameters: ; - *A* - value to multiply. mul_32: asl mul_16: asl mul_8: asl asl asl rts ;==============================================================================; ; Routine: add16 ; 16-bit addition; code by FMan ; Sourced from http://www.codebase64.org/doku.php?id=base:16bit_addition_and_subtraction ; Parameters: ; tmp00 First number Low byte ; tmp01 First number High byte ; tmp02 First number Low byte ; tmp03 First number High byte ; Returns: ; tmp04 Result Low byte ; tmp05 Result High byte add16: clc lda tmp00 ; num1lo adc tmp02 ; num2lo sta tmp04 ; resultLo lda tmp01 ; num1hi adc tmp03 ; num2hi sta tmp05 ; resultHi rts ;==============================================================================; ; Routine: mul_10 ; Fast Multiply by 10; code by Leo Nechaev. ; Sourced from http://6502.org/source/integers/fastx10.htm mul_10: asl ; multiply by 2 sta tmp00 asl ; multiply by 2 again asl ; and once more clc adc tmp00 ; A = x*8 + x*2 rts ;==============================================================================; ; Routine: modulus255 ; Fast modulus 255. ; Sourced from http://6502org.wikidot.com/software-math-fastmod ; Parameters: ; tmp00 Low byte ; tmp01 High byte modulus255: clc lda tmp00 adc tmp01 adc #1 sbc #0 rts ;==============================================================================; ; Routine: fastRand8 ; fast 8-bit linear feedback shift register-based random number generator ; Sourced from http://codebase64.org/doku.php?id=base:small_fast_8-bit_prng ; todo: throw some variance into how numbers get XORed; the current setup might ; be a bit too predictable... ; These values run a complete loop of all 256 values: randGenXorVals: .hex 1D 2B 2D 4D 5F 63 65 69 71 87 8D A9 C3 CF E7 F5 fastRand8: lda randSeed8 beq @xorIt asl beq @noXor bcc @noXor @xorIt: pha ; save cur seed value and #$0F ; mask with $0F (max index of randGenXorVals) tay pla ; restore cur seed value eor randGenXorVals,y ; xor with one of the values from the table. @noXor: sta randSeed8 rts ;==============================================================================; ; fast 16-bit linear feedback shift register-based random number generator ; Sourced from http://codebase64.org/doku.php?id=base:small_fast_16-bit_prng ; todo: figure out what magic number to use ; todo2: use a set of random numbers, a la fastRand8 ; fastRand16: ; lda randSeed16 ; beq @lowZero ; normal shift ; asl randSeed16 ; lda randSeed16+1 ; rol ; bcc @noXor ; @xorIt: ; high byte in A ;eor #>magic ; sta randSeed16+1 ; lda randSeed16 ;eor #<magic ; sta randSeed16 ; rts ; @lowZero: ; lda randSeed16+1 ; beq @xorIt ; asl ; beq @noXor ; bcs @xorIt ; @noXor: ; sta randSeed16+1 ; rts
19.77907
88
0.578777
8794c9b33915a64e4d55d33afc1ab22fadc507e6
721
asm
Assembly
programs/oeis/227/A227241.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/227/A227241.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/227/A227241.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A227241: a(n) = sigma(n)*( 2*sigma(n)+1 ). ; 3,21,36,105,78,300,136,465,351,666,300,1596,406,1176,1176,1953,666,3081,820,3570,2080,2628,1176,7260,1953,3570,3240,6328,1830,10440,2080,8001,4656,5886,4656,16653,2926,7260,6328,16290,3570,18528,3916,14196,12246,10440,4656,30876,6555,17391,10440,19306,5886,28920,10440,28920,12880,16290,7260,56616,7750,18528,21736,32385,14196,41616,9316,31878,18528,41616,10440,76245,11026,26106,30876,39340,18528,56616,12880,69378,29403,31878,14196,100576,23436,34980,28920,64980,16290,109746,25200,56616,32896,41616,28920,127260,19306,58653,48828,94395 seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n). add $1,$0 add $1,$0 mul $1,$0 add $1,$0 mov $0,$1
72.1
540
0.751734
14e82115e80a4242f91f04fa539da74fcc92d586
4,185
asm
Assembly
audio/music/chris_encounter.asm
Trap-Master/spacworld97-thingy
a144827abecacdfec6cdc3baa32098e9290adf70
[ "blessing" ]
null
null
null
audio/music/chris_encounter.asm
Trap-Master/spacworld97-thingy
a144827abecacdfec6cdc3baa32098e9290adf70
[ "blessing" ]
null
null
null
audio/music/chris_encounter.asm
Trap-Master/spacworld97-thingy
a144827abecacdfec6cdc3baa32098e9290adf70
[ "blessing" ]
null
null
null
Music_ChrisEncounter: musicheader 4, 1, Music_TeamSnareEncounter_Ch1 musicheader 1, 2, Music_TeamSnareEncounter_Ch2 musicheader 1, 3, Music_TeamSnareEncounter_Ch3 musicheader 1, 4, Music_TeamSnareEncounter_Ch4 Music_TeamSnareEncounter_Ch1: tempo $93 volume $77 stereopanning $77 octave 4 notetype $C, $C8 dutycycle 1 note G_, 1 note F_, 1 note __, 1 note D_, 1 note __, 1 note C#, 1 note __, 1 note C_, 1 note __, 1 octave 3 note A#, 1 note __, 1 note G_, 1 octave 4 note C#, 4 Music_TeamSnareEncounter_Ch1_loop: dutycycle 0 note __, 1 intensity $A3 octave 3 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note C_, 1 note D#, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note C_, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note C_, 1 note D#, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note C_, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note C_, 1 note D#, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note C_, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note C_, 1 note D#, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note D#, 1 note __, 1 note C_, 1 note D#, 1 loopchannel 0, Music_TeamSnareEncounter_Ch1_loop Music_TeamSnareEncounter_Ch2: octave 5 notetype $C, $C8 dutycycle 1 note C_, 1 octave 4 note A#, 1 note __, 1 note G_, 1 note __, 1 note F#, 1 note __, 1 note F_, 1 note __, 1 note D#, 1 note __, 1 note C_, 1 note B_, 4 Music_TeamSnareEncounter_Ch2_loop: dutycycle 0 note __, 1 octave 3 note G_, 1 note __, 1 note G_, 1 note __, 1 note G_, 1 note D#, 1 note G_, 1 note G#, 1 note __, 1 note G#, 1 note __, 1 note G#, 1 note __, 1 note D#, 1 note G#, 1 note __, 1 note A_, 1 note __, 1 note A_, 1 note __, 1 note A_, 1 note D#, 1 note A_, 1 note G#, 1 note __, 1 note G#, 1 note __, 1 note G#, 1 note __, 1 note D#, 1 note G#, 1 note __, 1 note G_, 1 note __, 1 note G_, 1 note __, 1 note G_, 1 note D#, 1 note G_, 1 note G#, 1 note __, 1 note G#, 1 note __, 1 note G#, 1 note __, 1 note D#, 1 note G#, 1 note __, 1 note A_, 1 note __, 1 note A_, 1 note __, 1 note A_, 1 note D#, 1 note A_, 1 note A#, 1 note __, 1 note A#, 1 note __, 1 note B_, 1 note __, 1 note D#, 1 note B_, 1 loopchannel 0, Music_TeamSnareEncounter_Ch2_loop Music_TeamSnareEncounter_Ch3: octave 5 notetype $C, $14 note C_, 1 octave 4 note A#, 1 note __, 1 note G_, 1 note __, 1 note F#, 1 note __, 1 note F_, 1 note __, 1 note D#, 1 note __, 1 note C_, 1 note G_, 4 Music_TeamSnareEncounter_Ch3_loop: dutycycle 4 intensity $14 octave 3 note C_, 1 note __, 1 note C_, 1 note __, 1 octave 4 note C_, 1 note __, 1 octave 3 note C_, 1 note __, 1 note F#, 1 note __, 1 note F_, 1 note __, 1 note D#, 1 octave 2 note G_, 1 note A#, 1 note B_, 1 octave 3 note C_, 1 note __, 1 note C_, 1 note __, 1 octave 4 note C_, 1 note __, 1 octave 3 note C_, 1 note __, 1 note F#, 1 note __, 1 note F_, 1 note __, 1 note D#, 1 octave 2 note G_, 1 note A#, 1 note B_, 1 octave 3 note C_, 1 note __, 1 note C_, 1 note __, 1 octave 4 note C_, 1 note __, 1 octave 3 note C_, 1 note __, 1 note F#, 1 note __, 1 note F_, 1 note __, 1 note D#, 1 octave 2 note G_, 1 note A#, 1 note B_, 1 octave 3 note C_, 1 note __, 1 note C_, 1 note __, 1 octave 4 note C_, 1 note __, 1 octave 3 note C_, 1 note __, 1 note F#, 1 note __, 1 note F_, 1 note __, 1 note D#, 1 octave 2 note G_, 1 note A#, 1 note B_, 1 loopchannel 0, Music_TeamSnareEncounter_Ch3_loop Music_TeamSnareEncounter_Ch4: togglenoise 3 notetype $C note D_, 1 note D_, 1 note __, 1 note D_, 1 note __, 1 note D_, 1 note __, 1 note D_, 1 note __, 1 note D_, 1 note __, 1 note A#, 1 note B_, 2 note __, 2 Music_TeamSnareEncounter_Ch4_loop: note A#, 1 note G_, 1 note G_, 1 note G_, 1 note D_, 1 note G_, 1 note B_, 1 note G_, 1 loopchannel 0, Music_TeamSnareEncounter_Ch4_loop
13.243671
49
0.629152
ff49d82f9efb01369c81ef439ea6b5a31b17d1dd
2,207
asm
Assembly
utils/outputbuffer.asm
peter-mount/departures8bit
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
[ "Apache-2.0" ]
null
null
null
utils/outputbuffer.asm
peter-mount/departures8bit
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
[ "Apache-2.0" ]
null
null
null
utils/outputbuffer.asm
peter-mount/departures8bit
cb0cd95503c9d0872d1cfaf3579c6f7c9ece282f
[ "Apache-2.0" ]
null
null
null
; ********************************************************************** ; Output buffer ; ********************************************************************** ; outputReset - reset output buffer ; ; on exit: ; A undefined ; X preserved ; Y current buffer size .outputReset LDA #0 ; Set length to 0 STA outputLength STA outputBuffer ; Terminate buffer RTS ; outputTerminate Terminate output with 0 ; ; on exit: ; A undefined ; X preserved ; Y current buffer size .outputTerminate LDA #0 LDY outputLength STA outputBuffer,Y RTS ; outputAppendHexChar Append A to buffer in hex ; ; on entry: ; A value to append ; ; on exit: ; A preserved ; X preserved ; Y preserved ; tempA value of A .outputAppendHexChar { STA tempA PHAXY LDA tempA LSR A LSR A LSR A LSR A JSR appendHex LDA tempA JSR appendHex PLAXY RTS .lookup EQUS "0123456789ABCDEF" .appendHex AND #&0F ; mask lower nibble TAY LDA lookup,Y ; A from lookup table, run through to outputAppend } ; outputAppend Append a to outputBuffer ; ; on entry: ; A byte to append ; ; on exit: ; A preserved ; X preserved ; Y current buffer size .outputAppend LDY outputLength STA outputBuffer,Y INY STY outputLength RTS ; outputAppendString - Append string to output ; ; on entry: ; X,Y Address of string to append ; ; on exit: ; A undefined ; X undefined ; Y undefined .outputAppendString { STX stringPointer ; Store string address STY stringPointer+1 LDY #0 ; start at string start LDX outputLength ; append index .loop LDA (stringPointer),Y ; Read until 0 STA outputBuffer,X ; Store in buffer BEQ end ; Finish when at end INY ; next src index BEQ end INX ; next dest index BNE loop ; looop until buffer end .end STX outputLength ; store new length RTS }
21.427184
86
0.528772
0822671ab6ee4708e8bff8b3f5a2d9201043946e
409
asm
Assembly
programs/oeis/332/A332136.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/332/A332136.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/332/A332136.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A332136: a(n) = 3*(10^(2n+1)-1)/9 + 3*10^n. ; 6,363,33633,3336333,333363333,33333633333,3333336333333,333333363333333,33333333633333333,3333333336333333333,333333333363333333333,33333333333633333333333,3333333333336333333333333,333333333333363333333333333,33333333333333633333333333333,3333333333333336333333333333333 mov $1,10 pow $1,$0 mul $1,10 add $1,5 bin $1,2 sub $1,105 div $1,15 add $1,6 mov $0,$1
31.461538
273
0.799511
08bda4971e9cb044a260faa134d70a19a91c30fc
4,359
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1731.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_1731.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_1731.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 %r15 push %rbx push %rcx push %rdi push %rsi lea addresses_WC_ht+0xf4d8, %rdi clflush (%rdi) nop nop nop and $44955, %r11 movw $0x6162, (%rdi) nop nop nop nop cmp $9041, %rsi lea addresses_WC_ht+0x9498, %rsi lea addresses_WT_ht+0x15698, %rdi nop add %rbx, %rbx mov $13, %rcx rep movsl nop nop nop nop nop sub $17520, %r11 pop %rsi pop %rdi pop %rcx pop %rbx pop %r15 pop %r11 ret .global s_faulty_load s_faulty_load: push %r15 push %r8 push %rbp push %rbx push %rcx push %rsi // Faulty Load lea addresses_WC+0x6698, %rbp nop nop nop nop nop dec %rbx mov (%rbp), %r15w lea oracles, %rsi and $0xff, %r15 shlq $12, %r15 mov (%rsi,%r15,1), %r15 pop %rsi pop %rcx pop %rbx pop %rbp pop %r8 pop %r15 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_WC', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} [Faulty Load] {'src': {'type': 'addresses_WC', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_WC_ht', 'same': True, 'size': 2, 'congruent': 6, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM'} {'38': 21829} 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 38 */
52.518072
2,999
0.663226
0c1c39f3c2089db2dc03331248ed252434580229
1,545
asm
Assembly
asm/jo_f_status.asm
JozanLeClerc/lowbat-bsd
6d0fa66f918304bf828382b9f5361357494e4bd9
[ "BSD-3-Clause" ]
1
2020-04-20T16:22:15.000Z
2020-04-20T16:22:15.000Z
asm/jo_f_status.asm
JozanLeClerc/lowbat-bsd
6d0fa66f918304bf828382b9f5361357494e4bd9
[ "BSD-3-Clause" ]
null
null
null
asm/jo_f_status.asm
JozanLeClerc/lowbat-bsd
6d0fa66f918304bf828382b9f5361357494e4bd9
[ "BSD-3-Clause" ]
null
null
null
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; File : jo_f_status.asm /_________/ ;; ;; Author : Joe | ;; ;; Date : 04/2020 | ;; ;; Info : Gets batt status | ;; ;; / | ;; ;; \ / ;; ;; \_____/ ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; apm status ;; ---------- ;; 0: high ;; 1: low ;; 2: critical ;; 3: charging section .text extern system global jo_f_status jo_f_status: mov rdi, f_cmd call system mov rdi, st_file mov rsi, 0x0 mov rax, 0x5 syscall jc err mov rdi, rax mov rsi, buff mov rdx, 0x1 mov rax, 0x3 syscall jc err mov rax, 0x6 syscall movsx rax, byte [rsi + 0x0] sub rax, 0x30 retq err: mov rax, 0xfe retq section .data f_cmd: db "apm -b > /tmp/lowbat.status", 0x0 st_file: db "/tmp/lowbat.status", 0x0 buff: db 0x0, 0x0
29.711538
90
0.267314
a2d634cd9d1b8c158f3f86edcb32b957498be6f3
2,372
asm
Assembly
dotProduct/dotProduct.asm
KyleErwin/Assembly
e9aa223a4a119df5a14e043723131d8ddfe8c12e
[ "MIT" ]
null
null
null
dotProduct/dotProduct.asm
KyleErwin/Assembly
e9aa223a4a119df5a14e043723131d8ddfe8c12e
[ "MIT" ]
null
null
null
dotProduct/dotProduct.asm
KyleErwin/Assembly
e9aa223a4a119df5a14e043723131d8ddfe8c12e
[ "MIT" ]
null
null
null
segment .data fmt db "The dot product of (%.2f,%.2f) and (%.2f,%.2f) is: (%.2f)", 0xa, 0 segment .text global dotProduct extern printf ;An assembly function to ; 1. Accepts 6 oating point inputs (X1,X2,Xnorm,Y1,Y2,Ynorm) ; 2. Normalize these inputs by dividing each coordinate with the vector's norm. ; 3. Calculate and display the dot product of the two normalised vectors. ;And is called by a c program dotProduct: push rbp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; MAKE IT TWO DECIMEL PLACES ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; movss xmm15, xmm0 cvtss2sd xmm0, xmm15 movss xmm15, xmm1 cvtss2sd xmm1, xmm15 movss xmm15, xmm2 cvtss2sd xmm2, xmm15 movss xmm15, xmm3 cvtss2sd xmm3, xmm15 movss xmm15, xmm4 cvtss2sd xmm4, xmm15 movss xmm15, xmm5 cvtss2sd xmm5, xmm15 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; STORE THE INPUTS FOR LATER ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; movsd xmm10, xmm0 ;X1 parameter is xmm0 movsd xmm11, xmm1 ;X2 parameter is xmm1 movsd xmm12, xmm2 ;Xnorm parameter is xmm2 movsd xmm13, xmm3 ;Y1 parameter is xmm3 movsd xmm14, xmm4 ;Y2 parameter is xmm4 movsd xmm15, xmm5 ;Ynorm parameter is xmm5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; NORMALIZE THE INPUTS ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;We're going to normalise the X1 and X2 varaibles by dividing them by Xnorm divsd xmm0, xmm2 divsd xmm1, xmm2 ;Same thing with the Y inputs divsd xmm3, xmm5 divsd xmm4, xmm5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; CALCULATE DOT PRODUCT ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;X1 * Y1 stored in xmm0 mulsd xmm0, xmm3 ;X2 * Y2 stored in xmm1 mulsd xmm1, xmm4 ;Add the two, stored in xmm0 addsd xmm0, xmm1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; CALL PRINTF WITH RESULT ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Store the result, overwrite Ynorm since we don't need it movsd xmm15, xmm0 ;Move the format of the output mov rdi, fmt mov rax, 5 ;"The dot product of (X1,X2) movsd xmm0, xmm10 movsd xmm1, xmm11 ;and (Y1,Y2) movsd xmm2, xmm13 movsd xmm3, xmm14 ;is: (result)". movsd xmm4, xmm15 call printf pop rbp mov rax, 1 ret
26.355556
81
0.526138
d73da315084cc669dc5cebde9207d6a1133780eb
6,090
asm
Assembly
src/interrupts.asm
AmFobes/MineAssemble
3272c597a7b3935d3fa4cf37b77faef82d68e1cd
[ "MIT" ]
479
2015-01-13T14:19:51.000Z
2022-03-30T05:19:05.000Z
src/interrupts.asm
AmFobes/MineAssemble
3272c597a7b3935d3fa4cf37b77faef82d68e1cd
[ "MIT" ]
8
2016-03-14T18:45:04.000Z
2021-03-29T19:59:35.000Z
src/interrupts.asm
AmFobes/MineAssemble
3272c597a7b3935d3fa4cf37b77faef82d68e1cd
[ "MIT" ]
34
2015-02-24T13:25:49.000Z
2022-01-21T17:34:59.000Z
; ; This file contains all interrupt related setup and interaction ; [bits 32] global init_idt, init_pic, init_input, init_time global set_timer_frequency global set_irq_handler, clear_irq_handler, enable_irq global irq0_end, irq1_end, irq2_end, irq3_end, irq4_end, irq5_end, irq6_end, irq7_end global irq8_end, irq9_end, irqA_end, irqB_end, irqC_end, irqD_end, irqE_end, irqF_end global keys, time ; C input handler extern handleInput section .bss ; IDT memory idt resb 0x800 section .text ; void init_idt() ; Initialize Interrupt Descriptor Table (IDT) idt_ptr: dw 0x800 - 1 dd idt init_idt: lidt [idt_ptr] ret ; void init_pic() ; Initialize Programmable Interrupt Controllers (PIC) init_pic: mov al, 0x11 ; Init command out 0x20, al ; PIC1 command port out 0xA0, al ; PIC2 command port mov al, 0x20 ; Interrupt offset out 0x21, al ; PIC1 data port mov al, 0x28 ; Interrupt offset out 0xA1, al ; PIC2 data port mov al, 0x04 ; IR4 is connected to slave (PIC2) out 0x21, al ; PIC1 data port mov al, 0x02 ; Slave ID 2 out 0xA1, al ; PIC2 data port mov al, 0x01 ; 8086/88 mode out 0x21, al ; PIC1 data port mov al, 0x01 ; 8086/88 mode out 0xA1, al ; PIC2 data port mov al, 0xFF ; Disable all IRQs out 0x21, al ; PIC1 data port mov al, 0xFF ; Disable all IRQs out 0xA1, al ; PIC1 data port push dword [spurious_interrupt_handler] push 7 call set_irq_handler add esp, 4 push 15 call set_irq_handler add esp, 8 ret ; void init_input() ; Initialize input handler init_input: push dword input_handler push 1 call set_irq_handler call enable_irq add esp, 8 ret ; Interrupt handler for keyboard keys input_handler: push eax push ebx push ecx ; Wait for keyboard to have scancode ready .kbwait: in al, 0x64 and al, 1 test al, al jz .kbwait ; Read scancode and extract down/up state xor eax, eax in al, 0x60 mov bl, al shr bl, 7 xor bl, 1 ; Ignore repeated key presses mov cl, [keys + eax] and cl, 1 cmp cl, 1 jne .norepeat cmp cl, bl je .finish .norepeat: or bl, 10000000b and al, 01111111b ; Store scancode for program input handler mov [keys + eax], bl .finish: pop ecx pop ebx pop eax jmp irq1_end ; void init_time() ; Initialize timer handler init_time: push dword 1000 call set_timer_frequency add esp, 4 push dword time_handler push 0 call set_irq_handler call enable_irq add esp, 8 ret ; Interrupt handler for timer (fires every ms) time_handler: inc dword [time] jmp irq0_end ; void set_timer_frequency(int freq) ; Set IRQ0 timer frequency ; Must be at least ~18 Hz set_timer_frequency: mov edx, 0 mov eax, 0x123456 div dword [esp + 4] push eax call set_timer_rate add esp, 4 ret ; void set_timer_rate(int rate) ; Set IRQ0 timer rate set_timer_rate: mov al, 0x34 ; Channel 0 (rate generator mode) out 0x43, al ; PIT mode/command port mov eax, [esp + 4] out 0x40, al ; PIT channel 0 data port mov al, ah out 0x40, al ret spurious_interrupt_handler: iret ; void set_interrupt_handler(int index, void (*handler)) ; Create or update IDT entry set_interrupt_handler: cli mov ecx, [esp + 4] ; Interrupt index mov ax, [esp + 8] mov [0 + idt + ecx * 8], ax ; Low word of handler address mov ax, [esp + 10] mov [6 + idt + ecx * 8], ax ; High word of handler address mov ax, cs mov [2 + idt + ecx * 8], ax ; Code segment selector mov word [4 + idt + ecx * 8], 0x8E00 ; Attributes (0x8E00 = 32-bit interrupt gate) sti ret ; void clear_interrupt_handler(int index) ; Remove IDT entry clear_interrupt_handler: mov ecx, [esp + 4] ; Interrupt index mov word [4 + idt + ecx * 8], 0 ; Attributes (0 = Not used) ret ; void set_irq_handler(int index, void (*handler)) ; Create or update IDT entry by IRQ index set_irq_handler: mov ecx, [esp + 4] ; Index mov esi, [esp + 8] ; Handler address add ecx, 0x20 ; Interrupt offset push esi push ecx call set_interrupt_handler add esp, 8 ret ; void clear_irq_handler(int irqIndex) ; Remove IDT entry for IRQ index clear_irq_handler: mov ecx, [esp + 4] add ecx, 0x20 push ecx call clear_interrupt_handler add esp, 4 ret ; void enable_irq(int index) ; Enable IRQ enable_irq: mov dx, 0x21 mov al, [esp + 4] shl al, 4 and al, 0x80 add dl, al mov cl, [esp + 4] and cl, 111b mov bl, 1 shl bl, cl in al, dx not bl and al, bl out dx, al ret ; IRQ finishing irq0_end: irq1_end: irq2_end: irq3_end: irq4_end: irq5_end: irq6_end: irq7_end: ; IRQs 0 to 7 are controlled by PIC1 push eax mov al, 0x20 out 0x20, al pop eax iret irq8_end: irq9_end: irqA_end: irqB_end: irqC_end: irqD_end: irqE_end: irqF_end: ; IRQs 8 to F are controlled by PIC2 push eax mov al, 0x20 out 0xA0, al out 0x20, al pop eax, iret section .data time dd 0 section .bss ; Key status buffer (128 scancodes) keys resb 0x80
21.75
90
0.562726
5b98d2c8ca079442837924b3a906153498237e08
710
asm
Assembly
oeis/245/A245329.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/245/A245329.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/245/A245329.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A245329: a(n) = sum_{k=0..n}C(n,k)^3*(-8)^k with C(n,k) = n!/(k!(n-k)!). ; Submitted by Jamie Morken(w4) ; 1,-7,1,1001,-15359,30233,3126529,-61392247,259448833,11970181433,-287815672319,1854020654633,48800262650881,-1443188813338279,12410505050039041,198977188596692681,-7472188661349285887,80331498114096555641,766481648806881192961,-39247429496953820283799,508903924267766073922561,2507501233889715162828953,-206875224385405048493940479,3172428352650125207079978761,4322166145576133710632099841,-1085551601564361131248009066567,19511689806226539019846043232769,-30692370851515146775460850714967 mov $1,1 mov $2,$0 lpb $0 sub $0,1 mul $1,-8 mov $3,$2 bin $3,$0 pow $3,3 add $1,$3 lpe mov $0,$1
44.375
491
0.790141
af2c21f009eeba18b2cc8ce97e6a6a53159a3023
1,013
asm
Assembly
programs/oeis/047/A047207.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/047/A047207.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/047/A047207.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A047207: Numbers that are congruent to {0, 1, 3, 4} mod 5. ; 0,1,3,4,5,6,8,9,10,11,13,14,15,16,18,19,20,21,23,24,25,26,28,29,30,31,33,34,35,36,38,39,40,41,43,44,45,46,48,49,50,51,53,54,55,56,58,59,60,61,63,64,65,66,68,69,70,71,73,74,75,76,78,79,80,81,83,84,85,86,88,89,90,91,93,94,95,96,98,99,100,101,103,104,105,106,108,109,110,111,113,114,115,116,118,119,120,121,123,124,125,126,128,129,130,131,133,134,135,136,138,139,140,141,143,144,145,146,148,149,150,151,153,154,155,156,158,159,160,161,163,164,165,166,168,169,170,171,173,174,175,176,178,179,180,181,183,184,185,186,188,189,190,191,193,194,195,196,198,199,200,201,203,204,205,206,208,209,210,211,213,214,215,216,218,219,220,221,223,224,225,226,228,229,230,231,233,234,235,236,238,239,240,241,243,244,245,246,248,249,250,251,253,254,255,256,258,259,260,261,263,264,265,266,268,269,270,271,273,274,275,276,278,279,280,281,283,284,285,286,288,289,290,291,293,294,295,296,298,299,300,301,303,304,305,306,308,309,310,311 mov $1,$0 mul $1,5 add $1,2 div $1,4
126.625
913
0.712734
93dc9f67106c7e164c775574a5b5fcde735a253d
219
asm
Assembly
tests/test build script and options/nonCodeOptions/optionMsg_empty2.asm
fengjixuchui/sjasmplus
df0fabd2411bf89e23637fce46d273f52dafbe16
[ "BSD-3-Clause" ]
220
2016-10-22T19:44:39.000Z
2022-03-29T20:57:04.000Z
tests/test build script and options/nonCodeOptions/optionMsg_empty2.asm
ped7g/sjasmplus
487635c8057cd5594c372d9b70bc00a3f3a1ecc4
[ "BSD-3-Clause" ]
153
2018-05-07T10:31:23.000Z
2022-03-30T04:35:59.000Z
tests/test build script and options/nonCodeOptions/optionMsg_empty2.asm
ped7g/sjasmplus
487635c8057cd5594c372d9b70bc00a3f3a1ecc4
[ "BSD-3-Clause" ]
51
2016-05-12T21:27:36.000Z
2022-03-27T15:16:16.000Z
nn: nop ld a,'warn' some_error line ; invalid msg option in "--msg" will keep the test-runner "--msg=lstlab" in place, ; so the accompanying "msglst" file looks like "lstlab" with extra options error ahead
36.5
86
0.694064
31abdc111055d7467f6b984925d265692c1bf1a0
9,449
asm
Assembly
erasure_code/gf_4vect_mad_sse.asm
leo-project/isa_l
9e7aad28f35265a80c9d4ef8f58380e00546e3e2
[ "BSD-3-Clause" ]
1
2018-03-22T07:20:18.000Z
2018-03-22T07:20:18.000Z
erasure_code/gf_4vect_mad_sse.asm
leo-project/isa_l
9e7aad28f35265a80c9d4ef8f58380e00546e3e2
[ "BSD-3-Clause" ]
null
null
null
erasure_code/gf_4vect_mad_sse.asm
leo-project/isa_l
9e7aad28f35265a80c9d4ef8f58380e00546e3e2
[ "BSD-3-Clause" ]
null
null
null
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Copyright(c) 2011-2015 Intel Corporation All rights reserved. ; ; Redistribution and use in source and binary forms, with or without ; modification, are permitted provided that the following conditions ; are met: ; * Redistributions of source code must retain the above copyright ; notice, this list of conditions and the following disclaimer. ; * Redistributions in binary form must reproduce the above copyright ; notice, this list of conditions and the following disclaimer in ; the documentation and/or other materials provided with the ; distribution. ; * Neither the name of Intel Corporation nor the names of its ; contributors may be used to endorse or promote products derived ; from this software without specific prior written permission. ; ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; gf_4vect_mad_sse(len, vec, vec_i, mul_array, src, dest); ;;; %include "reg_sizes.asm" %define PS 8 %ifidn __OUTPUT_FORMAT__, win64 %define arg0 rcx %define arg0.w ecx %define arg1 rdx %define arg2 r8 %define arg3 r9 %define arg4 r12 %define arg5 r15 %define tmp r11 %define tmp2 r10 %define tmp3 r13 %define return rax %define return.w eax %define stack_size 16*10 + 3*8 %define arg(x) [rsp + stack_size + PS + PS*x] %define func(x) proc_frame x %macro FUNC_SAVE 0 sub rsp, stack_size movdqa [rsp+16*0],xmm6 movdqa [rsp+16*1],xmm7 movdqa [rsp+16*2],xmm8 movdqa [rsp+16*3],xmm9 movdqa [rsp+16*4],xmm10 movdqa [rsp+16*5],xmm11 movdqa [rsp+16*6],xmm12 movdqa [rsp+16*7],xmm13 movdqa [rsp+16*8],xmm14 movdqa [rsp+16*9],xmm15 save_reg r12, 10*16 + 0*8 save_reg r13, 10*16 + 1*8 save_reg r15, 10*16 + 2*8 end_prolog mov arg4, arg(4) mov arg5, arg(5) %endmacro %macro FUNC_RESTORE 0 movdqa xmm6, [rsp+16*0] movdqa xmm7, [rsp+16*1] movdqa xmm8, [rsp+16*2] movdqa xmm9, [rsp+16*3] movdqa xmm10, [rsp+16*4] movdqa xmm11, [rsp+16*5] movdqa xmm12, [rsp+16*6] movdqa xmm13, [rsp+16*7] movdqa xmm14, [rsp+16*8] movdqa xmm15, [rsp+16*9] mov r12, [rsp + 10*16 + 0*8] mov r13, [rsp + 10*16 + 1*8] mov r15, [rsp + 10*16 + 2*8] add rsp, stack_size %endmacro %elifidn __OUTPUT_FORMAT__, elf64 %define arg0 rdi %define arg0.w edi %define arg1 rsi %define arg2 rdx %define arg3 rcx %define arg4 r8 %define arg5 r9 %define tmp r11 %define tmp2 r10 %define tmp3 r12 %define return rax %define return.w eax %define func(x) x: %macro FUNC_SAVE 0 push r12 %endmacro %macro FUNC_RESTORE 0 pop r12 %endmacro %endif ;;; gf_4vect_mad_sse(len, vec, vec_i, mul_array, src, dest) %define len arg0 %define len.w arg0.w %define vec arg1 %define vec_i arg2 %define mul_array arg3 %define src arg4 %define dest1 arg5 %define pos return %define pos.w return.w %define dest2 mul_array %define dest3 tmp2 %define dest4 vec_i %ifndef EC_ALIGNED_ADDR ;;; Use Un-aligned load/store %define XLDR movdqu %define XSTR movdqu %else ;;; Use Non-temporal load/stor %ifdef NO_NT_LDST %define XLDR movdqa %define XSTR movdqa %else %define XLDR movntdqa %define XSTR movntdq %endif %endif default rel [bits 64] section .text %define xmask0f xmm15 %define xgft3_hi xmm14 %define xgft4_hi xmm13 %define xgft4_lo xmm12 %define x0 xmm0 %define xtmpa xmm1 %define xtmph1 xmm2 %define xtmpl1 xmm3 %define xtmph2 xmm4 %define xtmpl2 xmm5 %define xtmph3 xmm6 %define xtmpl3 xmm7 %define xtmph4 xmm8 %define xtmpl4 xmm9 %define xd1 xmm10 %define xd2 xmm11 %define xd3 xtmph1 %define xd4 xtmpl1 align 16 global gf_4vect_mad_sse:function func(gf_4vect_mad_sse) FUNC_SAVE sub len, 16 jl .return_fail xor pos, pos movdqa xmask0f, [mask0f] ;Load mask of lower nibble in each byte mov tmp, vec sal vec_i, 5 ;Multiply by 32 lea tmp3, [mul_array + vec_i] sal tmp, 6 ;Multiply by 64 movdqu xgft3_hi, [tmp3+tmp+16] ; " Cx{00}, Cx{10}, Cx{20}, ... , Cx{f0} sal vec, 5 ;Multiply by 32 add tmp, vec movdqu xgft4_lo, [tmp3+tmp] ;Load array Dx{00}, Dx{01}, Dx{02}, ... movdqu xgft4_hi, [tmp3+tmp+16] ; " Dx{00}, Dx{10}, Dx{20}, ... , Dx{f0} mov dest2, [dest1+PS] ; reuse mul_array mov dest3, [dest1+2*PS] mov dest4, [dest1+3*PS] ; reuse vec_i mov dest1, [dest1] .loop16: XLDR x0, [src+pos] ;Get next source vector movdqu xtmph1, [tmp3+16] ; " Ax{00}, Ax{10}, Ax{20}, ... , Ax{f0} movdqu xtmpl1, [tmp3] ;Load array Ax{00}, Ax{01}, Ax{02}, ... movdqu xtmph2, [tmp3+vec+16] ; " Bx{00}, Bx{10}, Bx{20}, ... , Bx{f0} movdqu xtmpl2, [tmp3+vec] ;Load array Bx{00}, Bx{01}, Bx{02}, ... movdqu xtmpl3, [tmp3+2*vec] ;Load array Cx{00}, Cx{01}, Cx{02}, ... movdqa xtmph3, xgft3_hi movdqa xtmpl4, xgft4_lo movdqa xtmph4, xgft4_hi XLDR xd1, [dest1+pos] ;Get next dest vector XLDR xd2, [dest2+pos] ;Get next dest vector movdqa xtmpa, x0 ;Keep unshifted copy of src psraw x0, 4 ;Shift to put high nibble into bits 4-0 pand x0, xmask0f ;Mask high src nibble in bits 4-0 pand xtmpa, xmask0f ;Mask low src nibble in bits 4-0 ; dest1 pshufb xtmph1, x0 ;Lookup mul table of high nibble pshufb xtmpl1, xtmpa ;Lookup mul table of low nibble pxor xtmph1, xtmpl1 ;GF add high and low partials pxor xd1, xtmph1 XLDR xd3, [dest3+pos] ;Reuse xtmph1, Get next dest vector XLDR xd4, [dest4+pos] ;Reuse xtmpl1, Get next dest vector ; dest2 pshufb xtmph2, x0 ;Lookup mul table of high nibble pshufb xtmpl2, xtmpa ;Lookup mul table of low nibble pxor xtmph2, xtmpl2 ;GF add high and low partials pxor xd2, xtmph2 ; dest3 pshufb xtmph3, x0 ;Lookup mul table of high nibble pshufb xtmpl3, xtmpa ;Lookup mul table of low nibble pxor xtmph3, xtmpl3 ;GF add high and low partials pxor xd3, xtmph3 ; dest4 pshufb xtmph4, x0 ;Lookup mul table of high nibble pshufb xtmpl4, xtmpa ;Lookup mul table of low nibble pxor xtmph4, xtmpl4 ;GF add high and low partials pxor xd4, xtmph4 XSTR [dest1+pos], xd1 ;Store result XSTR [dest2+pos], xd2 ;Store result XSTR [dest3+pos], xd3 ;Store result XSTR [dest4+pos], xd4 ;Store result add pos, 16 ;Loop on 16 bytes at a time cmp pos, len jle .loop16 lea tmp, [len + 16] cmp pos, tmp je .return_pass .lessthan16: ;; Tail len ;; Do one more overlap pass mov tmp, len ;Overlapped offset length-16 XLDR x0, [src+tmp] ;Get next source vector movdqu xtmph1, [tmp3+16] ; " Ax{00}, Ax{10}, Ax{20}, ... , Ax{f0} movdqu xtmpl1, [tmp3] ;Load array Ax{00}, Ax{01}, Ax{02}, ... movdqu xtmph2, [tmp3+vec+16] ; " Bx{00}, Bx{10}, Bx{20}, ... , Bx{f0} movdqu xtmpl2, [tmp3+vec] ;Load array Bx{00}, Bx{01}, Bx{02}, ... movdqu xtmpl3, [tmp3+2*vec] ;Load array Cx{00}, Cx{01}, Cx{02}, ... XLDR xd1, [dest1+tmp] ;Get next dest vector XLDR xd2, [dest2+tmp] ;Get next dest vector XLDR xtmph4, [dest3+tmp] ;Reuse xtmph1. Get next dest vector sub len, pos movdqa xtmpl4, [constip16] ;Load const of i + 16 pinsrb xtmph3, len.w, 15 pshufb xtmph3, xmask0f ;Broadcast len to all bytes pcmpgtb xtmph3, xtmpl4 XLDR xtmpl4, [dest4+tmp] ;Get next dest vector movdqa xtmpa, x0 ;Keep unshifted copy of src psraw x0, 4 ;Shift to put high nibble into bits 4-0 pand x0, xmask0f ;Mask high src nibble in bits 4-0 pand xtmpa, xmask0f ;Mask low src nibble in bits 4-0 ; dest1 pshufb xtmph1, x0 ;Lookup mul table of high nibble pshufb xtmpl1, xtmpa ;Lookup mul table of low nibble pxor xtmph1, xtmpl1 ;GF add high and low partials pand xtmph1, xtmph3 pxor xd1, xtmph1 ; dest2 pshufb xtmph2, x0 ;Lookup mul table of high nibble pshufb xtmpl2, xtmpa ;Lookup mul table of low nibble pxor xtmph2, xtmpl2 ;GF add high and low partials pand xtmph2, xtmph3 pxor xd2, xtmph2 ; dest3 pshufb xgft3_hi, x0 ;Lookup mul table of high nibble pshufb xtmpl3, xtmpa ;Lookup mul table of low nibble pxor xgft3_hi, xtmpl3 ;GF add high and low partials pand xgft3_hi, xtmph3 pxor xtmph4, xgft3_hi ; dest4 pshufb xgft4_hi, x0 ;Lookup mul table of high nibble pshufb xgft4_lo, xtmpa ;Lookup mul table of low nibble pxor xgft4_hi, xgft4_lo ;GF add high and low partials pand xgft4_hi, xtmph3 pxor xtmpl4, xgft4_hi XSTR [dest1+tmp], xd1 ;Store result XSTR [dest2+tmp], xd2 ;Store result XSTR [dest3+tmp], xtmph4 ;Store result XSTR [dest4+tmp], xtmpl4 ;Store result .return_pass: FUNC_RESTORE mov return, 0 ret .return_fail: FUNC_RESTORE mov return, 1 ret endproc_frame section .data align 16 mask0f: ddq 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f constip16: ddq 0xf0f1f2f3f4f5f6f7f8f9fafbfcfdfeff ;;; func core, ver, snum slversion gf_4vect_mad_sse, 00, 01, 0209
27.548105
72
0.695312
0c98071e72b8482c3fbaf0b5c1e4fe13e4f469f0
391
asm
Assembly
programs/oeis/044/A044431.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/044/A044431.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/044/A044431.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A044431: Numbers n such that string 9,9 occurs in the base 10 representation of n but not of n-1. ; 99,199,299,399,499,599,699,799,899,990,1099,1199,1299,1399,1499,1599,1699,1799,1899,1990,2099,2199,2299,2399,2499,2599,2699,2799,2899,2990,3099,3199,3299,3399,3499,3599,3699,3799,3899 mov $1,10 mov $3,$0 mod $0,10 lpb $0 mov $0,8 mov $1,1 lpe add $1,89 mov $2,$3 mul $2,100 add $1,$2
26.066667
185
0.70844
2809d2403f22c6a005cf2ef5b37ed7d3c8ac1e29
889
asm
Assembly
oeis/268/A268088.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/268/A268088.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/268/A268088.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A268088: Number of nX3 0..2 arrays with every repeated value in every row not one larger and in every column one larger mod 3 than the previous repeated value, and upper left element zero. ; Submitted by Jon Maiga ; 9,243,4608,83349,1339893,20699712,303284403,4320438183,59802048000,811951057125,10831783903677,142591596848064,1855468989421875,23920516469271231,305928653301448704,3886833181740400197,49103880497968317093,617397813039833352000,7731129167889151055859,96474481199867338572375,1200296024065951743527424,14895537250192664038389477,184446802450889854831549197,2279642151796093242558182592,28129112844645711127201992819,346606315602303261776203675503,4265708406771339689267575369728 seq $0,267946 ; Number of n X 1 0..2 arrays with every repeated value in every row and column one larger mod 3 than the previous repeated value, and upper left element zero. pow $0,3 mul $0,9
111.125
479
0.859393
899011ee6a0f6565fa6528bfdc1cc8e9f28e5d25
286
asm
Assembly
testCode/assemblyTest/laTest.asm
Dynamitelaw/scratchComputer
e180abc5d3c1d3c908df1cec8ad0891b5fd25aba
[ "CC0-1.0" ]
null
null
null
testCode/assemblyTest/laTest.asm
Dynamitelaw/scratchComputer
e180abc5d3c1d3c908df1cec8ad0891b5fd25aba
[ "CC0-1.0" ]
null
null
null
testCode/assemblyTest/laTest.asm
Dynamitelaw/scratchComputer
e180abc5d3c1d3c908df1cec8ad0891b5fd25aba
[ "CC0-1.0" ]
null
null
null
.text lui t0, 1 #t0 should have 1<<12 = 2^12 = 4096 addi zero, zero, 0 addi zero, zero, 0 #Test la la ra, exit #t1 should have PC + 1<<12 = 12 + 4096 = 4108 jr ra addi t0, t0, 1 addi t0, t0, 1 addi t0, t0, 1 addi t0, t0, 1 addi t0, t0, 1 addi t0, t0, 1 rem exit: addi zero, zero, 0
16.823529
58
0.618881
a4bb10beae8d3532e08926970fe2d243babe1fd8
437
asm
Assembly
exercise/04/mult/mult.asm
linjiachi/co107a
38d0c4f38d7304ec1106dca9fbf5fc0bb4f7d322
[ "MIT" ]
null
null
null
exercise/04/mult/mult.asm
linjiachi/co107a
38d0c4f38d7304ec1106dca9fbf5fc0bb4f7d322
[ "MIT" ]
null
null
null
exercise/04/mult/mult.asm
linjiachi/co107a
38d0c4f38d7304ec1106dca9fbf5fc0bb4f7d322
[ "MIT" ]
null
null
null
// This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name: projects/04/Mult.asm // Multiplies R0 and R1 and stores the result in R2. // (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.) // Put your code here. @2 M=0 // R2 = 0 @0 D=M @2 M=D+M @1 M=M-1 D=M @2 D;JGT // if(D>0) goto 2 @12 0;JMP // Repeat
19
67
0.599542
b10e42a74b8cd94960d423675d8556f60b84f569
5,518
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_369.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_369.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_369.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 %r15 push %r9 push %rcx push %rdi push %rsi lea addresses_D_ht+0xba12, %rsi lea addresses_A_ht+0x1a7fb, %rdi nop nop nop nop nop inc %r12 mov $80, %rcx rep movsl nop nop nop add $14912, %r15 lea addresses_WT_ht+0x1af1a, %r12 nop nop nop nop nop add $39728, %r9 movups (%r12), %xmm5 vpextrq $1, %xmm5, %rdi xor $50633, %r15 lea addresses_normal_ht+0xe11a, %rsi clflush (%rsi) nop nop mfence mov $0x6162636465666768, %r9 movq %r9, %xmm0 vmovups %ymm0, (%rsi) nop nop nop cmp $37904, %rdi lea addresses_WT_ht+0x1d99a, %rsi lea addresses_normal_ht+0xc59a, %rdi clflush (%rdi) nop nop nop and $31995, %r9 mov $65, %rcx rep movsb nop add %r15, %r15 lea addresses_D_ht+0x189ae, %rsi nop nop nop nop nop and %r11, %r11 mov $0x6162636465666768, %rdi movq %rdi, %xmm2 vmovups %ymm2, (%rsi) nop nop nop nop dec %rcx lea addresses_normal_ht+0x113ae, %rsi clflush (%rsi) nop nop nop nop nop cmp $8321, %r15 mov (%rsi), %di nop nop inc %r9 pop %rsi pop %rdi pop %rcx pop %r9 pop %r15 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r12 push %r13 push %r14 push %rbp push %rcx push %rsi // Faulty Load lea addresses_PSE+0x1119a, %rsi nop nop xor %r14, %r14 mov (%rsi), %cx lea oracles, %r12 and $0xff, %rcx shlq $12, %rcx mov (%r12,%rcx,1), %rcx pop %rsi pop %rcx pop %rbp pop %r14 pop %r13 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_PSE'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 2, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': True, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'src': {'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 10, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'33': 21829} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
40.573529
2,999
0.663284
a2862527641b9e8908ef4e994f610fb2b2f18ccf
426
asm
Assembly
oeis/131/A131295.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/131/A131295.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/131/A131295.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A131295: a(n)=ds_4(a(n-1))+ds_4(a(n-2)), a(0)=0, a(1)=1; where ds_4=digital sum base 4. ; Submitted by Christian Krause ; 0,1,1,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2,3,5,5,4,3,4,4,2 lpb $0 sub $0,1 sub $3,1 mod $3,3 mov $2,$3 add $3,$1 mov $1,$2 add $3,2 lpe mov $0,$3
28.4
201
0.530516
85b2a9f3bcc3302a5e5375a8ee0bdf77af59f0e2
2,436
asm
Assembly
programs/oeis/245/A245679.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/245/A245679.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/245/A245679.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A245679: a(n) = pg(n, 3) + pg(n, 4) + ... + pg(n, n) where pg(n, m) is the m-th n-th-order polygonal number. ; 0,0,0,6,25,69,154,300,531,875,1364,2034,2925,4081,5550,7384,9639,12375,15656,19550,24129,29469,35650,42756,50875,60099,70524,82250,95381,110025,126294,144304,164175,186031,210000,236214,264809,295925,329706,366300,405859,448539,494500,543906,596925,653729,714494,779400,848631,922375,1000824,1084174,1172625,1266381,1365650,1470644,1581579,1698675,1822156,1952250,2089189,2233209,2384550,2543456,2710175,2884959,3068064,3259750,3460281,3669925,3888954,4117644,4356275,4605131,4864500,5134674,5415949,5708625,6013006,6329400,6658119,6999479,7353800,7721406,8102625,8497789,8907234,9331300,9770331,10224675,10694684,11180714,11683125,12202281,12738550,13292304,13863919,14453775,15062256,15689750,16336649,17003349,17690250,18397756,19126275,19876219,20648004,21442050,22258781,23098625,23962014,24849384,25761175,26697831,27659800,28647534,29661489,30702125,31769906,32865300,33988779,35140819,36321900,37532506,38773125,40044249,41346374,42680000,44045631,45443775,46874944,48339654,49838425,51371781,52940250,54544364,56184659,57861675,59575956,61328050,63118509,64947889,66816750,68725656,70675175,72665879,74698344,76773150,78890881,81052125,83257474,85507524,87802875,90144131,92531900,94966794,97449429,99980425,102560406,105190000,107869839,110600559,113382800,116217206,119104425,122045109,125039914,128089500,131194531,134355675,137573604,140848994,144182525,147574881,151026750,154538824,158111799,161746375,165443256,169203150,173026769,176914829,180868050,184887156,188972875,193125939,197347084,201637050,205996581,210426425,214927334,219500064,224145375,228864031,233656800,238524454,243467769,248487525,253584506,258759500,264013299,269346699,274760500,280255506,285832525,291492369,297235854,303063800,308977031,314976375,321062664,327236734,333499425,339851581,346294050,352827684,359453339,366171875,372984156,379891050,386893429,393992169,401188150,408482256,415875375,423368399,430962224,438657750,446455881,454357525,462363594,470475004,478692675,487017531,495450500,503992514,512644509,521407425,530282206,539269800,548371159,557587239,566919000,576367406,585933425,595618029,605422194,615346900,625393131,635561875 mov $2,1 add $2,$0 add $2,$0 mov $4,4 lpb $4,1 mov $3,$2 lpb $2,3 sub $4,2 lpe lpe sub $2,1 lpb $2,$0 trn $2,3 add $3,$2 add $2,1 trn $3,3 add $1,$3 trn $1,$2 lpe
105.913043
2,138
0.836207
176dc874701542f2d8351b786a715c7b5bab6ca3
1,390
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_asin.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_asin.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math48/z80/am48_asin.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; double asin(double x) SECTION code_clib SECTION code_fp_math48 PUBLIC am48_asin EXTERN am48_dequate, am48_dmul, am48_dconst_1, am48_dsub EXTERN am48_sqrt, am48_ddiv, am48_atan, am48_dpopret, am48_dconst_pi am48_asin: ; arcsin ; AC' = asin(AC') ; ; enter : AC' = double x ; ; exit : success ; ; AC' = asin(x) ; carry reset ; ; fail if domain error |x| > 1 ; ; AC' = +-pi/2 ; carry set, errno set ; ; note : -pi/2 < asin(x) < pi/2 ; ; uses : af, af', bc', de', hl' ; asin(x) = atan(x/sqrt(1-x*x)) push bc ; save AC push de push hl exx push bc ; save x push de push hl call am48_dequate ; AC = AC'= x call am48_dmul ; AC'= x*x call am48_dconst_1 ; AC = 1 exx call am48_dsub ; AC'= 1-x*x call am48_sqrt pop hl ; AC = x pop de pop bc jr c, domain_err exx call am48_ddiv ; AC'= x/sqrt(1-x*x) call am48_atan jp am48_dpopret domain_err: ; AC = x ld a,b and $80 ; a = sgn(x) call am48_dconst_pi dec l or b ld b,a ; AC = sgn(x)*pi/2 exx scf jp am48_dpopret
16.547619
68
0.459712
b78319f8f15c245e9ef2257769eda5910c45dab3
811
asm
Assembly
src/coreclr/nativeaot/Runtime/arm/GetThread.asm
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
9,402
2019-11-25T23:26:24.000Z
2022-03-31T23:19:41.000Z
src/coreclr/nativeaot/Runtime/arm/GetThread.asm
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
37,522
2019-11-25T23:30:32.000Z
2022-03-31T23:58:30.000Z
src/coreclr/nativeaot/Runtime/arm/GetThread.asm
pyracanda/runtime
72bee25ab532a4d0636118ec2ed3eabf3fd55245
[ "MIT" ]
3,629
2019-11-25T23:29:16.000Z
2022-03-31T21:52:28.000Z
;; Licensed to the .NET Foundation under one or more agreements. ;; The .NET Foundation licenses this file to you under the MIT license. #include "AsmMacros.h" TEXTAREA ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; RhpGetThread ;; ;; ;; INPUT: none ;; ;; OUTPUT: r0: Thread pointer ;; ;; MUST PRESERVE ARGUMENT REGISTERS ;; @todo check the actual requirements here, r0 is both return and argument register ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LEAF_ENTRY RhpGetThread ;; r0 = GetThread(), TRASHES r12 INLINE_GETTHREAD r0, r12 bx lr LEAF_END FASTCALL_ENDFUNC INLINE_GETTHREAD_CONSTANT_POOL end
24.575758
110
0.484587
6fe1e6630635a8add867ef9989534e4f8a4b2c6c
812
asm
Assembly
sources/boot/boot.asm
SashaVolohov/VH-DOS
8d723bc3fa881f8f79fbbe0b2356f2f622be649d
[ "Unlicense" ]
3
2021-01-01T17:18:09.000Z
2022-01-08T08:53:55.000Z
sources/boot/boot.asm
SashaVolohov/VH-DOS
8d723bc3fa881f8f79fbbe0b2356f2f622be649d
[ "Unlicense" ]
3
2021-02-09T09:43:44.000Z
2021-06-04T07:15:38.000Z
sources/boot/boot.asm
SashaVolohov/VH-DOS
8d723bc3fa881f8f79fbbe0b2356f2f622be649d
[ "Unlicense" ]
null
null
null
; Операционная система VH-DOS ; © Саша Волохов, 2020-2021. ; Многочисленные редакции © Артём Котов. 2021. ; Данный файл служит для запуска ОС. ; Этот файл находится в MBR дискеты/жёсткого диска. Загружается по адресу 0000:7C00 org 0x0600 include "..\standards.inc" macro PrintOut string_offset { mov bp,string_offset call TxtPrint } start: Initial_Bootcode mov ax,Standard_video_mode int 10h ClearExtSeg ReadSector 2, HDD1, addr_DOSLDR jc DiskError jmp addr_DOSLDR DiskError: ClearScreen ; ? SetCursorPosition 0x02, 0x00 ; ? jmp addr_BSOD ; ? include "..\kernel\TxtPrint.inc" include "..\kernel\PCSpeaker.inc" fail_ldr_str1 db 'DOSLDR is missing.',36+1 dup (0) fail_ldr_str2 db 'Press <Ctrl>-<Alt>-<Del> to restart.',0 FAT12_MBR_end ; жёсткий диск
20.3
84
0.713054
da2b6870b6922b2b1e1f0cc60fe321698ddb3652
17
asm
Assembly
projects/vmt/scratch/bootstrap.asm
RobertCurry0216/nand2tetris
5be3e68b921561f9358b28876e1573b093f1244b
[ "MIT" ]
null
null
null
projects/vmt/scratch/bootstrap.asm
RobertCurry0216/nand2tetris
5be3e68b921561f9358b28876e1573b093f1244b
[ "MIT" ]
null
null
null
projects/vmt/scratch/bootstrap.asm
RobertCurry0216/nand2tetris
5be3e68b921561f9358b28876e1573b093f1244b
[ "MIT" ]
null
null
null
@256 D=A @SP M=D
3.4
4
0.529412
b2dccbd3664809ec88f1f272e733aada490857c8
748
asm
Assembly
data/maps/objects/CinnabarGym.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/maps/objects/CinnabarGym.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/maps/objects/CinnabarGym.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
CinnabarGym_Object: db $2e ; border block def_warps warp 16, 17, 1, LAST_MAP warp 17, 17, 1, LAST_MAP def_signs def_objects object SPRITE_MIDDLE_AGED_MAN, 3, 3, STAY, DOWN, 1, OPP_BLAINE, 1 object SPRITE_SUPER_NERD, 17, 2, STAY, DOWN, 2, OPP_SUPER_NERD, 9 object SPRITE_SUPER_NERD, 17, 8, STAY, DOWN, 3, OPP_BURGLAR, 4 object SPRITE_SUPER_NERD, 11, 4, STAY, DOWN, 4, OPP_SUPER_NERD, 10 object SPRITE_SUPER_NERD, 11, 8, STAY, DOWN, 5, OPP_BURGLAR, 5 object SPRITE_SUPER_NERD, 11, 14, STAY, DOWN, 6, OPP_SUPER_NERD, 11 object SPRITE_SUPER_NERD, 3, 14, STAY, DOWN, 7, OPP_BURGLAR, 6 object SPRITE_SUPER_NERD, 3, 8, STAY, DOWN, 8, OPP_SUPER_NERD, 12 object SPRITE_GYM_GUIDE, 16, 13, STAY, DOWN, 9 ; person def_warps_to CINNABAR_GYM
34
68
0.741979
796a62e35fdf08e8ff7a2a36fb6c99a91cc60599
2,235
asm
Assembly
non_regression/other_x86_linux.out.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
1
2021-02-28T21:31:18.000Z
2021-02-28T21:31:18.000Z
non_regression/other_x86_linux.out.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
non_regression/other_x86_linux.out.asm
LRGH/plasmasm
4cd50546c3dc895763d72dd60b7c46179c1916bc
[ "Apache-2.0" ]
null
null
null
.file "a30.c" .text .globl main .type main, @function main: subl $4, %esp movl 12(%esp), %eax movl (%eax), %eax movl %eax, (%esp) call toto .L08048311: addl $4, %esp ret .size main, .-main # ---------------------- .L08048315: .p2align 3 # ---------------------- .local func1 .type func1, @function func1: rep; ret .size func1, .-func1 # ---------------------- .L080483D2: .p2align 4 # ---------------------- .local func2 .type func2, @function func2: rep; ret .size func2, .-func2 # ---------------------- .L080483E2: .p2align 4 # ---------------------- .globl toto .type toto, @function toto: subl $8, %esp movl $68, %eax movl %edi, 4(%esp) movl 12(%esp), %edi movl %esi, (%esp) movl $init, %esi testl $1, %edi jne .L08048448 .L08048410: testl $2, %edi jne .L08048468 .L08048418: movl %eax, %ecx xorl %edx, %edx shrl $2, %ecx testb $2, %al rep movsl je .L08048430 .L08048425: movzwl (%esi), %edx movw %dx, (%edi) movl $2, %edx .L08048430: testb $1, %al je .L0804843B .L08048434: movzbl (%esi,%edx), %eax movb %al, (%edi,%edx) .L0804843B: movl (%esp), %esi movl 4(%esp), %edi addl $8, %esp ret .L08048446: .p2align 3 .L08048448: movzbl init, %eax movl $init+1, %esi movb %al, (%edi) addl $1, %edi movl $67, %eax testl $2, %edi je .L08048418 .L08048466: .p2align 3 .L08048468: movzwl (%esi), %edx subl $2, %eax addl $2, %esi movw %dx, (%edi) addl $2, %edi jmp .L08048418 .size toto, .-toto # ---------------------- .data .LD0804A028: .zero 24 # ---------------------- .local init .type init, @object init: .long 1 .long value .long func1 .long func2 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .long 0 .size init, 68 # ---------------------- .bss .align 32 .globl value .type value, @object value: .zero 68 .size value, 68 # ---------------------- .ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3" .section .note.GNU-stack,"",@progbits
17.192308
51
0.486801
8923a40550b5369c3add0d29e4db11344af666c0
598
asm
Assembly
Gas/Dos/GInclude.asm
Gabidal/GAS_Pack
02f13531849bc5c03721a4319a9e315a60ba7707
[ "MIT" ]
1
2021-09-21T13:07:37.000Z
2021-09-21T13:07:37.000Z
Gas/Dos/GInclude.asm
Gabidal/GAS_Pack
02f13531849bc5c03721a4319a9e315a60ba7707
[ "MIT" ]
null
null
null
Gas/Dos/GInclude.asm
Gabidal/GAS_Pack
02f13531849bc5c03721a4319a9e315a60ba7707
[ "MIT" ]
null
null
null
%include 'UtilsLib\GasRoot.asm' tryCatch Include, jmp %include 'UtilsLib\Hydrogen.asm';string %include 'UtilsLib\Helium.asm';I/O %include 'UtilsLib\GasMath.asm' %include 'UtilsLib\GasWord.asm' %include 'XeoX\Steam.asm' %include 'XeoX\XeoX.asm' %include 'UtilsLib\Radon.asm' %include 'UtilsLib\Argon.asm' %include 'GLOB\G_Global.asm' %include 'GLOB\G_Extern.asm' %include 'GC\OxyTree.asm' %include 'GC\OxyPump.asm' %include 'GC\OxyFunc.asm' %include 'GC\Oxygen.asm';token %include 'GIT\Core.asm' endOxygen: %include 'Assets\Nimble.asm';errors %include 'Assets\Oxide.asm';variabled endInclude
26
39
0.755853
d6204452d9cf46c5eec4e8926d9386a788193dbc
666
asm
Assembly
oeis/330/A330908.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/330/A330908.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/330/A330908.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A330908: a(n+1) = a(n) + (number of divisors of a(n) that are not divisors of other divisors of a(n)) for n>1; a(1)=1. ; Submitted by Christian Krause ; 1,2,4,6,9,11,13,15,18,21,24,27,29,31,33,36,39,42,46,49,51,54,57,60,64,66,70,74,77,80,83,85,88,91,94,97,99,102,106,109,111,114,118,121,123,126,130,134,137,139,141,144,147,150,154,158,161,164,167,169,171,174,178,181,183,186,190,194,197,199,201,204,208,211,213,216,219,222,226,229,231,235,238,242,245,248,251,253,256,258,262,265,268,271,273,277,279,282,286,290 lpb $0 sub $0,1 mov $2,$3 seq $2,83399 ; Number of divisors of n that are not divisors of other divisors of n. add $3,$2 lpe mov $0,$3 add $0,1
51.230769
359
0.686186
c63cee53ca399d6ee271101cdccf601befa6b94c
290
asm
Assembly
oeis/135/A135151.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/135/A135151.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/135/A135151.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A135151: A002260 + A128174 - I, I = Identity matrix. ; Submitted by Jon Maiga ; 1,1,2,2,2,3,1,3,3,4,2,2,4,4,5,1,3,3,5,5,6,2,2,4,4,6,6,7,1,3,3,5,5,7,7,8,2,2,4,4,6,6,8,8,9,1,3,3,5,5,7,7,9,9,10 lpb $0 add $1,$2 add $2,1 sub $0,$2 trn $1,$0 lpe mod $1,2 add $1,$0 mov $0,$1 add $0,1
19.333333
112
0.548276
8774c78cf1ad0688ecd2a8481dc8cc0313430147
6,629
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_1490.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_1490.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_/i9-9900K_12_0xa0.log_21829_1490.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r8 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x1a04c, %r13 nop nop nop nop nop and %r8, %r8 movl $0x61626364, (%r13) nop nop nop nop nop cmp %rsi, %rsi lea addresses_WT_ht+0x196c8, %rdx nop xor %rbp, %rbp mov (%rdx), %r12 nop nop add %r13, %r13 lea addresses_WC_ht+0x38c8, %r12 nop nop nop nop nop and $49575, %rbp mov $0x6162636465666768, %r13 movq %r13, %xmm5 movups %xmm5, (%r12) nop nop nop nop sub $24005, %r12 lea addresses_D_ht+0x10848, %rbp nop and %rax, %rax movl $0x61626364, (%rbp) nop xor $20468, %rsi lea addresses_A_ht+0x1bdc8, %rbp nop nop nop inc %r12 mov (%rbp), %eax nop nop nop nop sub $9697, %rsi lea addresses_normal_ht+0x9298, %rsi nop nop cmp $28040, %rax movups (%rsi), %xmm7 vpextrq $1, %xmm7, %rdx nop nop nop nop add $49810, %r12 lea addresses_A_ht+0xc0e8, %r13 nop nop add %rdx, %rdx mov $0x6162636465666768, %r8 movq %r8, %xmm7 movups %xmm7, (%r13) nop nop nop nop nop and $61088, %r13 lea addresses_WC_ht+0xb6c8, %rsi nop nop nop nop nop cmp $1220, %r13 mov (%rsi), %dx cmp $43047, %r8 lea addresses_normal_ht+0x1a230, %rsi lea addresses_A_ht+0x7ac8, %rdi nop nop nop add $64589, %rdx mov $63, %rcx rep movsw nop nop nop nop nop inc %rdi lea addresses_A_ht+0x54a6, %rdi nop nop nop nop nop add $51005, %r8 mov (%rdi), %bp nop nop nop nop nop add $56183, %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r9 push %rbp push %rcx push %rdx // Load lea addresses_A+0x168a4, %r10 sub %r11, %r11 movb (%r10), %cl nop xor %r9, %r9 // Faulty Load lea addresses_D+0x1dec8, %r9 nop nop nop and %rbp, %rbp mov (%r9), %edx lea oracles, %r14 and $0xff, %rdx shlq $12, %rdx mov (%r14,%rdx,1), %rdx pop %rdx pop %rcx pop %rbp pop %r9 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': True, 'size': 1}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': True, 'size': 4}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 1, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}} {'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4}} {'src': {'NT': False, 'same': True, 'congruent': 7, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'} {'src': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}} {'src': {'NT': False, 'same': False, 'congruent': 9, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_A_ht'}} {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'} {'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 */
33.994872
2,999
0.655152
95e62232b27815003746f0c4a3b6a6a5c4d54718
3,061
asm
Assembly
uuu/src/apps/sound_test/sound_test.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
7
2019-03-04T08:53:33.000Z
2022-01-28T19:32:12.000Z
uuu/src/apps/sound_test/sound_test.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
null
null
null
uuu/src/apps/sound_test/sound_test.asm
ekscrypto/Unununium
4b67e7c5e63cf1be2157382ffd4c1e9d12957a1f
[ "BSD-2-Clause" ]
null
null
null
[bits 32] section sound_test %macro showmsg 1+ ; prints a message to the system log, be sure to [section .data] ; include a 1 or 0 terminator on the string. %%msg: db %1 __SECT__ push esi mov esi, %%msg externfunc string_out, system_log pop esi %endmacro struc riff_head .id: resb 4 ; 'RIFF' .size: resd 1 ; number of bytes in file, not including this header? .type_id: resd 1 ; just guessing, but i know this must be 'WAVE' for wave files endstruc struc format_chunk .id: resb 4 ; 'fmt ' <-- note the space .size: resd 1 ; not including this header? .tag: resw 1 ; 1 for uncompressed .channels: resw 1 .sample_rate: resd 1 .bytes_per_sec: resd 1 .align: resw 1 ; size of sample frame .bits_per_sample: resw 1 ;; may be more endstruc struc data_chunk .id: resb 4 ; 'data' .size: resd 1 ; not including this header and any end pad bytes endstruc global app_sound_test app_sound_test: externfunc install_check, sb jc exit mov esi, stream_start cmp dword[esi], 'RIFF' jne exit.riff cmp dword[esi+riff_head.type_id], 'WAVE' jne exit.wave add esi, riff_head_size ; esi now points to first chunk cmp dword[esi+format_chunk.id], 'fmt ' jne exit.stupid mov ebx, [esi+format_chunk.sample_rate] push esi externfunc set_sample_rate, noclass pop esi cmp word[esi+format_chunk.channels], 1 jne exit.stupid cmp word[esi+format_chunk.bits_per_sample], 8 jne exit.stupid add esi, [esi+format_chunk.size] add esi, byte 8 ; esi now points to next chunk cmp dword[esi], 'data' jne exit.stupid mov ecx, [esi+data_chunk.size] add esi, byte data_chunk_size ; don't play the header mov [stream.current_position], esi mov [stream.bytes_remaining], ecx ; copy the sound to someplace DMA can get to it mov edi, 0x60000 rep movsd showmsg "playing sound",0xa,0 externfunc set_speaker, enable mov edx, callback_function externfunc play_sound, stream showmsg "press enter to continue",0xa,0 externfunc wait_ack, debug externfunc set_speaker, disable exit: retn .riff: showmsg "File does not appear to be RIFF, exiting",0xa,0 jmp exit .wave: showmsg "File does not appear to be in wave format, exiting",0xa,0 jmp exit .stupid: showmsg "This program is too stupid to deal with this fancy wav file, exiting",0xa,0 jmp exit .tobig: jmp exit callback_function: ;; ecx = number of bytes to copy ;; edi = buffer to put bytes in ;; ;; returns: ;; ebx = number of bytes copied cmp [stream.bytes_remaining], ecx jge .copy_full_amount ; if we get here we have less left to play than the callback wants mov ecx, [stream.bytes_remaining] .copy_full_amount: mov ebx, ecx mov esi, [stream.current_position] shr ecx, 2 ; convert bytes to dwords rep movsd add [stream.current_position], ebx sub [stream.bytes_remaining], ebx retn section .data stream_start: incbin "test.wav" stream_end: stream: .current_position: dd 0 ; offset to current place in file .bytes_remaining: dd 0
19.496815
86
0.705978
c80f70de51ce79bc79ddda07c79d527c83ef3314
720
asm
Assembly
oeis/241/A241581.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/241/A241581.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/241/A241581.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A241581: Row sums in triangle A241580. ; Submitted by Simon Strandgaard ; 1,1,8,54,584,7350,114162,2053688,42513984,991883610,25807006730,740614555692,23250961252752,792694751381078,29169262097277330,1152329533163353680,48645406703597457152,2185462919071085059890,104113841197940277430554,5242449827954998459195220,278203997624511081857712720,15518939940016010335969935342,907827608832170075848213569506,55571595418409930325877249619640,3552684229572071164265719077316800,236772589144646136801462060873994250,16423148853907073524083143988489308202 mov $4,$0 add $0,1 lpb $0 sub $0,1 mov $2,$1 pow $2,$1 mov $3,$4 add $3,1 bin $3,$1 mul $5,$1 add $1,1 mul $3,$2 div $5,-1 add $5,$3 lpe mov $0,$5
34.285714
475
0.808333
17ea230ff8d2ed7abbb13d19a4b445a70596fe72
464
asm
Assembly
oeis/108/A108044.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/108/A108044.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/108/A108044.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A108044: Triangle read by rows: right half of Pascal's triangle (A007318) interspersed with 0's. ; Submitted by Jon Maiga ; 1,0,1,2,0,1,0,3,0,1,6,0,4,0,1,0,10,0,5,0,1,20,0,15,0,6,0,1,0,35,0,21,0,7,0,1,70,0,56,0,28,0,8,0,1,0,126,0,84,0,36,0,9,0,1,252,0,210,0,120,0,45,0,10,0,1,0,462,0,330,0,165,0,55,0,11,0,1,924,0,792,0,495,0,220,0,66,0,12,0,1,0,1716,0,1287,0,715,0,286,0 lpb $0 mov $2,-2 bin $2,$0 add $3,1 sub $0,$3 div $2,2 lpe bin $3,$2 mov $0,$3
33.142857
249
0.614224
6f9ffac38b17ef5b21bc2a2a710313a8dfa6a488
1,952
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_19_514.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_19_514.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_19_514.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r8 push %rbx push %rcx push %rdi push %rsi lea addresses_A_ht+0x8442, %rsi lea addresses_WT_ht+0x155e2, %rdi sub $65411, %r11 mov $107, %rcx rep movsl nop nop and $32253, %r12 lea addresses_WC_ht+0x1c442, %rcx clflush (%rcx) nop nop nop nop nop add $35198, %r8 mov (%rcx), %esi nop nop nop and $27862, %rsi lea addresses_WC_ht+0xe42, %r11 nop nop nop nop cmp %rbx, %rbx mov (%r11), %r12 nop add $34090, %r12 pop %rsi pop %rdi pop %rcx pop %rbx pop %r8 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r13 push %r15 push %r9 push %rcx // Store mov $0x391, %r13 xor %rcx, %rcx mov $0x5152535455565758, %r9 movq %r9, %xmm1 vmovntdq %ymm1, (%r13) nop nop dec %rcx // Faulty Load lea addresses_normal+0x9042, %rcx nop nop dec %r15 vmovups (%rcx), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %r12 lea oracles, %r15 and $0xff, %r12 shlq $12, %r12 mov (%r15,%r12,1), %r12 pop %rcx pop %r9 pop %r15 pop %r13 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 0}} [Faulty Load] {'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 9}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 9}, 'OP': 'LOAD'} {'34': 19} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
19.137255
148
0.64959
a619207e15553b2feeb2552ca7a7519685f7a436
652
asm
Assembly
oeis/157/A157653.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/157/A157653.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/157/A157653.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A157653: a(n) = 80000*n^2 - 39200*n + 4801. ; 45601,246401,607201,1128001,1808801,2649601,3650401,4811201,6132001,7612801,9253601,11054401,13015201,15136001,17416801,19857601,22458401,25219201,28140001,31220801,34461601,37862401,41423201,45144001,49024801,53065601,57266401,61627201,66148001,70828801,75669601,80670401,85831201,91152001,96632801,102273601,108074401,114035201,120156001,126436801,132877601,139478401,146239201,153160001,160240801,167481601,174882401,182443201,190164001,198044801,206085601,214286401,222647201,231168001,239848801 seq $0,157652 ; a(n) = 40*(200*n - 49). pow $0,2 sub $0,36481600 div $0,640000 mul $0,800 add $0,45601
65.2
501
0.819018
4af6c722153682f04b2c38ca802b3f479700a52d
835
asm
Assembly
programs/oeis/195/A195177.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/195/A195177.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/195/A195177.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A195177: a(n) = 3*n - floor(2*n*sqrt(2)). ; 0,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,10,10,11,11,11,11,11,11,12,12,12,12,12,13,13,13,13,13,13,14,14,14,14,14,14,15,15,15,15,15,15,16,16,16,16,16,16,17,17,17,17,17,17,18,18,18,18,18,19,19,19,19,19,19,20,20,20,20,20,20,21,21,21,21,21,21,22,22,22,22,22,22,23,23,23,23,23,23,24,24,24,24,24,25,25,25,25,25,25,26,26,26,26,26,26,27,27,27,27,27,27,28,28,28,28,28,28,29,29,29,29,29,29,30,30,30,30,30,31,31,31,31,31,31,32,32,32,32,32,32,33,33,33,33,33,33,34,34,34,34,34,34,35,35,35,35,35,36,36,36,36,36,36,37,37,37,37,37,37,38,38,38,38,38,38,39,39,39,39,39,39,40,40,40,40,40,40,41,41,41,41,41,42,42,42,42,42,42,43,43,43,43,43 mov $2,$0 div $2,34 lpb $0,1 mov $1,$2 add $1,$0 mov $0,$2 div $1,6 add $1,1 lpe
64.230769
698
0.615569
497e8234d5911fae02ae885a34ac11a597cfcd54
153
asm
Assembly
lift/x86/testdata/x86_64/fpu/fldl2t/fldl2t.asm
decomp/experimental
6d058f5e1da6fc2d0765e348fb861803a319c9fb
[ "CC0-1.0" ]
9
2017-09-10T12:04:49.000Z
2020-12-21T15:59:09.000Z
lift/x86/testdata/x86_64/fpu/fldl2t/fldl2t.asm
decomp/experimental
6d058f5e1da6fc2d0765e348fb861803a319c9fb
[ "CC0-1.0" ]
3
2017-06-14T09:52:32.000Z
2019-10-13T09:14:26.000Z
lift/x86/testdata/x86_64/fpu/fldl2t/fldl2t.asm
decomp/experimental
6d058f5e1da6fc2d0765e348fb861803a319c9fb
[ "CC0-1.0" ]
2
2018-10-24T18:49:55.000Z
2019-05-25T21:15:42.000Z
[BITS 64] global fldl2t:function section .text ; === [ FLDL2T ] =============================================================== fldl2t: fldl2t ret
12.75
80
0.379085
ff5782f78119d4a4c9eec641d6fd13c6d721953b
253
asm
Assembly
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_DrawUpdateStructAlways_fastcall.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_DrawUpdateStructAlways_fastcall.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/temp/sp1/zx/c/sdcc_iy/sp1_DrawUpdateStructAlways_fastcall.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; sp1_DrawUpdateStructAlways(struct sp1_update *u) SECTION code_clib SECTION code_temp_sp1 PUBLIC _sp1_DrawUpdateStructAlways_fastcall EXTERN asm_sp1_DrawUpdateStructAlways defc _sp1_DrawUpdateStructAlways_fastcall = asm_sp1_DrawUpdateStructAlways
21.083333
74
0.897233
69cf2f265e8b5c6fe08e29803562a178c6535fc0
367
asm
Assembly
programs/oeis/134/A134863.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/134/A134863.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/134/A134863.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A134863: Wythoff BAB numbers. ; 7,20,28,41,54,62,75,83,96,109,117,130,143,151,164,172,185,198,206,219,227,240,253,261,274,287,295,308,316,329,342,350,363,376,384,397,405,418,431,439,452,460,473,486,494,507,520,528,541,549,562,575,583,596 add $0,1 seq $0,26352 ; a(n) = floor(n*tau)+n+1. seq $0,276885 ; Sums-complement of the Beatty sequence for 1 + phi. sub $0,5
45.875
207
0.702997
2041fea981b36b250bfc35fa7836131b8fc794ea
414
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80p_dadd.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80p_dadd.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math48/c/sccz80/cm48_sccz80p_dadd.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_clib SECTION code_fp_math48 PUBLIC cm48_sccz80p_dadd EXTERN cm48_sccz80p_dcallee1_0, am48_dadd cm48_sccz80p_dadd: ; sccz80 float primitive ; ; enter : AC'(BCDEHL') = double x (math48) ; stack = double y (sccz80), ret ; ; exit : AC'(BCDEHL') = x + y ; ; uses : all except iy call cm48_sccz80p_dcallee1_0 ; AC = x ; AC'= y jp am48_dadd
15.923077
50
0.615942
3ee3640d270056f709a03527f0e5c3c0b090031d
280
asm
Assembly
CS2610/problem2.asm
shariefsmm/College-Codes
8fac4a980f8c20978862f3a16446b7cdb550d95a
[ "MIT" ]
null
null
null
CS2610/problem2.asm
shariefsmm/College-Codes
8fac4a980f8c20978862f3a16446b7cdb550d95a
[ "MIT" ]
null
null
null
CS2610/problem2.asm
shariefsmm/College-Codes
8fac4a980f8c20978862f3a16446b7cdb550d95a
[ "MIT" ]
null
null
null
# problem2.asm .data str1: .ascii "123456789abcedef" str2: .ascii "123456789ABCDEF" str3: .asciiz "123456789abcedef" str4: .asciiz "123456789ABCDEF" .text .globl main main: la $t0, str1 la $t1, str2 la $t2, str3 la $t3, str4 li $v0, 10 syscall
14.736842
37
0.632143
7580210db8dd4291a97811722a75c1f991d4e5cc
71
asm
Assembly
nasm/opposite_number_56dec885c54a926dcd001095.asm
p85/codewars-solutions
b4a5073b0c21f64e50e975416526ba5dd58019fc
[ "MIT" ]
null
null
null
nasm/opposite_number_56dec885c54a926dcd001095.asm
p85/codewars-solutions
b4a5073b0c21f64e50e975416526ba5dd58019fc
[ "MIT" ]
null
null
null
nasm/opposite_number_56dec885c54a926dcd001095.asm
p85/codewars-solutions
b4a5073b0c21f64e50e975416526ba5dd58019fc
[ "MIT" ]
null
null
null
SECTION .text global opposite opposite: mov eax, edi neg eax ret
10.142857
15
0.71831
1d892bde7d58e180269dad88f31ba4f680a51fa2
1,115
asm
Assembly
Laboratorio/Relatorio_08/Resposta Rel_08/prog16.asm
0Augusto/hello-world
9fd2c7b00a6c3cbe696f7eff8db4e89a8d7b4ae2
[ "Apache-2.0" ]
1
2022-03-03T17:22:30.000Z
2022-03-03T17:22:30.000Z
Laboratorio/Relatorio_08/Resposta Rel_08/prog16.asm
0Augusto/hello-world
9fd2c7b00a6c3cbe696f7eff8db4e89a8d7b4ae2
[ "Apache-2.0" ]
null
null
null
Laboratorio/Relatorio_08/Resposta Rel_08/prog16.asm
0Augusto/hello-world
9fd2c7b00a6c3cbe696f7eff8db4e89a8d7b4ae2
[ "Apache-2.0" ]
null
null
null
# Programa: # i = 0; # j = 0; # do { # do { # aux = vet[j];; # vet[j] = vet[j+1]; # vet[j+1] = aux; # j++; # } while ( j < 100 ); # j = 0; # i++; # } while ( i < 100 ); # Variaveis associadas aos registradores # endBase -> $16 # i -> $17 # j -> $18 .data a: .word 5 : 20 b: .word 4 : 20 c: .word 3 : 20 d: .word 2 : 20 e: .word 1 : 20 .text .globl main main: addi $8, $0, 0x1001 # t0 = 0x00001001 sll $16, $8, 0x10 # endBase = 0x10010000 addi $9, $0, 0x63 # t1 = 99 doExterno: addi $18, $0, 0x0 # j = 0 doInterno: sll $8, $18, 0x2 # t0 = j * 4 add $8, $8, $16 # t0 = j * 4 + endBase lw $10, 0x0($8) # aux = vet[j] lw $11, 0x4($8) # t3 = vet[j+1] if: slt $12, $11, $10 # if (vet[j+1] < vet[j]) t4 = 1; else t4 = 0 beq $12, $0, fimIf # if (t4 == 0) goto fimIf sw $11, 0x0($8) # vet[j] = vet[j+1] sw $10, 0x4($8) # vet[j+1] = aux fimIf: addi $18, $18, 0x1 # j = j + 1 bne $18, $9, doInterno # if (j != 99) goto doInterno addi $17, $17, 0x1 # i = i + 1 bne $17, $9, doExterno # if (i != 99) goto doExterno
20.272727
67
0.464574
3fd4b34df24cc509cb04bb015cc116bf8ba9e5c8
3,093
asm
Assembly
artwork/esqueleto/esqueleto_camina.asm
fjpena/sword-of-ianna-zx
fdd6bdb5775933756e75402a7c6be80d5334702d
[ "Apache-2.0" ]
67
2017-10-07T18:48:05.000Z
2022-02-01T20:37:40.000Z
artwork/esqueleto/esqueleto_camina.asm
fjpena/sword-of-ianna-zx
fdd6bdb5775933756e75402a7c6be80d5334702d
[ "Apache-2.0" ]
null
null
null
artwork/esqueleto/esqueleto_camina.asm
fjpena/sword-of-ianna-zx
fdd6bdb5775933756e75402a7c6be80d5334702d
[ "Apache-2.0" ]
9
2017-10-06T21:02:55.000Z
2022-01-06T03:11:58.000Z
; ASM source file created by SevenuP v1.21 ; SevenuP (C) Copyright 2002-2007 by Jaime Tejedor Gomez, aka Metalbrain ;GRAPHIC DATA: ;Pixel Size: ( 24, 32) ;Char Size: ( 3, 4) ;Frames: 6 ;Sort Priorities: X char, Char line, Y char, Frame number ;Data Outputted: Gfx ;Interleave: Sprite ;Mask: No esqueleto_camina: DEFB 0, 0, 0, 0, 30, 0, 0, 63 DEFB 0, 0,114, 0, 0, 82, 0, 0 DEFB 13, 0, 0, 31, 0, 0, 10, 0 DEFB 0,192, 0, 1,142, 64, 1,117 DEFB 0, 3, 4, 64, 2,117, 0, 6 DEFB 4, 8, 4, 48, 80, 0, 1,200 DEFB 4, 7,144, 4, 31,160, 4,127 DEFB 0, 3, 28, 0, 3, 0, 0, 8 DEFB 36, 0, 0, 34,128, 0, 33, 64 DEFB 0, 80,128, 0, 34, 0, 0, 4 DEFB 0, 0, 72, 0, 0, 64, 0, 0 DEFB 133, 0, 1,128, 0, 0,120, 0 DEFB 0, 0, 0, 0, 0, 0, 0, 1 DEFB 224, 0, 3,240, 0, 7, 32, 0 DEFB 5, 32, 0, 0,208, 0, 1,240 DEFB 0, 6,160, 0, 6, 2, 0, 8 DEFB 115, 0, 11,167, 0, 8, 39, 0 DEFB 11,175, 0, 16, 47, 0, 14,158 DEFB 0, 1, 28, 0, 0,209, 0, 2 DEFB 202, 0, 0, 20, 0, 0,192, 0 DEFB 2, 0, 0, 2, 16, 0, 4, 8 DEFB 0, 4, 4, 0, 10, 0, 0, 20 DEFB 2, 0, 32, 4, 0, 64, 8, 1 DEFB 128, 16, 0,192, 42, 0, 56, 0 DEFB 0, 0, 0, 0, 0, 0, 0, 0 DEFB 0, 0, 30, 32, 0, 63, 48, 0 DEFB 114, 56, 0, 82, 56, 0, 13,120 DEFB 0,223,120, 0,202,120, 0, 0 DEFB 240, 0, 76,224, 0, 84,192, 2 DEFB 68, 0, 4, 65,128, 2, 61,136 DEFB 0, 0, 16, 0, 1, 40, 0,224 DEFB 80, 0,116,160, 1,180, 0, 0 DEFB 136, 0, 0, 96, 0, 0, 52, 0 DEFB 0, 26, 0, 2, 9, 0, 3,244 DEFB 0, 1, 9, 0, 1, 2, 0, 2 DEFB 4, 0, 2, 8, 0, 0, 21, 0 DEFB 0, 0, 0, 0, 1,224, 0, 3 DEFB 240, 0, 7, 32, 0, 5, 32, 0 DEFB 0,208, 0, 1,240, 0, 24,160 DEFB 0, 24, 8, 0, 0,228, 0, 23 DEFB 80, 0, 16, 68, 0, 39, 80, 0 DEFB 32, 66, 0, 19, 14, 0, 8, 62 DEFB 0, 0,252, 0, 6,120, 0, 22 DEFB 1, 0, 0,234, 0, 0, 69, 0 DEFB 7, 0, 0, 0,224, 0, 0, 24 DEFB 0, 0, 20, 0, 2, 24, 0, 4 DEFB 32, 0, 0, 64, 0, 1,128, 0 DEFB 0, 96, 0, 8, 16, 0, 21, 0 DEFB 0, 0, 0, 0, 0, 0, 0, 30 DEFB 0, 0, 63, 0, 0,114, 0, 0 DEFB 82, 0, 0, 13, 4, 0, 31, 2 DEFB 1,138, 4, 1,128, 66, 2, 14 DEFB 165, 2,117, 74, 4, 4, 5, 4 DEFB 117, 74, 8, 4, 36, 16, 53, 80 DEFB 8, 0, 0, 4, 7,224, 3,127 DEFB 192, 11, 31,128, 0, 6, 0, 0 DEFB 32, 0, 0, 12, 0, 0, 3, 64 DEFB 0, 32,160, 0, 64, 64, 0, 0 DEFB 128, 1, 1, 0, 2, 1, 0, 20 DEFB 2, 0, 8, 5,224, 5, 0, 0 DEFB 0, 0, 0, 0, 0, 0, 0, 0 DEFB 0, 0, 1,228, 0, 3,242, 0 DEFB 7, 37, 0, 5, 34, 0, 0,213 DEFB 0, 25,242, 0, 24,161, 0, 32 DEFB 10, 0, 64,225, 0,143, 82, 1 DEFB 0, 68, 2, 15, 82, 1, 0, 69 DEFB 0,135, 16, 2,192, 0, 0,223 DEFB 248, 0, 15,240, 0, 3,192, 0 DEFB 0, 0, 0, 1,128, 0, 0, 96 DEFB 0, 0, 16, 0, 16, 40, 0, 10 DEFB 144, 0, 16, 32, 0, 0, 64, 0 DEFB 16, 64, 0, 0,128, 0, 1,248
36.388235
72
0.450372
fb8428bb0d047bc18a5b8bddd81412762263f2be
3,506
asm
Assembly
src/main.asm
ISSOtm/gb-open-world
b0b5b838e2a98e536e440632c95472ea057111c5
[ "MIT" ]
8
2021-03-14T21:48:19.000Z
2021-11-16T11:05:16.000Z
src/main.asm
ISSOtm/gb-open-world
b0b5b838e2a98e536e440632c95472ea057111c5
[ "MIT" ]
null
null
null
src/main.asm
ISSOtm/gb-open-world
b0b5b838e2a98e536e440632c95472ea057111c5
[ "MIT" ]
null
null
null
INCLUDE "defines.asm" SECTION "Main loop", ROM0 Main:: ;; Init engine ; Screen redrawing expects to run over already-loaded palettes; ; Thus, we need to init the dynamic palette array to "all free" ld hl, wBGPaletteIDs ld c, wBGPaletteIDs.end - wBGPaletteIDs - 1 xor a rst MemsetSmall ; Reserve palette #7 for UI (clear bit 1 so it doesn't get faded) ld [hl], $05 ; Temporary var init while I write the code ; Load map 0 xor a ld [wNextMap], a ; Set camera position to $0808 (128.5) ld a, $02 ld [wCameraYPos], a ld [wCameraYPos + 1], a ld [wCameraXPos], a ld [wCameraXPos + 1], a ld [wCameraTargetYPos], a ld [wCameraTargetYPos + 1], a ld [wCameraTargetXPos], a ld [wCameraTargetXPos + 1], a ; Begin the main loop by fading in ld a, STATE_LOADMAP ld [wCurState], a xor a ld [wOBJPaletteMask], a ; Pretend that we just finished fading to white inc a ; ld a, 1 ld [wFadeDelta], a ld a, $FF ld [wFadeAmount], a MainLoop: ;; Run state's init func, if any ld a, [wCurState] assert NB_STATES <= 128 add a, a jr c, .noStateInit assert LOW(StateInitPtrs) == 0 ld l, a ld h, HIGH(StateInitPtrs) ld a, BANK(StateInitPtrs) ldh [hCurROMBank], a ld [rROMB0], a call JumpToPtr ld hl, wCurState ld a, [hl] set 7, a ld [hl], a add a, a .noStateInit ;; Process state's "update" function ld l, a ld h, HIGH(StatePtrs) ld a, BANK(StatePtrs) ldh [hCurROMBank], a ld [rROMB0], a call JumpToPtr ;; Move camera towards focal point ld a, BANK(CameraMovtFuncs) ldh [hCurROMBank], a ld [rROMB0], a ld a, [wCameraMovtType] add a, a add a, LOW(CameraMovtFuncs) ld l, a adc a, HIGH(CameraMovtFuncs) sub l ld h, a ld a, [hli] ld h, [hl] ld l, a rst CallHL ; Do not call the camera movement function if movement is disabled ; This is important, because camera movement alters palette fading parameters, in order ; to load palettes dynamically. (Remember that the palette fader is also the committer!) ; Therefore, when doing palette operations across frames, you will want not to run this ld a, [wCameraMovtType] and a call nz, MoveCamera ;; Move scrolling to new camera position ld a, [wCameraYPos] ld l, a ld a, [wCameraYPos + 1] xor l and $0F xor l swap a ldh [hSCY], a ld a, [wCameraXPos] ld l, a ld a, [wCameraXPos + 1] xor l and $0F xor l swap a ldh [hSCX], a ;; Tick map timers ld hl, wMapTimers .tickMapTimers dec [hl] jr nz, :+ ld [hl], l : inc l jr nz, .tickMapTimers ;; Wait for next frame rst WaitVBlank jp MainLoop SECTION FRAGMENT "State pointers", ROMX StatePtrs: align 8 SECTION FRAGMENT "State init pointers", ROMX StateInitPtrs: align 8 NB_STATES = 0 MACRO register_state SECTION FRAGMENT "State pointers", ROMX dw \1StateUpdate SECTION FRAGMENT "State init pointers", ROMX dw \1StateInit DEF UPPERCASE_NAME equs STRUPR("\1") DEF STATE_{UPPERCASE_NAME} equ NB_STATES REDEF NB_STATES = NB_STATES + 1 PURGE UPPERCASE_NAME SECTION "\1 state", ROM0 ENDM ; State definitions are at the end of this file SECTION "Map timers", WRAM0,ALIGN[8] wMapTimers: ds 256 SECTION "Main loop state variables", WRAM0 ; FIII IIII ; F = If reset, this is the first frame the state is running ; I = ID of the current main loop state ; Do ***NOT*** change this in the init func!!! wCurState:: db ;; State definitions ; Note that each of these files may define more than one state INCLUDE "main/states/normal.asm" INCLUDE "main/states/fade.asm" INCLUDE "main/states/load_map.asm"
18.452632
89
0.699373
ce2df6f6c2c44fbd437bbd931241587d034dc829
381
asm
Assembly
src/arch/x86_64/long_boot.asm
jackmillerstudent/rust-os
c0af6f0e61e9d86d9b16641d20bc571fc90e2e73
[ "MIT" ]
null
null
null
src/arch/x86_64/long_boot.asm
jackmillerstudent/rust-os
c0af6f0e61e9d86d9b16641d20bc571fc90e2e73
[ "MIT" ]
null
null
null
src/arch/x86_64/long_boot.asm
jackmillerstudent/rust-os
c0af6f0e61e9d86d9b16641d20bc571fc90e2e73
[ "MIT" ]
null
null
null
global long_mode_start section .text bits 64 long_mode_start: ; call the rust main extern kmain ; new call kmain ; new .os_returned: ; rust main returned, print `OS returned!` mov rax, 0x4f724f204f534f4f mov [0xb8000], rax mov rax, 0x4f724f754f744f65 mov [0xb8008], rax mov rax, 0x4f214f644f654f6e mov [0xb8010], rax hlt
20.052632
46
0.656168
ff5abab873a68e4eb9fe5c4f1435cac971db9ed6
2,588
asm
Assembly
test/FibonacciSeries.asm
iris-net/hackvm2asm
efff76f44b199d2600f0b0c65099fa689313a1e2
[ "MIT" ]
null
null
null
test/FibonacciSeries.asm
iris-net/hackvm2asm
efff76f44b199d2600f0b0c65099fa689313a1e2
[ "MIT" ]
null
null
null
test/FibonacciSeries.asm
iris-net/hackvm2asm
efff76f44b199d2600f0b0c65099fa689313a1e2
[ "MIT" ]
null
null
null
// ===== push Argument 1 ===== @1 D=A @ARG A=M+D D=M @SP A=M M=D // SP++ @SP M=M+1 // ===== pop Pointer 1 ====== @THAT D=A @R13 M=D // SP-- @SP M=M-1 A=M D=M @R13 A=M M=D // ===== push Constant 0 ===== @0 D=A @SP A=M M=D // SP++ @SP M=M+1 // ===== pop That 0 ====== @0 D=A @THAT D=M+D @R13 M=D // SP-- @SP M=M-1 A=M D=M @R13 A=M M=D // ===== push Constant 1 ===== @1 D=A @SP A=M M=D // SP++ @SP M=M+1 // ===== pop That 1 ====== @1 D=A @THAT D=M+D @R13 M=D // SP-- @SP M=M-1 A=M D=M @R13 A=M M=D // ===== push Argument 0 ===== @0 D=A @ARG A=M+D D=M @SP A=M M=D // SP++ @SP M=M+1 // ===== push Constant 2 ===== @2 D=A @SP A=M M=D // SP++ @SP M=M+1 // ===== arithmetic command Sub ===== // SP-- @SP M=M-1 // D=Memory[SP] @SP A=M D=M // SP-- @SP M=M-1 // A=Memory[SP] A=M // Sub M=M-D // SP++ @SP M=M+1 // ===== pop Argument 0 ====== @0 D=A @ARG D=M+D @R13 M=D // SP-- @SP M=M-1 A=M D=M @R13 A=M M=D // ===== label MAIN_LOOP_START ====== (MAIN_LOOP_START) // ===== push Argument 0 ===== @0 D=A @ARG A=M+D D=M @SP A=M M=D // SP++ @SP M=M+1 // ===== if-goto COMPUTE_ELEMENT ====== // SP-- @SP M=M-1 A=M D=M @COMPUTE_ELEMENT D;JGT // ===== goto END_PROGRAM ====== @END_PROGRAM 0;JMP // ===== label COMPUTE_ELEMENT ====== (COMPUTE_ELEMENT) // ===== push That 0 ===== @0 D=A @THAT A=M+D D=M @SP A=M M=D // SP++ @SP M=M+1 // ===== push That 1 ===== @1 D=A @THAT A=M+D D=M @SP A=M M=D // SP++ @SP M=M+1 // ===== arithmetic command Add ===== // SP-- @SP M=M-1 // D=Memory[SP] @SP A=M D=M // SP-- @SP M=M-1 // A=Memory[SP] A=M // Add M=M+D // SP++ @SP M=M+1 // ===== pop That 2 ====== @2 D=A @THAT D=M+D @R13 M=D // SP-- @SP M=M-1 A=M D=M @R13 A=M M=D // ===== push Pointer 1 ===== @THAT D=M @SP A=M M=D // SP++ @SP M=M+1 // ===== push Constant 1 ===== @1 D=A @SP A=M M=D // SP++ @SP M=M+1 // ===== arithmetic command Add ===== // SP-- @SP M=M-1 // D=Memory[SP] @SP A=M D=M // SP-- @SP M=M-1 // A=Memory[SP] A=M // Add M=M+D // SP++ @SP M=M+1 // ===== pop Pointer 1 ====== @THAT D=A @R13 M=D // SP-- @SP M=M-1 A=M D=M @R13 A=M M=D // ===== push Argument 0 ===== @0 D=A @ARG A=M+D D=M @SP A=M M=D // SP++ @SP M=M+1 // ===== push Constant 1 ===== @1 D=A @SP A=M M=D // SP++ @SP M=M+1 // ===== arithmetic command Sub ===== // SP-- @SP M=M-1 // D=Memory[SP] @SP A=M D=M // SP-- @SP M=M-1 // A=Memory[SP] A=M // Sub M=M-D // SP++ @SP M=M+1 // ===== pop Argument 0 ====== @0 D=A @ARG D=M+D @R13 M=D // SP-- @SP M=M-1 A=M D=M @R13 A=M M=D // ===== goto MAIN_LOOP_START ====== @MAIN_LOOP_START 0;JMP // ===== label END_PROGRAM ====== (END_PROGRAM)
6.792651
39
0.460201
b5517cb8c0d790cb59111b57cb2faa0ecd817af0
681
asm
Assembly
oeis/074/A074878.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/074/A074878.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/074/A074878.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A074878: Row sums of triangle in A074829. ; Submitted by Jamie Morken(s2) ; 1,2,6,14,32,70,150,316,658,1358,2784,5678,11534,23356,47178,95110,191440,384854,772902,1550972,3110306,6234142,12490176,25015774,50088862,100270460,200690970,401624726,803642288,1607920198,3216868854,6435401788,12873496114,25751348846,51509746848,103030899470,206080253870,412190368444,824429052522,1648936281382,3297999054736,6596202777782,13192736715846,26386009260284,52772885509442,105547173836350,211096617479040,422196907581886,844399757593918,1688809130241788,3377633817967674 mov $1,2 mov $2,3 mov $4,1 lpb $0 sub $0,1 mov $3,$2 mul $2,2 add $3,$4 mov $4,$1 add $1,$3 lpe mov $0,$4
40.058824
485
0.803231
29aaba824065ceefa0e403313fc447bb3dbbc45f
4,641
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2390.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_2390.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_2390.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 %rcx push %rdi push %rsi lea addresses_normal_ht+0x13b8f, %rsi lea addresses_A_ht+0xbbc7, %rdi clflush (%rsi) nop nop nop and %r15, %r15 mov $116, %rcx rep movsw nop nop xor $38397, %r13 pop %rsi pop %rdi pop %rcx pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r12 push %r14 push %r15 push %r8 push %rbp push %rdi push %rdx // Store lea addresses_A+0x1957b, %r14 nop nop nop sub %r12, %r12 movw $0x5152, (%r14) nop nop nop nop inc %r14 // Store lea addresses_US+0x160cf, %rdx nop nop nop nop add $158, %rdi mov $0x5152535455565758, %r8 movq %r8, %xmm1 vmovups %ymm1, (%rdx) nop nop nop nop nop and %rdx, %rdx // Faulty Load lea addresses_WC+0x348f, %r14 nop and %rdi, %rdi mov (%r14), %r8w lea oracles, %rdi and $0xff, %r8 shlq $12, %r8 mov (%rdi,%r8,1), %r8 pop %rdx pop %rdi pop %rbp pop %r8 pop %r15 pop %r14 pop %r12 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 5, 'size': 32, '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_normal_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 3, 'same': 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 */
47.357143
2,999
0.661064
4b117fe6711fd48a8d565874fbc70074ac18ab0b
726
asm
Assembly
data/maps/sgb_roof_pal_inds.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
data/maps/sgb_roof_pal_inds.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
data/maps/sgb_roof_pal_inds.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
; Crystal does not support SGB, so this is unused. MapGroupRoofSGBPalInds: ; entries correspond to map groups db PREDEFPAL_00 db PREDEFPAL_OLIVINE db PREDEFPAL_MAHOGANY db PREDEFPAL_DUNGEONS db PREDEFPAL_ECRUTEAK db PREDEFPAL_BLACKTHORN db PREDEFPAL_CINNABAR db PREDEFPAL_CERULEAN db PREDEFPAL_AZALEA db PREDEFPAL_LAKE_OF_RAGE db PREDEFPAL_VIOLET db PREDEFPAL_GOLDENROD db PREDEFPAL_VERMILION db PREDEFPAL_PALLET db PREDEFPAL_PEWTER db PREDEFPAL_VERMILION db PREDEFPAL_INDIGO db PREDEFPAL_FUCHSIA db PREDEFPAL_LAVENDER db PREDEFPAL_SILVER_CAVE db PREDEFPAL_FUCHSIA db PREDEFPAL_CELADON db PREDEFPAL_CIANWOOD db PREDEFPAL_VIRIDIAN db PREDEFPAL_NEW_BARK db PREDEFPAL_SAFFRON db PREDEFPAL_CHERRYGROVE
22.6875
50
0.856749
e5e8b607dc56fd936ffdbf88ea4087b1cb8f855c
766
asm
Assembly
oeis/181/A181768.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/181/A181768.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/181/A181768.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A181768: G.f.: (1/2)*(3 - sqrt((1-5*x)/(1-x))). ; Submitted by Christian Krause ; 1,1,2,5,15,51,188,731,2950,12235,51822,223191,974427,4302645,19181100,86211885,390248055,1777495635,8140539950,37463689775,173164232965,803539474345,3741930523740,17481709707825,81912506777200,384847173838501,1812610804416698,8556895079642921,40480850291739165,191884148712996795,911225151259732188,4334673398737025619,20653004146207902678,98551406393189773875,470929264402115625030,2253335124410029816191,10795436970247959597573,51780807158413733406681,248647340005431279523860 sub $0,1 mov $1,1 mov $3,$0 mov $4,1 lpb $3 mul $1,$4 mul $1,$3 mul $1,2 add $5,$4 add $5,1 div $1,$5 div $2,2 add $2,$1 mul $2,2 sub $3,1 add $4,2 lpe mov $0,$2 div $0,2 add $0,1
30.64
480
0.762402
62367ea2c764e756fe933bf73388994a479740a0
408
asm
Assembly
QUIZ2/troubleshoot-1(ORIGINAL).asm
CodyKelly-UCD/CSCI-2525
08abef3fc374ed9e7eea6390cf3a94144989fd33
[ "MIT" ]
null
null
null
QUIZ2/troubleshoot-1(ORIGINAL).asm
CodyKelly-UCD/CSCI-2525
08abef3fc374ed9e7eea6390cf3a94144989fd33
[ "MIT" ]
null
null
null
QUIZ2/troubleshoot-1(ORIGINAL).asm
CodyKelly-UCD/CSCI-2525
08abef3fc374ed9e7eea6390cf3a94144989fd33
[ "MIT" ]
null
null
null
TITIE Troubleshoot.asm INCLUDE Irvine32.asm rows = 2 * 3 PressKey equ <Press a Key to continue. > .data a word ae32h b dword 015b c byte 32d astr byte "this is a string" anArr word ? , 32, 32h, word "th", 'is', ah .code main PROC mov eax, 0 mov ebx, eax mov eax, a; put a in eax mov ebx, b; put b in ebx mov a, b; a = b add a, b; a = c + b mov c; ebx; c = ebx mov bl, [anArray + 3] exit main END main
13.16129
41
0.64951
790fd405abf3c489eba5bb89ec70395a6bea4721
2,810
asm
Assembly
private/windows/media/avi/avicap/libentry.asm
King0987654/windows2000
01f9c2e62c4289194e33244aade34b7d19e7c9b8
[ "MIT" ]
13
2020-05-23T22:07:40.000Z
2022-01-12T01:24:36.000Z
private/windows/media/avi/avicap/libentry.asm
King0987654/windows2000
01f9c2e62c4289194e33244aade34b7d19e7c9b8
[ "MIT" ]
null
null
null
private/windows/media/avi/avicap/libentry.asm
King0987654/windows2000
01f9c2e62c4289194e33244aade34b7d19e7c9b8
[ "MIT" ]
14
2019-01-16T01:01:23.000Z
2022-02-20T15:54:27.000Z
PAGE,132 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; LIBENTRY.ASM ; ; Windows dynamic link library entry routine ; ; This module generates a code segment called INIT_TEXT. ; It initializes the local heap if one exists and then calls ; the C routine LibMain() which should have the form: ; BOOL FAR PASCAL LibMain(HANDLE hInstance, ; WORD wDataSeg, ; WORD cbHeap, ; DWORD ignore); /* Always NULL - ignore */ ; ; The result of the call to LibMain is returned to Windows. ; The C routine should return TRUE if it completes initialization ; successfully, FALSE if some error occurs. ; ; Note - The last parameter to LibMain is included for compatibility ; reasons. Applications that wish to modify this file and remove the ; parameter from LibMain may do so by simply removing the two ; "push" instructions below marked with "****". ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; include cmacros.inc externFP <LibMain> ; the C routine to be called createSeg INIT_TEXT, INIT_TEXT, BYTE, PUBLIC, CODE sBegin INIT_TEXT assumes CS,INIT_TEXT ?PLM=0 ; 'C'naming externA <_acrtused> ; ensures that Win DLL startup code is linked ?PLM=1 ; 'PASCAL' naming externFP <LocalInit> ; Windows heap init routine cProc LibEntry, <PUBLIC,FAR> ; entry point into DLL include CONVDLL.INC cBegin push di ; handle of the module instance push ds ; library data segment push cx ; heap size push es ; Always NULL **** May remove (see above) push si ; Always NULL **** May remove (see above) ; if we have some heap then initialize it jcxz callc ; jump if no heap specified ; call the Windows function LocalInit() to set up the heap ; LocalInit((LPSTR)start, WORD cbHeap); xor ax,ax cCall LocalInit <ds, ax, cx> or ax,ax ; did it do it ok ? jz error ; quit if it failed ; invoke the C routine to do any special initialization callc: call LibMain ; invoke the 'C' routine (result in AX) jmp short exit ; LibMain is responsible for stack clean up error: pop si ; clean up stack on a LocalInit error pop es pop cx pop ds pop di exit: cEnd sEnd INIT_TEXT end LibEntry 
33.452381
79
0.521708
84e7b0b1bf720aca5d793bdcf72efa92d2b099e0
405
asm
Assembly
libsrc/video/hd44780/lcd_vpeek.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/video/hd44780/lcd_vpeek.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/video/hd44780/lcd_vpeek.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_driver PUBLIC lcd_vpeek PUBLIC _lcd_vpeek PUBLIC asm_lcd_vpeek EXTERN __console_x EXTERN asm_lcd_get_vram_addr lcd_vpeek: _lcd_vpeek: pop bc pop hl push hl push bc ld bc,(__console_x) ld a,l call asm_lcd_vpeek ld l,a ld h,0 ret ; Entry: ; a = character ; b = y ; c = x asm_lcd_vpeek: ; First of all, put onto the VRAM map call asm_lcd_get_vram_addr ld a,(hl) and a ret
10.945946
38
0.730864
03a3cf80cbd19b7e5845c2441af7c8f71fa813fa
355
asm
Assembly
libsrc/spectrum/zx_kempston.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
1
2018-09-04T23:07:24.000Z
2018-09-04T23:07:24.000Z
libsrc/spectrum/zx_kempston.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
libsrc/spectrum/zx_kempston.asm
dex4er/deb-z88dk
9ee4f23444fa6f6043462332a1bff7ae20a8504b
[ "ClArtistic" ]
null
null
null
; ; ZX Spectrum specific routines ; by Stefano Bodrato, 14/09/2006 ; ; int zx_kempston(); ; ; The result is: ; - 1 (true) if the Kempston Joystick is connected ; - 0 (false) otherwise ; ; $Id: zx_kempston.asm,v 1.1 2006/12/01 16:58:30 stefano Exp $ ; XLIB zx_kempston zx_kempston: ld hl,0 in a,(31) cp 32 ret nc inc hl ret
15.434783
63
0.628169
287a8593de08fd2d119f65b0ee9e0b9032000970
485
asm
Assembly
oeis/075/A075183.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/075/A075183.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/075/A075183.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A075183: One half of third column of triangle A075181. ; Submitted by Jon Maiga ; 1,11,105,1020,10500,115920,1375920,17539200,239500800,3492720000,54226972800,893577484800,15583119552000,286816578048000,5557616064000000,113108602134528000,2412627824775168000 add $0,1 mov $2,$0 seq $0,120928 ; Number of "ups" and "downs" in the permutations of [n] if either a previous counted "up" ("down") or a "void" precedes an "up" ("down") which then will be counted also. mul $0,$2 div $0,8
48.5
184
0.764948
dbeaa85b26780d7b86b8cc29699d9c686fd189e1
683
asm
Assembly
data/mapObjects/indigoplateaulobby.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
16
2018-08-28T21:47:01.000Z
2022-02-20T20:29:59.000Z
data/mapObjects/indigoplateaulobby.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
5
2019-04-03T19:53:11.000Z
2022-03-11T22:49:34.000Z
data/mapObjects/indigoplateaulobby.asm
adhi-thirumala/EvoYellow
6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c
[ "Unlicense" ]
2
2019-12-09T19:46:02.000Z
2020-12-05T21:36:30.000Z
IndigoPlateauLobbyObject: db $0 ; border block db $3 ; warps db $b, $7, $0, $ff db $b, $8, $1, $ff db $0, $8, $0, LORELEIS_ROOM db $0 ; signs db $6 ; objects object SPRITE_NURSE, $7, $5, STAY, DOWN, $1 ; person object SPRITE_GYM_HELPER, $4, $9, STAY, RIGHT, $2 ; person object SPRITE_LASS, $5, $1, STAY, DOWN, $3 ; person object SPRITE_MART_GUY, $0, $5, STAY, RIGHT, $4 ; person object SPRITE_CABLE_CLUB_WOMAN, $d, $6, STAY, DOWN, $5 ; person object SPRITE_CHANSEY, $8, $5, STAY, DOWN, $6 ; person ; warp-to EVENT_DISP INDIGO_PLATEAU_LOBBY_WIDTH, $b, $7 EVENT_DISP INDIGO_PLATEAU_LOBBY_WIDTH, $b, $8 EVENT_DISP INDIGO_PLATEAU_LOBBY_WIDTH, $0, $8 ; LORELEIS_ROOM
29.695652
64
0.674963
aadfbf7786e5586e0c84629c24c063951f88531c
3,518
asm
Assembly
programs/oeis/182/A182788.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/182/A182788.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/182/A182788.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A182788: Number of n-colorings of the Triangle Graph of order 3. ; 0,0,0,6,192,1620,7680,26250,72576,172872,368640,721710,1320000,2283996,3773952,5997810,9219840,13770000,20054016,28564182,39890880,54734820,73920000,98407386,129309312,167904600,215654400,274218750,345473856,431530092,534750720,657771330,803520000,975238176,1176502272,1411245990,1683783360,1998832500,2361540096,2777506602,3252812160,3794043240,4408320000,5103324366,5887328832,6769225980,7758558720,8865551250,10101140736,11477009712,13005619200,14700242550,16575000000,18644893956,20925844992,23434728570,26189412480,29208795000,32512843776,36122635422,40060395840,44349541260,49014720000,54081854946,59578186752,65532317760,71974256640,78935463750,86448897216,94549059732,103272046080,112655591370,122739120000,133563795336,145172570112,157610237550,170923483200,185160937500,200373229056,216613038642,233935153920,252396524880,272056320000,292975983126,315219291072,338852411940,363943964160,390565076250,418789447296,448693408152,480355983360,513858953790,549286920000,586727366316,626270725632,668010444930,712043051520,758468220000,807388839936,858911084262,913144478400,970201970100,1030200000000,1093258572906,1159501329792,1229055620520,1302052577280,1378627188750,1458918374976,1543069062972,1631226263040,1723541145810,1820169120000,1921269910896,2027007639552,2137550902710,2253072853440,2373751282500,2499768700416,2631312420282,2768574641280,2911752532920,3061048320000,3216669368286,3378828270912,3547742935500,3723636672000,3906738281250,4097282144256,4295508312192,4501662597120,4715996663430,4938768120000,5170240613076,5410683919872,5660374042890,5919593304960,6188630445000,6467780714496,6757345974702,7057634794560,7368962549340,7691651520000,8026030993266,8372437362432,8731214228880,9102712504320,9487290513750,9885314099136,10297156723812,10723199577600,11163831682650,11619450000000,12090459536856,12577273454592,13080313177470,13600008502080,14136797707500,14691127666176,15263453955522,15854240970240,16463962035360,17093099520000,17742144951846,18411599132352,19101972252660,19813784010240,20547563726250,21303850463616,22083193145832,22886150676480,23713292059470,24565196520000,25442453626236,26345663411712,27275436498450,28232394220800,29217168750000,30230403219456,31272751850742,32344880080320,33447464686980,34581193920000,35746767628026,36944897388672,38176306638840,39441730805760,40741917438750,42077626341696,43449629706252,44858712245760,46305671329890,47791317120000,49316472705216,50881974239232,52488671077830,54137425917120,55829114932500,57564627918336,59344868428362,61170753916800,63043215880200,64963200000000,66931666285806,68949589219392,71017957899420,73137776186880,75310062851250,77535851717376,79816191813072,82152147517440,84544798709910,86995240920000,89504585477796,92073959665152,94704506867610,97397386727040,100153775295000,102974865186816,105861865736382,108816003151680,111838520671020,114930678720000,118093755069186,121329044992512,124637861426400,128021535129600,131481414843750,135018867454656,138635278154292,142332050603520,146110607095530,149972388720000,153918855527976,157951486697472,162071780699790,166281255466560,170581448557500,174973917328896,179460239102802,184042011336960,188720851795440,193498398720000,198376311002166,203356268356032,208439971491780,213629142289920,218925523976250,224330881297536,229847000697912 mov $2,$0 lpb $0,1 mov $0,0 add $0,$2 sub $0,1 mov $1,$2 sub $2,2 pow $2,4 mul $0,$2 add $4,$0 mov $0,1 mul $1,$4 mov $2,$3 lpe
195.444444
3,299
0.900227
3370b046bb7482ba1638cb448c0c8a2df910cb14
1,579
asm
Assembly
picoctf/EasyRsa/gmp-ecm/x86_64/mulredc1.asm
beninato8/ctfs
b28c7b1e5f15a74fd62774da2b93aac225e38f57
[ "MIT" ]
null
null
null
picoctf/EasyRsa/gmp-ecm/x86_64/mulredc1.asm
beninato8/ctfs
b28c7b1e5f15a74fd62774da2b93aac225e38f57
[ "MIT" ]
null
null
null
picoctf/EasyRsa/gmp-ecm/x86_64/mulredc1.asm
beninato8/ctfs
b28c7b1e5f15a74fd62774da2b93aac225e38f57
[ "MIT" ]
null
null
null
# # mp_limb_t mulredc1(mp_limb_t * z, const mp_limb_t x, const mp_limb_t y, # const mp_limb_t m, mp_limb_t inv_m) # # Compute z := x*y mod m, in Montgomery representation, where x, y < m # and m is n limb wide. inv_m is the less significant limb of the # inverse of m modulo 2^(n*GMP_LIMB_BITS) # # The result might be unreduced (larger than m) but becomes reduced # after subtracting m. The calling function should take care of that. # # We use a temporary space for unreduced product on the stack. # Therefore, this can not be used for large integers (anyway, the # algorithm is quadratic). # # WARNING: z is only n limbs but since it might be unreduced, there # could be a carry that does not fit in z. This carry is returned. include(`config.m4') TEXT GLOBL GSYM_PREFIX`'mulredc1 TYPE(GSYM_PREFIX`'mulredc1,`function') ifdef(`WINDOWS64_ABI', # stack: inv_m, %r9: m, %r8: y, %rdx: x, %rcx: *z `define(`INV_M', `0x28(%rsp)') define(`M', `%r9') define(`Y', `%r8') define(`X', `%rdx') define(`Z', `%rcx') define(`TMP2', `%r10') define(`TMP1', `%r8')', # %r8: inv_m, %rcx: m, %rdx: y, %rsi : x, %rdi : *z `define(`INV_M', `%r8') define(`M', `%rcx') define(`Y', `%rdx') define(`X', `%rsi') define(`Z', `%rdi') define(`TMP2', `%r10') define(`TMP1', `%r9')') GSYM_PREFIX`'mulredc1: movq Y, %rax mulq X movq %rdx, TMP2 movq %rax, TMP1 # store xy in [r9:r10] mulq INV_M # compute u mulq M # compute u*m addq TMP1, %rax # rax is 0, now (carry is important) adcq TMP2, %rdx movq %rdx, (Z) adcq $0, %rax ret
28.709091
74
0.635845
301cc4470485e4d2da848415e5627c4e7964c485
278
asm
Assembly
oeis/294/A294496.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/294/A294496.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/294/A294496.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A294496: Number of distinct minimal period lengths of periodic infinite words on n symbols having the constant gap property. ; Submitted by Jon Maiga ; 1,1,2,3,6,8,15,18,31,35,56,62 mov $1,$0 div $1,2 mul $1,4 add $1,5 div $1,2 bin $1,2 mul $0,$1 add $0,9 div $0,12 add $0,1
18.533333
126
0.690647
5a9934b888bd07979444a5a11fb789f2f55c6984
812
asm
Assembly
P5/P5_TestCode/P5_L1_testcase4/P5_L1_testcase4/mips4.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
1
2022-01-23T09:24:47.000Z
2022-01-23T09:24:47.000Z
P5/P5_TestCode/P5_L1_testcase4/mips4.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
null
null
null
P5/P5_TestCode/P5_L1_testcase4/mips4.asm
alxzzhou/BUAA_CO_2020
b54bf367081a5a11701ebc3fc78a23494aecca9e
[ "Apache-2.0" ]
null
null
null
.data nums: .space 4096 .text ori $t3, $0, 1234 beq $t3, $t3, loop nop ori $t0, $0, 1 loop: ori $t0, $0, 5 ori $t2, $t2, 0123 ori $t4, $t4, 0123 beq $t2, $t4, loop2 nop ori $t0, $0, 1 loop2: ori $t0, $0, 6 ori $t1, $t1, 0123 ori $t5, $t5, 0123 beq $t5, $t1, loop3 nop ori $t0, $0, 1 loop3: ori $t0, $0, 7 ori $t6, 2333 ori $t7, 2333 nop beq $t6, $t7, loop4 nop ori $t0, $0, 1 loop4: ori $t0, $0, 8 ori $t1, 244 ori $t2, 244 nop beq $t2, $t1, loop5 nop ori $t0, $0, 1 loop5: ori $t0, $0, 9 ori $t3, $0, 255 ori $t4, $0, 255 nop nop beq $t3, $t4, loop6 nop ori $t0, $0, 1 loop6: ori $t0, $0, 10 ori $t5, $0, 255 ori $t6, $0, 255 nop nop beq $t6, $t5, loop7 nop ori $t0, $0, 1 loop7: ori $t1, 1000 nop nop nop beq $t1, $t1, end nop ori $t0, $0, 1 end: ori $t0, 11
12.30303
20
0.543103
6ed93c9af2acde831ec6bf03b358cd988077715b
13,881
asm
Assembly
roms/giko019.asm
bokuweb/rustynes
f213881554e20054c7ea7adafe511195c25f8cb7
[ "MIT", "Unlicense" ]
423
2018-02-08T01:36:38.000Z
2022-03-09T14:09:42.000Z
roms/giko019.asm
bokuweb/rustynes
f213881554e20054c7ea7adafe511195c25f8cb7
[ "MIT", "Unlicense" ]
11
2018-08-31T05:01:23.000Z
2021-10-03T09:59:11.000Z
roms/giko019.asm
bokuweb/rustynes
f213881554e20054c7ea7adafe511195c25f8cb7
[ "MIT", "Unlicense" ]
30
2018-02-10T07:37:27.000Z
2021-09-19T10:48:30.000Z
; マッパー3サンプル ; INESヘッダー .inesprg 1 ; - プログラム1バンク .ineschr 2 ; - グラフィック2バンク .inesmir 1 ; - 垂直ミラーリング .inesmap 3 ; - マッパー3番(CNROM) ; ゼロページ ViewAdr_L = $00 ; ネームテーブルアドレス(下位) ViewAdr_H = $01 ; ネームテーブルアドレス(上位) MapAdr_L = $02 ; マップアドレス(下位) MapAdr_H = $03 ; マップアドレス(下位) MapAdrW_L = $04 ; マップアドレス(下位)更新用 MapAdrW_H = $05 ; マップアドレス(上位)更新用 MapAdr_ofs = $06 ; マップアクセス用オフセット View_X = $07 ; 汎用 View_Y = $08 ; 汎用 Work_X = $09 ; 汎用 Work_Y = $0A ; 汎用 Walk_Cnt = $10 GameMode = $11 ; モード(0=フィールド,1=バンク切り替え予約,2=切り替え後) KumaAdr_L = $20 ; クマ下位アドレス KumaAdr_H = $21 ; クマ上位アドレス .bank 1 ; バンク1 .org $FFFA ; $FFFAから開始 .dw mainLoop ; VBlank割り込みハンドラ(1/60秒毎にmainLoopがコールされる) .dw Start ; リセット割り込み。起動時とリセットでStartに飛ぶ .dw IRQ ; ハードウェア割り込みとソフトウェア割り込みによって発生 .bank 0 ; バンク0 .org $0300 ; $0300から開始、スプライトDMAデータ配置 Sprite1_Y: .db 0 ; スプライト#1 Y座標 Sprite1_T: .db 0 ; スプライト#1 ナンバー Sprite1_S: .db 0 ; スプライト#1 属性 Sprite1_X: .db 0 ; スプライト#1 X座標 Sprite2_Y: .db 0 ; スプライト#1 Y座標 Sprite2_T: .db 0 ; スプライト#1 ナンバー Sprite2_S: .db 0 ; スプライト#1 属性 Sprite2_X: .db 0 ; スプライト#1 X座標 .org $8000 ; $8000から開始 Start: sei ; 割り込み不許可 cld ; デシマルモードフラグクリア ldx #$ff txs ; スタックポインタ初期化 ; PPUコントロールレジスタ1初期化 lda #%00110000 ; ここではVBlank割り込み禁止 sta $2000 ; VROMバンク切り替え lda #2 ; バンク2 sta $8000 waitVSync: lda $2002 ; VBlankが発生すると、$2002の7ビット目が1になる bpl waitVSync ; bit7が0の間は、waitVSyncラベルの位置に飛んでループして待ち続ける ; PPUコントロールレジスタ2初期化 lda #%00000110 ; 初期化中はスプライトとBGを表示OFFにする sta $2001 ; パレットをロード ldx #$00 ; Xレジスタクリア ; VRAMアドレスレジスタの$2006に、パレットのロード先のアドレス$3F00を指定する。 lda #$3F sta $2006 lda #$00 sta $2006 loadPal: ; ラベルは、「ラベル名+:」の形式で記述 lda tilepal, x ; Aに(ourpal + x)番地のパレットをロードする sta $2007 ; $2007にパレットの値を読み込む inx ; Xレジスタに値を1加算している cpx #32 ; Xを32(10進数。BGとスプライトのパレットの総数)と比較して同じかどうか比較している bne loadPal ; 上が等しくない場合は、loadpalラベルの位置にジャンプする ; Xが32ならパレットロード終了 ; スプライトDMA領域初期化(すべて0にする) lda #0 ldx #$00 initSpriteDMA: sta $0300, x inx bne initSpriteDMA ; ゼロページ初期化 lda #$00 ldx #$00 initZeroPage: sta <$00, x inx bne initZeroPage ; 初期地形描画 ; ViewAdr初期化($2000) lda #$20 sta <ViewAdr_H sta $2006 lda #$00 sta <ViewAdr_L sta $2006 ; マップの先頭アドレス設定 lda #high(Map_Tbl_Init) sta <MapAdr_H lda #low(Map_Tbl_Init) sta <MapAdr_L lda #32 ; ネームテーブル1ライン16*2セット sta <View_Y ; とりあえずView_Yを使う initField: ldy <MapAdr_ofs ; オフセット lda [MapAdr_L],y ; マップロード pha ; Aを保存 lda <View_Y and #1 bne initFieldSub ; View_Yが偶数ならネームテーブル上位、奇数なら下位 pla ; Aに復帰 ; 上位を取得するので4回右シフトにする lsr a lsr a lsr a lsr a jmp initFieldSub2 initFieldSub ; 下位取得 pla ; Aに復帰 and #$F ; 下位取得後にMapAdrオフセット加算 inc <MapAdr_ofs initFieldSub2 ; キャラ出力 ; 2x2キャラなので4倍にする asl a asl a clc ldy <View_Y cpy #17 bcs initFieldSub3 clc adc #2 ; 2x2のうちの下の部分のキャラなので2加算する initFieldSub3 ; 2キャラ出力する sta $2007 clc adc #1 ; 1加算 sta $2007 dec <View_Y lda <View_Y beq initFieldEnter2 ; 2行描き終えた cmp #16 bne initField ; ネームテーブル改行処理(1行描き終えた) ; MapAdrオフセットクリア lda #0 sta <MapAdr_ofs jmp initField initFieldEnter2 ; ネームテーブル改行処理(2行描き終えた) inc <View_X lda <View_X cmp #15 beq initFieldEnd ; 15行出力したら終了 lda #32 ; ネームテーブル1ライン16*2セット sta <View_Y ; MapAdr加算 lda <MapAdr_L clc adc <MapAdr_ofs ; オフセットを加算 adc #8 ; さらに画面外の分の8をスキップ sta <MapAdr_L bcc initFieldSub4 inc <MapAdr_H ; 桁上がり initFieldSub4 lda #0 sta <MapAdr_ofs jmp initField initFieldEnd ; マップの先頭アドレスを再度設定して初期化 lda #high(Map_Tbl_Init) sta <MapAdr_H sta <MapAdrW_H lda #low(Map_Tbl_Init) sta <MapAdr_L sta <MapAdrW_L ; 属性を初期化する ; $23C0から lda #$23 sta $2006 lda #$C0 sta $2006 sta <Work_X lda #8 ; 8回毎に改行 sta <Work_Y initAttr jsr setAttrib sta $2007 inc <MapAdrW_L lda <MapAdrW_L bne initAttrSub inc <MapAdrW_H ; 桁上がり initAttrSub dec <Work_Y lda <Work_Y bne initAttrSub2 lda #8 ; 8回毎に改行 sta <Work_Y lda <MapAdrW_L clc adc #24 ; 8+16 sta <MapAdrW_L bcc initAttrSub2 inc <MapAdrW_H ; 桁上がり initAttrSub2 inc <Work_X lda <Work_X bne initAttr ; Xが$00になるまでループ ; スクロールクリア lda $2002 lda #$00 sta $2005 sta $2005 ; VBlank待ち waitVSync2: lda $2002 bpl waitVSync2 ; PPUコントロールレジスタ2初期化 lda #%00011110 ; BGの表示をONにする sta $2001 ; PPUコントロールレジスタ1の割り込み許可フラグを立てる lda #%10110000 sta $2000 infinityLoop: ; VBlank割り込み発生を待つだけの無限ループ lda <GameMode cmp #1 bne infinityLoop lda #%00110000 ; VBlank割り込み禁止 ; VROMバンク切り替え lda #3 ; バンク3 sta $8000 ; ネームテーブルクリア jsr clearNameTbl ; クマ表示 jsr putKuma waitVSync3: lda $2002 ; VBlank待ち bpl waitVSync3 lda #%00011110 ; BGの表示をONにする sta $2001 ; スクロールクリア lda $2002 lda #$00 sta $2005 sta $2005 ; ゲームモードを2に inc <GameMode lda #%10110000 ; VBlank割込み禁止解除 jmp infinityLoop mainLoop: ; メインループ pha ; Aレジスタをスタックに保存 ; ゲームモード0のとき以外は何もしない lda <GameMode beq mainLoopSub pla ; 割り込み前の内容をAレジスタに復帰 rti mainLoopSub jsr putSprite inc <Walk_Cnt ; 歩きカウンター加算 ; パッドI/Oレジスタの準備 lda #$01 sta $4016 lda #$00 sta $4016 ; パッド入力チェック lda $4016 ; Aボタン and #1 ; AND #1 beq NOTHINGdown ; バンク切り替え予約 inc <GameMode lda #%00000110 ; スプライトとBGを表示OFFにする sta $2001 jmp NOTHINGdown NOTHINGdown: pla ; 割り込み前の内容をAレジスタに復帰 rti ; 割り込みから復帰 putSprite: lda #$3 ; スプライトデータは$0300番地からなので、3をロードする。 sta $4014 ; スプライトDMAレジスタにAをストアして、スプライトデータをDMA転送する ; プレイヤーキャラスプライト描画(座標固定) ; 歩きアニメパターン取得 lda <Walk_Cnt and #$20 asl a tax ; 左側 lda #112 ; Y座標 sta Sprite1_Y cpx #$40 beq spritePut lda #02 ; 2番 jmp spritePut2 spritePut lda #04 ; 4番 spritePut2 sta Sprite1_T stx Sprite1_S lda #112 ; X座標 sta Sprite1_X ; 右側 lda #112 ; Y座標 sta Sprite2_Y cpx #$40 beq spritePut3 lda #04 ; 4番 jmp spritePut4 spritePut3 lda #02 ; 2番 spritePut4 sta Sprite2_T stx Sprite2_S lda #120 ; X座標 sta Sprite2_X rts setAttrib: ; MapAdrW_H,Lを左上として、属性1マス分をAレジスタに設定する ; (Mapのキャラ番号とパレット番号は同一というシンプルな前提) ldy #0 ; オフセット ; 左上(000000xx) lda [MapAdrW_L],y ; マップロード ; 上位を取得するので4回右シフトにする ldx #4 jsr shiftR sta <View_X ; View_Xに保存 ; 右上(0000xx00) lda [MapAdrW_L],y ; マップロード ; 下位を取得するので$FとANDする and #$F ; 左シフト2回してView_XにORする ldx #2 jsr shiftL ora <View_X sta <View_X ; 左下(00xx0000) ldy #16 ; マップは横16バイトなので16加算 lda [MapAdrW_L],y ; マップロード ; 上位を取得するので4回右シフトにする ldx #4 jsr shiftR ; 左シフト4回してView_XにORする ldx #4 jsr shiftL ora <View_X sta <View_X ; 右下(xx000000) lda [MapAdrW_L],y ; マップロード ; 下位を取得するので$FとANDする and #$F ; 左シフト6回してView_XにORする ldx #6 jsr shiftL ora <View_X rts shiftL: ; Xレジスタの回数だけAを左シフトする asl a dex bne shiftL rts shiftR: ; Xレジスタの回数だけAを右シフトする lsr a dex bne shiftR rts putKuma: ; プレイヤーキャラスプライトクリア lda #$00 ; アドレス0 sta $2003 sta $2004 ; マッパー3サンプル ; INESヘッダー .inesprg 1 ; - プログラム1バンク .ineschr 2 ; - グラフィック2バンク .inesmir 1 ; - 垂直ミラーリング .inesmap 3 ; - マッパー3番(CNROM) ; ゼロページ ViewAdr_L = $00 ; ネームテーブルアドレス(下位) ViewAdr_H = $01 ; ネームテーブルアドレス(上位) MapAdr_L = $02 ; マップアドレス(下位) MapAdr_H = $03 ; マップアドレス(下位) MapAdrW_L = $04 ; マップアドレス(下位)更新用 MapAdrW_H = $05 ; マップアドレス(上位)更新用 MapAdr_ofs = $06 ; マップアクセス用オフセット View_X = $07 ; 汎用 View_Y = $08 ; 汎用 Work_X = $09 ; 汎用 Work_Y = $0A ; 汎用 Walk_Cnt = $10 GameMode = $11 ; モード(0=フィールド,1=バンク切り替え予約,2=切り替え後) KumaAdr_L = $20 ; クマ下位アドレス KumaAdr_H = $21 ; クマ上位アドレス .bank 1 ; バンク1 .org $FFFA ; $FFFAから開始 .dw mainLoop ; VBlank割り込みハンドラ(1/60秒毎にmainLoopがコールされる) .dw Start ; リセット割り込み。起動時とリセットでStartに飛ぶ .dw IRQ ; ハードウェア割り込みとソフトウェア割り込みによって発生 .bank 0 ; バンク0 .org $0300 ; $0300から開始、スプライトDMAデータ配置 Sprite1_Y: .db 0 ; スプライト#1 Y座標 Sprite1_T: .db 0 ; スプライト#1 ナンバー Sprite1_S: .db 0 ; スプライト#1 属性 Sprite1_X: .db 0 ; スプライト#1 X座標 Sprite2_Y: .db 0 ; スプライト#1 Y座標 Sprite2_T: .db 0 ; スプライト#1 ナンバー Sprite2_S: .db 0 ; スプライト#1 属性 Sprite2_X: .db 0 ; スプライト#1 X座標 .org $8000 ; $8000から開始 Start: sei ; 割り込み不許可 cld ; デシマルモードフラグクリア ldx #$ff txs ; スタックポインタ初期化 ; PPUコントロールレジスタ1初期化 lda #%00110000 ; ここではVBlank割り込み禁止 sta $2000 ; VROMバンク切り替え lda #2 ; バンク2 sta $8000 waitVSync: lda $2002 ; VBlankが発生すると、$2002の7ビット目が1になる bpl waitVSync ; bit7が0の間は、waitVSyncラベルの位置に飛んでループして待ち続ける ; PPUコントロールレジスタ2初期化 lda #%00000110 ; 初期化中はスプライトとBGを表示OFFにする sta $2001 ; パレットをロード ldx #$00 ; Xレジスタクリア ; VRAMアドレスレジスタの$2006に、パレットのロード先のアドレス$3F00を指定する。 lda #$3F sta $2006 lda #$00 sta $2006 loadPal: ; ラベルは、「ラベル名+:」の形式で記述 lda tilepal, x ; Aに(ourpal + x)番地のパレットをロードする sta $2007 ; $2007にパレットの値を読み込む inx ; Xレジスタに値を1加算している cpx #32 ; Xを32(10進数。BGとスプライトのパレットの総数)と比較して同じかどうか比較している bne loadPal ; 上が等しくない場合は、loadpalラベルの位置にジャンプする ; Xが32ならパレットロード終了 ; スプライトDMA領域初期化(すべて0にする) lda #0 ldx #$00 initSpriteDMA: sta $0300, x inx bne initSpriteDMA ; ゼロページ初期化 lda #$00 ldx #$00 initZeroPage: sta <$00, x inx bne initZeroPage ; 初期地形描画 ; ViewAdr初期化($2000) lda #$20 sta <ViewAdr_H sta $2006 lda #$00 sta <ViewAdr_L sta $2006 ; マップの先頭アドレス設定 lda #high(Map_Tbl_Init) sta <MapAdr_H lda #low(Map_Tbl_Init) sta <MapAdr_L lda #32 ; ネームテーブル1ライン16*2セット sta <View_Y ; とりあえずView_Yを使う initField: ldy <MapAdr_ofs ; オフセット lda [MapAdr_L],y ; マップロード pha ; Aを保存 lda <View_Y and #1 bne initFieldSub ; View_Yが偶数ならネームテーブル上位、奇数なら下位 pla ; Aに復帰 ; 上位を取得するので4回右シフトにする lsr a lsr a lsr a lsr a jmp initFieldSub2 initFieldSub ; 下位取得 pla ; Aに復帰 and #$F ; 下位取得後にMapAdrオフセット加算 inc <MapAdr_ofs initFieldSub2 ; キャラ出力 ; 2x2キャラなので4倍にする asl a asl a clc ldy <View_Y cpy #17 bcs initFieldSub3 clc adc #2 ; 2x2のうちの下の部分のキャラなので2加算する initFieldSub3 ; 2キャラ出力する sta $2007 clc adc #1 ; 1加算 sta $2007 dec <View_Y lda <View_Y beq initFieldEnter2 ; 2行描き終えた cmp #16 bne initField ; ネームテーブル改行処理(1行描き終えた) ; MapAdrオフセットクリア lda #0 sta <MapAdr_ofs jmp initField initFieldEnter2 ; ネームテーブル改行処理(2行描き終えた) inc <View_X lda <View_X cmp #15 beq initFieldEnd ; 15行出力したら終了 lda #32 ; ネームテーブル1ライン16*2セット sta <View_Y ; MapAdr加算 lda <MapAdr_L clc adc <MapAdr_ofs ; オフセットを加算 adc #8 ; さらに画面外の分の8をスキップ sta <MapAdr_L bcc initFieldSub4 inc <MapAdr_H ; 桁上がり initFieldSub4 lda #0 sta <MapAdr_ofs jmp initField initFieldEnd ; マップの先頭アドレスを再度設定して初期化 lda #high(Map_Tbl_Init) sta <MapAdr_H sta <MapAdrW_H lda #low(Map_Tbl_Init) sta <MapAdr_L sta <MapAdrW_L ; 属性を初期化する ; $23C0から lda #$23 sta $2006 lda #$C0 sta $2006 sta <Work_X lda #8 ; 8回毎に改行 sta <Work_Y initAttr jsr setAttrib sta $2007 inc <MapAdrW_L lda <MapAdrW_L bne initAttrSub inc <MapAdrW_H ; 桁上がり initAttrSub dec <Work_Y lda <Work_Y sta $2004 sta $2004 sta $2004 lda #$04 ; アドレス4 sta $2003 lda #$00 sta $2004 sta $2004 sta $2004 sta $2004 ; BGパレットとスプライトパレット書き換え lda #$3F sta $2006 lda #$01 sta $2006 lda #$30 ; 白 sta $2007 sta $2007 lda #$0F ; 黒 sta $2007 lda #$3F sta $2006 lda #$10 sta $2006 lda #$0F ; 黒 sta $2007 ; 属性初期化 jsr clearAttrib ; クマ表示 lda #$20 sta <KumaAdr_H lda #$6B sta <KumaAdr_L ldx #0 putKumaSub: lda <KumaAdr_H sta $2006 lda <KumaAdr_L sta $2006 putKumaSub2 stx $2007 inx txa and #$F cmp #$9 bne putKumaSub2 lda <KumaAdr_L clc adc #$20 ; ネームテーブルを改行する sta <KumaAdr_L bcc putKumaSub3 inc <KumaAdr_H ; 桁上がり putKumaSub3 txa clc adc #$7 ; キャラを改行する tax cpx #$E0 ; キャラを$D0まで出力する bne putKumaSub ; 枠表示 lda #$22 sta $2006 lda #$28 sta $2006 ldx #$E ldy #$FC ; 横線 putYokoWaku1 sty $2007 dex bne putYokoWaku1 lda #$23 sta $2006 lda #$08 sta $2006 ldx #$E putYokoWaku2 sty $2007 dex bne putYokoWaku2 ldx #$47 ldy #$FD ; 縦線 putTateWaku1 lda #$22 sta $2006 stx $2006 sty $2007 txa clc adc #$20 tax bcc putTateWaku1 ; 面倒なんで桁上がりするまで ldx #$56 putTateWaku2 lda #$22 sta $2006 stx $2006 sty $2007 txa clc adc #$20 tax bcc putTateWaku2 ; 面倒なんで桁上がりするまで ; 左上 lda #$22 sta $2006 lda #$27 sta $2006 lda #$EE sta $2007 ; 右上 lda #$22 sta $2006 lda #$36 sta $2006 lda #$EF sta $2007 ; 左下 lda #$23 sta $2006 lda #$07 sta $2006 lda #$FE sta $2007 ; 右下 lda #$23 sta $2006 lda #$16 sta $2006 lda #$FF sta $2007 ; 「くまが あらわれた!」 lda #$22 sta $2006 lda #$48 sta $2006 ldx #$E0 putKumaAppeared stx $2007 inx cpx #$E9 bne putKumaAppeared rts clearNameTbl: ; ネームテーブル0クリア ; ネームテーブルの$2000から lda #$20 sta $2006 lda #$00 sta $2006 lda #$00 ; 0番(透明) ldx #240 ; 240回繰り返す ldy #4 ; それを4回、計960回繰り返す clearNameTblSub sta $2007 dex bne clearNameTblSub ldx #240 dey bne clearNameTblSub rts clearAttrib: ; 属性初期化 lda #$23 sta $2006 lda #$C0 sta $2006 ldx #$00 ; Xレジスタクリア lda #0 ; 4つともパレット0番 clearAttribSub sta $2007 ; $2007に属性の値を読み込む ; 64回(全キャラクター分)ループする inx cpx #64 bne clearAttribSub rts IRQ: rti ; 初期データ .org $9000 ; $9000から開始 tilepal: .incbin "giko6.pal" ; パレットをincludeする ; マップデータ(32x32) Map_Tbl: .include "giko019map.txt" .bank 2 ; バンク2 .org $0000 ; $0000から開始 .incbin "giko4.spr" ; スプライトデータ .incbin "giko7.bkg" ; 地形BGデータ .bank 3 ; バンク3 .org $0000 ; $0000から開始 .incbin "giko4.spr" ; スプライトデータ .incbin "giko8.bkg" ; 敵&メッセージBGデータ
16.159488
59
0.636049
57ba004e55f09d316d9715ffa1f8061854353aac
655
asm
Assembly
oeis/074/A074538.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/074/A074538.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/074/A074538.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A074538: a(n) = 2^n + 5^n + 7^n. ; Submitted by Jamie Morken(s1.) ; 3,14,78,476,3042,19964,133338,901796,6155682,42307244,292241898,2026156916,14085431922,98109721724,684326604858,4778079120836,33385518525762,233393453571404,1632228295438218,11417968672225556,79887633730301202,559022701243584284,3912205234378197978,27380668269044383076,191640836025358582242,1341366642887875408364,9388970453767206180138,65719812944131338185396,460023789447724848552882,3220092020328103359411644,22540271613266874640120698,157780038647718886155104516,1104450957308286037563157122 mov $3,$0 seq $0,74503 ; a(n) = 1^n + 2^n + 7^n. mov $2,5 pow $2,$3 add $0,$2 sub $0,1
59.545455
498
0.832061
d979a1b648c407c764be303c7f3fe5dd4081c8c2
541
asm
Assembly
programs/oeis/186/A186146.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/186/A186146.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/186/A186146.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A186146: Rank of n^3 when {i^2: i>=1} and {j^3: j>=1} are jointly ranked with i^2 before j^3 when i^2=j^3. Complement of A186145. ; 2,4,8,12,16,20,25,30,36,41,47,53,59,66,73,80,87,94,101,109,117,125,133,141,150,158,167,176,185,194,203,213,222,232,242,252,262,272,282,292,303,314,324,335,346,357,369,380,392,403,415,426,438,450,462,475,487,499,512,524,537,550,563,576,589,602,615,628,642,655,669,682,696,710,724,738,752,766,781,795,810,824,839,853,868,883,898 mov $2,$0 add $0,1 seq $0,77121 ; Number of integer squares <= n^3. add $0,$2
67.625
328
0.693161
af8ff3bb83f391f95f6620cc766f2510799a575f
2,831
asm
Assembly
DE-LAB-2/main.asm
tustunkok/CMPE236-Labs
0592cf993a9c0b360973654bc6171a29a0e3335c
[ "MIT" ]
null
null
null
DE-LAB-2/main.asm
tustunkok/CMPE236-Labs
0592cf993a9c0b360973654bc6171a29a0e3335c
[ "MIT" ]
null
null
null
DE-LAB-2/main.asm
tustunkok/CMPE236-Labs
0592cf993a9c0b360973654bc6171a29a0e3335c
[ "MIT" ]
null
null
null
; GLOBAL 7SEG CONSTANTS N0 EQU 11000000B ; #DEFINE N0 11000000B N1 EQU 11111001B N2 EQU 10100100B N3 EQU 10110000B N4 EQU 10011001B N5 EQU 10010010B N6 EQU 10000010B N7 EQU 11111000B N8 EQU 10000000B N9 EQU 10010000B NA EQU 10001000B NB EQU 10000011B NC EQU 11000110B ND EQU 10100001B NE_ EQU 10000110B NF EQU 10001110B ; CONTSTANTS ATTEMPT_LOC EQU 20H PASSWD_LOC EQU 21H ; PASSWD_LOC[4] EN EQU P3.0 LENGTH EQU 04D ORG 00H SJMP MAIN ORG 30H MAIN: MOV ATTEMPT_LOC, #03D ; INT ATTEMPT = 3; ACALL GET_PASSWD ; LET THE USER ENTER HıS/HER PASSWORD ıNFO ACALL CHCK_PASSWD ; CHECK IF THE PASSWORD ENTERED CORRECTLY ; COMPARE THE RETURNED VALUE WITH THE PASSWORD ; LENGTH TO SEE IF THEY ARE EQUAL OR NOT. CJNE A, #LENGTH, ERROR ; PASSWORD IS CORRECT MOV R2, #0CH ACALL WRT2LED SJMP HALT ; PASSWORD IS NOT CORRECT ERROR: MOV R2, #0FH ACALL WRT2LED HALT: SJMP HALT ; =================================================== ; CHECK THE ENTERED DIGITS BY THE USER ; PARAMS: NONE ; RETURN: NUMBER OF CORRECTLY ENTERED DIGITS CHCK_PASSWD: MOV R2, #LENGTH ;INT PWD_LENGTH=4; MOV R0, #PASSWD_LOC ;LOAD THE R0 TO THE PLACE WHERE PASSWORD RESIDES CLR A ;INT CORRECT_COUNT = 0 PUSH A LP2: PUSH 02H ;SAVE THE PREVIOUS VALUE OF THE R2 REGISTER MOV R2, ATTEMPT_LOC ;PARAMETER LOADING, WRT2LED(ATTEMPT_COUNT) ACALL WRT2LED POP 02H ;GET THE PREVIOUS R2 VALUE LP3: JB EN, LP3 ;WAIT UNTILL THE USER OPENS ENABLE PIN MOV A, P2 ;GET A DIGIT FROM THE USER CLR C SUBB A, @R0 ;CHECKT THE CORRESPONDING DIGIT IN THE PSWD JZ CONT DJNZ ATTEMPT_LOC, LP2 ;ATTEMPT_COUNT --; MOV R2, ATTEMPT_LOC ;ATTEMPT COUNT IS FINISHED ACALL WRT2LED ;WRITE 0 TO 7SEG DISPLAY SJMP EXT ;GO TO THE EXIT ;IF(DIGIT=PASSWORD[I]){CORRECT_COUNT++;} CONT: INC R0 ;MOVE THE POINTER TO THE NEXT VALUE POP A ;GET THE CORRECT_COUNT VARIABLE INC A ;CORRECT_COUNT++ PUSH A DJNZ R2, LP2 EXT: POP A ;RETURN CORRECT_COUNT++ RET ; =================================================== ; GET 4 DIGIT PASSWORD FROM USER ; PARAMS: NONE ; RETURN: NONE GET_PASSWD: MOV R2, #LENGTH ; INT PASSWORD_LENGTH=4; MOV R0, #PASSWD_LOC ; LOAD R0 POINTER WITH THE VALUE OF 21H LP1: JB EN, LP1 ; WAIT UNTILL THE USER OPENS ENABLE PIN MOV @R0, P2 INC R0 DJNZ R2, LP1 ; PASSWORD_LENGTH --; RET ; =================================================== ; WRITE THE GIVEN NUMBER TO THE 7SEG DISPLAY ; PARAMS: NUMBER ; RETURN: NONE WRT2LED: MOV DPTR, #LED_DATA MOV A, #0FH ; IF(PARAMETER>MAX_VALUE){RETURN;} CLR C ; CLEAR THE CARRY BIT SUBB A, R2 JC EXT1 ; IF CARRY OCCURS DO NOTHING MOV A, R2 ; READ THE PARAMETER MOVC A, @A+DPTR MOV P1, A EXT1: RET ORG 0200H LED_DATA: DB N0, N1, N2, N3, N4, N5, N6, N7, N8, N9, NA, NB, NC, ND, NE_, NF END
25.276786
76
0.660544
93b3bf6e90d702da18833583cc71d6870e932430
334
asm
Assembly
libsrc/abc80/abc_cursor.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/abc80/abc_cursor.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/abc80/abc_cursor.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ; ABC80 specific routines ; by Stefano Bodrato, Oct 2007 ; ; Set cursor shape ; ; void abc_cursor(unsigned char shape); ; ; ; $Id: abc_cursor.asm,v 1.2 2016-06-11 19:38:47 dom Exp $ ; SECTION code_clib PUBLIC abc_cursor PUBLIC _abc_cursor abc_cursor: _abc_cursor: ld a,11 out (56),a ld a,l ; FASTCALL out (57),a ret
13.36
57
0.685629
c64d2731133a3ed67d1b0a4ae4c591f29b9162dd
546
asm
Assembly
programs/oeis/045/A045534.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/045/A045534.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/045/A045534.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A045534: Number of squarefree self-avoiding walks in 2 dimensions. ; 1,4,8,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 mov $3,$0 mul $0,6 sub $0,3 mul $0,2 mov $1,2 lpb $0 mov $2,$3 cmp $2,0 add $3,$2 div $0,$3 mul $0,2 lpb $0 sub $0,$3 max $0,0 seq $0,173919 ; Numbers that are prime or one less than a prime. trn $1,8 lpe lpb $0 trn $0,6 mul $1,2 lpe lpe div $1,2 mov $0,$1
19.5
176
0.547619