hexsha stringlengths 40 40 | size int64 6 1.05M | ext stringclasses 3 values | lang stringclasses 1 value | max_stars_repo_path stringlengths 4 232 | max_stars_repo_name stringlengths 7 106 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 7 | max_stars_count int64 1 33.5k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 232 | max_issues_repo_name stringlengths 7 106 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 7 | max_issues_count int64 1 37.5k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 232 | max_forks_repo_name stringlengths 7 106 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 7 | max_forks_count int64 1 12.6k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 1.05M | avg_line_length float64 1.16 19.7k | max_line_length int64 2 938k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d9e134573ba8f484a216ecfd7e07ac1c7413d896 | 1,120 | asm | Assembly | text/maps/rocket_hideout_b4f.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 16 | 2018-08-28T21:47:01.000Z | 2022-02-20T20:29:59.000Z | text/maps/rocket_hideout_b4f.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 5 | 2019-04-03T19:53:11.000Z | 2022-03-11T22:49:34.000Z | text/maps/rocket_hideout_b4f.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 2 | 2019-12-09T19:46:02.000Z | 2020-12-05T21:36:30.000Z | _RocketHideoutJessieJamesText1::
text "Not another step,"
line "brat!@@"
_RocketHideoutJessieJamesText2::
text "How dare you"
line "humiliate us at"
cont "MT.MOON!"
para "It's payback time,"
line "you brat!"
done
_RocketHideoutJessieJamesText3::
text "Such"
line "a dreadful twerp!"
prompt
_RocketHideoutJessieJamesText4::
text "Looks like TEAM"
line "ROCKET's blasting"
cont "off again!@@"
_RocketHideout4Text_4557a::
text "So! I must say, I"
line "am impressed you"
cont "got here!"
done
_RocketHideout4Text_4557f::
text "WHAT!"
line "This cannot be!"
prompt
_RocketHideout4Text_45584::
text "I see that you"
line "raise #MON"
cont "with utmost care."
para "A child like you"
line "would never"
cont "understand what I"
cont "hope to achieve."
para "I shall step"
line "aside this time!"
para "I hope we meet"
line "again..."
done
_RocketHideout4BattleText4::
text "The elevator"
line "doesn't work? Who"
cont "has the LIFT KEY?"
done
_RocketHideout4EndBattleText4::
text "No!"
prompt
_RocketHideout4Text_455ec::
text "Oh no! I dropped"
line "the LIFT KEY!"
done
| 16.969697 | 32 | 0.716964 |
447f88ea85b1ddb6b09ca822ad996c97bc3668bd | 2,163 | asm | Assembly | code/lcdtest.asm | Gonzo-XIII/Z80_LCD-Display | 1b407334adc6b46269b0467fbdc63d96a85628b4 | [
"MIT"
] | null | null | null | code/lcdtest.asm | Gonzo-XIII/Z80_LCD-Display | 1b407334adc6b46269b0467fbdc63d96a85628b4 | [
"MIT"
] | null | null | null | code/lcdtest.asm | Gonzo-XIII/Z80_LCD-Display | 1b407334adc6b46269b0467fbdc63d96a85628b4 | [
"MIT"
] | 1 | 2021-06-16T11:42:19.000Z | 2021-06-16T11:42:19.000Z | ;********************
;Some simple test code to write commands and data to a
;character LCD display
;
;Tested with the RASM assembler
;********************
org $8000
lcd_comm_port equ $20 ;Port addresses. Change as needed.
lcd_data_port equ $21
lcd_set_8bit equ $3f ;8-bit port, 2-line display
lcd_cursor_on equ $0f ;Turn cursors on
lcd_cls equ $01 ;Clear the display
;Initialisation
ld a,lcd_set_8bit
call lcd_send_command
ld a,lcd_cursor_on
call lcd_send_command
ld a,lcd_cls
call lcd_send_command
;Send a single character
ld a,'>'
call lcd_send_data
;Send a string
ld hl,hello_world
call lcd_send_asciiz
ret
hello_world:
db "Hello, world!",0
;******************
;Send a command byte to the LCD
;Entry: A= command byte
;Exit: All preserved
;******************
lcd_send_command:
push bc ;Preserve
ld c,lcd_comm_port ;Command port
lcd_command_wait_loop: ;Busy wait
in b,(c) ;Read status byte
sll b ;Shift busy bit into carry flag
jr c,lcd_command_wait_loop ;While busy
out (c),a ;Send command
pop bc ;Restore
ret
;******************
;Send a data byte to the LCD
;Entry: A= data byte
;Exit: All preserved
;******************
lcd_send_data:
push bc ;Preserve
ld c,lcd_comm_port ;Command port
lcd_data_wait_loop: ;Busy wait
in b,(c) ;Read status byte
sll b ;Shift busy bit into carry flag
jr c,lcd_data_wait_loop ;While busy
ld c,lcd_data_port ;Data port
out (c),a ;Send data
pop bc ;Restore
ret
;******************
;Send an asciiz string to the LCD
;Entry: HL=address of string
;Exit: HL=address of ending zero of the string. All others preserved
;******************
lcd_send_asciiz:
push af
push bc ;Preserve
lcd_asciiz_char_loop
ld c,lcd_comm_port ;Command port
lcd_asciiz_wait_loop: ;Busy wait
in a,(c) ;Read status byte
rlca ;Shift busy bit into carry flag
jr c,lcd_asciiz_wait_loop ;While busy
ld a,(hl) ;Get character
and a ;Is it zero?
jr z,lcd_asciiz_done ;If so, we're done
ld c,lcd_data_port ;Data port
out (c),a ;Send data
inc hl ;Next char
jr lcd_asciiz_char_loop
lcd_asciiz_done:
pop bc ;Restore
pop af
ret | 20.6 | 68 | 0.670828 |
17d29da2acfe0c4c529881d3bdfba27af3d510e4 | 4,255 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_784.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_784.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_784.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %rbx
push %rdx
lea addresses_UC_ht+0x10e83, %rbx
nop
sub %r14, %r14
mov (%rbx), %dx
nop
nop
nop
and %r10, %r10
pop %rdx
pop %rbx
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r15
push %rdi
push %rdx
push %rsi
// Load
lea addresses_WC+0xd503, %r15
inc %rdi
mov (%r15), %r10
and $48495, %rdx
// Faulty Load
lea addresses_PSE+0x11683, %rdx
nop
nop
nop
inc %r11
vmovups (%rdx), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %rsi
lea oracles, %rdi
and $0xff, %rsi
shlq $12, %rsi
mov (%rdi,%rsi,1), %rsi
pop %rsi
pop %rdx
pop %rdi
pop %r15
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 11}}
{'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
*/
| 61.666667 | 2,999 | 0.660165 |
48cf05b5711901878e3e8e3c98599e4dbb8ce30b | 207 | asm | Assembly | oeis/018/A018366.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/018/A018366.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/018/A018366.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A018366: Divisors of 272.
; Submitted by Jamie Morken(s3)
; 1,2,4,8,16,17,34,68,136,272
add $0,1
lpb $0
mov $2,$0
trn $0,5
div $1,2
seq $2,5010 ; a(n) = 9*2^n.
add $1,$2
lpe
div $1,18
mov $0,$1
| 13.8 | 31 | 0.570048 |
bfa89c6ba27f98d7dcfd97eea68fb366c8bb8b45 | 1,002 | asm | Assembly | programs/oeis/016/A016768.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/016/A016768.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/016/A016768.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A016768: (3*n)^4.
; 0,81,1296,6561,20736,50625,104976,194481,331776,531441,810000,1185921,1679616,2313441,3111696,4100625,5308416,6765201,8503056,10556001,12960000,15752961,18974736,22667121,26873856,31640625,37015056,43046721,49787136,57289761,65610000,74805201,84934656,96059601,108243216,121550625,136048896,151807041,168896016,187388721,207360000,228886641,252047376,276922881,303595776,332150625,362673936,395254161,429981696,466948881,506250000,547981281,592240896,639128961,688747536,741200625,796594176,855036081,916636176,981506241,1049760000,1121513121,1196883216,1275989841,1358954496,1445900625,1536953616,1632240801,1731891456,1836036801,1944810000,2058346161,2176782336,2300257521,2428912656,2562890625,2702336256,2847396321,2998219536,3154956561,3317760000,3486784401,3662186256,3844124001,4032758016,4228250625,4430766096,4640470641,4857532416,5082121521,5314410000,5554571841,5802782976,6059221281,6324066576,6597500625,6879707136,7170871761,7471182096,7780827681
mul $0,3
pow $0,4
| 167 | 962 | 0.879242 |
688e98c8cff1c288e9d2acbcc2cb3d4a4ad8b9af | 360 | asm | Assembly | software/profi/net-tools/src/pqdos/browser/dos/console.asm | andykarpov/karabas-pro | 11d897e51a7a66fddcdfb97fc7b785ca535d48dd | [
"MIT"
] | 26 | 2020-07-25T15:00:32.000Z | 2022-03-22T19:30:04.000Z | software/profi/net-tools/src/pqdos/browser/dos/console.asm | zxrepo/andykarpov.karabas-pro | ab84aa2c95c206b2384d99054eb23cbe6aeec56b | [
"MIT"
] | 42 | 2020-07-29T14:29:18.000Z | 2022-03-22T11:34:28.000Z | software/profi/net-tools/src/pqdos/browser/dos/console.asm | zxrepo/andykarpov.karabas-pro | ab84aa2c95c206b2384d99054eb23cbe6aeec56b | [
"MIT"
] | 7 | 2020-09-07T14:21:31.000Z | 2022-01-24T17:18:56.000Z | module Console
KEY_UP = #19
KEY_DN = #1A
KEY_LT = #8
KEY_RT = #18
newLine:
ld a, CR
call putC
ld a, LF
putC:
ld e, a
ld c, 2
jp BDOS
getC:
peekC:
ld c, 6, e, #ff
jp BDOS
putStringZ:
ld a, (hl)
and a
ret z
push hl
call putC
pop hl
inc hl
jr putStringZ
waitForKeyUp:
ret
endmodule | 10.909091 | 19 | 0.533333 |
f995df997d35a653ae9e179def5b5e9ea1f07462 | 227 | asm | Assembly | programs/oeis/202/A202169.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/202/A202169.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/202/A202169.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A202169: Size of maximal independent set in graph S_3(n).
; 1,3,4,6,7,10,12,15,19,22
lpb $0
mov $2,$0
seq $2,183871 ; a(n) = n + ceiling( (1/5)*n^2 ). Complement of A183870.
sub $2,$0
trn $0,9
lpe
mov $0,$2
add $0,1
| 18.916667 | 73 | 0.594714 |
7b16e3d7a7892314232ce9b730cc89039ecf8703 | 1,880 | asm | Assembly | programs/oeis/207/A207449.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/207/A207449.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/207/A207449.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A207449: Number of n X 4 0..1 arrays avoiding 0 0 0 and 0 0 1 horizontally and 0 0 1 and 1 0 1 vertically.
; 10,100,330,760,1450,2460,3850,5680,8010,10900,14410,18600,23530,29260,35850,43360,51850,61380,72010,83800,96810,111100,126730,143760,162250,182260,203850,227080,252010,278700,307210,337600,369930,404260,440650,479160,519850,562780,608010,655600,705610,758100,813130,870760,931050,994060,1059850,1128480,1200010,1274500,1352010,1432600,1516330,1603260,1693450,1786960,1883850,1984180,2088010,2195400,2306410,2421100,2539530,2661760,2787850,2917860,3051850,3189880,3332010,3478300,3628810,3783600,3942730,4106260,4274250,4446760,4623850,4805580,4992010,5183200,5379210,5580100,5785930,5996760,6212650,6433660,6659850,6891280,7128010,7370100,7617610,7870600,8129130,8393260,8663050,8938560,9219850,9506980,9800010,10099000,10404010,10715100,11032330,11355760,11685450,12021460,12363850,12712680,13068010,13429900,13798410,14173600,14555530,14944260,15339850,15742360,16151850,16568380,16992010,17422800,17860810,18306100,18758730,19218760,19686250,20161260,20643850,21134080,21632010,22137700,22651210,23172600,23701930,24239260,24784650,25338160,25899850,26469780,27048010,27634600,28229610,28833100,29445130,30065760,30695050,31333060,31979850,32635480,33300010,33973500,34656010,35347600,36048330,36758260,37477450,38205960,38943850,39691180,40448010,41214400,41990410,42776100,43571530,44376760,45191850,46016860,46851850,47696880,48552010,49417300,50292810,51178600,52074730,52981260,53898250,54825760,55763850,56712580,57672010,58642200,59623210,60615100,61617930,62631760,63656650,64692660,65739850,66798280,67868010,68949100,70041610,71145600,72261130,73388260,74527050,75677560,76839850,78013980,79200010,80398000,81608010,82830100,84064330,85310760,86569450,87840460,89123850,90419680,91728010,93048900
mov $1,$0
add $1,2
pow $1,2
mul $1,$0
mul $1,10
add $1,10
| 188 | 1,711 | 0.855851 |
75ada7e51047849d8137568af278000fa985f5bb | 4,083 | asm | Assembly | 45/runtime/rt/rtllinit.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | 45/runtime/rt/rtllinit.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | 45/runtime/rt/rtllinit.asm | minblock/msdos | 479ffd237d9bb7cc83cb06361db2c4ef42dfbac0 | [
"Apache-2.0"
] | null | null | null | TITLE RTLLINIT - Low Level Core initialization module
PAGE 56,132
;***
;RTLLINIT.ASM - Low Level core initialization module
;
; Copyright <C> 1986, Microsoft Corporation
;
;Purpose:
; This module contains low level initialization support for the
; BASIC 3.0 runtime. This module will always be present in a user's
; program.
;
;******************************************************************************
INCLUDE switch.inc
INCLUDE rmacros.inc
;
; Code Segments
;
USESEG <RT_TEXT> ;runtime core
;
; Data Segments
;
useSeg _DATA
useSeg _BSS ;runtime data (uninitialized)
INCLUDE seg.inc
INCLUDE idmac.inc
SUBTTL Runtime data definitions for Low level BASIC Runtime Core
PAGE
sBegin _DATA
sEnd _DATA
sBegin _BSS
;
; Global data
;
;***
;b$RcoFlg - Flag to indicate if Ronco keyboard is present
;OEM-interface routine (variable)
;
;Purpose:
; This variable is a flag used to indicate if a Ronco (101 key or
; extended) keyboard is attached to the system. This keyboard has
; to be handled specially in the runtime code because of the extra
; function keys.
;
;Allocation:
; b$RcoFlg is a BYTE value declared in the _BSS segment by
; the OEM.
;
;Values:
; 0 - Normal keyboard present
; 10H - Extended (Ronco) keyboard present
;
;Initially Set:
; b$RcoFlg will be initialized by the OEM-Dependent code during
; the call to B$RTLLINI or B$GWINI.
;
;Modified By:
; Once set, this value is never changed.
;
;Used By:
; OEM-Dependent code and any code dealing with the function keys.
;****
staticW b$llequipflags,? ; hardware equipment flags.
staticB b$llmachineid,? ; machine id. PC,XT,AT,JR,etc.
globalB b$RcoFlg,? ; NZ if ronco present
sEnd _BSS
assumes CS,RT_TEXT
sBegin RT_TEXT
externNP B$SEGINI
SUBTTL Runtime Low Level Core Initialization
PAGE
;***
;B$RTLLINI - OEM-Dependent runtime initialization.
;OEM-interface routine
;
;Purpose:
; OEM-Dependent initialization for all of the BASIC runtime.
;
; There are two different OEM-Dependent initialization routines
; B$RTLLINI and B$GWINI. In terms of functionality, there is no
; difference between the two routines. B$GWINI is from an earlier
; concept of the organization of the runtime while B$RTLLINI is from
; a newer, more structured approach to the runtime. Eventually,
; we hope to be able to distribute the code currently in B$GWINI
; but until that time there are two initialization routines.
;
; The following differences exist between the two routines:
;
; B$RTLLINI B$GWINI
; Called before B$GWINI called after B$RTLLINI
;
; Currently, this routine only sets b$RcoFlg and then calls
; B$SEGINI.
;
;Entry:
; None.
;
;Exit:
; AX != 0 if initialization failed.
;
;Uses:
; Per Convention
;
;Exceptions:
; None.
;******************************************************************************
;
; Get Machine ID.
; Get keyboard type.
; Save equipment flag.
;
;#**
cProc B$RTLLINI,<PUBLIC,NEAR>,<ES>
cBegin
;
; Get the machine ID and save it in b$llmachineid.
; The machine ID is located at 0FFFF:0E and are mapped as
; follows:
; PC 0FFH
; XT 0FEH
; JR 0FDH
; AT 0FCH
;
MOV BX,0FFFFH ;segment 0FFFFH
MOV ES,BX ;address with ES
MOV AL,ES:[000EH] ;get machine ID
MOV b$llmachineid,AL ;save machine ID
;
; Check whether the Ronco is presented. Ronco may be installed on
; XT or AT only. If presented, bit 4 at 0000:496H (actually 40:96H)
; is on.
XOR AX,AX ;segment 0000H
MOV ES,AX ;address with ES
CMP b$llmachineid,0FCH ; AT or newer model ?
JBE ChkRco ; Brif yes
CMP b$llmachineid,0FEH ; XT is another possibility
JNZ KybChkEnd ; Brif not
ChkRco:
MOV AL,ES:[496H] ; get KB_FLAG_3 in BIOS data seg
AND AL,10H ; mask the other bits
MOV [b$RcoFlg],AL ; save the result (either 0 or 10H)
; Save the equipment flags in b$llequipflags.
; The equipment flags are located at 0000:410H.
;
KybChkEnd:
MOV AX,ES:[410H] ;get equipment flags.
MOV b$llequipflags,AX ;save equipment flags.
cCall B$SEGINI
XOR AX,AX ;return 0 => init OK, no errors
cEnd
SUBTTL D5OPEN - DOS 5 OPEN helper
PAGE
sEnd RT_TEXT
END
| 23.198864 | 79 | 0.693363 |
6fa718e9e4b54538e44d8c21f287e51467ea6634 | 539 | asm | Assembly | programs/oeis/031/A031387.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/031/A031387.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/031/A031387.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A031387: a(n) = prime(6*n-3).
; 5,23,47,73,103,137,167,197,233,269,307,347,379,419,449,487,523,571,607,643,677,727,761,811,853,883,937,977,1019,1051,1093,1129,1187,1229,1279,1303,1367,1427,1453,1489,1543,1579,1613,1663,1709,1753,1801,1867,1901,1951,1999,2039,2087,2131,2179,2239,2281,2333,2371,2399,2447,2521,2557,2621,2671,2699,2731,2789,2833,2879,2927,2971,3037,3083,3163,3203,3253,3307,3343,3389,3457,3499,3539,3581,3623,3673,3719,3769,3823,3877,3919,3967,4019,4073,4127,4159,4229,4261,4327,4373
mul $0,6
seq $0,215848 ; Primes > 3.
| 89.833333 | 468 | 0.753247 |
17a5ef3dd281e2b2ee86ad444287fbf236d3e918 | 475 | asm | Assembly | oeis/349/A349862.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/349/A349862.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/349/A349862.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A349862: a(n) is the maximum value of binomial(n-2*k,k) with 0 <= k <= floor(n/3).
; Submitted by Jamie Morken(w1)
; 1,1,1,1,2,3,4,5,6,10,15,21,28,36,56,84,120,165,220,330,495,715,1001,1365,2002,3003,4368,6188,8568,12376,18564,27132,38760,54264,77520,116280,170544,245157,346104,490314,735471,1081575,1562275,2220075,3124550,4686825,6906900,10015005,14307150
pow $1,$0
lpb $0
sub $0,1
add $3,1
mov $2,$3
trn $2,$0
bin $2,$0
trn $2,$1
add $1,$2
lpe
mov $0,$1
| 29.6875 | 243 | 0.677895 |
2b9f4dfaaa65a768abe928f2d531fc3f23d5d0e6 | 4,191 | asm | Assembly | platforms/m3/prc_v12/debug/test1/test1.asm | lab11/M-ulator | 95b49c6194678c74accca4a20af71380efbcac5f | [
"Apache-2.0",
"MIT"
] | 19 | 2015-01-26T10:47:23.000Z | 2021-08-13T11:07:54.000Z | platforms/m3/prc_v12/debug/test1/test1.asm | lab11/M-ulator | 95b49c6194678c74accca4a20af71380efbcac5f | [
"Apache-2.0",
"MIT"
] | 14 | 2015-08-24T02:35:46.000Z | 2021-05-05T03:53:44.000Z | platforms/m3/prc_v12/debug/test1/test1.asm | lab11/M-ulator | 95b49c6194678c74accca4a20af71380efbcac5f | [
"Apache-2.0",
"MIT"
] | 9 | 2015-05-27T23:27:35.000Z | 2020-10-05T22:02:43.000Z |
test1/test1.elf: file format elf32-littlearm
Disassembly of section .text:
00000000 <hang-0x80>:
0: 00002000 .word 0x00002000
4: 00000091 .word 0x00000091
...
10: 00000080 .word 0x00000080
14: 00000080 .word 0x00000080
18: 00000080 .word 0x00000080
1c: 00000080 .word 0x00000080
20: 00000080 .word 0x00000080
24: 00000080 .word 0x00000080
28: 00000080 .word 0x00000080
2c: 00000000 .word 0x00000000
30: 00000080 .word 0x00000080
34: 00000080 .word 0x00000080
...
00000080 <hang>:
80: e7fe b.n 80 <hang>
...
00000090 <_start>:
90: f000 f802 bl 98 <main>
94: e7fc b.n 90 <_start>
Disassembly of section .text.startup.main:
00000098 <main>:
98: 4b21 ldr r3, [pc, #132] ; (120 <main+0x88>)
9a: 4a22 ldr r2, [pc, #136] ; (124 <main+0x8c>)
9c: b530 push {r4, r5, lr}
9e: 6013 str r3, [r2, #0]
a0: 4a21 ldr r2, [pc, #132] ; (128 <main+0x90>)
a2: 6013 str r3, [r2, #0]
a4: 4b21 ldr r3, [pc, #132] ; (12c <main+0x94>)
a6: 4a22 ldr r2, [pc, #136] ; (130 <main+0x98>)
a8: 6819 ldr r1, [r3, #0]
aa: 4291 cmp r1, r2
ac: d00e beq.n cc <main+0x34>
ae: 601a str r2, [r3, #0]
b0: 4b20 ldr r3, [pc, #128] ; (134 <main+0x9c>)
b2: 2200 movs r2, #0
b4: 601a str r2, [r3, #0]
b6: 4b20 ldr r3, [pc, #128] ; (138 <main+0xa0>)
b8: 22c8 movs r2, #200 ; 0xc8
ba: 0252 lsls r2, r2, #9
bc: 601a str r2, [r3, #0]
be: 2190 movs r1, #144 ; 0x90
c0: 4a1e ldr r2, [pc, #120] ; (13c <main+0xa4>)
c2: 0589 lsls r1, r1, #22
c4: 6011 str r1, [r2, #0]
c6: 22d0 movs r2, #208 ; 0xd0
c8: 0252 lsls r2, r2, #9
ca: 601a str r2, [r3, #0]
cc: 4a19 ldr r2, [pc, #100] ; (134 <main+0x9c>)
ce: 4b1c ldr r3, [pc, #112] ; (140 <main+0xa8>)
d0: 6811 ldr r1, [r2, #0]
d2: 4c1c ldr r4, [pc, #112] ; (144 <main+0xac>)
d4: 6019 str r1, [r3, #0]
d6: 4b1c ldr r3, [pc, #112] ; (148 <main+0xb0>)
d8: 481c ldr r0, [pc, #112] ; (14c <main+0xb4>)
da: 6023 str r3, [r4, #0]
dc: 2300 movs r3, #0
de: 6003 str r3, [r0, #0]
e0: 4d1b ldr r5, [pc, #108] ; (150 <main+0xb8>)
e2: 4b1c ldr r3, [pc, #112] ; (154 <main+0xbc>)
e4: 2123 movs r1, #35 ; 0x23
e6: 6019 str r1, [r3, #0]
e8: 6025 str r5, [r4, #0]
ea: 24c8 movs r4, #200 ; 0xc8
ec: 6004 str r4, [r0, #0]
ee: 6019 str r1, [r3, #0]
f0: 6813 ldr r3, [r2, #0]
f2: 3301 adds r3, #1
f4: 6013 str r3, [r2, #0]
f6: 4b18 ldr r3, [pc, #96] ; (158 <main+0xc0>)
f8: 46c0 nop ; (mov r8, r8)
fa: 3b01 subs r3, #1
fc: 2b00 cmp r3, #0
fe: d1fb bne.n f8 <main+0x60>
100: 4816 ldr r0, [pc, #88] ; (15c <main+0xc4>)
102: 4917 ldr r1, [pc, #92] ; (160 <main+0xc8>)
104: 6008 str r0, [r1, #0]
106: 4917 ldr r1, [pc, #92] ; (164 <main+0xcc>)
108: 2001 movs r0, #1
10a: 6008 str r0, [r1, #0]
10c: 6812 ldr r2, [r2, #0]
10e: 2a0a cmp r2, #10
110: d103 bne.n 11a <main+0x82>
112: 4a15 ldr r2, [pc, #84] ; (168 <main+0xd0>)
114: 4b15 ldr r3, [pc, #84] ; (16c <main+0xd4>)
116: 601a str r2, [r3, #0]
118: e7fe b.n 118 <main+0x80>
11a: 4a15 ldr r2, [pc, #84] ; (170 <main+0xd8>)
11c: 6013 str r3, [r2, #0]
11e: e7fe b.n 11e <main+0x86>
120: 00007fff .word 0x00007fff
124: e000e280 .word 0xe000e280
128: e000e100 .word 0xe000e100
12c: 00000174 .word 0x00000174
130: deadbeef .word 0xdeadbeef
134: 00000178 .word 0x00000178
138: a0000028 .word 0xa0000028
13c: a0003000 .word 0xa0003000
140: a0003ef0 .word 0xa0003ef0
144: a0002000 .word 0xa0002000
148: aa000032 .word 0xaa000032
14c: a0002004 .word 0xa0002004
150: ab000032 .word 0xab000032
154: a000200c .word 0xa000200c
158: 00002710 .word 0x00002710
15c: 0001800a .word 0x0001800a
160: a0000034 .word 0xa0000034
164: a0001300 .word 0xa0001300
168: 0ea7f00d .word 0x0ea7f00d
16c: a0003bb0 .word 0xa0003bb0
170: a0003010 .word 0xa0003010
| 34.073171 | 55 | 0.550704 |
27943ad5daa9ae2559fbed4c2889928edc369998 | 536 | asm | Assembly | programs/oeis/191/A191404.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/191/A191404.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/191/A191404.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A191404: A000201(n)+A000201(n+3).
; 4,7,11,13,17,20,23,27,29,33,37,39,43,46,49,53,55,59,62,65,69,71,75,79,81,85,88,91,95,97,101,105,107,111,114,117,121,123,127,130,133,137,139,143,147,149,153,156,159,163,165,169,172,175,179,181,185,189,191,195,198,201,205,207,211,215,217,221,224,227
mov $1,$0
mov $5,$0
lpb $0
lpb $1
mov $2,$0
add $0,3
seq $2,60145 ; a(n) = floor(n/tau) - floor(n/(1 + tau)).
mov $1,$2
add $1,1
lpe
mov $0,2
lpe
mov $4,$1
cmp $4,0
add $1,$4
mov $0,$1
add $0,3
mov $3,$5
mul $3,3
add $0,$3
| 22.333333 | 249 | 0.598881 |
9f18b007a89a4d45a1039e53e7cd262c491a8148 | 450 | asm | Assembly | writeonly/main.asm | TrevCan/unOctet-computer | 4c84967b56614f4af5399530fa1499f8df4b4258 | [
"MIT"
] | null | null | null | writeonly/main.asm | TrevCan/unOctet-computer | 4c84967b56614f4af5399530fa1499f8df4b4258 | [
"MIT"
] | null | null | null | writeonly/main.asm | TrevCan/unOctet-computer | 4c84967b56614f4af5399530fa1499f8df4b4258 | [
"MIT"
] | null | null | null | ; data address for PORT B IO (8 pins)
PORTA = $6001
; data address for PORT B IO (8 pins)
PORTB = $6000
; register addresses to set to either Input
; or Output
DDRA = $6003
DDRB = $6002
; literal 11111111 binary
; all outputs in IO W65C22
IOSETOUTS = $ff
.org $8000
reset:
nop
; set PORTB output pins
; to literal 0x50 ( 01010000 binary )
lda #%11100011
sta $5999
blink:
sta PORTB
jmp blink
.org $fffc
.word reset
.word $0000
| 11.842105 | 43 | 0.675556 |
c0d665f997bd47fca3e449a7bdc5d194f374d899 | 792 | asm | Assembly | DCS216 Operating System/ep3/string/stringC.asm | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | 1 | 2021-12-17T23:09:00.000Z | 2021-12-17T23:09:00.000Z | DCS216 Operating System/ep3/string/stringC.asm | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | null | null | null | DCS216 Operating System/ep3/string/stringC.asm | Lan-Jing/Courses | 540db9499b8725ca5b82a2c4e7a3da09f73c0efa | [
"MIT"
] | 1 | 2021-08-03T23:42:06.000Z | 2021-08-03T23:42:06.000Z | .file "string.c"
.intel_syntax noprefix
.text
.globl _countA
.def _countA; .scl 2; .type 32; .endef
_countA:
LFB0:
.cfi_startproc
push ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
mov ebp, esp
.cfi_def_cfa_register 5
sub esp, 8
mov DWORD PTR [ebp-4], 0
mov DWORD PTR [ebp-8], 0
jmp L2
L5:
mov edx, DWORD PTR [ebp-4]
mov eax, DWORD PTR [ebp+8]
add eax, edx
mov al, BYTE PTR [eax]
cmp al, 97
je L3
mov edx, DWORD PTR [ebp-4]
mov eax, DWORD PTR [ebp+8]
add eax, edx
mov al, BYTE PTR [eax]
cmp al, 65
jne L4
L3:
inc DWORD PTR [ebp-8]
L4:
inc DWORD PTR [ebp-4]
L2:
mov eax, DWORD PTR [ebp-4]
cmp eax, DWORD PTR [ebp+12]
jl L5
mov eax, DWORD PTR [ebp-8]
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE0:
.ident "GCC: (MinGW.org GCC-8.2.0-5) 8.2.0"
| 16.851064 | 44 | 0.659091 |
d1327a4b108e0405a886baa7d7af5e2b4ac0e5eb | 992 | asm | Assembly | src/include/defines.asm | rondnelson99/vcs-instrument | d5004bc1cd682a3cffcafc98cd6a16cc3071d708 | [
"MIT"
] | null | null | null | src/include/defines.asm | rondnelson99/vcs-instrument | d5004bc1cd682a3cffcafc98cd6a16cc3071d708 | [
"MIT"
] | null | null | null | src/include/defines.asm | rondnelson99/vcs-instrument | d5004bc1cd682a3cffcafc98cd6a16cc3071d708 | [
"MIT"
] | null | null | null | .MEMORYMAP
DEFAULTSLOT 0
SLOT 0 START $F000 SIZE $1000 NAME "ROM"
SLOT 1 START $80 SIZE $80 NAME "RAM"
.ENDME
.ROMBANKSIZE $1000
.ROMBANKS 1
.include "vcs.inc"
.include "macro.inc"
.def Scratchpad $80
.MACRO incv2bpp ARGS FILE WIDTH ;include a 2bpp row-major image, but convert to column-major
.fopen FILE HANDLE
.fsize HANDLE SIZE
.REPT WIDTH/8 INDEX X
.REPT SIZE/(WIDTH/8) INDEX Y
.fseek HANDLE (WIDTH/8*Y)+X START
.ftell HANDLE LOC
.printv LOC
.print "\n"
.fread HANDLE DATA
.db DATA
.ENDR
.ENDR
.ENDM
.MACRO incvr2bpp ARGS FILE WIDTH ;same as above but also store each character backwards
.incbin FILE READ 0 FSIZE SIZE
.redef HEIGHT SIZE/(WIDTH/8)
.REPT WIDTH/8 INDEX X
.REPT HEIGHT INDEX Y
.incbin FILE SKIP SIZE-(WIDTH/8*(Y+1))+X READ 1
.ENDR
.ENDR
.ENDM
.MACRO bitReverse ;reverse the order of bits in the byte
.redef _out 0
.rept 8 INDEX i
.redef _out (_out>>1)|((\1<<i)&$80)
.endr
.ENDM
.MACRO lax_ind_y
.db $b3
.db \1
.endm
| 18.716981 | 92 | 0.688508 |
2ac436fdf8303ef7fc4189434fb0da76abc5deb5 | 66 | asm | Assembly | test/ascii/div.asm | Gibstick/mips241 | 5121b5e1c7d25c0b834b2da31f29f37e05e2dde2 | [
"MIT"
] | 2 | 2016-07-08T22:03:36.000Z | 2018-03-09T03:36:31.000Z | test/ascii/div.asm | Gibstick/mips241 | 5121b5e1c7d25c0b834b2da31f29f37e05e2dde2 | [
"MIT"
] | 4 | 2016-06-25T05:14:43.000Z | 2016-07-16T23:53:07.000Z | test/ascii/div.asm | Gibstick/mips241 | 5121b5e1c7d25c0b834b2da31f29f37e05e2dde2 | [
"MIT"
] | 2 | 2020-05-15T17:35:36.000Z | 2021-09-30T21:37:41.000Z | lis $5
.word 55
lis $4
.word 5
div $5, $4
mflo $1
mfhi $2
jr $31
| 6.6 | 10 | 0.575758 |
d058f34ccdd722b6d85a51a500d7526488b5c7f4 | 580 | asm | Assembly | oeis/054/A054602.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/054/A054602.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/054/A054602.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A054602: a(n) = Sum_{d|3} phi(d)*n^(3/d).
; 0,3,12,33,72,135,228,357,528,747,1020,1353,1752,2223,2772,3405,4128,4947,5868,6897,8040,9303,10692,12213,13872,15675,17628,19737,22008,24447,27060,29853,32832,36003,39372,42945,46728,50727,54948,59397,64080,69003,74172,79593,85272,91215,97428,103917,110688,117747,125100,132753,140712,148983,157572,166485,175728,185307,195228,205497,216120,227103,238452,250173,262272,274755,287628,300897,314568,328647,343140,358053,373392,389163,405372,422025,439128,456687,474708,493197,512160,531603,551532
mov $1,$0
pow $1,2
add $1,2
mul $0,$1
| 72.5 | 496 | 0.782759 |
a83677487a2326549ce5d0b0b44a30fdfa4dcc0e | 79,645 | asm | Assembly | secd/secd.asm | bwkimmel/secd | 5522e9dfdac4e4835cb0d7e9ac94ff88a9121977 | [
"MIT"
] | 13 | 2015-04-09T22:20:44.000Z | 2021-12-30T10:41:21.000Z | secd/secd.asm | bwkimmel/secd | 5522e9dfdac4e4835cb0d7e9ac94ff88a9121977 | [
"MIT"
] | null | null | null | secd/secd.asm | bwkimmel/secd | 5522e9dfdac4e4835cb0d7e9ac94ff88a9121977 | [
"MIT"
] | 4 | 2016-11-16T14:22:14.000Z | 2022-03-13T12:58:56.000Z | ; ==============================================================================
; SECD machine implementation
;
; This file implements the instruction cycle for an SECD (Stack, Environment,
; Code, Dump) machine. For details, see:
;
; Peter Henderson, "Functional Programming: Application and Implementation",
; Prentice Hall, 1980.
; ==============================================================================
;
%include 'secd.inc'
%include 'system.inc'
; ==============================================================================
; Constants
;
%define MIN_FREE 5 ; Minimum number of free cells at top of cycle
%define DEDUP_THRESHOLD 1000 ; Attempt dedup if GC yields fewer than this
; many free cells.
; ==============================================================================
; Flags
;
%define SECD_MARKED 0x80 ; GC-bit for cell array
%define HEAP_MARK 0x01 ; GC-bit for heap items
%define HEAP_FORWARD 0x02 ; Indicates that heap item has been moved
; ==============================================================================
; Reserved registers
;
%define S ebx ; (S)tack
%define C esi ; (C)ontrol
%define ff edi ; Head of the free list (ff)
; ==============================================================================
; Debugging
;
%ifdef DEBUG
; ------------------------------------------------------------------------------
; Displays the error for a bad cell reference and exits.
; ------------------------------------------------------------------------------
_bad_cell_ref:
sys.write stderr, err_bc, err_bc_len
sys.exit 1
.halt:
jmp .halt
; ------------------------------------------------------------------------------
; Checks that the specified value is a valid cell reference.
; ------------------------------------------------------------------------------
_check_cell_ref:
enter 0, 0
cmp dword [ebp + 8], 0xffff
ja _bad_cell_ref
leave
ret
%macro check_cell_ref 1
push dword %1
call _check_cell_ref
add esp, 4
%endmacro
%else ; !DEBUG
%macro check_cell_ref 1
; nothing to do
%endmacro
%endif
; ==============================================================================
; Instruction macros
;
; ------------------------------------------------------------------------------
; Save reserved registers for an external function call
; USAGE: pushsecd
; ------------------------------------------------------------------------------
%macro pushsecd 0
push S
push C
push ff
%endmacro
; ------------------------------------------------------------------------------
; Restore reserved registers after an external function call
; USAGE: popsecd
; ------------------------------------------------------------------------------
%macro popsecd 0
pop ff
pop C
pop S
%endmacro
; ------------------------------------------------------------------------------
; Extracts the first element of a cons cell
; USAGE: car <dest>, <src>
; <dest> = the location to put the result into
; <src> = the cons cell from which to exract the first element
; ------------------------------------------------------------------------------
%macro car 2
check_cell_ref %2
mov %1, [dword values + %2 * 4]
shr %1, 16
%endmacro
; ------------------------------------------------------------------------------
; Extracts the second element of a cons cell
; USAGE: cdr <dest>, <src>
; <dest> = the location to put the result into
; <src> = the cons cell from which to extract the second element
; ------------------------------------------------------------------------------
%macro cdr 2
check_cell_ref %2
mov %1, [dword values + %2 * 4]
and %1, 0xffff
%endmacro
; ------------------------------------------------------------------------------
; Extracts both elements of a cons cell, replacing the source argument with its
; second element.
; USAGE: carcdr <car>, <cdr/src>
; <car> = the location to put the first element of the cons cell into
; <cdr/src> = the cons cell from which to extract both elements, and the
; location in which to put the second element
; ------------------------------------------------------------------------------
%macro carcdr 2
check_cell_ref %2
mov %2, [dword values + %2 * 4]
mov %1, %2
shr %1, 16
and %2, 0xffff
%endmacro
; ------------------------------------------------------------------------------
; Extracts both elements of a cons cell, replacing the source argument with its
; first element.
; USAGE: cdrcar <cdr>, <car/src>
; <cdr> = the location to put the second element of the cons cell into
; <car/src> = the cons cell from which to extract both elements, and the
; location in which to put the first element
; ------------------------------------------------------------------------------
%macro cdrcar 2
check_cell_ref %2
mov %2, [dword values + %2 * 4]
mov %1, %2
and %1, 0xffff
shr %2, 16
%endmacro
; ------------------------------------------------------------------------------
; Dereferences a cell index
; USAGE: ivalue <dest>
; <dest> = the index into the cell array to dereference, and the location into
; which to put the value at that location
; ------------------------------------------------------------------------------
%macro ivalue 1
check_cell_ref %1
mov %1, [dword values + %1 * 4]
%endmacro
; ------------------------------------------------------------------------------
; Allocates a cell for a new value
; USAGE: alloc <dest>, <value>, <flags>
; <dest> = the location in which to put the index of the newly allocated cell
; <value> = the value to place in the new cell
; <flags> = the flags indicating the type of the new cell
; ------------------------------------------------------------------------------
%macro alloc 3
mov dword [values + ff * 4], %2
mov byte [flags + ff], %3 ; set flags for new cell
mov %1, ff
inc ff
%endmacro
; ------------------------------------------------------------------------------
; Allocates a new cons cell
; USAGE: cons <car/dest>, <cdr>
; <car/dest> = the location in which to put the index of the new cons cell, and
; the first element of the new cell
; <cdr> = the second element of the new cell
; ------------------------------------------------------------------------------
%macro cons 2
check_cell_ref %1
%ifidni %1,%2
%else
check_cell_ref %2
%endif
shl %1, 16
or %1, %2
alloc %1, %1, SECD_CONS
%endmacro
; ------------------------------------------------------------------------------
; Allocates a new number cell
; USAGE: number <dest>, <value>
; <dest> = the location in which to put the index of the new cell
; <value> = the numeric value to place in the new cell
; ------------------------------------------------------------------------------
%macro number 2
alloc %1, %2, SECD_NUMBER
%endmacro
; ------------------------------------------------------------------------------
; Allocates a new symbolic cell
; USAGE: symbol <dest>, <value>
; <dest> = the location in which to put the index of the new cell
; <value> = the address of the symbol in the string store
; ------------------------------------------------------------------------------
%macro symbol 2
alloc %1, %2, SECD_SYMBOL
%endmacro
; ------------------------------------------------------------------------------
; Tests if the indicate cell is a number cell. If it is, ZF will be clear,
; otherwise ZF will be set.
; USAGE: isnumber <cell>
; <cell> = the cell to test
; ------------------------------------------------------------------------------
%macro isnumber 1
check_cell_ref %1
test byte [flags + %1], 0x02
%endmacro
; ------------------------------------------------------------------------------
; Checks if the arguments are suitable for arithmetic operations. If they are
; not, control will jump to "_arith_nonnum", which will push NIL onto the stack
; and return control to the top of the instruction cycle.
; USAGE: check_arith_args <arg1>, <arg2>
; <arg1> = the first argument
; <arg2> = the second argument
; ------------------------------------------------------------------------------
%macro check_arith_args 2
isnumber %1
jz _arith_nonnum
isnumber %2
jz _arith_nonnum
%endmacro
; ==============================================================================
; Builtin strings
;
segment .data
magic db "SECD", 0, 0
magic_len equ $ - magic
tstr db "T"
tstr_len equ $ - tstr
fstr db "F"
fstr_len equ $ - fstr
nilstr db "NIL"
nilstr_len equ $ - nilstr
err_ii db "Illegal instruction", 10
err_ii_len equ $ - err_ii
err_mem db "Memory error", 10
err_mem_len equ $ - err_mem
err_hf db "Out of heap space", 10
err_hf_len equ $ - err_hf
err_car db "Attempt to CAR an atom", 10
err_car_len equ $ - err_car
err_cdr db "Attempt to CDR an atom", 10
err_cdr_len equ $ - err_cdr
err_oob db "Index out of bounds", 10
err_oob_len equ $ - err_oob
%ifdef DEBUG
err_ff db "Free cells in use", 10
err_ff_len equ $ - err_ff
err_bc db "Bad cell reference", 10
err_bc_len equ $ - err_bc
%endif
sep db 10, "-----------------", 10
sep_len equ $ - sep
maj_sep db 10, "==============================================", 10
maj_sep_len equ $ - maj_sep
gcheap db 0
dump_file db "dump.bin", 0
err_dmp db "Can't open dump file", 10
err_dmp_len equ $ - err_dmp
; ==============================================================================
; Storage for cells
;
; Each cell consists of a 32-bit value and an 8-bit set of flags. The format of
; the cell is determined by the flags from the table below
;
; TYPE DATA FLAGS
; Cons [31.....CAR.....16|15.....CDR......0] x000 x000
; Symbol [31............POINTER.............0] x000 x001
; Number [31.............VALUE..............0] x000 x011
; ^---------- GC-bit
;
; For a cons cell, the CAR and the CDR are 16-bit indices into the cell array.
;
segment .bss
values resd 65536 ; Storage for cons cells and ivalues
values2 resd 65536
flags resb 65536 ; Storage for isatom and isnumber bits
; ==============================================================================
; SECD-machine registers stored in memory
;
E resd 1 ; (E)nvironment register
D resd 1 ; (D)ump register
true resd 1 ; true register
false resd 1 ; false register
Sreg resd 1
Creg resd 1
ffreg resd 1
mark resd 1
; ==============================================================================
; SECD-machine code
; ==============================================================================
segment .text
global _exec, _flags, _car, _cdr, _ivalue, _issymbol, _isnumber, \
_iscons, _cons, _svalue, _init, _number, _symbol
extern _store, _getchar, _putchar, _putexp, _flush, \
_heap_alloc, _heap_mark, _heap_sweep, _heap_forward, \
_heap_item_length
; ==============================================================================
; Exported functions
;
_dumpimage:
call _gc
push eax ; Save current SECD-machine state
push ecx
push edx
push S
push C
mov [Sreg], dword S
mov [Creg], dword C
mov [ffreg], dword ff
sys.open dump_file, O_CREAT|O_TRUNC|O_WRONLY, 0q644
cmp eax, 0
jge .endif
call _flush
sys.write stderr, err_dmp, err_dmp_len
sys.exit 1
.stop:
jmp .stop
.endif:
push eax
sys.write [esp], magic, magic_len
sys.write [esp], Sreg, 2
sys.write [esp], E, 2
sys.write [esp], Creg, 2
sys.write [esp], D, 2
sys.write [esp], ffreg, 2
mov eax, dword [ffreg]
shl eax, 2
sys.write [esp], values, eax
sys.write [esp], flags, dword [ffreg]
sys.close [esp]
add esp, 4
pop C ; Restore SECD-machine state
pop S
pop edx
pop ecx
pop eax
ret
; ------------------------------------------------------------------------------
; Prints the current state of the machine for diagnostic purposes
;
_dumpstate:
mov [Sreg], S
mov [Creg], C
mov [ffreg], ff
pushsecd
sys.write stdout, maj_sep, maj_sep_len
push dword [Sreg]
call _putexp
add esp, 4
call _flush
sys.write stdout, sep, sep_len
push dword [E]
call _putexp
add esp, 4
call _flush
sys.write stdout, sep, sep_len
push dword [Creg]
call _putexp
add esp, 4
call _flush
popsecd
ret
_car:
car eax, eax
ret
_cdr:
cdr eax, eax
ret
_ivalue:
ivalue eax
ret
_svalue:
ivalue eax
ret
_cons:
xchg ff, [ffreg]
cons eax, edx
xchg ff, [ffreg]
ret
_number:
xchg ff, [ffreg]
number eax, eax
xchg ff, [ffreg]
ret
_symbol:
xchg ff, [ffreg]
symbol eax, eax
xchg ff, [ffreg]
ret
_flags:
mov al, byte [flags + eax]
and eax, 0x000000ff
ret
_issymbol:
call _flags
and eax, SECD_TYPEMASK
cmp eax, SECD_SYMBOL
sete al
ret
_isnumber:
call _flags
and eax, SECD_TYPEMASK
cmp eax, SECD_NUMBER
sete al
ret
_iscons:
call _flags
and eax, SECD_TYPEMASK
cmp eax, SECD_CONS
sete al
ret
_init:
enter 0, 0
mov ff, 1
push dword tstr_len
push dword tstr
call _store
add esp, 8
symbol eax, eax
mov [true], eax
push dword fstr_len
push dword fstr
call _store
add esp, 8
symbol eax, eax
mov [false], eax
push dword nilstr_len
push dword nilstr
call _store
add esp, 8
mov byte [flags], SECD_SYMBOL
mov dword [values], eax
mov [ffreg], ff
; call _test_dedup
; sys.exit 1
leave
ret
_exec:
enter 0, 0
push ebx
push esi
push edi
mov ff, [ffreg]
mov C, [ebp + 8] ; C <-- fn
and C, 0xffff
mov S, [ebp + 12] ; S <-- args
and S, 0xffff
mov [E], dword 0
mov [D], dword 0
cons S, 0
;
; ---> to top of instruction cycle ...
; call _test_dedup
call _dumpimage
;call _dumpstate
; sys.exit 1
; ==============================================================================
; Top of SECD Instruction Cycle
;
_cycle:
cmp ff, 0x10000 - MIN_FREE
jbe .nogc
cmp ff, 0x10000
ja _memerror
call _gc
cmp ff, 0x10000 - MIN_FREE
ja _out_of_space
.nogc:
check_cell_ref dword S ; Check that all registers are valid
check_cell_ref dword [E] ; cell references
check_cell_ref dword C
check_cell_ref dword [D]
check_cell_ref dword ff
carcdr eax, C ; Pop next instruction from code list
ivalue eax ; Get its numeric value
cmp eax, dword numinstr ; Check that it is a valid opcode
jae _illegal
jmp [dword _instr + eax * 4] ; Jump to opcode handler
_illegal:
call _flush
sys.write stderr, err_ii, err_ii_len
sys.exit 1
.stop:
jmp .stop
_memerror:
call _flush
sys.write stderr, err_mem, err_mem_len
sys.exit 1
.stop:
jmp .stop
_out_of_space:
call _flush
sys.write stderr, err_hf, err_hf_len
sys.exit 1
.halt:
jmp .halt
; ==============================================================================
; SECD Instruction Set
;
; The first 21 instructions (LD - STOP) come directly from Henderson's book.
; The remainder are extensions.
;
; Summary (from Sec. 6.2 of Henderson (1980)):
; LD - Load (from environment)
; LDC - Load constant
; LDF - Load function
; AP - Apply function
; RTN - Return
; DUM - Create dummy environment
; RAP - Recursive apply
; SEL - Select subcontrol
; JOIN - Rejoin main control
; CAR - Take car of item on top of stack
; CDR - Take cdr of item on top of stack
; ATOM - Apply atom predicate to top stack item
; CONS - Form cons of top two stack items
; EQ - Apply eq predicate to top two stack items
; ADD - \
; SUB - |
; MUL - \_ Apply arithmetic operation to top two stack items
; DIV - /
; REM - |
; LEQ - /
; STOP - Stop
;
; Extensions:
; NOP - No operation
; SYM - Apply issymbol predicate to top stack item
; NUM - Apply isnumber predicate to top stack item
; GET - Push ASCII value of a character from stdin onto stack
; PUT - Pop ASCII value from stack and write it to stdout
; APR - Apply and return (for tail-call optimization)
; TSEL - Tail-select (for IF statement in tail position)
; MULX - Extended multiply (returns a pair representing 64-bit result)
; PEXP - Print expression on top of stack to stdout
; POP - Pop an item off of the stack
; LDE - Load expression
; AP0 - Apply parameterless function
; UPD - Return and update
; RCP - Apply isrecipe predicate to top stack item
; J - Landin's J-operator (cons program closure)
; APJ - Apply program closure
;
; The following are not yet fully implemented:
; CVEC - Create vector
; VSET - Set element of vector
; VREF - Get element of vector
; VLEN - Get length of vector
; VCPY - Bulk copy between vectors
; CBIN - Create binary blob
; BSET - Set byte in binary blob
; BREF - Get byte in binary blob
; BLEN - Get size of binary blob
; BCPY - Bulk copy between binary blobs
; BS16 - Set 16-bit value in binary blob
; BR16 - Get 16-bit value in binary blob
; BS32 - Set 32-bit value in binary blob
; BR32 - Get 32-bit value in binary blob
;
_instr \
dd _instr_NOP , \
_instr_LD , _instr_LDC , _instr_LDF , _instr_AP , _instr_RTN , \
_instr_DUM , _instr_RAP , _instr_SEL , _instr_JOIN, _instr_CAR , \
_instr_CDR , _instr_ATOM, _instr_CONS, _instr_EQ , _instr_ADD , \
_instr_SUB , _instr_MUL , _instr_DIV , _instr_REM , _instr_LEQ , \
_instr_STOP, _instr_SYM , _instr_NUM , _instr_GET , _instr_PUT , \
_instr_APR , _instr_TSEL, _instr_MULX, _instr_PEXP, _instr_POP, \
_instr_CVEC, _instr_VSET, _instr_VREF, _instr_VLEN, _instr_VCPY, \
_instr_CBIN, _instr_BSET, _instr_BREF, _instr_BLEN, _instr_BCPY, \
_instr_BS16, _instr_BR16, _instr_BS32, _instr_BR32, _instr_XXX , \
_instr_XXX , _instr_XXX , _instr_J , _instr_APJ , _instr_XXX , \
_instr_XXX , _instr_RCP , _instr_LDE , _instr_AP0 , _instr_UPD
numinstr equ ($ - _instr) >> 2
; ==============================================================================
; SECD Instruction Implementations
;
; ------------------------------------------------------------------------------
; XXX - Reserved (illegal opcode)
;
; TRANSITION: s e (NOP.c) d --> <undefined>
; ------------------------------------------------------------------------------
_instr_XXX:
jmp _illegal
; ------------------------------------------------------------------------------
; NOP - No operation
;
; TRANSITION: s e (NOP.c) d --> s e c d
; ------------------------------------------------------------------------------
_instr_NOP:
jmp _cycle
; ------------------------------------------------------------------------------
; POP - Pop item off of the stack
;
; TRANSITION: (x.s) e (POP.c) d --> s e c d
; ------------------------------------------------------------------------------
_instr_POP:
cdr S, S
jmp _cycle
; ------------------------------------------------------------------------------
; LD - Load (from environment)
;
; TRANSITION: s e (LD i.c) d --> (x.s) e c d
; where x = locate(i,e)
; ------------------------------------------------------------------------------
_instr_LD:
mov eax, [E] ; W <-- E
carcdr edx, C ; EDX <-- car(cdr(C)), C' <-- cdr(cdr(C))
test byte [flags + edx], SECD_ATOM
jnz .skiploop1
carcdr ecx, edx ; ECX <-- car(car(cdr(C))), EDX <-- cdr(car(cdr(C)))
ivalue ecx
jcxz .endloop1
.loop1: ; FOR i = 1 TO car(car(cdr(C)))
cdr eax, eax ; W <-- cdr(W)
loop .loop1
.endloop1:
car eax, eax ; W <-- car(W)
.skiploop1:
mov ecx, edx ; ECX <-- cdr(car(cdr(C)))
ivalue ecx
jcxz .endloop2
.loop2: ; FOR i = 1 TO cdr(car(cdr(C)))
cdr eax, eax ; W <-- cdr(W)
loop .loop2
.endloop2:
car eax, eax ; W <-- car(W)
cons eax, S
mov S, eax ; S <-- cons(W, S)
jmp _cycle
; ------------------------------------------------------------------------------
; LDC - Load constant
;
; TRANSITION: s e (LDC x.c) d --> (x.s) e c d
; ------------------------------------------------------------------------------
_instr_LDC:
carcdr eax, C
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; LDF - Load function
;
; TRANSITION: s e (LDF c'.c) d --> ((c'.e).s) e c d
; ------------------------------------------------------------------------------
_instr_LDF:
carcdr eax, C
cons eax, [E]
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; AP - Apply function
;
; TRANSITION: ((c'.e') v.s) e (AP.c) d --> NIL (v.e') c' (s e c.d)
; ------------------------------------------------------------------------------
_instr_AP:
cons C, [D]
mov eax, [E]
cons eax, C ; EAX <-- cons(E, cons(cdr(C), D))
carcdr edx, S ; EDX <-- car(S), S' <-- cdr(S)
carcdr C, edx ; C' <-- car(car(S)), EDX <-- cdr(car(S))
carcdr ecx, S ; ECX <-- car(cdr(S)), S' <-- cdr(cdr(S))
cons S, eax
mov [D], S ; D' <-- cons(cdr(cdr(S)), cons(e, cons(cdr(c), d)))
cons ecx, edx
mov [E], ecx ; E' <-- cons(car(cdr(S)), cdr(car(S)))
mov S, 0 ; S' <-- nil
jmp _cycle
; ------------------------------------------------------------------------------
; RTN - Return
;
; TRANSITION: (x) e' (RTN) (s e c.d) --> (x.s) e c d
; ------------------------------------------------------------------------------
_instr_RTN:
mov edx, [D]
carcdr eax, edx ; EAX <-- car(D), EDX <-- cdr(D)
car S, S
cons S, eax ; S' <-- cons(car(S), car(D))
carcdr eax, edx ; EAX <-- car(cdr(D)), EDX <-- cdr(cdr(D))
mov [E], eax ; E' <-- car(cdr(D))
carcdr C, edx ; C' <-- car(cdr(cdr(D))), EDX <-- cdr(cdr(cdr(D)))
mov [D], edx ; D' <-- cdr(cdr(cdr(D)))
jmp _cycle
; ------------------------------------------------------------------------------
; DUM - Create dummy environment
;
; TRANSITION: s e (DUM.c) d --> s (Ω.e) c d
; ------------------------------------------------------------------------------
_instr_DUM:
mov eax, 0
cons eax, [E]
mov [E], eax ; E' <-- cons(nil, E)
jmp _cycle
; ------------------------------------------------------------------------------
; RAP - Recursive apply
;
; TRANSITION: ((c'.e') v.s) (Ω.e) (RAP.c) d --> NIL rplaca(e',v) c' (s e c.d)
; ------------------------------------------------------------------------------
_instr_RAP:
cons C, [D] ; C' <-- cons(cdr(C), D)
mov edx, [E]
carcdr eax, edx ; EAX <-- car(E), EDX <-- cdr(E)
cons eax, C ; EAX <-- cons(cdr(E), cons(cdr(C), D))
carcdr edx, S ; EDX <-- car(S), S' <-- cdr(S)
carcdr C, edx ; C' <-- car(car(S)), EDX <-- cdr(car(S))
mov [E], edx ; E' <-- EDX = cdr(car(S))
carcdr ecx, S ; ECX <-- car(cdr(S)), S' <-- cdr(cdr(S))
cons S, eax ; D' <-- cons(cdr(cdr(S)),
mov [D], S ; cons(cdr(E), cons(cdr(C), D)))
; car(EDX) <-- ECX, S used as temporary register
mov S, [dword values + edx * 4]
and S, 0x0000ffff
shl ecx, 16
or S, ecx
mov [dword values + edx * 4], S
mov S, 0 ; S' <-- nil
cons eax, C ; EAX <-- cons(cdr(E)
jmp _cycle
; ------------------------------------------------------------------------------
; SEL - Select subcontrol
;
; TRANSITION: (x.s) e (SEL ct cf.c) d --> s e c' (c.d)
; where c' = ct if x = T, and c' = cf if x = F
; ------------------------------------------------------------------------------
_instr_SEL:
mov eax, C
carcdr edx, eax ; EDX <-- car(cdr(C))
carcdr ecx, eax ; ECX <-- car(cdr(cdr(C)), EAX <-- cdr(cdr(cdr(C)))
cons eax, [D]
mov [D], eax ; D' <-- cons(cdr(cdr(cdr(C))), D)
carcdr eax, S ; EAX <-- car(S), S' <-- cdr(S)
push S
mov S, [true]
ivalue S
ivalue eax
cmp eax, S
cmove C, edx ; IF car(S) == true THEN C' <-- car(cdr(C))
cmovne C, ecx ; IF car(S) != true THEN C' <-- car(cdr(cdr(C)))
pop S
jmp _cycle
; ------------------------------------------------------------------------------
; JOIN - Rejoin main control
;
; TRANSITION: s e (JOIN) (c.d) --> s e c d
; ------------------------------------------------------------------------------
_instr_JOIN:
mov eax, [D]
carcdr C, eax
mov [D], eax
jmp _cycle
; ------------------------------------------------------------------------------
; CAR - Take car of item on top of stack
;
; TRANSITION: ((a.b) s) e (CAR.c) d --> (a.s) e c d
; ------------------------------------------------------------------------------
_instr_CAR:
cdrcar eax, S
mov dl, byte [flags + S]
test dl, SECD_ATOM
jz .endif
call _flush
sys.write stderr, err_car, err_car_len
sys.exit 1
.halt:
jmp .halt
.endif:
car S, S
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; CDR - Take cdr of item on top of stack
;
; TRANSITION: ((a.b) s) e (CAR.c) d --> (b.s) e c d
; ------------------------------------------------------------------------------
_instr_CDR:
cdrcar eax, S
mov dl, byte [flags + S]
test dl, SECD_ATOM
jz .endif
call _flush
sys.write stderr, err_cdr, err_cdr_len
sys.exit 1
.halt:
jmp .halt
.endif:
cdr S, S
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; ATOM - Apply atom predicate to top stack item
;
; TRANSITION: (a.s) e (ATOM.c) d --> (t.s) e c d
; where t = T if a is an atom and t = F if a is not an atom.
; ------------------------------------------------------------------------------
_instr_ATOM:
carcdr eax, S ; EAX <-- car(S), S' <-- cdr(S)
mov dl, byte [flags + eax]
; DL <-- flags for EAX = car(S)
test dl, SECD_ATOM
cmovnz eax, [true] ; IF (isnumber OR issymbol) THEN EAX <-- true
cmovz eax, [false] ; IF (!isnumber AND !issymbol) THEN EAX <-- false
cons eax, S
mov S, eax ; S' <-- cons(true/false, cdr(S))
jmp _cycle
; ------------------------------------------------------------------------------
; CONS - Form cons of top two stack items
;
; TRANSITION: (a b.s) e (CONS.c) d --> ((a.b).s) e c d
; ------------------------------------------------------------------------------
_instr_CONS:
cdrcar edx, S
carcdr eax, edx ; EAX = car(cdr(S)), EDX = cdr(cdr(S)), S' = car(S)
cons S, eax
cons S, edx
jmp _cycle
; ------------------------------------------------------------------------------
; EQ - Apply eq predicate to top two stack items
;
; TRANSITION: (a b.s) e (EQ.c) d --> ([a=b].s) e c d
; ------------------------------------------------------------------------------
_instr_EQ:
carcdr eax, S ; EAX <-- car(S), S' <-- cdr(S)
mov dl, byte [flags + eax]
carcdr ecx, S ; ECX <-- car(cdr(S)), S' <-- cdr(cdr(S))
mov dh, byte [flags + ecx]
and dx, 0x0101
cmp dx, 0x0101
jne .else
ivalue eax
ivalue ecx
cmp eax, ecx
jne .else ; IF isatom(car(S)) AND isatom(car(cdr(S))) AND
; ivalue(car(S)) == ivalue(car(cdr(S))) THEN ...
mov eax, [true]
jmp .endif
.else:
mov eax, [false]
.endif:
cons eax, S
mov S, eax ; S' <-- cons(T/F, cdr(cdr(S)))
jmp _cycle
; ------------------------------------------------------------------------------
; Arithmetic operation on non-numeric operands - push NIL onto stack as the
; result of this operation and jump to the top of the instruction cycle
;
_arith_nonnum:
mov eax, 0
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; ADD - Add top two stack items
;
; TRANSITION: (a b.s) e (ADD.c) d --> ([a+b].s) e c d
; ------------------------------------------------------------------------------
_instr_ADD:
carcdr edx, S
carcdr eax, S ; EAX = car(cdr(S)), EDX = car(S), S' = cdr(cdr(S))
check_arith_args eax, edx
ivalue eax
ivalue edx
add eax, edx
number eax, eax
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; SUB - Subtract top two stack items
;
; TRANSITION: (a b.s) e (SUB.c) d --> ([a-b].s) e c d
; ------------------------------------------------------------------------------
_instr_SUB:
carcdr edx, S
carcdr eax, S ; EAX = car(cdr(S)), EDX = car(S), S' = cdr(cdr(S))
check_arith_args eax, edx
ivalue eax
ivalue edx
sub eax, edx
number eax, eax
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; MUL - Multiply top two stack items
;
; TRANSITION: (a b.s) e (MUL.c) d --> ([a*b].s) e c d
; ------------------------------------------------------------------------------
_instr_MUL:
carcdr edx, S
carcdr eax, S ; EAX = car(cdr(S)), EDX = car(S), S' = cdr(cdr(S))
check_arith_args eax, edx
ivalue eax
ivalue edx
imul edx
number eax, eax
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; MUL - Extended multiply top two stack items
;
; TRANSITION: (a b.s) e (MULX.c) d --> ((lo.hi).s) e c d
; where lo is the least significant 32-bits of a*b and hi is the
; most significant 32-bits of a*b
; ------------------------------------------------------------------------------
_instr_MULX:
carcdr edx, S
carcdr eax, S ; EAX = car(cdr(S)), EDX = car(S), S' = cdr(cdr(S))
check_arith_args eax, edx
ivalue eax
ivalue edx
imul edx
number eax, eax
number edx, edx
cons eax, edx
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; DIV - Divide top two stack items
;
; TRANSITION: (a b.s) e (DIV.c) d --> ([a/b].s) e c d
; ------------------------------------------------------------------------------
_instr_DIV:
carcdr ecx, S
carcdr eax, S ; EAX = car(cdr(S)), ECX = car(S), S' = cdr(cdr(S))
check_arith_args eax, ecx
ivalue eax
ivalue ecx
cdq ; Extend sign of EAX into all bits of EDX
idiv ecx ; Compute EAX <-- EDX:EAX / ECX
number eax, eax
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; REM - Compute the remainder resulting from the division of the top two stack
; items
;
; TRANSITION: (a b.s) e (REM.c) d --> ([a%b].s) e c d
; ------------------------------------------------------------------------------
_instr_REM:
carcdr ecx, S
carcdr eax, S ; EAX = car(cdr(S)), ECX = car(S), S' = cdr(cdr(S))
check_arith_args eax, ecx
ivalue eax
ivalue ecx
mov edx, eax
sar edx, 31 ; Extend sign of EAX into all bits of EDX
idiv ecx ; Compute EDX <-- EDX:EAX % ECX
number edx, edx
cons edx, S
mov S, edx
jmp _cycle
; ------------------------------------------------------------------------------
; LEQ - Test whether the top stack item is less than or equal to the second item
; on the stack
;
; TRANSITION: (a b.s) e (REM.c) d --> ([a≤b].s) e c d
; ------------------------------------------------------------------------------
_instr_LEQ:
carcdr edx, S
carcdr eax, S ; EAX = car(cdr(S)), EDX = car(S), S' = cdr(cdr(S))
mov cl, byte [flags + edx]
and cl, SECD_TYPEMASK
mov ch, byte [flags + eax]
and ch, SECD_TYPEMASK
cmp ch, cl ; First compare types
jne .result ; If they have different types, we have a result, else..
ivalue eax
ivalue edx
cmp eax, edx ; Compare their values
.result:
cmovle eax, [true]
cmovnle eax, [false]
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; STOP - Halt the machine
;
; TRANSITION: s e (STOP) d --> <undefined>
; ------------------------------------------------------------------------------
_instr_STOP:
car S, S
; call _dumpimage
mov eax, S
pop edi
pop esi
pop ebx
leave
ret
; ------------------------------------------------------------------------------
; SYM - Apply issymbol predicate to top stack item
;
; TRANSITION: (x.s) e (SYM.c) d --> (t.s) e c d
; where t = T if x is a symbol, and t = F if x is not a symbol
; ------------------------------------------------------------------------------
_instr_SYM:
carcdr eax, S ; EAX <-- car(S), S' <-- cdr(S)
mov dl, byte [flags + eax]
; DL <-- flags for EAX = car(S)
and dl, SECD_TYPEMASK
cmp dl, SECD_SYMBOL
cmove eax, [true] ; IF (issymbol) THEN EAX <-- true
cmovne eax, [false] ; IF (!issymbol) THEN EAX <-- false
cons eax, S
mov S, eax ; S' <-- cons(true/false, cdr(S))
jmp _cycle
; ------------------------------------------------------------------------------
; NUM - Apply isnumber predicate to top stack item
;
; TRANSITION: (x.s) e (NUM.c) d --> (t.s) e c d
; where t = T if x is a number, and t = F if x is not a number
; ------------------------------------------------------------------------------
_instr_NUM:
carcdr eax, S ; EAX <-- car(S), S' <-- cdr(S)
mov dl, byte [flags + eax]
; DL <-- flags for EAX = car(S)
and dl, SECD_TYPEMASK
cmp dl, SECD_NUMBER
cmove eax, [true] ; IF (isnumber) THEN EAX <-- true
cmovne eax, [false] ; IF (!isnumber) THEN EAX <-- false
cons eax, S
mov S, eax ; S' <-- cons(true/false, cdr(S))
jmp _cycle
; ------------------------------------------------------------------------------
; GET - Push ASCII value of a character from stdin onto stack
;
; TRANSITION: s e (GET.c) d --> (x.s) e c d
; where x is the ASCII value of the character read from stdin
; ------------------------------------------------------------------------------
_instr_GET:
pushsecd
call _getchar
popsecd
number eax, eax
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; PUT - Pop ASCII value from stack and write it to stdout
;
; TRANSITION: (x.s) e (PUT.c) d --> s e c d
; SIDE EFFECT: The character with the ASCII value x is printed to stdout
; ------------------------------------------------------------------------------
_instr_PUT:
car eax, S
ivalue eax
and eax, 0x000000ff
pushsecd
push eax
call _putchar
add esp, 4
popsecd
jmp _cycle
; ------------------------------------------------------------------------------
; PEXP - Print expression on top of stack to stdout
;
; TRANSITION: (x.s) e (PEXP.c) d --> (x.s) e c d
; SIDE EFFECT: The expression x is printed to stdout
; ------------------------------------------------------------------------------
_instr_PEXP:
car eax, S
pushsecd
push eax
call _putexp
add esp, 4
call _flush
popsecd
jmp _cycle
; ------------------------------------------------------------------------------
; APR - Apply and return (for tail-call optimization)
;
; Note that the only difference between the transition for APR and the that of
; AP is that the dump register is left untouched. Hence, the effect of RTN will
; be to return control to the current function's caller rather than to this
; function.
;
; TRANSITION: ((c'.e') v.s) e (APR) d --> NIL (v.e') c' d
; ------------------------------------------------------------------------------
_instr_APR:
carcdr edx, S ; EDX <-- car(S), S' <-- cdr(S)
carcdr C, edx ; C' <-- car(car(S)), EDX <-- cdr(car(S))
car ecx, S ; ECX <-- car(cdr(S))
cons ecx, edx
mov [E], ecx ; E' <-- cons(car(cdr(S)), cdr(car(S)))
mov S, 0 ; S' <-- nil
jmp _cycle
; ------------------------------------------------------------------------------
; TSEL - Tail-select (for IF statement in tail position)
;
; Note that the only difference between the transition for TSEL and the that of
; SEL is that the dump register is left untouched. Hence, JOIN should not be
; used at the end of ct or cf, as this would result in undefined behavior.
; Instead, a RTN instruction should be encountered at the end of ct or cf.
;
; TRANSITION: (x.s) e (TSEL ct cf) d --> s e c' d
; where c' = ct if x = T, and c' = cf if x = F
; ------------------------------------------------------------------------------
_instr_TSEL:
mov eax, C
carcdr edx, eax ; EDX <-- car(cdr(C))
car ecx, eax ; ECX <-- car(cdr(cdr(C))
carcdr eax, S ; EAX <-- car(S), S' <-- cdr(S)
push S
mov S, [true]
ivalue S
ivalue eax
cmp eax, S
cmove C, edx ; IF car(S) == true THEN C' <-- car(cdr(C))
cmovne C, ecx ; IF car(S) != true THEN C' <-- car(cdr(cdr(C)))
pop S
jmp _cycle
; ------------------------------------------------------------------------------
; CVEC - Create vector
;
; TRANSITION: (n.s) e (CVEC.c) d --> (v.s) e c d
; where v is a newly allocated vector of length n
; ------------------------------------------------------------------------------
_instr_CVEC:
carcdr eax, S ; EAX <-- number of elements in vector
ivalue eax
shl eax, 1 ; EAX <-- 2*length == # bytes to allocate
call _malloc
alloc eax, eax, SECD_VECTOR
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; VSET - Set element of vector
;
; TRANSITION: (v i x.s) e (VSET.c) d --> (v.s) e c d
; SIDE EFFECT: v[i] <-- x
; ------------------------------------------------------------------------------
_instr_VSET:
carcdr eax, S
carcdr ecx, S
push eax
ivalue eax
ivalue ecx
mov edx, eax
call _heap_item_length ; Does not clobber ECX, EDX
shr eax, 1
cmp ecx, eax
jb .endif
add esp, 4
jmp _index_out_of_bounds
.endif:
carcdr eax, S
mov word [edx + ecx*2], ax
pop eax
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; VREF - Get element of vector
;
; TRANSITION: (v i.s) e (VREF.c) d --> (v[i].s) e c d
; ------------------------------------------------------------------------------
_instr_VREF:
carcdr eax, S
carcdr ecx, S
ivalue eax
ivalue ecx
mov edx, eax
call _heap_item_length ; Does not clobber ECX, EDX
shr eax, 1
cmp ecx, eax
jb .endif
jmp _index_out_of_bounds
.endif:
mov eax, 0
mov ax, word [edx + ecx*2]
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; VLEN - Get length of vector
;
; TRANSITION: (v.s) e (VLEN.c) d --> (n.s) e c d
; where n is the number of elements in v
; ------------------------------------------------------------------------------
_instr_VLEN:
carcdr eax, S
ivalue eax
call _heap_item_length
shr eax, 1
number eax, eax
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; VCPY - Bulk copy between vectors
;
; TRANSITION: (v i w j n.s) e (VCPY.c) d --> (v.s) e c d
; SIDE EFFECT: w[j+k] <-- v[i+k] for all k, 0 ≤ k < n
; ------------------------------------------------------------------------------
_instr_VCPY:
push esi
push edi
carcdr eax, S
carcdr ecx, S
ivalue eax
ivalue ecx
lea esi, [eax + ecx*2]
call _heap_item_length
shr eax, 1
sub eax, ecx
mov edx, eax
carcdr eax, S
carcdr ecx, S
push eax
ivalue eax
ivalue ecx
lea edi, [eax + ecx*2]
call _heap_item_length
shr eax, 1
sub eax, ecx
carcdr ecx, S
ivalue ecx
cmp ecx, eax
ja .out_of_bounds
cmp ecx, edx
ja .out_of_bounds
jmp .loop
.out_of_bounds:
pop eax
pop edi
pop esi
jmp _index_out_of_bounds
cld
.loop:
jcxz .endloop
rep movsw
jmp .loop
.endloop:
pop eax
pop edi
pop esi
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; CBIN - Create binary blob
;
; TRANSITION: (n.s) e (CBIN.c) d --> (b.s) e c d
; where b is a newly allocated n-byte binary blob
; ------------------------------------------------------------------------------
_instr_CBIN:
carcdr eax, S ; EAX <-- length of binary
ivalue eax
call _malloc
alloc eax, eax, SECD_BINARY
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; BSET - Set byte in binary blob
;
; TRANSITION: (b i x.s) e (BSET.c) d --> (b.s) e c d
; SIDE EFFECT: [b+i] <-- x
; ------------------------------------------------------------------------------
_instr_BSET:
carcdr eax, S
carcdr ecx, S
push eax
ivalue eax
ivalue ecx
mov edx, eax
call _heap_item_length ; Does not clobber ECX, EDX
cmp ecx, eax
jb .endif
add esp, 4
jmp _index_out_of_bounds
.endif:
carcdr eax, S
ivalue eax
mov byte [edx + ecx], al
pop eax
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; BGET - Get byte in binary blob
;
; TRANSITION: (b i.s) e (BGET.c) d --> ([b+i].s) e c d
; ------------------------------------------------------------------------------
_instr_BREF:
carcdr eax, S
carcdr ecx, S
ivalue eax
ivalue ecx
mov edx, eax
call _heap_item_length ; Does not clobber ECX, EDX
cmp ecx, eax
jb .endif
jmp _index_out_of_bounds
.endif:
mov eax, 0
mov al, byte [edx + ecx]
number eax, eax
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; BLEN - Get size of binary blob
;
; TRANSITION: (b.s) e (BLEN.c) d --> (n.s) e c d
; where n is the length of b, in bytes
; ------------------------------------------------------------------------------
_instr_BLEN:
carcdr eax, S
ivalue eax
call _heap_item_length
number eax, eax
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; BCPY - Bulk copy between binary blobs
;
; TRANSITION: (b1 i b2 j n.s) e (BCPY.c) d --> (b1.s) e c d
; SIDE EFFECT: b2[j+k] <-- b1[i+k] for all k, 0 ≤ k < n
; ------------------------------------------------------------------------------
_instr_BCPY:
push esi
push edi
carcdr eax, S
carcdr ecx, S
ivalue eax
ivalue ecx
lea esi, [eax + ecx]
call _heap_item_length
sub eax, ecx
mov edx, eax
carcdr eax, S
carcdr ecx, S
push eax
ivalue eax
ivalue ecx
lea edi, [eax + ecx]
call _heap_item_length
sub eax, ecx
carcdr ecx, S
ivalue ecx
cmp ecx, eax
ja .out_of_bounds
cmp ecx, edx
ja .out_of_bounds
jmp .loop
.out_of_bounds:
pop eax
pop edi
pop esi
jmp _index_out_of_bounds
cld
.loop:
jcxz .endloop
rep movsb
jmp .loop
.endloop:
pop eax
pop edi
pop esi
xchg S, eax
cons S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; BS16 - Set 16-bit value in binary blob UNIMPLEMENTED
;
; TRANSITION: (b i x.s) e (BSET.c) d --> (b.s) e c d
; SIDE EFFECT: [b+i*2]@2 <-- x
; ------------------------------------------------------------------------------
_instr_BS16:
jmp _illegal
; ------------------------------------------------------------------------------
; BG16 - Get 16-bit value in binary blob UNIMPLEMENTED
;
; TRANSITION: (b i.s) e (BGET.c) d --> ([b+i*2]@2.s) e c d
; ------------------------------------------------------------------------------
_instr_BR16:
jmp _illegal
; ------------------------------------------------------------------------------
; BS32 - Set 32-bit value in binary blob UNIMPLEMENTED
;
; TRANSITION: (b i x.s) e (BSET.c) d --> (b.s) e c d
; SIDE EFFECT: [b+i*4]@4 <-- x
; ------------------------------------------------------------------------------
_instr_BS32:
jmp _illegal
; ------------------------------------------------------------------------------
; BG32 - Get 32-bit value in binary blob UNIMPLEMENTED
;
; TRANSITION: (b i.s) e (BGET.c) d --> ([b+i*4]@4.s) e c d
; ------------------------------------------------------------------------------
_instr_BR32:
jmp _illegal
; ------------------------------------------------------------------------------
; RCP - Apply isrecipe predicate to top stack item
;
; TRANSITION: (x.s) e (RCP.c) d --> (t.s) e c d
; where t = T if x is a recipe, and t = F if x is not a recipe
; ------------------------------------------------------------------------------
_instr_RCP:
carcdr eax, S ; EAX <-- car(S), S' <-- cdr(S)
mov dl, byte [flags + eax]
; DL <-- flags for EAX = car(S)
test dl, SECD_RECIPE
cmovnz eax, [true] ; IF (isrecipe) THEN EAX <-- true
cmovz eax, [false] ; IF (!isrecipe) THEN EAX <-- false
cons eax, S
mov S, eax ; S' <-- cons(true/false, cdr(S))
jmp _cycle
; ------------------------------------------------------------------------------
; LDE - Load expression
;
; TRANSITION: s e (LDE c.c') d --> ((recipe:(c.e)).s) e c' d
; ------------------------------------------------------------------------------
_instr_LDE:
carcdr eax, C
cons eax, [E]
or [flags + eax], byte SECD_RECIPE
cons eax, S
mov S, eax
jmp _cycle
; ------------------------------------------------------------------------------
; AP0 - Apply parameterless function
;
; TRANSITION: (x.s) e (AP0.c) d --> (x.s) e c d
; ((recipe:(c.e)).s) e' (AP0.c') d -->
; NIL e c (((recipe:(c.e)).s) e' c'.d)
; ------------------------------------------------------------------------------
_instr_AP0:
car edx, S ; EDX=(recipe:(c.e))
test [flags + edx], byte SECD_RECIPE
jz _cycle
; S=((recipe:(c.e)).s) E=e' C=c' D=d
cons C, [D] ; C=(c'.d)
mov eax, [E] ; EAX=e'
cons eax, C ; EAX=(e' c'.d)
carcdr C, edx ; C=c EDX=e
cons S, eax ; S=(((recipe:(c.e)).s) e' c'.d)
mov [D], S ; D=(((recipe:(c.e)).s) e' c'.d)
mov [E], edx ; E=e
mov S, 0 ; S=nil
jmp _cycle
; ------------------------------------------------------------------------------
; UPD - Return and update
;
; TRANSITION: (x) e (UPD) (((recipe:(c.e)).s) e' c'.d) --> (x.s) e' c' d
; AND (recipe:(c.e)) --> x
; ------------------------------------------------------------------------------
_instr_UPD:
; S=(x) E=e C=() D=(((recipe:(c.e)).s) e' c'.d)
mov edx, [D] ; EDX=(((recipe:(c.e)).s) e' c'.d)
carcdr eax, edx ; EAX=((recipe:(c.e)).s) EDX=(e' c'.d)
carcdr ecx, eax ; ECX=(recipe:(c.e)) EAX=s
car S, S ; S=x
; Update (recipe:(c.e)) <-- x
push eax
mov eax, dword [values + 4 * S]
mov dword [values + 4 * ecx], eax
mov al, byte [flags + S]
mov byte [flags + ecx], al
pop eax
cons S, eax ; S=(x.s)
carcdr eax, edx ; EAX=e' EDX=(c'.d)
mov [E], eax ; E=e'
carcdr C, edx ; C=c' EDX=d
mov [D], edx ; D=d
jmp _cycle
; ------------------------------------------------------------------------------
; J - Landin J-operator (cons program closure)
;
; The transitions that implement the Landin J-operator are described in [1,2].
; This implementation differs in two respects:
;
; - A new opcode is used to represent the J-operator, rather than a special
; symbol to be used with the AP (apply) opcode.
; - A separate opcode (APJ) is required to apply the program closure, rather
; than requiring the AP (apply) opcode to distinguish between regular
; closures and program closures.
;
; [1] P.J. Landin. A generalization of jumps and labels. Report, UNIVAC
; Systems Programming Research, August 1965.
;
; [2] H. Thielecke. An introduction to Landin's "A generalization of jumps
; and labels", Higher-Order and Symbolic Computation 11(2):117-123, 1998
;
; TRANSITION: (f.s) e (J.c) d --> ((f.d).s) e c d
; ------------------------------------------------------------------------------
_instr_J:
carcdr eax, S ; S=s, EAX=f
cons eax, [D] ; EAX=(f.d)
cons eax, S ; EAX=((f.d).s)
mov S, eax ; S=((f.d).s)
jmp _cycle
; ------------------------------------------------------------------------------
; APJ - Apply program closure
;
; TRANSITION: ((f s' e' c'.d') x.s) e (APJ.c) d --> (f x.s') e' (AP.c') d'
; ------------------------------------------------------------------------------
_instr_APJ:
carcdr eax, S ; EAX=(f s' e' c'.d'), S=(x.s)
car edx, S ; EDX=x, S=[free]
carcdr S, eax ; S=f, EAX=(s' e' c'.d')
carcdr ecx, eax ; ECX=s', EAX=(e' c'.d')
cons edx, ecx ; EDX=(x.s')
cons S, edx ; S=(f x.s')
carcdr edx, eax ; EDX=e', EAX=(c'.d')
mov [E], edx ; E=e'
carcdr edx, eax ; EDX=c', EAX=d'
number C, 4 ; C=AP
cons C, edx ; C=(AP.c')
mov [D], eax ; D=d'
jmp _cycle
_index_out_of_bounds:
call _flush
sys.write stderr, err_oob, err_oob_len
sys.exit 1
.halt:
jmp .halt
; ==============================================================================
; Garbage Collection
;
; We use a compacting garbage collector to find unreferenced cells. We
; begin by marking the cells referenced by the registers of the machine: S, E,
; C, D, true, and false. Whenever we mark a cons cell, we recursively mark that
; cell's car and cdr (if they are not already marked). After this phase is
; complete, we iterate over all cells and relocate the marked (i.e. in use)
; cells to a contiguous block at the beginning of the cell array.
;
; ------------------------------------------------------------------------------
; Traces referenced cells starting with the registers of the SECD machine
;
_trace:
push eax ; Save current SECD-machine state
push ecx
push edx
push S
push C
; Clear all marks
mov ecx, 65536
mov edx, dword flags
.loop_clearmarks:
and [edx], byte ~SECD_MARKED
inc edx
dec ecx
jnz .loop_clearmarks
; Trace from root references (SECD-machine registers)
mov eax, S
call _mark
mov eax, C
call _mark
mov eax, [E]
call _mark
mov eax, [D]
call _mark
mov eax, [true]
call _mark
mov eax, [false]
call _mark
mov eax, 0
call _mark
; Sanity check -- scan free list for marked cells. There should not be any.
%ifdef DEBUG
mov eax, ff
.loop_checkff:
cmp eax, 0xffff
jg .done ; while (eax <= 0xffff)
test byte [flags + eax], SECD_MARKED ; if cell marked...
jnz .error ; break to error
inc eax ; advance to next cell
jmp .loop_checkff ; end while
.error:
call _flush ; found in-use cell in free
sys.write stderr, err_ff, err_ff_len ; list.
sys.exit 1
.halt:
jmp .halt
.done:
%endif ; DEBUG
pop C ; Restore SECD-machine state
pop S
pop edx
pop ecx
pop eax
ret
; ------------------------------------------------------------------------------
; Find and mark referenced cells recursively
; EXPECTS eax = the index of the cell from which to start tracing
;
_mark:
mov dl, byte [flags + eax] ; DL <-- flags for current cell
test dl, SECD_MARKED
jz .if
ret ; quit if cell already marked
.if:
or dl, SECD_MARKED
mov byte [flags + eax], dl ; mark this cell
test dl, SECD_ATOM
jnz .else ; if this is a cons cell then...
cdrcar edx, eax ; recurse on car and cdr
push edx
call _mark
pop eax
jmp _mark
.else:
test dl, SECD_HEAP ; if cell is a heap reference...
jz .endif
push ebx
mov ebx, eax
ivalue eax
test byte [gcheap], HEAP_FORWARD
jz .endif_heap_forward
call _heap_forward ; update reference if forwarded
mov [values + ebx * 4], eax
.endif_heap_forward:
test byte [gcheap], HEAP_MARK
jz .endif_heap_mark ; if heap item not marked then...
call _heap_mark ; mark the heap item
.endif_heap_mark:
and dl, SECD_TYPEMASK
cmp dl, SECD_VECTOR
jne .endif_vector ; if cell is a vector reference...
mov eax, ebx
call _heap_item_length
mov ecx, eax
shr ecx, 1
.loop: ; recurse on all entries in vector
mov eax, 0
mov ax, word [ebx]
add ebx, 2
push ecx
call _mark
pop ecx
loop .loop
.endif_vector:
pop ebx
.endif:
ret
; ------------------------------------------------------------------------------
; Generic sort (quicksort)
;
; Requires:
; ESI - start index (inclusive) of range to sort
; EDI - end index (inclusive) of range to sort
; EBX - address of compare function
; ECX - address of swap function
;
; Destroys: EAX, EDX, ESI
; Compare function must have the following characteristics:
; Requires:
; ESI - index of left side of comparison
; EDI - index of right side of comparison
; Ensures:
; ZF - indicates whether left side = right side
; SF - indicates whether left side < right side
; Preserves: ESI, EDI, EBX, ECX
; Destroys: EAX, EDX
;
; Swap function must have the following characteristics:
; Requires:
; ESI - index of first element
; EDI - index of second element
; Preserves: ESI, EDI, EBX, ECX
; Destroys: EAX, EDX
;
_test_sort:
mov [values + 0 * 4], dword 3
mov [values + 1 * 4], dword 7
mov [values + 2 * 4], dword 8
mov [values + 3 * 4], dword 5
mov [values + 4 * 4], dword 2
mov [values + 5 * 4], dword 1
mov [values + 6 * 4], dword 9
mov [values + 7 * 4], dword 5
mov [values + 8 * 4], dword 4
mov esi, 0
mov edi, 9
mov ebx, .test_compare
mov ecx, .test_swap
call _sort
.done_test_sort:
ret
.test_compare:
mov eax, [values + esi * 4]
mov edx, [values + edi * 4]
cmp eax, edx
ret
.test_swap:
mov eax, [values + esi * 4]
mov edx, [values + edi * 4]
mov [values + esi * 4], edx
mov [values + edi * 4], eax
ret
_sort:
push esi
call .sort
pop esi
ret
.sort:
; Make sure we have something to sort
cmp esi, edi
mov eax, edi
sub eax, esi
cmp eax, 1
jg .continue
ret
.continue:
push edi
push esi
; EAX = (ESI + EDI) / 2
mov eax, edi
sub eax, esi
shr eax, 1
add eax, esi
dec esi
.loop_pivot:
xchg eax, edi
.loop_scan_a:
cmp esi, edi
jge .done_loop_scan_a
inc esi
pusha
call ebx ; TODO: Preserve destroyed registers
popa
jle .loop_scan_a
.done_loop_scan_a:
xchg eax, esi
.loop_scan_b:
cmp esi, edi
jle .done_loop_scan_b
dec esi
pusha
call ebx ; TODO: Preserve destroyed registers
popa
jge .loop_scan_b
.done_loop_scan_b:
xchg eax, edi
xchg esi, edi
cmp esi, edi
jae .done_pivot
cmp eax, esi
cmove eax, edi
je .endif
cmp eax, edi
cmove eax, esi
.endif:
pusha
call ecx ; TODO: Preserve destroyed registers
popa
jmp .loop_pivot
.done_pivot:
; pop esi
xchg esi, [esp]
; inc edi
call .sort
pop esi
pop edi
jmp .sort ; tail recursion
_compare_atom:
mov edx, [values2 + esi * 4]
and edx, 0xffff
mov al, [flags + edx]
mov edx, [values2 + edi * 4]
and edx, 0xffff
mov ah, [flags + edx]
mov dx, ax
and al, SECD_ATOM
and ah, SECD_ATOM
; If one is an atom and the other isn't, the atom is lesser
cmp ah, al
jne .done
; If both are cons cells, we consider them equal
cmp al, 0
je .done
; If both are atoms, next compare their types
and dl, SECD_TYPEMASK
and dh, SECD_TYPEMASK
cmp dh, dl
jne .done
; If both are the same type, compare their values
mov eax, [values2 + esi * 4]
and eax, 0xffff
mov eax, [values + eax * 4]
mov edx, [values2 + edi * 4]
and edx, 0xffff
mov edx, [values + edx * 4]
cmp eax, edx
jne .done
; If both have the same value, compare their original locations. This
; ensures that the first occurrance of a given atom is the one that is
; kept. This is important because the NIL symbol must occupy cell zero.
mov eax, [values2 + esi * 4]
and eax, 0xffff
mov edx, [values2 + edi * 4]
and edx, 0xffff
cmp eax, edx
.done:
ret
_compare_cons:
push ebx
push ecx
sub esp, 4
mov ebx, [mark]
mov ecx, 0
mov eax, [values2 + esi * 4]
and eax, 0xffff
mov eax, [values + eax * 4]
mov edx, eax
shr edx, 16
and eax, 0xffff
mov eax, [values2 + eax * 4]
shr eax, 16
cmp eax, ebx
jae .done_check_a
mov edx, [values2 + edx * 4]
shr edx, 16
cmp edx, ebx
jae .done_check_a
mov cl, 1
shl edx, 16
or eax, edx
mov [esp], eax
.done_check_a:
mov eax, [values2 + edi * 4]
and eax, 0xffff
mov eax, [values + eax * 4]
mov edx, eax
shr edx, 16
and eax, 0xffff
mov eax, [values2 + eax * 4]
shr eax, 16
cmp eax, ebx
jae .done_check_b
mov edx, [values2 + edx * 4]
shr edx, 16
cmp edx, ebx
jae .done_check_b
mov ch, 1
shl edx, 16
or eax, edx
.done_check_b:
cmp ch, cl
jne .done
cmp cl, 0
je .done
mov edx, [esp]
cmp eax, edx
.done:
pop eax ; Can't do "add esp, 4" because that would affect the flags
pop ecx
pop ebx
ret
; ------------------------------------------------------------------------------
; Collapse duplicate cells
; ========================
;
; Allocated cells in the SECD machine are immutable. Therefore, it is valid
; to restructure the cell graph so that:
;
; - no two cells contain the same atomic value, and furthermore that
; - whenever two cons cells, say A and B, are such that the subgraph reachable
; from A is identical to the subgraph reachable from B (in structure and in
; the atomic values reachable from A or B), that A and B are in fact the
; same cell.
;
; This can lead to a significant reduction in cell usage, as a typical running
; SECD machine will have many cells containing common values (e.g., small
; numbers, common symbols, common code fragments, etc.).
;
; This algorithm is much more expensive than the basic garbage collection, so we
; only do this as a last resort when the basic garbage collection fails to yield
; sufficient space.
;
;
; Working Array
; -------------
;
; To accomplish this task, we must be able to rearrange cells in a potentially
; very full cell array. We will need a second working area for this task. In
; this working area, we store the permutation that transforms the original
; arrangement of the cells into the new arrangement. Each DWORD value in the
; working array contains:
;
; [31.....FWD....16|15.....REF.....0]
;
; FWD = The index into the cell array of the location where the cell that
; was originally here has moved.
; REF = The index into the original cell array of the cell that should be
; moved to this location.
;
; We sort, swap, and collapse cells by rearranging cells in this working array,
; and only at the end do we update the actual cell array.
;
;
; Algorithm
; ---------
;
; We determine if two cells contain identical values simply by looking at the
; type and value stored in the cell array. For atomic values, this is
; sufficient. However, two cons cells may be identical but not share the same
; numerical values if their CARs and CDRs have not been collapsed.
;
; Example:
;
; Index: 0 1 2 3 4
; Value: [ NIL | A | A | CAR=1, CDR=0 | CAR=2, CDR=0 ]
;
; In this example, cells 3 and 4 are identical, but because cells 1 and 2
; have not yet been collapsed to a single cell, a comparison of the numerical
; values stored in 3 and 4 is insufficient to detect that they are identical.
;
; We therefore collapse the cell array in phases:
;
; - Phase 0: Find and collapse the atoms.
; - Phase 1: Find and collapse the 'Level 1' cons cells (those whose CAR and
; CDR are both atoms).
; - Phase 2: Find the collapse the 'Level 2' cons cells (those whose CAR and
; CDR are both atomic or 'Level 1' cons).
; ...
; - Phase N: Find and collapse the 'Level N' cons cells (those whose CAR and
; CDR are both atomic or 'Level K' cons with K < N).
;
; Each phase proceeds by:
;
; - Partitioning the remaining cells (those on the right side of a 'mark'
; value, those cells to the left 'mark' have already been collapsed) so that
; atomic (Phase 0) or 'Level N' (Phase N, N > 0) cells are on the left,
; sorted by their numerical value, and all other cells (Level K cells,
; K > N) are on the right.
; - Collapse the cells in the partition on the left.
; - Update the 'mark' to point at the start of the partition on the right.
;
; Each phase must result in no more collapsed cells than the prior phase, since
; we cannot have a common 'Level N' graph without also having a common
; 'Level N-1' graph. Therefore, if a phase fails to find any cons cells to be
; collapsed, the algorithm terminates. The algorithm also terminates if the
; 'mark' reaches the end of the cell array.
;
;
; Requires:
; EDI - number of occupied cells
;
_test_dedup:
; Load an image of the S-expression "( ( 3 2 1 . 0 ) ( 4 2 1 . 0 ) 1 2 . 0 )
mov [Sreg], dword 3
mov [E], dword 3
mov [Creg], dword 3
mov [D], dword 3
mov [values + 0 * 4], dword 0x000a0009
mov [values + 1 * 4], dword 2
mov [values + 2 * 4], dword 0x00010010
mov [values + 3 * 4], dword 0x00000005 ; <--- Root
mov [values + 4 * 4], dword 0x00140002
mov [values + 5 * 4], dword 0x0004000b
mov [values + 6 * 4], dword 0x00130012
mov [values + 7 * 4], dword 0x0011000d
mov [values + 8 * 4], dword 2
mov [values + 9 * 4], dword 0x00080007
mov [values + 10 * 4], dword 3
mov [values + 11 * 4], dword 0x000c0006
mov [values + 12 * 4], dword 1
mov [values + 13 * 4], dword 0
mov [values + 14 * 4], dword 0
mov [values + 15 * 4], dword 1
mov [values + 16 * 4], dword 0x000f000e
mov [values + 17 * 4], dword 1
mov [values + 18 * 4], dword 0
mov [values + 19 * 4], dword 2
mov [values + 20 * 4], dword 4
mov al, SECD_NUMBER | SECD_ATOM | SECD_MARKED
mov ah, SECD_MARKED
mov [flags + 0], ah
mov [flags + 1], al
mov [flags + 2], ah
mov [flags + 3], ah
mov [flags + 4], ah
mov [flags + 5], ah
mov [flags + 6], ah
mov [flags + 7], ah
mov [flags + 8], al
mov [flags + 9], ah
mov [flags + 10], al
mov [flags + 11], ah
mov [flags + 12], al
mov [flags + 13], al
mov [flags + 14], al
mov [flags + 15], al
mov [flags + 16], ah
mov [flags + 17], al
mov [flags + 18], al
mov [flags + 19], al
mov [flags + 20], al
push dword 3
call _putexp
add esp, 4
call _flush
mov edi, 21
call _dedup
push dword 3
call _putexp
add esp, 4
call _flush
ret
_dedup:
mov [Sreg], S
mov [Creg], C
; Initialize sort map
mov esi, edi
mov eax, edi
shl eax, 16
or eax, edi
.loop_init:
mov [values2 + esi * 4], eax
sub eax, 0x00010001
dec esi
jns .loop_init
mov esi, 0
mov ebx, _compare_atom
mov ecx, .swap
call _sort
; Scan for first cons cell, collapsing equivalent atoms as we go
.loop_find_cons:
mov ecx, [values2 + esi * 4]
and ecx, 0xffff
mov al, [flags + ecx]
test al, SECD_ATOM
jz .done_loop_find_cons
mov eax, [values + ecx * 4]
cmp esi, 0
je .else_not_collapse
cmp eax, edx
jne .else_not_collapse
mov eax, [values2 + ecx * 4]
and eax, 0xffff
or eax, ebx
mov [values2 + ecx * 4], eax
jmp .endif_collapse
.else_not_collapse:
mov ebx, esi
shl ebx, 16
mov edx, eax
.endif_collapse:
inc esi
jmp .loop_find_cons
.done_loop_find_cons:
sub esp, 4
push edi
.loop_phase:
mov ebx, _compare_cons
mov ecx, .swap
mov [mark], esi
mov edi, [esp]
call _sort
; Scan for next level cons cell, collapsing equivalent cons cells as we
; go
mov [esp + 4], dword 0
mov ecx, esi
shl ecx, 16
dec esi
.loop_mark:
inc esi
mov eax, [values2 + esi * 4]
and eax, 0xffff
mov al, [flags + eax]
test al, SECD_ATOM
jnz _memerror
cmp esi, [esp]
jae .done_loop_phase
mov edi, [values2 + esi * 4]
and edi, 0xffff
mov eax, [values + edi * 4]
mov edx, eax
shr edx, 16
and eax, 0xffff
mov eax, [values2 + eax * 4]
shr eax, 16
mov edx, [values2 + edx * 4]
shr edx, 16
cmp eax, [mark]
jae .endloop_phase
cmp edx, [mark]
jae .endloop_phase
shl edx, 16
or eax, edx
cmp esi, [mark]
je .else_not_collapse_cons
cmp eax, ebx
jne .else_not_collapse_cons
mov [esp + 4], dword 1
mov eax, [values2 + edi * 4]
and eax, 0xffff
or eax, ecx
mov [values2 + edi * 4], eax
jmp .loop_mark
.else_not_collapse_cons:
mov ebx, eax
mov ecx, esi
shl ecx, 16
mov edx, eax
shr edx, 16
and eax, 0xffff
mov eax, [values2 + eax * 4]
and eax, 0xffff
mov edx, [values2 + edx * 4]
shl edx, 16
or eax, edx
mov [values + edi * 4], eax
jmp .loop_mark
.endloop_phase:
test [esp + 4], dword 1
jnz .loop_phase
.done_loop_phase:
pop edi
add esp, 4
; Update SECD-machine registers
mov eax, [Sreg]
mov eax, [values2 + eax * 4]
shr eax, 16
mov eax, [values2 + eax * 4]
and eax, 0xffff
mov [Sreg], eax
mov eax, [E]
mov eax, [values2 + eax * 4]
shr eax, 16
mov eax, [values2 + eax * 4]
and eax, 0xffff
mov [E], eax
mov eax, [Creg]
mov eax, [values2 + eax * 4]
shr eax, 16
mov eax, [values2 + eax * 4]
and eax, 0xffff
mov [Creg], eax
mov eax, [D]
mov eax, [values2 + eax * 4]
shr eax, 16
mov eax, [values2 + eax * 4]
and eax, 0xffff
mov [D], eax
mov eax, [true]
mov eax, [values2 + eax * 4]
shr eax, 16
mov eax, [values2 + eax * 4]
and eax, 0xffff
mov [true], eax
mov eax, [false]
mov eax, [values2 + eax * 4]
shr eax, 16
mov eax, [values2 + eax * 4]
and eax, 0xffff
mov [false], eax
mov S, [Sreg]
mov C, [Creg]
ret
.swap:
; Update forwarding pointers
mov edx, [values2 + esi * 4]
and edx, 0xffff
mov eax, [values2 + edx * 4]
and eax, 0xffff
shl eax, 16
or eax, edi
ror eax, 16
mov [values2 + edx * 4], eax
mov edx, [values2 + edi * 4]
and edx, 0xffff
mov eax, [values2 + edx * 4]
and eax, 0xffff
shl eax, 16
or eax, esi
ror eax, 16
mov [values2 + edx * 4], eax
; Exchange reference pointers
mov eax, [values2 + esi * 4]
mov edx, [values2 + edi * 4]
xchg ax, dx
mov [values2 + esi * 4], eax
mov [values2 + edi * 4], edx
ret
; ------------------------------------------------------------------------------
; Relocates used cells to form a contiguous block
;
; Algorithm:
; left = -1
; right = NUM_CELLS
;
; repeat {
; increment left until cell[left] is free
; decrement right until cell[right] is used
; if (right <= left) break;
;
; // relocate the cell and leave a breadcrumb to find it later
; cell[left] <-- cell[right]
; cell[right] <-- left // relocation pointer
; }
;
; // at this point, 'right' points to the last used cell, and 'left' points
; // to the first free cell
; while (right >= 0) { // loop through all the used cells
;
; // follow breadcrumbs to fix cons cells whose car or cdr has been
; // relocated
; if cell[right] is a cons cell {
; update car(cell[right]) if car(cell[left]) >= left
; update cdr(cell[right]) if cdr(cell[left]) >= left
; }
;
; decrement right
; }
;
_compact:
mov [Sreg], S
mov [Creg], C
push eax ; Save current SECD-machine state
push ecx
push edx
mov edi, -1 ; left
mov esi, 0x10000 ; right
.loop_find_free:
inc edi
test byte [flags + edi], SECD_MARKED ; is cell[left] free?
jnz .loop_find_free
.loop_find_used:
dec esi
test byte [flags + esi], SECD_MARKED ; is cell[right] used?
jz .loop_find_used
cmp esi, edi ; right <= left?
jle .loop_rewrite
mov eax, dword [values + esi * 4] ; value[left] <-- value[right]
mov dword [values + edi * 4], eax
mov dword [values + esi * 4], edi ; value[right] <-- left
mov al, byte [flags + esi] ; flags[left] <-- flags[right]
mov byte [flags + edi], al
mov byte [flags + esi], 0 ; mark right cell as free
jmp .loop_find_free
.loop_rewrite:
test byte [flags + esi], SECD_ATOM ; if cell[right] a cons cell:
jnz .endif_cons
mov eax, dword [values + esi * 4]
mov edx, eax ; split cell into car/cdr
shr eax, 16
and edx, 0xffff
cmp eax, edi ; if car >= left:
jb .endif_relocate_car
mov eax, dword [values + eax * 4] ; follow breadcrumb
.endif_relocate_car:
cmp edx, edi ; if cdr >= left:
jb .endif_relocate_cdr
mov edx, dword [values + edx * 4] ; follow breadcrumb
.endif_relocate_cdr:
shl eax, 16 ; update cell
or eax, edx
mov dword [values + esi * 4], eax
.endif_cons:
dec esi
jns .loop_rewrite
; Follow breadcrumbs for SECD-machine registers
mov eax, dword [Sreg]
cmp eax, edi
jb .endif_relocate_s
mov eax, dword [values + eax * 4]
mov dword [Sreg], eax
.endif_relocate_s:
mov eax, dword [E]
cmp eax, edi
jb .endif_relocate_e
mov eax, dword [values + eax * 4]
mov dword [E], eax
.endif_relocate_e:
mov eax, dword [Creg]
cmp eax, edi
jb .endif_relocate_c
mov eax, dword [values + eax * 4]
mov dword [Creg], eax
.endif_relocate_c:
mov eax, dword [D]
cmp eax, edi
jb .endif_relocate_d
mov eax, dword [values + eax * 4]
mov dword [D], eax
.endif_relocate_d:
; Restore state
pop edx
pop ecx
pop eax
mov S, [Sreg]
mov C, [Creg]
%ifnidni ff,edi
mov ff, edi ; ff <-- start of free cells
%endif
ret
; ------------------------------------------------------------------------------
; Finds unused cells and adds them to the free list.
;
_gc:
call _trace
call _compact
cmp ff, 0x10000 - DEDUP_THRESHOLD
jle .endif_dedup
%ifnidni ff,edi
mov edi, ff
%endif
call _dedup
call _trace
call _compact
.endif_dedup:
ret
; ------------------------------------------------------------------------------
; Garbage collection for heap (vectors and binary blobs) UNFINISHED
;
_heap_gc:
mov byte [gcheap], HEAP_MARK
call _trace
call _heap_sweep
mov byte [gcheap], HEAP_FORWARD
call _gc
mov byte [gcheap], 0
ret
; ------------------------------------------------------------------------------
; Allocate a block of memory on the heap UNFINISHED
;
_malloc:
push eax
call _heap_alloc
cmp eax, 0
jnz .done
call _heap_gc
mov eax, [esp]
call _heap_alloc
cmp eax, 0
jnz .done
call _flush
sys.write stderr, err_hf, err_hf_len
sys.exit 1
.halt:
jmp .halt
.done:
add esp, 4
ret
| 30.562164 | 80 | 0.444133 |
8b2d6fc6731e12200c6a4c4825b5c5b2585019e3 | 12,481 | asm | Assembly | demo-raycaster/DixVeauxMongoles.asm_trackdata.asm | Javanaise/vcs-demo-raycaster | 952618041ec1038fc86f830d7f29b910e989714b | [
"MIT"
] | 5 | 2018-11-06T07:34:11.000Z | 2022-01-14T02:56:56.000Z | demo-raycaster/DixVeauxMongoles.asm_trackdata.asm | Javanaise/vcs-demo-raycaster | 952618041ec1038fc86f830d7f29b910e989714b | [
"MIT"
] | null | null | null | demo-raycaster/DixVeauxMongoles.asm_trackdata.asm | Javanaise/vcs-demo-raycaster | 952618041ec1038fc86f830d7f29b910e989714b | [
"MIT"
] | null | null | null | ; TIATracker music player
; Copyright 2016 Andre "Kylearan" Wichmann
; Website: https://bitbucket.org/kylearan/tiatracker
; Email: andre.wichmann@gmx.de
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
; Song author: Glafouk
; Song name: DixVeauxMongoles
; @com.wudsn.ide.asm.hardware=ATARI2600
; =====================================================================
; TIATracker melodic and percussion instruments, patterns and sequencer
; data.
; =====================================================================
tt_TrackDataStart:
; =====================================================================
; Melodic instrument definitions (up to 7). tt_envelope_index_c0/1 hold
; the index values into these tables for the current instruments played
; in channel 0 and 1.
;
; Each instrument is defined by:
; - tt_InsCtrlTable: the AUDC value
; - tt_InsADIndexes: the index of the start of the ADSR envelope as
; defined in tt_InsFreqVolTable
; - tt_InsSustainIndexes: the index of the start of the Sustain phase
; of the envelope
; - tt_InsReleaseIndexes: the index of the start of the Release phase
; - tt_InsFreqVolTable: The AUDF frequency and AUDV volume values of
; the envelope
; =====================================================================
; Instrument master CTRL values
tt_InsCtrlTable:
dc.b $06, $07, $0c, $0c, $0c
; Instrument Attack/Decay start indexes into ADSR tables.
tt_InsADIndexes:
dc.b $00, $08, $20, $28, $3a
; Instrument Sustain start indexes into ADSR tables
tt_InsSustainIndexes:
dc.b $04, $1c, $20, $36, $3a
; Instrument Release start indexes into ADSR tables
; Caution: Values are stored with an implicit -1 modifier! To get the
; real index, add 1.
tt_InsReleaseIndexes:
dc.b $05, $1d, $25, $37, $3b
; AUDVx and AUDFx ADSR envelope values.
; Each byte encodes the frequency and volume:
; - Bits 7..4: Freqency modifier for the current note ([-8..7]),
; 8 means no change. Bit 7 is the sign bit.
; - Bits 3..0: Volume
; Between sustain and release is one byte that is not used and
; can be any value.
; The end of the release phase is encoded by a 0.
tt_InsFreqVolTable:
; 0: bassline
dc.b $8c, $8c, $8b, $89, $85, $00, $80, $00
; 1: Electronic Guitar
dc.b $8a, $8a, $89, $89, $88, $88, $87, $87
dc.b $86, $86, $85, $85, $84, $84, $83, $83
dc.b $82, $82, $81, $80, $80, $00, $80, $00
; 2: SineGlicth
dc.b $86, $96, $a6, $96, $86, $00, $86, $00
; 3: Chords
dc.b $88, $88, $88, $88, $88, $88, $88, $87
dc.b $85, $83, $82, $81, $81, $81, $80, $00
dc.b $80, $00
; 4: ChordsLong
dc.b $86, $00, $86, $00
; =====================================================================
; Percussion instrument definitions (up to 15)
;
; Each percussion instrument is defined by:
; - tt_PercIndexes: The index of the first percussion frame as defined
; in tt_PercFreqTable and tt_PercCtrlVolTable
; - tt_PercFreqTable: The AUDF frequency value
; - tt_PercCtrlVolTable: The AUDV volume and AUDC values
; =====================================================================
; Indexes into percussion definitions signifying the first frame for
; each percussion in tt_PercFreqTable.
; Caution: Values are stored with an implicit +1 modifier! To get the
; real index, subtract 1.
tt_PercIndexes:
dc.b $01
; The AUDF frequency values for the percussion instruments.
; If the second to last value is negative (>=128), it means it's an
; "overlay" percussion, i.e. the player fetches the next instrument note
; immediately and starts it in the sustain phase next frame. (Needs
; TT_USE_OVERLAY)
tt_PercFreqTable:
; 0: Break SD
dc.b $0a, $0a, $0b, $0b, $0c, $0c, $0d, $0d
dc.b $0e, $0e, $0f, $0f, $10, $10, $11, $11
dc.b $12, $12, $00
; The AUDCx and AUDVx volume values for the percussion instruments.
; - Bits 7..4: AUDC value
; - Bits 3..0: AUDV value
; 0 means end of percussion data.
tt_PercCtrlVolTable:
; 0: Break SD
dc.b $8a, $8a, $89, $89, $88, $88, $88, $87
dc.b $87, $87, $86, $86, $86, $85, $85, $85
dc.b $84, $84, $00
; =====================================================================
; Track definition
; The track is defined by:
; - tt_PatternX (X=0, 1, ...): Pattern definitions
; - tt_PatternPtrLo/Hi: Pointers to the tt_PatternX tables, serving
; as index values
; - tt_SequenceTable: The order in which the patterns should be played,
; i.e. indexes into tt_PatternPtrLo/Hi. Contains the sequences
; for all channels and sub-tracks. The variables
; tt_cur_pat_index_c0/1 hold an index into tt_SequenceTable for
; each channel.
;
; So tt_SequenceTable holds indexes into tt_PatternPtrLo/Hi, which
; in turn point to pattern definitions (tt_PatternX) in which the notes
; to play are specified.
; =====================================================================
; ---------------------------------------------------------------------
; Pattern definitions, one table per pattern. tt_cur_note_index_c0/1
; hold the index values into these tables for the current pattern
; played in channel 0 and 1.
;
; A pattern is a sequence of notes (one byte per note) ending with a 0.
; A note can be either:
; - Pause: Put melodic instrument into release. Must only follow a
; melodic instrument.
; - Hold: Continue to play last note (or silence). Default "empty" note.
; - Slide (needs TT_USE_SLIDE): Adjust frequency of last melodic note
; by -7..+7 and keep playing it
; - Play new note with melodic instrument
; - Play new note with percussion instrument
; - End of pattern
;
; A note is defined by:
; - Bits 7..5: 1-7 means play melodic instrument 1-7 with a new note
; and frequency in bits 4..0. If bits 7..5 are 0, bits 4..0 are
; defined as:
; - 0: End of pattern
; - [1..15]: Slide -7..+7 (needs TT_USE_SLIDE)
; - 8: Hold
; - 16: Pause
; - [17..31]: Play percussion instrument 1..15
;
; The tracker must ensure that a pause only follows a melodic
; instrument or a hold/slide.
; ---------------------------------------------------------------------
TT_FREQ_MASK = %00011111
TT_INS_HOLD = 8
TT_INS_PAUSE = 16
TT_FIRST_PERC = 17
; bass_intro0
tt_pattern0:
dc.b $31, $31, $31, $31, $31, $31, $31, $31
dc.b $2e, $2e, $2e, $2e, $2e, $2e, $2e, $2e
dc.b $00
; bass_intro1
tt_pattern1:
dc.b $35, $35, $35, $35, $33, $33, $33, $33
dc.b $31, $31, $31, $31, $31, $31, $31, $31
dc.b $00
; bass+drum0
tt_pattern2:
dc.b $31, $31, $11, $31, $31, $31, $11, $31
dc.b $2e, $2e, $11, $2e, $2e, $2e, $11, $2e
dc.b $00
; bass+drum1
tt_pattern3:
dc.b $35, $35, $11, $35, $33, $33, $11, $33
dc.b $31, $31, $11, $31, $31, $31, $11, $31
dc.b $00
; bass+drum2
tt_pattern4:
dc.b $2e, $2e, $11, $33, $2e, $2e, $11, $33
dc.b $31, $31, $11, $33, $31, $31, $11, $11
dc.b $00
; bass+drum3
tt_pattern5:
dc.b $33, $33, $11, $08, $33, $33, $11, $08
dc.b $33, $33, $11, $08, $11, $08, $11, $11
dc.b $00
; introblank
tt_pattern6:
dc.b $08, $08, $08, $08, $00
; intro_gd0
tt_pattern7:
dc.b $48, $48, $48, $48, $48, $48, $48, $48
dc.b $48, $48, $48, $48, $48, $48, $48, $48
dc.b $00
; intro_gd1
tt_pattern8:
dc.b $48, $48, $08, $48, $11, $48, $08, $48
dc.b $11, $48, $48, $11, $48, $11, $48, $11
dc.b $00
; mel2
tt_pattern9:
dc.b $08, $08, $51, $08, $51, $51, $08, $08
dc.b $4e, $08, $4e, $4e, $08, $08, $08, $4e
dc.b $00
; mel3
tt_pattern10:
dc.b $55, $55, $55, $55, $53, $53, $53, $53
dc.b $51, $51, $51, $51, $51, $08, $08, $08
dc.b $00
; mel4
tt_pattern11:
dc.b $76, $08, $08, $08, $08, $08, $78, $08
dc.b $70, $08, $72, $78, $08, $08, $08, $08
dc.b $00
; mel5
tt_pattern12:
dc.b $7a, $08, $08, $08, $78, $08, $08, $08
dc.b $76, $08, $08, $08, $08, $08, $08, $08
dc.b $00
; mel6
tt_pattern13:
dc.b $76, $08, $08, $08, $08, $08, $78, $08
dc.b $6c, $08, $6f, $76, $08, $08, $08, $08
dc.b $00
; mel7
tt_pattern14:
dc.b $76, $08, $08, $08, $73, $08, $08, $08
dc.b $72, $08, $08, $08, $08, $08, $08, $98
dc.b $00
; mel0
tt_pattern15:
dc.b $96, $08, $96, $96, $08, $96, $96, $96
dc.b $92, $90, $08, $8e, $08, $08, $08, $08
dc.b $00
; mel1
tt_pattern16:
dc.b $92, $92, $92, $92, $93, $93, $93, $96
dc.b $08, $08, $08, $08, $08, $08, $08, $98
dc.b $00
; mel1_b
tt_pattern17:
dc.b $92, $92, $92, $92, $93, $93, $93, $96
dc.b $08, $08, $08, $08, $98, $08, $96, $08
dc.b $00
; mel8
tt_pattern18:
dc.b $08, $08, $08, $08, $92, $08, $98, $b6
dc.b $08, $08, $08, $08, $98, $08, $96, $08
dc.b $00
; mel9
tt_pattern19:
dc.b $08, $08, $92, $08, $92, $b2, $08, $93
dc.b $96, $b6, $08, $08, $98, $08, $96, $08
dc.b $00
; mel10
tt_pattern20:
dc.b $08, $08, $08, $08, $92, $08, $9c, $b8
dc.b $08, $10, $98, $b8, $08, $10, $98, $b8
dc.b $00
; mel11
tt_pattern21:
dc.b $08, $10, $98, $b8, $08, $10, $98, $98
dc.b $08, $98, $98, $98, $98, $98, $98, $98
dc.b $00
; Individual pattern speeds (needs TT_GLOBAL_SPEED = 0).
; Each byte encodes the speed of one pattern in the order
; of the tt_PatternPtr tables below.
; If TT_USE_FUNKTEMPO is 1, then the low nibble encodes
; the even speed and the high nibble the odd speed.
IF TT_GLOBAL_SPEED = 0
tt_PatternSpeeds:
%%PATTERNSPEEDS%%
ENDIF
; ---------------------------------------------------------------------
; Pattern pointers look-up table.
; ---------------------------------------------------------------------
tt_PatternPtrLo:
dc.b <tt_pattern0, <tt_pattern1, <tt_pattern2, <tt_pattern3
dc.b <tt_pattern4, <tt_pattern5, <tt_pattern6, <tt_pattern7
dc.b <tt_pattern8, <tt_pattern9, <tt_pattern10, <tt_pattern11
dc.b <tt_pattern12, <tt_pattern13, <tt_pattern14, <tt_pattern15
dc.b <tt_pattern16, <tt_pattern17, <tt_pattern18, <tt_pattern19
dc.b <tt_pattern20, <tt_pattern21
tt_PatternPtrHi:
dc.b >tt_pattern0, >tt_pattern1, >tt_pattern2, >tt_pattern3
dc.b >tt_pattern4, >tt_pattern5, >tt_pattern6, >tt_pattern7
dc.b >tt_pattern8, >tt_pattern9, >tt_pattern10, >tt_pattern11
dc.b >tt_pattern12, >tt_pattern13, >tt_pattern14, >tt_pattern15
dc.b >tt_pattern16, >tt_pattern17, >tt_pattern18, >tt_pattern19
dc.b >tt_pattern20, >tt_pattern21
; ---------------------------------------------------------------------
; Pattern sequence table. Each byte is an index into the
; tt_PatternPtrLo/Hi tables where the pointers to the pattern
; definitions can be found. When a pattern has been played completely,
; the next byte from this table is used to get the address of the next
; pattern to play. tt_cur_pat_index_c0/1 hold the current index values
; into this table for channels 0 and 1.
; If TT_USE_GOTO is used, a value >=128 denotes a goto to the pattern
; number encoded in bits 6..0 (i.e. value AND %01111111).
; ---------------------------------------------------------------------
tt_SequenceTable:
; ---------- Channel 0 ----------
dc.b $00, $01, $00, $01, $02, $03, $02, $03
dc.b $02, $03, $02, $03, $02, $03, $02, $03
dc.b $02, $03, $02, $03, $04, $04, $04, $04
dc.b $05, $02, $03, $02, $03, $8c
; ---------- Channel 1 ----------
dc.b $06, $06, $06, $06, $06, $06, $06, $06
dc.b $07, $08, $09, $0a, $09, $0a, $0b, $0c
dc.b $0d, $0e, $0f, $10, $0f, $10, $0f, $10
dc.b $0f, $11, $12, $12, $13, $14, $15, $09
dc.b $0a, $09, $0a, $b0
echo "Track size: ", *-tt_TrackDataStart
| 33.194149 | 74 | 0.553241 |
7f6528a93e5660e6b9af903a85c1408a9244493b | 1,625 | asm | Assembly | programs/oeis/308/A308084.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/308/A308084.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/308/A308084.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A308084: a(n) = n*(n-1)*d(n)/4, where d(n)=A000005(n) is the number of divisors of n.
; 0,1,3,9,10,30,21,56,54,90,55,198,78,182,210,300,136,459,171,570,420,462,253,1104,450,650,702,1134,406,1740,465,1488,1056,1122,1190,2835,666,1406,1482,3120,820,3444,903,2838,2970,2070,1081,5640,1764,3675,2550,3978,1378,5724,2970,6160,3192,3306,1711,10620,1830,3782,5859,7056,4160,8580,2211,6834,4692,9660,2485,15336,2628,5402,8325,8550,5852,12012,3081,15800,8100,6642,3403,20916,7140,7310,7482,15312,3916,24030,8190,12558,8556,8742,8930,27360,4656,14259,14553,22275,5050,20604,5253,21424,21840,11130,5671,34668,5886,23980,12210,31080,6328,25764,13110,20010,20358,13806,14042,57120,10890,14762,15006,22878,15500,47250,8001,32512,16512,33540,8515,51876,17556,17822,36180,36720,9316,37812,9591,58380,19740,20022,20306,77220,20880,21170,32193,32634,11026,67050,11325,45904,34884,47124,23870,72540,12246,24806,25122,76320,25760,65205,13203,40098,54120,27390,13861,112224,21294,57460,43605,44118,14878,60204,45675,77000,31152,31506,15931,144990,16290,65884,33306,67344,34040,68820,34782,52734,71064,71820,18145,128352,18528,37442,75660,85995,19306,117018,19701,119400,40200,40602,41006,124236,41820,42230,63963,107640,43472,175560,22155,67098,45156,45582,46010,185760,46872,47306,47742,144540,48620,98124,24753,149856,113400,50850,25651,155268,26106,105340,106260,107184,27028,163566,54990,83190,55932,112812,28441,286800,28920,87483,88209,88938,89670,120540,60762,122512,61752,124500
mov $1,$0
cal $0,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.
add $1,1
bin $1,2
mul $1,2
mov $2,$0
mul $2,2
mul $1,$2
div $1,8
| 125 | 1,379 | 0.784615 |
d27e0c7812a057c7cc66c15c77c40d0d44388f42 | 662 | asm | Assembly | programs/oeis/295/A295288.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/295/A295288.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/295/A295288.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A295288: Binomial transform of the centered triangular numbers A005448.
; 1,5,19,62,184,512,1360,3488,8704,21248,50944,120320,280576,647168,1478656,3350528,7536640,16842752,37421056,82706432,181927936,398458880,869269504,1889533952,4093640704,8841592832,19042140160,40902852608,87644176384,187367948288,399700393984,850940395520,1808181231616,3835405795328,8121783156736,17171279249408,36249523978240,76416058130432,160872295038976,338237264494592,710284511543296,1489838255636480,3121513511256064,6533298092244992
mov $2,$0
add $0,2
mov $1,2
add $2,1
mul $2,3
lpb $0,1
sub $0,1
mul $1,2
add $1,$2
sub $1,1
mul $2,2
lpe
sub $1,16
div $1,16
add $1,1
| 34.842105 | 442 | 0.805136 |
1ba9c5118b29a7ea875a5cf189b88c872c4ffe58 | 5,332 | asm | Assembly | Transynther/x86/_processed/NC/_zr_un_/i7-7700_9_0x48.log_21829_1048.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_zr_un_/i7-7700_9_0x48.log_21829_1048.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_zr_un_/i7-7700_9_0x48.log_21829_1048.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x59b0, %rsi
lea addresses_A_ht+0x3eb0, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
sub $42271, %r11
mov $23, %rcx
rep movsw
nop
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_UC_ht+0x6b0, %rsi
lea addresses_WC_ht+0x27c6, %rdi
clflush (%rdi)
nop
nop
sub %rbx, %rbx
mov $7, %rcx
rep movsw
nop
nop
nop
nop
nop
xor %rcx, %rcx
lea addresses_normal_ht+0x161b0, %r10
nop
nop
sub %rax, %rax
mov (%r10), %r11w
xor %rdi, %rdi
lea addresses_UC_ht+0x1075e, %r10
nop
nop
nop
nop
nop
cmp %rax, %rax
movb (%r10), %bl
sub $6951, %r10
lea addresses_A_ht+0x4d30, %rax
nop
nop
nop
nop
cmp %r10, %r10
movl $0x61626364, (%rax)
nop
nop
nop
inc %rax
lea addresses_WC_ht+0x58b0, %r11
dec %rsi
movl $0x61626364, (%r11)
nop
nop
nop
nop
nop
inc %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r8
push %r9
push %rbp
push %rsi
// Faulty Load
mov $0x350b0300000006b0, %r10
add %rsi, %rsi
movb (%r10), %r9b
lea oracles, %r8
and $0xff, %r9
shlq $12, %r9
mov (%r8,%r9,1), %r9
pop %rsi
pop %rbp
pop %r9
pop %r8
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 11, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 4, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': True, 'NT': True}}
{'fe': 1, '00': 21828}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 43 | 2,999 | 0.658477 |
44609c434fa5b696a6048c2ed1b1f62e3b76137d | 15,142 | asm | Assembly | firmware/coreboot/3rdparty/blobs/cpu/amd/geode_lx/gplvsa_ii/sysmgr/idt.asm | fabiojna02/OpenCellular | 45b6a202d6b2e2485c89955b9a6da920c4d56ddb | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 1 | 2019-11-04T07:11:25.000Z | 2019-11-04T07:11:25.000Z | firmware/coreboot/3rdparty/blobs/cpu/amd/geode_lx/gplvsa_ii/sysmgr/idt.asm | fabiojna02/OpenCellular | 45b6a202d6b2e2485c89955b9a6da920c4d56ddb | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 13 | 2018-10-12T21:29:09.000Z | 2018-10-25T20:06:51.000Z | firmware/coreboot/3rdparty/blobs/cpu/amd/geode_lx/gplvsa_ii/sysmgr/idt.asm | fabiojna02/OpenCellular | 45b6a202d6b2e2485c89955b9a6da920c4d56ddb | [
"CC-BY-4.0",
"BSD-3-Clause"
] | null | null | null | ;
; Copyright (c) 2006-2008 Advanced Micro Devices,Inc. ("AMD").
;
; This library is free software; you can redistribute it and/or modify
; it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation; either version 2.1 of the
; License, or (at your option) any later version.
;
; This code is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General
; Public License along with this library; if not, write to the
; Free Software Foundation, Inc., 59 Temple Place, Suite 330,
; Boston, MA 02111-1307 USA
;
;********************************************************************************
; Routines to:
; -set up an SMM-based IDT
; -save/restore of FPU state only as needed
;********************************************************************************
include sysmgr.inc
include vsa2.inc
include gx2.inc
.model tiny,c
.586p
.CODE
CR equ 0Dh
LF equ 0Ah
public Saved_INTs
public Trap_Common
externdef Trap_Code: dword
externdef SysMgr_VSM: dword
externdef Current_VSM: dword
externdef IDT_Base: dword
externdef IDT_Limit: dword
externdef IDT_Selector:dword
externdef pascal Parse_Capabilities: proc
externdef pascal Read_MSR_HI: proc
FPU_Owner dd 0
FPU_State db 108 dup (0)
CR0_PE equ 1
CR0_EM equ 4
;***********************************************************************
; Saves the non-SMM IDT and installs VSA's exception vectors
;***********************************************************************
Install_IDT proc
; Save IDT of interrupted thread
mov ecx, 1329h
rdmsr
mov [IDT_Selector], eax
mov eax, IDT_SIZE-1
wrmsr
mov cl, 39h
rdmsr
mov [IDT_Base], eax
mov [IDT_Limit], edx
mov eax, [SysMgr_VSM]
add eax, OFFSET Saved_INTs
mov dx, IDT_SIZE
wrmsr
nop
mov byte ptr [$-1], 0C3h ; Patch a RET at the NOP above
mov eax, [SysMgr_VSM] ; Initialize FPU owner
mov [FPU_Owner], eax
; The following code is only necessary if SysMgr starts on a non-MB boundary.
; HandlerBase = {SMM_base[31:20], CS_selector[15:0], 4'b0}
; lea di, [Saved_INTs+2] ; Patch SysMgr's CS into vector table
; mov cx, IDT_SIZE/4
; shr eax, 4 ; Compute SysMgr's CS
;InsertCS:
; mov [di], ax ; Store SysMgr's CS into vector table
; add di, 4
; loop InsertCS
ret
Install_IDT endp
;***********************************************************************
; Restores the IDT ptr and FPU state (if modified)
;***********************************************************************
Restore_IDT proc
; Restore the IDT of interrupted thread
mov ecx, 1329h
mov eax, [IDT_Selector]
wrmsr
mov cl, 39h
mov eax, [IDT_Base]
mov edx, [IDT_Limit]
wrmsr
; The RET will be patched with a NOP if FPU usage occurs
RestoreRET::
ret
; Restore the RET at RestoreRET
mov byte ptr [RestoreRET], 0C3h
; Get last VSM to use FPU
mov esi, [SysMgr_VSM]
xchg [FPU_Owner], esi
; Set VSM's CR0.EM
or fs:(VSM_Header PTR [esi]).SysStuff.State.r_CR0, CR0_EM
; Save VSM's FPU state
; NOTE: This can be done in real-mode
fnsave fs:(VSM_Header PTR [esi]).SysStuff.FPU_State
; Restore non-SMM FPU state
; NOTE: This must be done in 32-bit protected mode
mov eax, CR0 ; Enter protected mode for FPU save
or al, CR0_PE
mov CR0, eax
jmp $+2
db 66h
frstor byte ptr cs:[FPU_State]
and al, NOT CR0_PE ; Return to real mode
mov CR0, eax
ret
Restore_IDT endp
;***********************************************************************
; Handler for Trap 7 (Device Not Available)
;***********************************************************************
Trap7 proc
push eax
; Clear interrupted VSM's CR0.EM (so it will own the FPU)
mov eax, CR0
and al, NOT CR0_EM
mov CR0, eax
; Get current owner of FPU
mov eax, cs:[FPU_Owner]
; Is it non-SMM thread ?
cmp eax, cs:[SysMgr_VSM]
jne Set_EM
; Yes, enable FPU restore code in Restore_IDT
mov byte ptr cs:[RestoreRET], 90h
; Save non-SMM FPU state
; NOTE: This must be done in 32-bit protected mode
mov eax, CR0 ; Enter protected mode for FPU save
or al, CR0_PE
mov CR0, eax
jmp $+2
db 66h
fnsave byte ptr cs:[FPU_State]
and al, NOT CR0_PE ; Return to real mode
mov CR0, eax
jmp short Record_FPU_Owner
Set_EM:
; Set previous owner's CR0.EM
or fs:(VSM_Header PTR [eax]).SysStuff.State.r_CR0, CR0_EM
; Save the FPU state of the previous owner
; NOTE: This can be done in 16-bit real-mode
fnsave byte ptr fs:(VSM_Header PTR [eax]).SysStuff.FPU_State
; Set FPU flag
mov fs:(VSM_Header PTR [eax]).SysStuff.FPU_Flag, 1
Record_FPU_Owner:
; Record the new owner of the FPU
mov eax, cs:[Current_VSM]
mov cs:[FPU_Owner], eax
; Has this VSM used the FPU previously ?
cmp fs:(VSM_Header PTR [eax]).SysStuff.FPU_Flag, 0
je short Exit
; Yes, restore its FPU state
; NOTE: This can be done in 16-bit real-mode
lea eax, (VSM_Header PTR [eax]).SysStuff.FPU_State
frstor byte ptr fs:[eax]
Exit: pop eax
iret ; Return to the interrupted VSM
Trap7 endp
;***********************************************************************
; Exception vectors (segments will be patched)
;***********************************************************************
Saved_INTs:
dd OFFSET Trap_Code + 8*0
dd OFFSET Trap_Code + 8*1
dd OFFSET Trap_Code + 8*2
dd OFFSET Trap_Code + 8*3
dd OFFSET Trap_Code + 8*4
dd OFFSET Trap_Code + 8*5
dd OFFSET Trap_Code + 8*6
dd OFFSET Trap_Code + 8*7
dd OFFSET Trap_Code + 8*8
dd OFFSET Trap_Code + 8*9
dd OFFSET Trap_Code + 8*0Ah
dd OFFSET Trap_Code + 8*0Bh
dd OFFSET Trap_Code + 8*0Ch
dd OFFSET Trap_Code + 8*0Dh
dd OFFSET Trap_Code + 8*0Eh
dd OFFSET Trap_Code + 8*0Fh
IDT_SIZE equ ($-Saved_INTs)
;***********************************************************************
; Macros for performing stackless CALLs & RETs
;***********************************************************************
ROM_CALL macro Subr
local RetAddr
mov dx, RetAddr ; Put return addr in BP
jmp Subr
RetAddr:
endm
ROM_RET macro
jmp dx ; Return to caller
endm
;***********************************************************************
; BX = Exception #
;***********************************************************************
Trap_Common:
mov cs:[TrapNum], bx
mov cs:[Reg_ECX], ecx
; Disable SMIs
mov ecx, MSR_SMM_CTRL
xor eax, eax
wrmsr
ROM_CALL NewLine
cmp bl, LastTrap
jbe @f
mov bl, LastTrap
@@:
add bx, bx
mov bx, cs:[bx+TrapMsgTbl]
ROM_CALL String
lea bx, [Msg_in]
ROM_CALL String
;
; Display the VSM which generated the exception
;
pop ecx ; Get SEG:OFFSET of faulting code
mov cs:[SegOff], ecx
mov esi, cs:[Current_VSM]
mov ah, fs:(VSM_Header PTR [esi]).VSM_Type
lea si, [VSM_Table]
ASSUME SI: PTR TableItem
test ecx, 0FFFF0000h ; Is it System Manager ?
jnz ScanVSM
mov eax, cs:[SysMgr_VSM]
mov cs:[Current_VSM], eax
jmp ShowVSM
ScanVSM:
mov al, cs:[si].Vsm ; Get VSM Type from table
cmp ah, al
je ShowVSM
cmp al, VSM_ANY ; End of table ?
je ShowVSM
add si, sizeof(TableItem) ; Advance to next table entry
jmp ScanVSM
ShowVSM:
mov bx, cs:[si].MsgStr
ROM_CALL String
lea bx, Msg_VSM ; VSM
ROM_CALL String
ROM_CALL NewLine
lea bx, Msg_IP ; IP = xxxx
ROM_CALL String
cmp cs:[TrapNum], 000Dh ; Is it Trap 0Dh ?
jne ShowIP
mov ebx, cs:[Current_VSM] ; Yes, check for bad MSR address
test ecx, 0FFFF0000h ; Did SysMgr cause it ?
jnz ComputeAddr
mov ebx, cs:[SysMgr_VSM] ; Yes
ComputeAddr:
movzx esi, cx
add esi, ebx
mov eax, dword ptr fs:[esi]
cmp al, 0Fh
jne short ShowIP
cmp ah, 30h ; WRMSR ?
je short BadMSR
cmp ah, 32h ; RDMSR ?
jne ShowIP
BadMSR:
mov cs:[MSR_Access], ah
mov si, sp ; Show caller
mov cx, ss:[si+4]
sub cx, 3
; If one of the MSR routines, show caller
cmp si, OFFSET Read_MSR_HI
jb short ShowIP
cmp si, OFFSET Parse_Capabilities
jae short ShowIP
mov cx, ss:[si+2]
ShowIP:
mov ax, cx
ROM_CALL Hex16
mov al, '/'
out dx, al
movzx eax, cx
add eax, cs:[Current_VSM]
ROM_CALL Hex32
lea bx, Msg_SP ; SP = xxxx
ROM_CALL String
mov ax, sp
ROM_CALL Hex16
lea bx, Msg_BP ; BP = xxxx
ROM_CALL String
mov ax, bp
ROM_CALL Hex16
cmp cs:[MSR_Access], 0 ; Was it an MSR access ?
je Beep
ROM_CALL NewLine ; Yes
lea bx, [Msg_MSR]
ROM_CALL String
lea bx, [Msg_MSR_Wr]
cmp cs:[MSR_Access], 30h
je short ShowMSR
lea bx, [Msg_MSR_Rd]
ShowMSR:
ROM_CALL String
mov eax, cs:[Reg_ECX] ; Display invalid MSR address
ROM_CALL Hex32
HI_TONE equ 1193180/3000 ; 3 KHz
LO_TONE equ 1193180/750 ; 750 Hz
INTERVAL equ 100000/15 ; .10 second
BEEP_LOOPS equ 10
Beep:
mov bx, BEEP_LOOPS
in al, 61h
or al, 3 ; connect speaker to timer 2
out 61h, al
BeepLoop:
mov dx, HI_TONE ; Start frequency
TwoTone:
mov al, 0B6h ; timer 2 mode set
out 43h, al ; set mode
mov ax, dx
out 42h, al ; set LSB of counter
mov al, ah
out 42h, al ; set MSB of counter
mov cx, INTERVAL ; # 15 usec intervals
Interval:
in al, 61h ; Wait for 15 usec
xor al, ah
test al, 10h
jz Interval
xor ah, 10h
loop Interval
shl dx, 1 ; Divide frequency by 2
cmp dx, LO_TONE ; End frequency
jb TwoTone
dec bx ; Decrement loop counter
jnz BeepLoop ; Start tones over
in al, 61h ; Turn off speaker
and al, NOT 3
out 61h, al
Halt: hlt
jmp Halt
;***********************************************************************
; VSM strings for display of VSM causing the exception
;***********************************************************************
TableItem struc
Vsm db ?
MsgStr dw ?
TableItem ends
VSM_Table:
TableItem {VSM_SYS_MGR, Sys_Mgr_VSM}
TableItem {VSM_AUDIO, XpressAudio}
TableItem {VSM_VGA, SoftVGA}
TableItem {VSM_LEGACY, Legacy_VSM}
TableItem {VSM_PM, PM_VSM}
TableItem {VSM_OHCI, OHCI_VSM}
TableItem {VSM_i8042, i8042_VSM}
TableItem {VSM_ACPI, ACPI_VSM}
TableItem {VSM_APM, APM_VSM}
TableItem {VSM_SMB, SMB_VSM}
TableItem {VSM_BATTERY, Battery_VSM}
TableItem {VSM_RTC, RTC_VSM}
TableItem {VSM_S2D, S2D_VSM}
TableItem {VSM_SPY, Spy_VSM}
TableItem {VSM_NETWORK, Network_VSM}
TableItem {VSM_GPIO, GPIO_VSM}
TableItem {VSM_USB, USB_VSM}
TableItem {VSM_FLASH, Flash_VSM}
TableItem {VSM_INFRARED,Infrared_VSM}
TableItem {VSM_THERMAL, Thermal_VSM}
TableItem {VSM_NULL, Null_VSM}
TableItem {VSM_VIP, VIP_VSM}
TableItem {VSM_LPC, LPC_VSM}
TableItem {VSM_VUART, VUART_VSM}
TableItem {VSM_MICRO, Micro_VSM}
TableItem {VSM_USER1, User1_VSM}
TableItem {VSM_USER2, User2_VSM}
TableItem {VSM_USER3, User3_VSM}
TableItem {VSM_SUPERIO, SuperIO_VSM}
TableItem {VSM_ANY, Unknown_VSM} ; Catch-all
Msg macro TrapString
db TrapString
db 0
endm
XpressAudio: Msg "Audio"
SoftVGA: Msg "SoftVG"
Legacy_VSM: Msg "Legacy"
USB_VSM: Msg "USB"
GPIO_VSM: Msg "GPIO"
ACPI_VSM: Msg "ACPI"
Sample_VSM: Msg "Sample"
APM_VSM: Msg "APM"
Battery_VSM: Msg "Battery"
PM_VSM: Msg "PM"
S2D_VSM: Msg "SaveToRAM"
Sys_Mgr_VSM: Msg "SysMgr"
i8042_VSM: Msg "i8042"
OHCI_VSM: Msg "OHCI"
SuperIO_VSM: Msg "SuperIO"
Null_VSM: Msg "Null"
Spy_VSM: Msg "Spy"
RTC_VSM: Msg "RTC"
SPY_VSM: Msg "Spy"
Network_VSM: Msg "Network"
Infrared_VSM: Msg "Infrared"
Thermal_VSM: Msg "Thermal"
VIP_VSM: Msg "VIP"
LPC_VSM: Msg "LPC"
User1_VSM: Msg "User1"
User2_VSM: Msg "User2"
User3_VSM: Msg "User3"
SMB_VSM: Msg "SMB"
Flash_VSM: Msg "Flash"
VUART_VSM: Msg "VUART"
Micro_VSM: Msg "Micro"
Unknown_VSM: Msg "VSM???"
;***********************************************************************
; Strings describing the type of exception
;***********************************************************************
TrapMsgTbl:
dw OFFSET Trap00
dw OFFSET Trap01
dw OFFSET Trap02
dw OFFSET Trap03
dw OFFSET Trap04
dw OFFSET Trap05
dw OFFSET Trap06
dw OFFSET Trap07
dw OFFSET Trap08
dw OFFSET Trap09
dw OFFSET Trap0A
dw OFFSET Trap0B
dw OFFSET Trap0C
dw OFFSET Trap0D
dw OFFSET Trap0E
dw OFFSET Trap0F
dw OFFSET Trap10
dw OFFSET Trap11
dw OFFSET Trapnn
LastTrap equ ($-TrapMsgTbl)/2
Trap00: Msg "Divide by Zero"
Trap01: Msg "Debug"
Trap02: Msg "NMI/INT 02h"
Trap03: Msg "Breakpoint"
Trap04: Msg "Overflow"
Trap05: Msg "Bounds Check"
Trap06: Msg "Invalid Opcode"
Trap07: Msg "Device Not Available"
Trap08: Msg "Double Fault"
Trap09: Msg "Invalid TSS"
Trap0A: Msg "INT 0Ah"
Trap0B: Msg "Segment Not Present"
Trap0C: Msg "Stack Fault"
Trap0D: Msg "General Protection"
Trap0E: Msg "Page Fault"
Trap0F: Msg "INT 0Fh"
Trap10: Msg "INT 10h"
Trap11: Msg "Aligment Check"
Trapnn: Msg "Trap ??"
;***********************************************************************
; Miscellaneous strings
;***********************************************************************
Msg_in: Msg " in "
Msg_VSM: Msg " VSM"
Msg_SP: Msg " SP="
Msg_BP: Msg " BP="
Msg_IP: Msg "IP="
Msg_MSR: Msg "Invalid MSR "
Msg_MSR_Rd: Msg "read: "
Msg_MSR_Wr: Msg "write: "
;***********************************************************************
; Stackless display routines
;***********************************************************************
NewLine:
mov al, CR
out DBG_PORT, al
ROM_RET
String:
mov al, cs:[bx]
or al, al
jz StringExit
out DBG_PORT, al
in al, 80h
inc bx ; Advance ptr
jmp String
StringExit:
ROM_RET
Seg_Addr:
mov si, bp
rol eax, 16
xchg ah, al
ROM_CALL Hex8
xchg ah, al
ROM_CALL Hex8
mov al, ':'
out DBG_PORT, al
rol eax, 16
xchg ah, al
ROM_CALL Hex8
xchg ah, al
ROM_CALL Hex8
mov bp, si ; Restore ret addr
ROM_RET
Hex32: rol edx, 16 ; Save return address in upper EDX
rol eax, 8
ROM_CALL Hex8
rol eax, 8
ROM_CALL Hex8
rol eax, 8
ROM_CALL Hex8
rol eax, 8
ROM_CALL Hex8
mov al, ' '
out DBG_PORT, al
rol edx, 16 ; Restore return address
ROM_RET
Hex16: rol edx, 16 ; Save return address in upper EDX
xchg ah, al
ROM_CALL Hex8
xchg ah, al
ROM_CALL Hex8
rol edx, 16 ; Restore return address
mov al, ' '
out DBG_PORT, al
ROM_RET
Hex8:
; Display 4 MSBs
mov di, ax
rol al, 4
and al, 0Fh
add al, '0' ; Convert to ASCII
cmp al, '9'
jbe @f
add al, 7 ; 'A'-'F'
@@: out DBG_PORT, al
in al, 80h
mov ax, di
; Display 4 LSBs
and al, 0Fh
add al, '0' ; Convert to ASCII
cmp al, '9'
jbe Char
add al, 7 ; 'A'-'F'
Char: out DBG_PORT, al
in al, 80h
ROM_RET
SegOff dd 0
Reg_ECX dd 0
TrapNum dw 0
MSR_Access db 0
end
| 21.69341 | 82 | 0.599591 |
99332981d1e15bc0bd73ea31ec81bb3f0cf666cc | 481 | asm | Assembly | oeis/122/A122600.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/122/A122600.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/122/A122600.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A122600: Expansion of 1/(1 + 3*x - 4*x^2 + x^3).
; Submitted by Christian Krause
; 1,-3,13,-52,211,-854,3458,-14001,56689,-229529,929344,-3762837,15235416,-61686940,249765321,-1011279139,4094585641,-16578638800,67125538103,-271785755150,1100438056662,-4455582728689,18040286167865,-73043627475013,295747609825188,-1197457625543481
mov $3,1
lpb $0
sub $0,1
sub $3,$1
add $1,$3
add $2,$1
add $3,$2
mov $4,$1
mul $4,2
sub $4,1
add $3,$4
mul $3,-1
lpe
mov $0,$3
| 25.315789 | 249 | 0.683992 |
e790f937fec8e738ef75611f4d8a5b278c2171ee | 667 | asm | Assembly | oeis/233/A233835.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/233/A233835.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/233/A233835.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A233835: a(n) = 8*binomial(7*n + 8, n)/(7*n + 8).
; Submitted by Christian Krause
; 1,8,84,1008,13090,179088,2542512,37106784,553270671,8391423040,129058047580,2008018827360,31550226597162,499892684834368,7978140653296800,128138773298754240,2069603881026760323,33593111381834512200,547698081896206040800,8965330544164089648000,147285313888568167177866,2427601241140324533955440,40132436072780673211539040,665280959576355894155751360,11056312948460083649692524450,184173254319004767598334690592,3074529110768196528367895250276,51427966548318851928781519842688
mov $2,$0
add $2,1
mul $2,6
add $2,1
add $0,$2
bin $0,$2
mul $0,24
mov $1,$2
add $1,1
div $0,$1
div $0,3
| 41.6875 | 476 | 0.830585 |
24b8c7c7a8420d1d065875d625654133b940111c | 410 | asm | Assembly | programs/oeis/024/A024926.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/024/A024926.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/024/A024926.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A024926: a(n) = Sum_{k=1..n} floor(p(k)/k).
; 2,3,4,5,7,9,11,13,15,17,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216
add $0,5
mov $1,2
mov $3,1
lpb $0,1
mov $2,$0
sub $0,$3
sub $0,1
add $3,1
add $3,$1
add $1,$2
trn $3,$0
trn $0,6
lpe
sub $1,5
| 22.777778 | 220 | 0.6 |
cadb88f2ecafa3bbe66b76f4f88967990be13da6 | 6,085 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_954.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_954.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_zr_/i9-9900K_12_0xa0.log_21829_954.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r15
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x19faf, %rax
clflush (%rax)
nop
nop
nop
nop
add %rbx, %rbx
mov (%rax), %edi
add $12960, %rcx
lea addresses_normal_ht+0xc7fb, %rax
nop
nop
nop
nop
xor $14159, %r15
vmovups (%rax), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $1, %xmm5, %rdx
nop
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_WC_ht+0xba7b, %rcx
nop
nop
nop
and $23473, %rsi
movups (%rcx), %xmm0
vpextrq $0, %xmm0, %rbx
nop
nop
add $25621, %rsi
lea addresses_WT_ht+0x1cb7b, %rsi
lea addresses_normal_ht+0x6c7b, %rdi
nop
sub $61426, %r13
mov $35, %rcx
rep movsb
nop
and $39858, %rsi
lea addresses_A_ht+0x188db, %rsi
lea addresses_normal_ht+0x6f5b, %rdi
nop
nop
nop
nop
cmp %rbx, %rbx
mov $112, %rcx
rep movsb
nop
nop
nop
nop
dec %rsi
lea addresses_WT_ht+0x1347b, %rdx
nop
nop
sub $47213, %rax
vmovups (%rdx), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %rcx
nop
and %rsi, %rsi
lea addresses_D_ht+0x847b, %rdi
nop
nop
nop
nop
nop
sub %r15, %r15
and $0xffffffffffffffc0, %rdi
vmovaps (%rdi), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $1, %xmm4, %rax
add $39507, %rdi
lea addresses_WC_ht+0x247b, %rdi
nop
nop
nop
nop
nop
and $53164, %rcx
vmovups (%rdi), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $0, %xmm4, %rbx
add %r13, %r13
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r13
push %r14
push %r8
push %rbp
push %rdx
// Faulty Load
lea addresses_WT+0xd47b, %rbp
lfence
mov (%rbp), %r13
lea oracles, %r8
and $0xff, %r13
shlq $12, %r13
mov (%r8,%r13,1), %r13
pop %rdx
pop %rbp
pop %r8
pop %r14
pop %r13
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_WT', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': True, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 10, 'type': 'addresses_normal_ht'}}
{'src': {'same': False, 'congruent': 5, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 1, 'type': 'addresses_normal_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_D_ht', 'AVXalign': True, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': True, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'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
*/
| 40.566667 | 2,999 | 0.660312 |
a19fc24bee9891962e59b616e6d6c499684033a8 | 826 | asm | Assembly | oeis/142/A142358.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142358.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142358.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142358: Primes congruent to 7 mod 47.
; Submitted by Jon Maiga
; 7,101,383,571,853,947,1229,1511,1699,2357,3109,3203,3391,3673,3767,4049,4519,4801,5647,5741,6211,6869,7057,7151,7433,7621,8467,9689,10159,10253,10723,11287,12227,12697,12791,12979,14107,14389,15329,16363,16927,17021,17209,17491,18149,18713,19183,19559,19841,20029,20123,20593,21157,22003,22567,22943,23131,23789,23977,24071,24917,25763,25951,26891,27361,27737,28019,28771,29147,29429,30181,30557,30839,31121,31873,32531,32719,33377,33941,34129,34693,35069,35257,36479,36761,37607,37889,38453,38923
mov $1,3
mov $2,$0
add $2,2
pow $2,2
lpb $2
sub $2,2
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,47
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,93
| 34.416667 | 499 | 0.728814 |
422af19d5159209972ac74921cdfef39232411e4 | 673 | asm | Assembly | oeis/034/A034660.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/034/A034660.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/034/A034660.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A034660: Sum of n-th powers of divisors of 12.
; Submitted by Christian Krause
; 6,28,210,2044,22386,257908,3037530,36130444,431733666,5170140388,61978939050,743375541244,8918294543346,107006334784468,1283997101947770,15407492847694444,184887084343023426,2218628050709022148,26623434909949071690,319480609006403630044,3833763649708914645906,46005141850728850805428,552061570551763831158810,6624738056749922960468044,79496851942053939878082786,953962194872104906760006308,11447546167874515876354097130,137370552990967769764297408444,1648446629750526838886958006066
mov $2,3
mov $3,2
pow $3,$0
mov $1,$3
add $1,1
mul $1,$3
pow $2,$0
add $2,1
mul $1,$2
add $1,$2
mov $0,$1
| 42.0625 | 484 | 0.846954 |
81cfb362b2ed4773868baaef9cd90856fb47fe61 | 873 | asm | Assembly | WPICTF/2018/forker.level1/exploit.asm | Per5ianCat/ctf-writeups | 1fd27f5d9619bddf670f25343948a8fe2f005f63 | [
"MIT"
] | 476 | 2019-10-23T10:53:18.000Z | 2021-03-30T10:54:19.000Z | WPICTF/2018/forker.level1/exploit.asm | lqhuyapcs/PersianCatsCTF | de26220cb0af73eb79d9d829c5a4b72f61aac5d2 | [
"MIT"
] | 9 | 2020-03-29T07:33:39.000Z | 2021-03-20T09:50:56.000Z | WPICTF/2018/forker.level1/exploit.asm | lqhuyapcs/PersianCatsCTF | de26220cb0af73eb79d9d829c5a4b72f61aac5d2 | [
"MIT"
] | 61 | 2019-11-11T08:39:16.000Z | 2021-03-27T16:49:16.000Z | bits 64
section .text
global _start
_start:
jmp filename
_open: ; fd = open(filename, O_RDONLY)
pop rdi ; filename's address
mov rsi, 0x0 ; O_RDONLY
mov rax, 0x2 ; syscall id for open
syscall
jmp buffer
_read: ; read(fd, buffer, 0x100)
mov rdi, rax ; fd
pop rsi ; buffer's address
push rsi ; buffer's address to be used by write
mov rdx, 0x100 ; size
mov rax, 0x0 ; syscall id for read
syscall
_write: ; write(4, buffer, 0x100)
mov rdi, 0x4 ; socket
pop rsi ; buffer's address
mov rdx, 0x100 ; size
mov rax, 0x1 ; syscall id for write
syscall
jmp _exit
filename:
call _open
db "flag.txt", 0x0
buffer:
call _read
db ""
_exit:
| 19.840909 | 62 | 0.520046 |
5f068edc89b12bce16c5a555319e79e04f9707cc | 442 | asm | Assembly | programs/oeis/138/A138968.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/138/A138968.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/138/A138968.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A138968: Positions of the primes congruent to 1 mod 3 when all primes except 3 are listed in order.
; 3,5,7,10,11,13,17,18,20,21,24,26,28,30,33,35,36,37,41,43,45,46,47,49,52,57,58,60,62,64,66,67,69,72,73,74,77,79,81,83,84,87,89,92,94,98,99,100,104,105,109,110,111,113,114,116,120,121,124,126,128,129,130,132
add $0,1
mov $2,$0
seq $2,177965 ; Indices m for which A177961(m) - m = 1.
mov $0,$2
seq $0,99802 ; Bisection of A000720.
sub $0,1
| 44.2 | 207 | 0.687783 |
788a2c95abd77fd57d2ae1f0af7875b453c7b788 | 692 | asm | Assembly | oeis/033/A033121.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/033/A033121.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/033/A033121.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A033121: Base-3 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,1.
; Submitted by Christian Krause
; 1,3,10,31,93,280,841,2523,7570,22711,68133,204400,613201,1839603,5518810,16556431,49669293,149007880,447023641,1341070923,4023212770,12069638311,36208914933,108626744800,325880234401,977640703203,2932922109610,8798766328831,26396298986493,79188896959480,237566690878441,712700072635323,2138100217905970,6414300653717911,19242901961153733,57728705883461200,173186117650383601,519558352951150803,1558675058853452410,4676025176560357231,14028075529681071693,42084226589043215080,126252679767129645241
mov $1,3
pow $1,$0
mul $1,15
div $1,13
mov $0,$1
| 69.2 | 499 | 0.854046 |
7d779892b2ad3b416c4f1fc2219a645bc398586e | 47 | asm | Assembly | assembly/teste06.asm | jvgoncalves935/tp01-compiladores | 5ec0569e80c7404de824702856f1d862be66300f | [
"MIT"
] | null | null | null | assembly/teste06.asm | jvgoncalves935/tp01-compiladores | 5ec0569e80c7404de824702856f1d862be66300f | [
"MIT"
] | null | null | null | assembly/teste06.asm | jvgoncalves935/tp01-compiladores | 5ec0569e80c7404de824702856f1d862be66300f | [
"MIT"
] | null | null | null | push teste
push aaa
push bbb
push ccc
push ccc
| 7.833333 | 10 | 0.787234 |
faf0b45f45fc7e2f0b590bb56b4cba79438671fb | 651 | asm | Assembly | os/impl/boot.asm | Yjsmall/codeStudy | 52d983e1444c135008916c6f2562acbd2711689b | [
"Apache-2.0"
] | null | null | null | os/impl/boot.asm | Yjsmall/codeStudy | 52d983e1444c135008916c6f2562acbd2711689b | [
"Apache-2.0"
] | null | null | null | os/impl/boot.asm | Yjsmall/codeStudy | 52d983e1444c135008916c6f2562acbd2711689b | [
"Apache-2.0"
] | null | null | null | SECTION MBR vstart=0x7c00
mov ax, cs
mov ds, ax
mov es, ax
mov ss, ax
mov fs, ax
mov sp, 0x7c00
mov ax, 0xb800
mov gs, ax
; 清屏
;---------------------------------------------------
mov ax, 0600h
mov bx, 0700h
mov cx, 0
mov dx, 184fh
int 10h
; 显示"MBR"
mov byte [gs:0x00], '1'
mov byte [gs:0x01], 0xA4
mov byte [gs:0x02], ' '
mov byte [gs:0x03], 0xA4
mov byte [gs:0x04], 'M'
mov byte [gs:0x05], 0xA4
mov byte [gs:0x06], 'B'
mov byte [gs:0x07], 0xA4
mov byte [gs:0x08], 'A'
mov byte [gs:0x09], 0xA4
jmp $
times 510-($-$$) db 0
db 0x55, 0xaa
| 16.275 | 52 | 0.480799 |
eb0b24c675416a27fe5c90e3033530173bbbf0f9 | 5,671 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_147.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_147.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_147.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r15
push %r9
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x5e68, %r9
nop
nop
nop
inc %rbx
movl $0x61626364, (%r9)
add $1461, %rdx
lea addresses_normal_ht+0x19068, %r14
nop
cmp %r12, %r12
and $0xffffffffffffffc0, %r14
movntdqa (%r14), %xmm0
vpextrq $0, %xmm0, %rdi
nop
sub $59158, %rdi
lea addresses_UC_ht+0xb61c, %r15
nop
nop
nop
sub $48205, %rbx
movl $0x61626364, (%r15)
nop
nop
and %r15, %r15
lea addresses_D_ht+0xb55c, %r9
nop
nop
and %rbx, %rbx
movb (%r9), %r15b
nop
nop
nop
nop
nop
dec %rdi
lea addresses_D_ht+0x13c88, %rsi
lea addresses_A_ht+0x90d0, %rdi
nop
add $59277, %r9
mov $71, %rcx
rep movsb
nop
nop
cmp $2883, %r12
lea addresses_A_ht+0x55e8, %rdx
nop
nop
sub %rbx, %rbx
movb $0x61, (%rdx)
sub %rcx, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r15
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r9
push %rcx
push %rdi
push %rdx
// Store
lea addresses_normal+0x1d9a8, %r9
nop
nop
nop
nop
add $52047, %r10
mov $0x5152535455565758, %rdi
movq %rdi, %xmm0
movups %xmm0, (%r9)
nop
nop
nop
nop
nop
dec %rcx
// Faulty Load
lea addresses_A+0x6068, %r11
nop
add %rcx, %rcx
vmovups (%r11), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $0, %xmm0, %rdx
lea oracles, %r10
and $0xff, %rdx
shlq $12, %rdx
mov (%r10,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rcx
pop %r9
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': True, 'type': 'addresses_A', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_normal', 'size': 16, 'AVXalign': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_A', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 5, 'NT': False, 'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 9, 'NT': True, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 2, 'NT': False, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 2, 'NT': True, 'type': 'addresses_D_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'same': True, 'congruent': 6, 'NT': False, 'type': 'addresses_A_ht', 'size': 1, 'AVXalign': False}}
{'35': 21829}
35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35 35
*/
| 42.007407 | 2,999 | 0.658967 |
9be9ffb3df922cbccec19aa6a3bdbdf5c04cf11c | 509 | asm | Assembly | programs/oeis/007/A007893.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/007/A007893.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/007/A007893.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A007893: A Kutz sequence.
; 1,4,9,16,1,4,9,16,25,4,9,16,25,36,9,16,25,36,49,16,25,36,49,64,25,36,49,64,81,36,49,64,81,100,49,64,81,100,121,64,81,100,121,144,81,100,121,144,169,100,121,144,169,196,121,144,169,196,225,144,169,196,225,256,169,196,225,256,289,196,225,256,289,324,225,256,289,324,361,256,289,324,361,400,289,324,361,400,441,324,361,400,441,484,361,400,441,484,529,400
add $0,1
mov $2,$0
div $0,5
mov $1,$2
lpb $0
sub $0,1
sub $1,4
lpe
pow $1,2
mul $1,2
sub $1,2
div $1,2
add $1,1
mov $0,$1
| 28.277778 | 353 | 0.666012 |
066a39cb5d1c9d9c47588175a3f8857adf778267 | 310 | asm | Assembly | programs/oeis/021/A021459.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/021/A021459.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/021/A021459.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A021459: Decimal expansion of 1/455.
; 0,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2,1,9,7,8,0,2
add $0,1
mov $1,10
pow $1,$0
mul $1,6
div $1,2730
mod $1,10
mov $0,$1
| 28.181818 | 199 | 0.541935 |
777830f148da60f264aaecb854d2352463c5866f | 259 | asm | Assembly | programs/oeis/272/A272342.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/272/A272342.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/272/A272342.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A272342: a(n) = 27*8^n.
; 27,216,1728,13824,110592,884736,7077888,56623104,452984832,3623878656,28991029248,231928233984,1855425871872,14843406974976,118747255799808,949978046398464,7599824371187712,60798594969501696
mov $1,8
pow $1,$0
mul $1,27
mov $0,$1
| 32.375 | 192 | 0.799228 |
f65b045b8e1558914614d86f2fdd9dfdb9740c9a | 419 | asm | Assembly | programs/oeis/076/A076049.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/076/A076049.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/076/A076049.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A076049: Numbers k such that the sum of the k-th triangular number and (k+2)-nd triangular number is a triangular number.
; 0,3,8,25,54,153,322,899,1884,5247,10988,30589,64050,178293,373318,1039175,2175864,6056763,12681872,35301409,73915374,205751697,430810378,1199208779,2510946900,6989500983,14634871028,40737797125
add $0,1
cal $0,216134 ; Numbers n such that T_n and 2*T_n + 1 are triangular.
mov $1,$0
sub $1,1
| 52.375 | 195 | 0.778043 |
2c213c31d2c88b67bf13ca8f4142d8a82273d093 | 528 | asm | Assembly | LAB 4/Lab4Task1.asm | smellycattt/Microprocessor-Programming | 9046490ba7f8e97963995a32589de4ea1bdb0ef5 | [
"MIT"
] | 1 | 2019-02-15T21:21:24.000Z | 2019-02-15T21:21:24.000Z | LAB 4/Lab4Task1.asm | jyotishmaan/Microprocessor-Programming | 7139e9ba0c9fd6f452003ecf07f76b02cb6c1773 | [
"MIT"
] | null | null | null | LAB 4/Lab4Task1.asm | jyotishmaan/Microprocessor-Programming | 7139e9ba0c9fd6f452003ecf07f76b02cb6c1773 | [
"MIT"
] | null | null | null | .Model Tiny
.386
.DATA
FILE DB 'ABCD.txt',0
MYNAME DB 'Shivankit'
NEWLINE DB 0DH, 0AH
IDNO DB '2015A7PS076P'
NEWLINE2 DB 0DH, 0AH
.CODE
.Startup
;CREATING THE FILE
MOV AH, 3CH
LEA DX, FILE
MOV CL, 2;
INT 21H
;OPENING THE FILE
LEA DX, FILE
MOV AH, 3DH
MOV AL, 02H
INT 21H
;WRITING DATA INTO THE FILE
MOV BX,AX ;TRANSFERRING THE FILE HANDLE
MOV AH, 40H
MOV CX, 25
LEA DX, MYNAME
INT 21H
;CLOSING THE FILE
MOV AH, 3EH
INT 21H
.EXIT
END
| 12.571429 | 41 | 0.600379 |
63d0b4ab035634b0786d94e1c04dfaae5b5cde99 | 308 | asm | Assembly | programs/oeis/046/A046820.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/046/A046820.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/046/A046820.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A046820: Number of 1's in binary expansion of 5n.
; 0,2,2,4,2,3,4,3,2,4,3,5,4,2,3,4,2,4,4,6,3,4,5,5,4,6,2,4,3,3,4,5,2,4,4,6,4,5,6,4,3,5,4,6,5,4,5,6,4,6,6,8,2,3,4,4,3,5,3,5,4,4,5,6,2,4,4,6,4,5,6,5,4,6,5,7,6,3,4,5,3,5,5,7,4,5,6,6,5,7,4,6,5,5,6,7,4,6,6,8
mul $0,5
mov $1,$0
lpb $1
div $1,2
sub $0,$1
lpe
| 30.8 | 201 | 0.535714 |
131712da23d2419dcb046c66603d82f44b18d769 | 489 | asm | Assembly | aesni/src/aes128/encrypt8_2.asm | kazcw/block-ciphers | 34bc0199ab1872683f1738070194a9671bb5e474 | [
"Apache-2.0",
"MIT"
] | null | null | null | aesni/src/aes128/encrypt8_2.asm | kazcw/block-ciphers | 34bc0199ab1872683f1738070194a9671bb5e474 | [
"Apache-2.0",
"MIT"
] | null | null | null | aesni/src/aes128/encrypt8_2.asm | kazcw/block-ciphers | 34bc0199ab1872683f1738070194a9671bb5e474 | [
"Apache-2.0",
"MIT"
] | null | null | null | aesenc xmm0, xmm13
aesenc xmm1, xmm13
aesenc xmm2, xmm13
aesenc xmm3, xmm13
aesenc xmm4, xmm13
aesenc xmm5, xmm13
aesenc xmm6, xmm13
aesenc xmm7, xmm13
aesenc xmm0, xmm14
aesenc xmm1, xmm14
aesenc xmm2, xmm14
aesenc xmm3, xmm14
aesenc xmm4, xmm14
aesenc xmm5, xmm14
aesenc xmm6, xmm14
aesenc xmm7, xmm14
aesenclast xmm0, xmm15
aesenclast xmm1, xmm15
aesenclast xmm2, xmm15
aesenclast xmm3, xmm15
aesenclast xmm4, xmm15
aesenclast xmm5, xmm15
aesenclast xmm6, xmm15
aesenclast xmm7, xmm15 | 18.807692 | 22 | 0.801636 |
9f40c629e44fcb97c862d8c28b61ce6e216f1bb7 | 4,238 | asm | Assembly | base/win32/client/amd64/fiber.asm | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | base/win32/client/amd64/fiber.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | base/win32/client/amd64/fiber.asm | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | title "Fiber Switch"
;++
;
; Copyright (c) 2000 Microsoft Corporation
;
; Module Name:
;
; fiber.asm
;
; Abstract:
;
; This module implements the platform specific fiber swtich code.
;
; Author:
;
; David N. Cutler (davec) 7-Jul-2000
;
;--
include ksamd64.inc
;++
;
; VOID
; SwitchToFiber(
; PFIBER NewFiber
; )
;
; Routine Description:
;
; This function saves the state of the current fiber and switches to the
; specified fiber.
;
; Arguments:
;
; NewFiber (rcx) - Supplies the address of the new fiber.
;
; Return Value:
;
; None
;
;--
LEAF_ENTRY SwitchToFiber, _TEXT$00
mov rdx, gs:[TeSelf] ; get TEB address
mov rax, TeFiberData[rdx] ; get current fiber address
;
; Set new deallocation stack and fiber data in TEB.
;
mov r8, FbDeallocationStack[rcx] ; set deallocation stack address
mov TeDeallocationStack[rdx], r8 ;
mov TeFiberData[rdx], rcx ; set new fiber address
;
; Save stack limit and fiber local storage data address.
;
mov r8, TeStackLimit[rdx] ; save current stack limit
mov FbStackLimit[rax], r8 ;
mov r8, TeFlsData[rdx] ; save fiber local storage data address
mov FbFlsData[rax], r8 ;
;
; Save the nonvolitile state of the current fiber.
;
lea r8, FbFiberContext[rax] ; get fiber context record address
mov CxRbx[r8], rbx ; save nonvolatile integer registers
mov CxRbp[r8], rbp ;
mov CxRsi[r8], rsi ;
mov CxRdi[r8], rdi ;
mov CxR12[r8], r12 ;
mov CxR13[r8], r13 ;
mov CxR14[r8], r14 ;
mov CxR15[r8], r15 ;
movq CxXmm6[r8], xmm6 ; save nonvolatile floating registers
movq CxXmm7[r8], xmm7 ;
movq CxXmm8[r8], xmm8 ;
movq CxXmm9[r8], xmm9 ;
movq CxXmm10[r8], xmm10 ;
movq CxXmm11[r8], xmm11 ;
movq CxXmm12[r8], xmm12 ;
movq CxXmm13[r8], xmm13 ;
movq CxXmm14[r8], xmm14 ;
movq CxXmm15[r8], xmm15 ;
stmxcsr CxMxCsr[r8] ; save floating control and status
mov r9, [rsp] ; save return address
mov CxRip[r8], r9 ;
mov CxRsp[r8], rsp ; save stack pointer
;
; Restore the new fiber stack base, stack limit, and fiber local storage data
; address.
;
mov r8, FbStackBase[rcx] ; restore stack base
mov TeStackBase[rdx], r8 ;
mov r8, FbStackLimit[rcx] ; restore stack limit
mov TeStackLimit[rdx], r8 ;
mov r8, FbFlsData[rcx] ; restore fiber local storage data address
mov TeFlsData[rdx], r8 ;
;
; Restore nonvolitile state of the new fiber.
;
lea r8, FbFiberContext[rcx] ; get fiber context address
mov rbx, CxRbx[r8] ; restore nonvolatile integer registers
mov rbp, CxRbp[r8] ;
mov rsi, CxRsi[r8] ;
mov rdi, CxRdi[r8] ;
mov r12, CxR12[r8] ;
mov r13, CxR13[r8] ;
mov r14, CxR14[r8] ;
mov r15, CxR15[r8] ;
movq xmm6, CxXmm6[r8] ; restore nonvolatile floating registers
movq xmm7, CxXmm7[r8] ;
movq xmm8, CxXmm8[r8] ;
movq xmm9, CxXmm9[r8] ;
movq xmm10, CxXmm10[r8] ;
movq xmm11, CxXmm11[r8] ;
movq xmm12, CxXmm12[r8] ;
movq xmm13, CxXmm13[r8] ;
movq xmm14, CxXmm14[r8] ;
movq xmm15, CxXmm15[r8] ;
ldmxcsr CxMxCsr[r8] ; restore floating control and status
mov rsp, CxRsp[r8] ; restore stack pointer
ret ;
LEAF_END SwitchToFiber, _TEXT$00
end
| 31.161765 | 83 | 0.500236 |
b8669ffff5189d51fdb70461bcc8d73719776533 | 445 | asm | Assembly | programs/oeis/025/A025797.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/025/A025797.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/025/A025797.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A025797: Expansion of 1/((1-x^2)(1-x^3)(1-x^8)).
; 1,0,1,1,1,1,2,1,3,2,3,3,4,3,5,4,6,5,7,6,8,7,9,8,11,9,12,11,13,12,15,13,17,15,18,17,20,18,22,20,24,22,26,24,28,26,30,28,33,30,35,33,37,35,40,37,43,40,45,43,48,45,51
mov $3,$0
mov $5,2
lpb $5
sub $5,1
add $0,$5
sub $0,1
mov $2,$5
mov $4,$0
max $4,0
seq $4,29002 ; Expansion of 1/((1-x)*(1-x^2)*(1-x^3)*(1-x^8)).
mul $2,$4
add $1,$2
lpe
min $3,1
mul $3,$4
sub $1,$3
mov $0,$1
| 21.190476 | 165 | 0.534831 |
5886af6235a77c710c0f58180a0207955b60bf34 | 8,085 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1256.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1256.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1256.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r13
push %r14
push %r15
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x2e65, %r12
nop
add %rcx, %rcx
mov (%r12), %ax
nop
nop
nop
nop
xor $53365, %r13
lea addresses_normal_ht+0x1c127, %r15
and $41920, %rcx
vmovups (%r15), %ymm0
vextracti128 $0, %ymm0, %xmm0
vpextrq $1, %xmm0, %r14
xor %r12, %r12
lea addresses_D_ht+0x8c6a, %r15
inc %rsi
mov (%r15), %rax
nop
nop
and $43264, %r12
lea addresses_D_ht+0xc5ca, %rcx
nop
nop
nop
add $16263, %r12
mov $0x6162636465666768, %r13
movq %r13, %xmm4
movups %xmm4, (%rcx)
nop
nop
nop
nop
sub %rsi, %rsi
lea addresses_WT_ht+0x142ca, %r13
nop
nop
nop
nop
sub %r14, %r14
mov (%r13), %ecx
sub $48862, %rcx
lea addresses_normal_ht+0x199ca, %r13
nop
nop
nop
nop
sub $62052, %rcx
mov (%r13), %r12
cmp %rcx, %rcx
lea addresses_WC_ht+0xf50a, %r14
nop
nop
nop
nop
nop
xor %rcx, %rcx
movb $0x61, (%r14)
nop
nop
nop
nop
nop
cmp $43207, %r15
lea addresses_WC_ht+0xb4e, %rsi
lea addresses_WC_ht+0x1a212, %rdi
nop
nop
nop
nop
nop
sub $168, %r15
mov $6, %rcx
rep movsq
nop
nop
xor %r13, %r13
lea addresses_WC_ht+0x1d6ca, %rsi
lea addresses_D_ht+0x954a, %rdi
clflush (%rsi)
nop
nop
nop
xor $26506, %r12
mov $50, %rcx
rep movsl
dec %r13
lea addresses_UC_ht+0x9f6a, %rsi
nop
sub $49674, %r12
mov (%rsi), %r15d
nop
nop
nop
inc %r13
lea addresses_D_ht+0x1e455, %rcx
add %r13, %r13
movb (%rcx), %r15b
nop
nop
nop
nop
nop
sub %r12, %r12
lea addresses_UC_ht+0x10eca, %rsi
nop
add %r14, %r14
movw $0x6162, (%rsi)
nop
nop
nop
nop
nop
add $17604, %r13
lea addresses_WT_ht+0x68ca, %r12
nop
nop
nop
nop
nop
add %r14, %r14
movb $0x61, (%r12)
nop
nop
sub %rcx, %rcx
lea addresses_D_ht+0x142ca, %r14
nop
nop
xor %r12, %r12
mov (%r14), %ecx
nop
nop
nop
nop
dec %r12
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r15
pop %r14
pop %r13
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
// Load
lea addresses_A+0x1de88, %rbp
clflush (%rbp)
nop
nop
cmp %r10, %r10
mov (%rbp), %dx
nop
nop
nop
add %rbp, %rbp
// REPMOV
lea addresses_RW+0x21ca, %rsi
mov $0xe32, %rdi
nop
xor $7732, %r10
mov $53, %rcx
rep movsw
nop
nop
nop
nop
and $53009, %rdx
// Load
lea addresses_UC+0x34a, %rsi
nop
nop
cmp $10662, %r11
mov (%rsi), %r10d
nop
nop
xor $41100, %rcx
// Faulty Load
lea addresses_normal+0x1b2ca, %rdi
inc %rcx
vmovups (%rdi), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %r10
lea oracles, %r11
and $0xff, %r10
shlq $12, %r10
mov (%r11,%r10,1), %r10
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 1, 'same': False, 'type': 'addresses_A'}, 'OP': 'LOAD'}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_RW'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_P'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': True, 'size': 4, 'congruent': 3, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_normal'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': True, 'size': 8, 'congruent': 3, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 7, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 5, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'STOR'}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 2, 'same': False, 'type': 'addresses_WC_ht'}, 'OP': 'REPM'}
{'src': {'congruent': 10, 'same': False, 'type': 'addresses_WC_ht'}, 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'}
{'src': {'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 0, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'dst': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 10, 'same': True, 'type': 'addresses_UC_ht'}, 'OP': 'STOR'}
{'dst': {'NT': True, 'AVXalign': False, 'size': 1, 'congruent': 7, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'STOR'}
{'src': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 11, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'}
{'34': 21829}
34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34
*/
| 32.732794 | 2,999 | 0.651082 |
c73d7036ad759a00f3262f077a35368be451e7d3 | 1,380 | asm | Assembly | books_and_notes/professional_courses/operating_system/sources/extra_books/Orange'S:自己动手写操作系统光盘源代码/chapter4/a/boot.asm | gxw1/review_the_national_post-graduate_entrance_examination | 8812779a7a4ce185a531d120562d5194b697c0c9 | [
"MIT"
] | 640 | 2019-03-30T11:32:43.000Z | 2022-03-31T14:05:18.000Z | books_and_notes/professional_courses/operating_system/sources/extra_books/Orange'S:自己动手写操作系统光盘源代码/chapter4/a/boot.asm | yyzVegst/review_the_national_post-graduate_entrance_examination | 8812779a7a4ce185a531d120562d5194b697c0c9 | [
"MIT"
] | 6 | 2019-07-22T01:57:24.000Z | 2022-01-20T15:03:16.000Z | books_and_notes/professional_courses/operating_system/sources/extra_books/Orange'S:自己动手写操作系统光盘源代码/chapter4/a/boot.asm | yyzVegst/review_the_national_post-graduate_entrance_examination | 8812779a7a4ce185a531d120562d5194b697c0c9 | [
"MIT"
] | 212 | 2019-04-10T02:31:50.000Z | 2022-03-30T02:32:47.000Z |
;%define _BOOT_DEBUG_ ; 做 Boot Sector 时一定将此行注释掉!将此行打开后用 nasm Boot.asm -o Boot.com 做成一个.COM文件易于调试
%ifdef _BOOT_DEBUG_
org 0100h ; 调试状态, 做成 .COM 文件, 可调试
%else
org 07c00h ; Boot 状态, Bios 将把 Boot Sector 加载到 0:7C00 处并开始执行
%endif
jmp short LABEL_START ; Start to boot.
nop ; 这个 nop 不可少
; 下面是 FAT12 磁盘的头
BS_OEMName DB 'ForrestY' ; OEM String, 必须 8 个字节
BPB_BytsPerSec DW 512 ; 每扇区字节数
BPB_SecPerClus DB 1 ; 每簇多少扇区
BPB_RsvdSecCnt DW 1 ; Boot 记录占用多少扇区
BPB_NumFATs DB 2 ; 共有多少 FAT 表
BPB_RootEntCnt DW 224 ; 根目录文件数最大值
BPB_TotSec16 DW 2880 ; 逻辑扇区总数
BPB_Media DB 0xF0 ; 媒体描述符
BPB_FATSz16 DW 9 ; 每FAT扇区数
BPB_SecPerTrk DW 18 ; 每磁道扇区数
BPB_NumHeads DW 2 ; 磁头数(面数)
BPB_HiddSec DD 0 ; 隐藏扇区数
BPB_TotSec32 DD 0 ; wTotalSectorCount为0时这个值记录扇区数
BS_DrvNum DB 0 ; 中断 13 的驱动器号
BS_Reserved1 DB 0 ; 未使用
BS_BootSig DB 29h ; 扩展引导标记 (29h)
BS_VolID DD 0 ; 卷序列号
BS_VolLab DB 'OrangeS0.02'; 卷标, 必须 11 个字节
BS_FileSysType DB 'FAT12 ' ; 文件系统类型, 必须 8个字节
LABEL_START:
mov ax, cs
mov ds, ax
mov es, ax
Call DispStr ; 调用显示字符串例程
jmp $ ; 无限循环
DispStr:
mov ax, BootMessage
mov bp, ax ; ES:BP = 串地址
mov cx, 16 ; CX = 串长度
mov ax, 01301h ; AH = 13, AL = 01h
mov bx, 000ch ; 页号为0(BH = 0) 黑底红字(BL = 0Ch,高亮)
mov dl, 0
int 10h ; int 10h
ret
BootMessage: db "Hello, OS world!"
times 510-($-$$) db 0 ; 填充剩下的空间,使生成的二进制代码恰好为512字节
dw 0xaa55 ; 结束标志
| 26.538462 | 96 | 0.684783 |
93acc6405dac123d879faa4a96dc49727f533de8 | 1,652 | asm | Assembly | programs/oeis/067/A067726.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/067/A067726.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/067/A067726.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A067726: a(n) = 6*n^2 + 12*n.
; 18,48,90,144,210,288,378,480,594,720,858,1008,1170,1344,1530,1728,1938,2160,2394,2640,2898,3168,3450,3744,4050,4368,4698,5040,5394,5760,6138,6528,6930,7344,7770,8208,8658,9120,9594,10080,10578,11088,11610,12144,12690,13248,13818,14400,14994,15600,16218,16848,17490,18144,18810,19488,20178,20880,21594,22320,23058,23808,24570,25344,26130,26928,27738,28560,29394,30240,31098,31968,32850,33744,34650,35568,36498,37440,38394,39360,40338,41328,42330,43344,44370,45408,46458,47520,48594,49680,50778,51888,53010,54144,55290,56448,57618,58800,59994,61200,62418,63648,64890,66144,67410,68688,69978,71280,72594,73920,75258,76608,77970,79344,80730,82128,83538,84960,86394,87840,89298,90768,92250,93744,95250,96768,98298,99840,101394,102960,104538,106128,107730,109344,110970,112608,114258,115920,117594,119280,120978,122688,124410,126144,127890,129648,131418,133200,134994,136800,138618,140448,142290,144144,146010,147888,149778,151680,153594,155520,157458,159408,161370,163344,165330,167328,169338,171360,173394,175440,177498,179568,181650,183744,185850,187968,190098,192240,194394,196560,198738,200928,203130,205344,207570,209808,212058,214320,216594,218880,221178,223488,225810,228144,230490,232848,235218,237600,239994,242400,244818,247248,249690,252144,254610,257088,259578,262080,264594,267120,269658,272208,274770,277344,279930,282528,285138,287760,290394,293040,295698,298368,301050,303744,306450,309168,311898,314640,317394,320160,322938,325728,328530,331344,334170,337008,339858,342720,345594,348480,351378,354288,357210,360144,363090,366048,369018,372000,374994,378000
mov $1,4
add $1,$0
mul $1,$0
mul $1,6
add $1,18
| 183.555556 | 1,570 | 0.823245 |
5f0124e25c3f32463d1e32bc51f74f8330598a60 | 441 | asm | Assembly | oeis/039/A039651.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/039/A039651.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/039/A039651.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A039651: Number of iterations of f(x) = phi(x)+1 on n required to reach a prime.
; Submitted by Simon Strandgaard
; 1,0,0,1,0,1,0,1,1,1,0,1,0,1,2,2,0,1,0,2,1,1,0,2,2,1,1,1,0,2,0,1,2,1,3,1,0,1,3,1,0,1,0,2,3,1,0,1,1,2,3,3,0,1,1,3,1,1,0,1,0,1,1,3,2,2,0,3,4,3,0,3,0,1,1,1,1,3,0,3,2,1,0,3,3,1,2,1,0,3,1,4,1,1,1,3,0,1,1,1
bin $1,$0
lpb $0
seq $0,10 ; Euler totient function phi(n): count numbers <= n and prime to n.
add $1,1
lpe
mov $0,$1
| 40.090909 | 201 | 0.591837 |
eadc673a99fde177dfa4deae3e350f68fc7c0cc9 | 955 | asm | Assembly | oeis/159/A159661.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/159/A159661.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/159/A159661.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A159661: The general form of the recurrences are the a(j, b(j) and n(j) solutions of the 2 equations problem: 11*n(j)+1=a(j)*a(j) and 13*n(j)+1=b(j)*b(j) with positive integer elements. the solutions of the 2 equations problem: 11*n(j)+1=a(j)*a(j); 13*n(j)+1=b(j)*b(j); with integer numbers.
; Submitted by Jon Maiga
; 1,25,599,14351,343825,8237449,197354951,4728281375,113281398049,2714025271801,65023325125175,1557845777732399,37323275340452401,894200762393125225,21423495022094552999,513269679767876146751,12297048819406932969025,294615901985998515109849,7058484598844557429667351,169109014470283379796906575,4051557862687956557696090449,97068279690040674004909264201,2325587154698288219560126250375,55717023433068876595438120744799,1334882975238954750070954771624801,31981474382301845125107476398250425
lpb $0
mov $2,$0
sub $0,1
seq $2,77424 ; Chebyshev sequence T(n,12) with Diophantine property.
add $1,$2
lpe
mov $0,$1
mul $0,2
add $0,1
| 68.214286 | 489 | 0.808377 |
13cfc7a8e019c89e34dd13cb70c679830bbfdcfe | 535 | asm | Assembly | programs/oeis/057/A057050.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/057/A057050.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/057/A057050.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A057050: Let R(i,j) be the rectangle with antidiagonals 1; 2,3; 4,5,6; ...; each k is an R(i(k),j(k)) and A057050(n)=j(n^2).
; 1,3,2,6,4,1,7,3,11,6,16,10,3,15,7,21,12,2,18,7,25,13,33,20,6,28,13,37,21,4,30,12,40,21,1,31,10,42,20,54,31,7,43,18,56,30,3,43,15,57,28,72,42,11,57,25,73,40,6,56,21,73,37,91,54,16,72
add $0,1
pow $0,2
sub $0,1
seq $0,212012 ; Triangle read by rows in which row n lists the number of states of the subshells of the n-th shell of the nuclear shell model ordered by energy level in increasing order.
div $0,2
| 59.444444 | 186 | 0.672897 |
9b64d8ec6b605278f75b9851e9ad62b55a723767 | 3,213 | asm | Assembly | Transynther/x86/_processed/P/_zr_/i7-7700_9_0x48_notsx.log_174_423.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/P/_zr_/i7-7700_9_0x48_notsx.log_174_423.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/P/_zr_/i7-7700_9_0x48_notsx.log_174_423.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %r9
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0xae6d, %rsi
lea addresses_A_ht+0xba6d, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp $38418, %rbx
mov $30, %rcx
rep movsb
nop
nop
nop
cmp $46584, %r9
lea addresses_D_ht+0x12e75, %r9
nop
nop
nop
nop
dec %r13
vmovups (%r9), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $0, %xmm7, %rbx
sub $51394, %rbx
lea addresses_normal_ht+0x1e66d, %rcx
nop
xor $54104, %r14
mov $0x6162636465666768, %rsi
movq %rsi, (%rcx)
nop
and $24925, %rcx
lea addresses_UC_ht+0x1eed, %rcx
nop
nop
nop
nop
nop
cmp $32847, %r13
movw $0x6162, (%rcx)
nop
nop
nop
nop
sub %r9, %r9
lea addresses_UC_ht+0x6ced, %rbx
nop
nop
nop
nop
cmp $26578, %rsi
movb $0x61, (%rbx)
nop
nop
nop
nop
nop
sub $60755, %rbx
lea addresses_D_ht+0x2f67, %r9
xor %rdi, %rdi
and $0xffffffffffffffc0, %r9
vmovntdqa (%r9), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $1, %xmm2, %r13
sub $48797, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r9
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r9
push %rax
push %rbp
push %rcx
push %rsi
// Store
lea addresses_WT+0x1636d, %r12
nop
sub %r9, %r9
mov $0x5152535455565758, %rax
movq %rax, (%r12)
nop
nop
nop
nop
inc %rbp
// Faulty Load
mov $0xb6d, %rcx
nop
nop
add $59743, %r12
mov (%rcx), %ebp
lea oracles, %r12
and $0xff, %rbp
shlq $12, %rbp
mov (%r12,%rbp,1), %rbp
pop %rsi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_P', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_WT', 'congruent': 10}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_P', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_WT_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 3}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 5}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 7}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 6}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': True, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 0}}
{'00': 174}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 22.95 | 521 | 0.651416 |
fd7447583389cbb9a58042ab1fdce031ef73aaa4 | 2,626 | asm | Assembly | data/tilesets/ruins_of_alph_collision.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | data/tilesets/ruins_of_alph_collision.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | data/tilesets/ruins_of_alph_collision.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | tilecoll WALL, WALL, WALL, WALL ; 00
tilecoll WALL, WALL, WALL, FLOOR ; 01
tilecoll WALL, WALL, FLOOR, WALL ; 02
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04
tilecoll WALL, WALL, WALL, FLOOR ; 05
tilecoll WALL, WALL, FLOOR, FLOOR ; 06
tilecoll WALL, WALL, FLOOR, FLOOR ; 07
tilecoll WALL, WALL, FLOOR, WALL ; 08
tilecoll WALL, FLOOR, WALL, WALL ; 09
tilecoll FLOOR, FLOOR, WALL, WALL ; 0a
tilecoll FLOOR, FLOOR, WALL, WALL ; 0b
tilecoll FLOOR, WALL, WALL, WALL ; 0c
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d
tilecoll WALL, FLOOR, WALL, FLOOR ; 0e
tilecoll FLOOR, WALL, FLOOR, WALL ; 0f
tilecoll WALL, FLOOR, FLOOR, FLOOR ; 10
tilecoll FLOOR, WALL, FLOOR, FLOOR ; 11
tilecoll FLOOR, FLOOR, WALL, FLOOR ; 12
tilecoll FLOOR, FLOOR, FLOOR, WALL ; 13
tilecoll WALL, FLOOR, WALL, WALL ; 14
tilecoll FLOOR, FLOOR, WALL, FLOOR ; 15
tilecoll FLOOR, FLOOR, FLOOR, WALL ; 16
tilecoll FLOOR, WALL, WALL, WALL ; 17
tilecoll WALL, WALL, WALL, PIT ; 18
tilecoll WALL, WALL, PIT, WALL ; 19
tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 1a
tilecoll WALL, FLOOR, WALL, FLOOR ; 1b
tilecoll FLOOR, WALL, FLOOR, WALL ; 1c
tilecoll FLOOR, FLOOR, WALL, FLOOR ; 1d
tilecoll FLOOR, FLOOR, FLOOR, WALL ; 1e
tilecoll WALL, FLOOR, FLOOR, FLOOR ; 1f
tilecoll FLOOR, WALL, FLOOR, FLOOR ; 20
tilecoll WALL, FLOOR, WALL, FLOOR ; 21
tilecoll WALL, FLOOR, FLOOR, FLOOR ; 22
tilecoll FLOOR, WALL, FLOOR, FLOOR ; 23
tilecoll WALL, WALL, WALL, WALL ; 24
tilecoll WALL, WALL, WALL, WALL ; 25
tilecoll WALL, WALL, WALL, WALL ; 26
tilecoll WALL, WALL, WALL, WALL ; 27
tilecoll WALL, WALL, WALL, WALL ; 28
tilecoll WALL, WALL, WALL, WALL ; 29
tilecoll WALL, WALL, WALL, WALL ; 2a
tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WALL ; 2b
tilecoll FLOOR, FLOOR, WALL, WARP_CARPET_DOWN ; 2c
tilecoll WALL, WALL, FLOOR, FLOOR ; 2d
tilecoll WALL, WALL, FLOOR, FLOOR ; 2e
tilecoll FLOOR, FLOOR, FLOOR, PIT ; 2f
tilecoll CAVE, WALL, FLOOR, FLOOR ; 30
tilecoll WALL, FLOOR, FLOOR, FLOOR ; 31
tilecoll FLOOR, WALL, FLOOR, FLOOR ; 32
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33
tilecoll WALL, WALL, WALL, PIT ; 34
tilecoll WALL, WALL, PIT, WALL ; 35
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37
tilecoll FLOOR, FLOOR, GRASS_4A, FLOOR ; 38
tilecoll FLOOR, FLOOR, GRASS_4B, FLOOR ; 39
tilecoll FLOOR, FLOOR, CUT_28, FLOOR ; 3a
tilecoll FLOOR, FLOOR, WATER, FLOOR ; 3b
tilecoll 64, FLOOR, WATERFALL_UP, FLOOR ; 3c
tilecoll 65, FLOOR, WATERFALL, FLOOR ; 3d
tilecoll WATERFALL_UP, FLOOR, WARP_CARPET_DOWN, FLOOR ; 3e
tilecoll WATERFALL, FLOOR, DOOR, FLOOR ; 3f
| 40.4 | 59 | 0.70754 |
50eba0e69a7bfcd4c891fcfc71e44c04681c6a51 | 817 | asm | Assembly | oeis/105/A105128.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/105/A105128.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/105/A105128.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A105128: Primes of the form 64n+33.
; Submitted by Jon Maiga
; 97,353,673,929,1249,1697,1889,2017,2081,2273,2593,2657,3041,3169,3361,3617,4001,4129,4513,5153,5281,5857,6113,6689,7393,7457,7649,7841,8161,8353,8609,8737,8929,9377,9697,10273,10337,10529,10657,11489,11617,11681,12577,12641,13217,13537,13729,13921,14177,14369,14561,14753,15073,15137,15329,15649,16033,16097,16417,16481,16673,16993,17377,17569,17761,18401,18593,18913,19489,19553,19681,19937,20129,20641,20897,21089,21601,22369,22433,22817,23201,24097,24481,25057,25121,25633,25889,26017,26209,26849
mov $1,2
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,30
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,34
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,1
lpe
mov $0,$1
add $0,31
| 35.521739 | 501 | 0.729498 |
dd6cf992afc0179bad9de04790e2dc2f68ef8f8e | 499 | asm | Assembly | oeis/215/A215666.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/215/A215666.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/215/A215666.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A215666: a(n) = 3*a(n-2) - a(n-3), with a(0)=0, a(1)=-3, and a(2)=6.
; Submitted by Christian Krause
; 0,-3,6,-9,21,-33,72,-120,249,-432,867,-1545,3033,-5502,10644,-19539,37434,-69261,131841,-245217,464784,-867492,1639569,-3067260,5786199,-10841349,20425857,-38310246,72118920,-135356595,254667006,-478188705,899357613
mov $4,-4
lpb $0
sub $0,1
mov $2,$1
add $3,$1
add $1,$3
add $2,2
add $4,2
mov $5,$4
mov $4,$1
mov $1,2
sub $5,$2
add $1,$5
lpe
mov $0,$1
div $0,2
mul $0,3
| 22.681818 | 217 | 0.61523 |
85d644bdd97fc5d733b757e146e64a0f8c6ee759 | 59 | asm | Assembly | resources/test-programs/hello_world/hello_world.asm | laconic-code/Test-RRISC-8-bit | 2361d99e06b64af672f5946440209e9fe78bf775 | [
"BSD-3-Clause"
] | null | null | null | resources/test-programs/hello_world/hello_world.asm | laconic-code/Test-RRISC-8-bit | 2361d99e06b64af672f5946440209e9fe78bf775 | [
"BSD-3-Clause"
] | null | null | null | resources/test-programs/hello_world/hello_world.asm | laconic-code/Test-RRISC-8-bit | 2361d99e06b64af672f5946440209e9fe78bf775 | [
"BSD-3-Clause"
] | null | null | null | set r0 'h'
set r1 'e'
set r2 'l'
set r3 'l'
set r4 'o'
halt | 9.833333 | 10 | 0.576271 |
10f2c0bbe107f0624e4c86e6a72436d4b722bc49 | 584 | asm | Assembly | XORInAssembly and SUM in Assembly/q2.asm | MichaelWiciak/HACKGatesAndAssemblyPrograms | 2363d29f3c6b2a20ca103ae118f552b2e147ef15 | [
"MIT"
] | null | null | null | XORInAssembly and SUM in Assembly/q2.asm | MichaelWiciak/HACKGatesAndAssemblyPrograms | 2363d29f3c6b2a20ca103ae118f552b2e147ef15 | [
"MIT"
] | null | null | null | XORInAssembly and SUM in Assembly/q2.asm | MichaelWiciak/HACKGatesAndAssemblyPrograms | 2363d29f3c6b2a20ca103ae118f552b2e147ef15 | [
"MIT"
] | null | null | null | @0
M = 0 // initialise sum to 0
@3 // Initialise my index register
M = 0
@2 // while index register - total length not equal to 0 -- sum += arr[index]
D = M // loads totalLength
@3 // laods index
D = D - M
@23 //end of the program if the condition is false
D;JEQ // code of while loop here
@1
D = M // Loads the initial starting point
@3 // loads the index
D = D + M // Adds the starting index with current index
A = D // get the value of this memory address
D = M
@0
M = D + M
@3 // load index
M = M + 1
@4 // start of loop
0;JMP //start of loop
@22 // Infinite loop end loop
0;JMP
| 23.36 | 78 | 0.648973 |
37b06179ebdc9caca4cab89d55fd0a32f45672f3 | 101,884 | asm | Assembly | non_regression/other_x86_linux_13.s.asm | LRGH/plasmasm | 4cd50546c3dc895763d72dd60b7c46179c1916bc | [
"Apache-2.0"
] | 1 | 2021-02-28T21:31:18.000Z | 2021-02-28T21:31:18.000Z | non_regression/other_x86_linux_13.s.asm | LRGH/plasmasm | 4cd50546c3dc895763d72dd60b7c46179c1916bc | [
"Apache-2.0"
] | null | null | null | non_regression/other_x86_linux_13.s.asm | LRGH/plasmasm | 4cd50546c3dc895763d72dd60b7c46179c1916bc | [
"Apache-2.0"
] | null | null | null | .file "deflate.c"
.text
.p2align 4,,15
# ----------------------
.local longest_match
.type longest_match, @function
longest_match:
.cfi_startproc
pushl %ebp
pushl %edi
movl %eax, %edi
pushl %esi
subl $44, %esp
movl 108(%eax), %ecx
movl 56(%eax), %esi
movl %edx, (%esp)
movl 124(%eax), %ebp
movl %eax, 24(%esp)
movl 120(%eax), %eax
movl %ecx, %edx
addl %esi, %ecx
movl %ecx, 28(%esp)
movl 144(%edi), %ecx
movl 44(%edi), %edi
movl %eax, 16(%esp)
movl $0, 4(%esp)
movl %ecx, 32(%esp)
leal -262(%edi), %ecx
cmpl %ecx, %edx
jbe .L2
movl %edx, %ecx
addl $262, %ecx
movl %ecx, 4(%esp)
subl %edi, 4(%esp)
.L2:
movl 24(%esp), %edi
movl 64(%edi), %ecx
movl %ecx, 8(%esp)
movl 52(%edi), %ecx
movl 28(%esp), %edi
movl %ecx, 12(%esp)
leal 258(%esi,%edx), %ecx
movzbl -1(%edi,%eax), %edx
movl %ecx, 40(%esp)
movl 16(%esp), %ecx
movb %dl, 22(%esp)
movzbl (%edi,%eax), %edx
movl %ebp, %edi
shrl $2, %edi
movb %dl, 21(%esp)
movl 24(%esp), %edx
cmpl 140(%edx), %eax
movl 116(%edx), %eax
cmovnb %edi, %ebp
movl 32(%esp), %edi
movl %eax, 36(%esp)
cmpl %eax, %edi
cmova %eax, %edi
movl %edi, 32(%esp)
jmp .L17
.p2align 4,,7
.p2align 3
.L5:
movl (%esp), %edx
movl 8(%esp), %eax
andl 12(%esp), %edx
movzwl (%eax,%edx,2), %eax
cmpl %eax, 4(%esp)
movl %eax, (%esp)
jnb .L16
subl $1, %ebp
je .L16
.L17:
movl (%esp), %eax
movl %ecx, %edi
addl %esi, %eax
movzbl (%eax,%ecx), %edx
cmpb 21(%esp), %dl
movb %dl, 16(%esp)
jne .L5
movzbl -1(%eax,%ecx), %edx
cmpb 22(%esp), %dl
movb %dl, 23(%esp)
jne .L5
movl 28(%esp), %edx
movzbl (%edx), %edx
cmpb %dl, (%eax)
jne .L5
movl 28(%esp), %edx
movzbl 1(%edx), %edx
cmpb %dl, 1(%eax)
jne .L5
movl 28(%esp), %edi
addl $2, %edi
movl %edi, %edx
leal 2(%eax), %edi
movl %edx, %eax
jmp .L14
.p2align 4,,7
.p2align 3
.L6:
movzbl 2(%edi), %edx
cmpb %dl, 2(%eax)
jne .L31
movzbl 3(%edi), %edx
cmpb %dl, 3(%eax)
jne .L32
movzbl 4(%edi), %edx
cmpb %dl, 4(%eax)
jne .L33
movzbl 5(%edi), %edx
cmpb %dl, 5(%eax)
jne .L34
movzbl 6(%edi), %edx
cmpb %dl, 6(%eax)
jne .L35
movzbl 7(%edi), %edx
cmpb %dl, 7(%eax)
jne .L36
addl $8, %edi
addl $8, %eax
movzbl (%edi), %edx
cmpb %dl, (%eax)
jne .L7
cmpl %eax, 40(%esp)
jbe .L7
.L14:
movzbl 1(%edi), %edx
cmpb %dl, 1(%eax)
je .L6
addl $1, %eax
.L7:
movl 40(%esp), %edx
subl %edx, %eax
leal 258(%eax), %edi
movl %edx, %eax
subl $258, %eax
cmpl %edi, %ecx
movl %eax, 28(%esp)
jge .L23
movl 24(%esp), %eax
movl (%esp), %ecx
cmpl %edi, 32(%esp)
movl %ecx, 112(%eax)
jle .L16
movl 28(%esp), %eax
movl %edi, %ecx
movzbl -1(%eax,%edi), %eax
movb %al, 22(%esp)
movl 40(%esp), %eax
movzbl -258(%eax,%edi), %eax
movb %al, 21(%esp)
jmp .L5
.p2align 4,,7
.p2align 3
.L16:
movl 36(%esp), %eax
cmpl %eax, %edi
cmovbe %edi, %eax
addl $44, %esp
popl %esi
popl %edi
popl %ebp
ret
.L23:
movzbl 16(%esp), %eax
movl %ecx, %edi
movb %al, 21(%esp)
movzbl 23(%esp), %eax
movb %al, 22(%esp)
jmp .L5
.L36:
addl $7, %eax
jmp .L7
.L35:
addl $6, %eax
jmp .L7
.L34:
addl $5, %eax
.p2align 4,,2
jmp .L7
.L33:
addl $4, %eax
.p2align 4,,2
jmp .L7
.L32:
addl $3, %eax
.p2align 4,,2
jmp .L7
.L31:
addl $2, %eax
.p2align 4,,2
jmp .L7
.cfi_endproc
.size longest_match, .-longest_match
# ----------------------
.p2align 4,,15
# ----------------------
.local fill_window
.type fill_window, @function
fill_window:
.cfi_startproc
pushl %ebp
movl %eax, %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $60, %esp
movl 44(%eax), %eax
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl 116(%ebp), %ecx
leal (%eax,%eax), %esi
movl %eax, %edx
movl %eax, 40(%esp)
subl $262, %eax
movl %esi, 44(%esp)
movl %eax, 36(%esp)
.p2align 4,,7
.p2align 3
.L56:
movl 60(%ebp), %edi
movl 108(%ebp), %eax
addl 36(%esp), %edx
subl %ecx, %edi
subl %eax, %edi
cmpl %edx, %eax
jnb .L64
movl (%ebp), %esi
movl 4(%esi), %ecx
testl %ecx, %ecx
movl %ecx, 12(%esp)
je .L52
.L43:
movl 56(%ebp), %edx
cmpl 12(%esp), %edi
movl %edx, 16(%esp)
movl 116(%ebp), %edx
jnb .L59
testl %edi, %edi
jne .L65
xorl %eax, %eax
.L47:
movl 5812(%ebp), %esi
addl %edx, %eax
movl %eax, 20(%esp)
movl %eax, 116(%ebp)
addl %esi, %eax
cmpl $2, %eax
jbe .L54
movl 108(%ebp), %edx
movl 56(%ebp), %eax
movl 88(%ebp), %edi
movl %esi, 16(%esp)
subl %esi, %edx
movl %eax, %ecx
movl %edi, 24(%esp)
movl 84(%ebp), %edi
movl %eax, 32(%esp)
movzbl (%eax,%edx), %eax
movl %edx, 12(%esp)
movl %edi, 28(%esp)
movl %eax, 72(%ebp)
movzbl 1(%ecx,%edx), %edi
movzbl 24(%esp), %ecx
sall %cl, %eax
xorl %eax, %edi
andl 28(%esp), %edi
movl %edi, 72(%ebp)
jmp .L53
.p2align 4,,7
.p2align 3
.L55:
movl 12(%esp), %esi
movl 32(%esp), %edx
movzbl 24(%esp), %ecx
movl 68(%ebp), %eax
movzbl 2(%edx,%esi), %edx
sall %cl, %edi
movl 64(%ebp), %ecx
xorl %edi, %edx
movl 52(%ebp), %edi
andl 28(%esp), %edx
leal (%eax,%edx,2), %eax
andl %esi, %edi
movzwl (%eax), %esi
movl %edx, 72(%ebp)
movw %si, (%ecx,%edi,2)
movzwl 12(%esp), %ecx
movl 16(%esp), %esi
addl $1, 12(%esp)
movw %cx, (%eax)
movl 20(%esp), %eax
subl $1, %esi
movl %esi, 5812(%ebp)
addl %esi, %eax
cmpl $2, %eax
jbe .L54
movl %edx, %edi
movl %esi, 16(%esp)
.L53:
movl 16(%esp), %edx
testl %edx, %edx
jne .L55
.L54:
cmpl $261, 20(%esp)
ja .L52
movl (%ebp), %eax
movl 4(%eax), %eax
testl %eax, %eax
je .L52
movl 44(%ebp), %edx
movl 20(%esp), %ecx
jmp .L56
.p2align 4,,7
.p2align 3
.L59:
xorl %ecx, %ecx
.L46:
movl 16(%esp), %edi
addl %edx, %eax
movl 12(%esp), %edx
movl %ecx, 4(%esi)
addl %eax, %edi
movl (%esi), %eax
movl %edx, 8(%esp)
movl %edi, (%esp)
movl %eax, 4(%esp)
call memcpy@PLT
movl 28(%esi), %eax
movl 24(%eax), %eax
cmpl $1, %eax
je .L66
cmpl $2, %eax
je .L67
.L49:
movl 12(%esp), %eax
addl %eax, (%esi)
addl %eax, 8(%esi)
movl 116(%ebp), %edx
jmp .L47
.p2align 4,,7
.p2align 3
.L64:
movl 40(%esp), %esi
movl 56(%ebp), %eax
movl %esi, 8(%esp)
leal (%eax,%esi), %edx
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 108(%ebp), %eax
movl 76(%ebp), %edx
subl %esi, 112(%ebp)
subl %esi, 92(%ebp)
movl %eax, 12(%esp)
subl %esi, 12(%esp)
movl 12(%esp), %eax
movl %edi, 16(%esp)
movl %eax, 108(%ebp)
movl 68(%ebp), %eax
leal (%eax,%edx,2), %eax
.p2align 4,,7
.p2align 3
.L40:
subl $2, %eax
movzwl (%eax), %ecx
movl %ecx, %edi
subl %esi, %edi
cmpl %ecx, %esi
movl $0, %ecx
cmova %ecx, %edi
subl $1, %edx
movw %di, (%eax)
jne .L40
movl 40(%esp), %esi
movl 44(%esp), %eax
addl 64(%ebp), %eax
movl %esi, %edx
.p2align 4,,7
.p2align 3
.L42:
subl $2, %eax
movzwl (%eax), %ecx
movl %ecx, %edi
subl %esi, %edi
cmpl %ecx, %esi
movl $0, %ecx
cmova %ecx, %edi
subl $1, %edx
movw %di, (%eax)
jne .L42
movl (%ebp), %esi
movl 16(%esp), %edi
addl 40(%esp), %edi
movl 12(%esp), %eax
movl 4(%esi), %ecx
testl %ecx, %ecx
movl %ecx, 12(%esp)
jne .L43
.p2align 4,,7
.p2align 3
.L52:
movl 5824(%ebp), %eax
movl 60(%ebp), %edx
cmpl %edx, %eax
jnb .L37
movl 116(%ebp), %esi
addl 108(%ebp), %esi
cmpl %esi, %eax
jnb .L57
movl 56(%ebp), %eax
subl %esi, %edx
movl $258, %edi
cmpl $258, %edx
cmovbe %edx, %edi
movl %edi, 8(%esp)
addl %esi, %eax
addl %edi, %esi
movl $0, 4(%esp)
movl %eax, (%esp)
call memset@PLT
movl %esi, 5824(%ebp)
.L37:
addl $60, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.L66:
movl 12(%esp), %eax
movl %edi, 4(%esp)
movl %eax, 8(%esp)
movl 48(%esi), %eax
movl %eax, (%esp)
call adler32@PLT
movl %eax, 48(%esi)
jmp .L49
.L67:
movl 12(%esp), %eax
movl %edi, 4(%esp)
movl %eax, 8(%esp)
movl 48(%esi), %eax
movl %eax, (%esp)
call crc32@PLT
movl %eax, 48(%esi)
jmp .L49
.L57:
leal 258(%esi), %ecx
cmpl %ecx, %eax
jnb .L37
subl %eax, %esi
subl %eax, %edx
addl $258, %esi
cmpl %edx, %esi
cmova %edx, %esi
addl 56(%ebp), %eax
movl %esi, 8(%esp)
movl $0, 4(%esp)
movl %eax, (%esp)
call memset@PLT
addl %esi, 5824(%ebp)
addl $60, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.L65:
movl 12(%esp), %ecx
movl %edi, 12(%esp)
subl %edi, %ecx
jmp .L46
.cfi_endproc
.size fill_window, .-fill_window
# ----------------------
.p2align 4,,15
# ----------------------
.local deflate_fast
.type deflate_fast, @function
deflate_fast:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
subl $76, %esp
movl 96(%esp), %ebp
.L91:
movl 116(%ebp), %edi
.p2align 4,,7
.p2align 3
.L85:
cmpl $261, %edi
jbe .L108
.L73:
movl 108(%ebp), %esi
movl 56(%ebp), %eax
movl 88(%ebp), %ecx
movl 72(%ebp), %edx
movl 52(%ebp), %edi
movzbl 2(%eax,%esi), %eax
sall %cl, %edx
movl 64(%ebp), %ecx
andl %esi, %edi
xorl %edx, %eax
movl 68(%ebp), %edx
andl 84(%ebp), %eax
movl %eax, 72(%ebp)
leal (%edx,%eax,2), %eax
movzwl (%eax), %edx
testl %edx, %edx
movw %dx, (%ecx,%edi,2)
movw %si, (%eax)
je .L107
movl 44(%ebp), %eax
movl %esi, %ecx
subl %edx, %ecx
subl $262, %eax
cmpl %eax, %ecx
jbe .L76
.L107:
movl 96(%ebp), %eax
.L74:
cmpl $2, %eax
jbe .L77
movl 5792(%ebp), %edx
subl $3, %eax
movl 5796(%ebp), %ecx
subw 112(%ebp), %si
leal 1(%edx), %edi
movw %si, (%ecx,%edx,2)
movl 5784(%ebp), %ecx
subl $1, %esi
movl %edi, 5792(%ebp)
movb %al, (%ecx,%edx)
movzbl %al, %eax
movzbl _length_code@GOTOFF(%ebx,%eax), %eax
addw $1, 1176(%ebp,%eax,4)
cmpw $255, %si
ja .L78
movzwl %si, %esi
movzbl _dist_code@GOTOFF(%ebx,%esi), %eax
.L79:
addw $1, 2440(%ebp,%eax,4)
movl 5788(%ebp), %eax
movl 116(%ebp), %ecx
subl $1, %eax
cmpl %eax, 5792(%ebp)
movl %ecx, 24(%esp)
sete %al
movzbl %al, %eax
movl %eax, 28(%esp)
movl 96(%ebp), %eax
subl %eax, 24(%esp)
movl 24(%esp), %edi
cmpl 128(%ebp), %eax
movl %eax, 56(%esp)
movl %edi, 116(%ebp)
ja .L80
cmpl $2, %edi
jbe .L80
movl 64(%ebp), %ecx
leal -1(%eax), %esi
movl 108(%ebp), %eax
movl %esi, 96(%ebp)
movl 72(%ebp), %edi
movl %esi, 20(%esp)
movl %ecx, 32(%esp)
movl 52(%ebp), %ecx
movl %eax, 60(%esp)
leal 1(%eax), %edx
movl %ebp, %eax
movl %ebp, 96(%esp)
movl %ecx, 36(%esp)
movl 68(%ebp), %ecx
movl %ecx, 40(%esp)
movl 56(%ebp), %ecx
movl %ecx, 44(%esp)
movl 88(%ebp), %ecx
movl %ecx, 48(%esp)
movl 84(%ebp), %ecx
movl %ecx, 52(%esp)
jmp .L82
.p2align 4,,7
.p2align 3
.L109:
movl %eax, %edi
movl 96(%esp), %eax
movl %esi, 20(%esp)
.L82:
movl %edx, 108(%eax)
movl 44(%esp), %eax
movzbl 48(%esp), %ecx
movl 32(%esp), %esi
movzbl 2(%eax,%edx), %eax
sall %cl, %edi
movl 96(%esp), %ecx
xorl %edi, %eax
movl 36(%esp), %edi
andl 52(%esp), %eax
movl %eax, 72(%ecx)
movl 40(%esp), %ecx
andl %edx, %edi
leal (%ecx,%eax,2), %ecx
movzwl (%ecx), %ebp
movw %bp, (%esi,%edi,2)
movl 20(%esp), %esi
movl 96(%esp), %edi
movw %dx, (%ecx)
addl $1, %edx
subl $1, %esi
testl %esi, %esi
movl %esi, 96(%edi)
jne .L109
movl 60(%esp), %edx
movl %edi, %ebp
addl 56(%esp), %edx
movl %edx, 108(%edi)
movl 24(%esp), %edi
.p2align 4,,7
.p2align 3
.L83:
movl 28(%esp), %eax
testl %eax, %eax
je .L85
movl 92(%ebp), %eax
xorl %ecx, %ecx
subl %eax, %edx
testl %eax, %eax
js .L86
addl 56(%ebp), %eax
movl %eax, %ecx
.L86:
movl %edx, 8(%esp)
movl %ecx, 4(%esp)
movl $0, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %esi
movl 108(%ebp), %eax
movl 28(%esi), %edi
movl %eax, 92(%ebp)
movl %edi, (%esp)
call _tr_flush_bits
movl 20(%edi), %eax
movl 16(%esi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L110
.L88:
movl (%ebp), %eax
movl 16(%eax), %esi
testl %esi, %esi
jne .L91
.L90:
addl $76, %esp
xorl %eax, %eax
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L77:
movl 56(%ebp), %eax
movl 5796(%ebp), %ecx
movzbl (%eax,%esi), %edx
xorl %esi, %esi
movl 5792(%ebp), %eax
movw %si, (%ecx,%eax,2)
movl 5784(%ebp), %ecx
leal 1(%eax), %esi
movl %esi, 5792(%ebp)
movb %dl, (%ecx,%eax)
addw $1, 148(%ebp,%edx,4)
movl 5788(%ebp), %eax
subl $1, %eax
cmpl %eax, 5792(%ebp)
sete %al
movzbl %al, %eax
movl %eax, 28(%esp)
movl 116(%ebp), %eax
leal -1(%eax), %edi
movl 108(%ebp), %eax
movl %edi, 116(%ebp)
leal 1(%eax), %edx
movl %edx, 108(%ebp)
jmp .L83
.p2align 4,,7
.p2align 3
.L80:
movl 56(%ebp), %eax
movl 56(%esp), %edx
addl 108(%ebp), %edx
movl $0, 96(%ebp)
movl 88(%ebp), %ecx
movl 24(%esp), %edi
movl %edx, 108(%ebp)
movzbl (%eax,%edx), %esi
movl %esi, 72(%ebp)
movzbl 1(%eax,%edx), %eax
sall %cl, %esi
xorl %esi, %eax
andl 84(%ebp), %eax
movl %eax, 72(%ebp)
jmp .L83
.p2align 4,,7
.p2align 3
.L108:
movl %ebp, %eax
call fill_window
movl 116(%ebp), %eax
cmpl $261, %eax
ja .L73
movl 100(%esp), %edi
testl %edi, %edi
je .L90
testl %eax, %eax
je .L72
cmpl $2, %eax
ja .L73
movl 96(%ebp), %eax
movl 108(%ebp), %esi
jmp .L74
.p2align 4,,7
.p2align 3
.L78:
shrw $7, %si
movzwl %si, %esi
movzbl _dist_code@GOTOFF+256(%ebx,%esi), %eax
jmp .L79
.p2align 4,,7
.p2align 3
.L76:
movl %ebp, %eax
call longest_match
movl 108(%ebp), %esi
movl %eax, 96(%ebp)
jmp .L74
.L110:
movl 12(%esi), %eax
movl 16(%edi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%esi)
addl %edx, 16(%edi)
addl %edx, 20(%esi)
subl %edx, 16(%esi)
subl %edx, 20(%edi)
jne .L88
movl 8(%edi), %eax
movl %eax, 16(%edi)
jmp .L88
.L72:
movl 108(%ebp), %edx
movl $2, %eax
cmpl $2, %edx
cmovbe %edx, %eax
cmpl $4, 100(%esp)
movl %eax, 5812(%ebp)
je .L111
movl 5792(%ebp), %ecx
movl $1, %eax
testl %ecx, %ecx
je .L71
movl 92(%ebp), %eax
xorl %ecx, %ecx
subl %eax, %edx
testl %eax, %eax
js .L97
addl 56(%ebp), %eax
movl %eax, %ecx
.L97:
movl %edx, 8(%esp)
movl %ecx, 4(%esp)
movl $0, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %edi
movl 108(%ebp), %eax
movl 28(%edi), %esi
movl %eax, 92(%ebp)
movl %esi, (%esp)
call _tr_flush_bits
movl 20(%esi), %eax
movl 16(%edi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L112
.L99:
movl (%ebp), %eax
movl 16(%eax), %eax
testl %eax, %eax
setne %al
movzbl %al, %eax
.L71:
addl $76, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.L111:
movl 92(%ebp), %eax
xorl %ecx, %ecx
subl %eax, %edx
testl %eax, %eax
js .L93
addl 56(%ebp), %eax
movl %eax, %ecx
.L93:
movl %edx, 8(%esp)
movl %ecx, 4(%esp)
movl $1, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %edi
movl 108(%ebp), %eax
movl 28(%edi), %esi
movl %eax, 92(%ebp)
movl %esi, (%esp)
call _tr_flush_bits
movl 20(%esi), %eax
movl 16(%edi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L113
.L95:
movl (%ebp), %eax
cmpl $1, 16(%eax)
sbbl %eax, %eax
addl $76, %esp
popl %ebx
addl $3, %eax
popl %esi
popl %edi
popl %ebp
ret
.L112:
movl 12(%edi), %eax
movl 16(%esi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%edi)
addl %edx, 16(%esi)
addl %edx, 20(%edi)
subl %edx, 16(%edi)
subl %edx, 20(%esi)
jne .L99
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L99
.L113:
movl 12(%edi), %eax
movl 16(%esi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%edi)
addl %edx, 16(%esi)
addl %edx, 20(%edi)
subl %edx, 16(%edi)
subl %edx, 20(%esi)
jne .L95
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L95
.cfi_endproc
.size deflate_fast, .-deflate_fast
# ----------------------
.p2align 4,,15
# ----------------------
.local deflate_slow
.type deflate_slow, @function
deflate_slow:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
subl $60, %esp
movl 80(%esp), %ebp
.L170:
movl 116(%ebp), %edx
.p2align 4,,7
.p2align 3
.L115:
cmpl $261, %edx
jbe .L173
.L153:
movl 108(%ebp), %esi
movl 56(%ebp), %eax
movl 88(%ebp), %ecx
movl 72(%ebp), %edx
movl 52(%ebp), %edi
movzbl 2(%eax,%esi), %eax
sall %cl, %edx
movl 64(%ebp), %ecx
andl %esi, %edi
xorl %edx, %eax
movl 68(%ebp), %edx
andl 84(%ebp), %eax
movl %eax, 72(%ebp)
leal (%edx,%eax,2), %eax
movzwl (%eax), %edx
movw %dx, (%ecx,%edi,2)
movl %edx, %ecx
movl 96(%ebp), %edx
movw %si, (%eax)
movl 112(%ebp), %eax
testl %ecx, %ecx
movl $2, 96(%ebp)
movl %edx, 120(%ebp)
movl %eax, 100(%ebp)
je .L156
cmpl 128(%ebp), %edx
jnb .L156
movl 44(%ebp), %eax
movl %esi, %edi
subl %ecx, %edi
subl $262, %eax
cmpl %eax, %edi
jbe .L174
.L156:
movl $2, %eax
.L121:
cmpl $2, %edx
jbe .L126
cmpl %eax, %edx
jb .L126
movl 116(%ebp), %eax
movl %esi, %ecx
subl $3, %edx
subw 100(%ebp), %cx
leal -3(%esi,%eax), %eax
movl 5796(%ebp), %esi
movl %eax, 24(%esp)
movl 5792(%ebp), %eax
leal -1(%ecx), %edi
subl $2, %ecx
movw %di, (%esi,%eax,2)
movl 5784(%ebp), %esi
leal 1(%eax), %edi
movl %edi, 5792(%ebp)
movb %dl, (%esi,%eax)
movzbl %dl, %edx
movzbl _length_code@GOTOFF(%ebx,%edx), %eax
addw $1, 1176(%ebp,%eax,4)
cmpw $255, %cx
ja .L127
movzwl %cx, %ecx
movzbl _dist_code@GOTOFF(%ebx,%ecx), %eax
.L128:
addw $1, 2440(%ebp,%eax,4)
movl 5792(%ebp), %eax
movl 116(%ebp), %ecx
movl %eax, 32(%esp)
movl 5788(%ebp), %eax
leal 1(%ecx), %edi
movl %edi, 28(%esp)
subl $1, %eax
movl %eax, 36(%esp)
movl 120(%ebp), %eax
subl %eax, 28(%esp)
movl 28(%esp), %edi
leal -2(%eax), %esi
movl %eax, 40(%esp)
movl 108(%ebp), %eax
movl %edi, 116(%ebp)
movl %esi, 120(%ebp)
movl %eax, 44(%esp)
addl $1, %eax
.p2align 4,,7
.p2align 3
.L172:
cmpl 24(%esp), %eax
movl %esi, 20(%esp)
movl %eax, 108(%ebp)
ja .L129
movl 56(%ebp), %edx
movl 88(%ebp), %ecx
movl 72(%ebp), %edi
movzbl 2(%edx,%eax), %edx
sall %cl, %edi
movl 68(%ebp), %ecx
xorl %edi, %edx
movl 52(%ebp), %edi
andl 84(%ebp), %edx
movl %edx, 72(%ebp)
leal (%ecx,%edx,2), %edx
movl 64(%ebp), %ecx
movzwl (%edx), %esi
andl %eax, %edi
movw %si, (%ecx,%edi,2)
movw %ax, (%edx)
.L129:
movl 20(%esp), %esi
addl $1, %eax
subl $1, %esi
testl %esi, %esi
movl %esi, 120(%ebp)
jne .L172
movl 40(%esp), %eax
movl 44(%esp), %ecx
movl 36(%esp), %edi
cmpl %edi, 32(%esp)
movl $0, 104(%ebp)
movl 28(%esp), %edx
leal -1(%eax,%ecx), %eax
movl $2, 96(%ebp)
movl %eax, 108(%ebp)
jne .L115
movl 92(%ebp), %edx
xorl %ecx, %ecx
subl %edx, %eax
testl %edx, %edx
js .L133
movl 56(%ebp), %ecx
addl %edx, %ecx
.L133:
movl %eax, 8(%esp)
movl %ecx, 4(%esp)
movl $0, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %esi
movl 108(%ebp), %eax
movl 28(%esi), %edi
movl %eax, 92(%ebp)
movl %edi, (%esp)
call _tr_flush_bits
movl 20(%edi), %eax
movl 16(%esi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L175
.L135:
movl (%ebp), %eax
movl 16(%eax), %eax
testl %eax, %eax
jne .L170
.L137:
xorl %eax, %eax
.L167:
addl $60, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L126:
movl 104(%ebp), %edi
testl %edi, %edi
je .L138
movl 56(%ebp), %eax
movl 5796(%ebp), %ecx
movzbl -1(%eax,%esi), %edx
xorl %esi, %esi
movl 5792(%ebp), %eax
movw %si, (%ecx,%eax,2)
movl 5784(%ebp), %ecx
leal 1(%eax), %esi
movl %esi, 5792(%ebp)
movb %dl, (%ecx,%eax)
addw $1, 148(%ebp,%edx,4)
movl 5788(%ebp), %eax
subl $1, %eax
cmpl %eax, 5792(%ebp)
je .L176
.L140:
movl 116(%ebp), %eax
addl $1, 108(%ebp)
leal -1(%eax), %edx
movl (%ebp), %eax
movl %edx, 116(%ebp)
movl 16(%eax), %eax
testl %eax, %eax
je .L137
cmpl $261, %edx
ja .L153
.L173:
movl %ebp, %eax
call fill_window
movl 116(%ebp), %eax
cmpl $261, %eax
ja .L153
movl 84(%esp), %edx
testl %edx, %edx
je .L137
testl %eax, %eax
je .L119
cmpl $2, %eax
ja .L153
movl 96(%ebp), %edx
movl 112(%ebp), %eax
movl $2, 96(%ebp)
movl 108(%ebp), %esi
movl %edx, 120(%ebp)
movl %eax, 100(%ebp)
movl $2, %eax
jmp .L121
.p2align 4,,7
.p2align 3
.L138:
movl 116(%ebp), %eax
addl $1, %esi
movl $1, 104(%ebp)
movl %esi, 108(%ebp)
leal -1(%eax), %edx
movl %edx, 116(%ebp)
jmp .L115
.p2align 4,,7
.p2align 3
.L127:
shrw $7, %cx
movzwl %cx, %ecx
movzbl _dist_code@GOTOFF+256(%ebx,%ecx), %eax
jmp .L128
.p2align 4,,7
.p2align 3
.L176:
movl 92(%ebp), %edx
xorl %ecx, %ecx
movl 108(%ebp), %eax
subl %edx, %eax
testl %edx, %edx
js .L141
movl 56(%ebp), %ecx
addl %edx, %ecx
.L141:
movl %eax, 8(%esp)
movl %ecx, 4(%esp)
movl $0, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %esi
movl 108(%ebp), %eax
movl 28(%esi), %edi
movl %eax, 92(%ebp)
movl %edi, (%esp)
call _tr_flush_bits
movl 20(%edi), %eax
movl 16(%esi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
je .L140
movl 12(%esi), %eax
movl 16(%edi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%esi)
addl %edx, 16(%edi)
addl %edx, 20(%esi)
subl %edx, 16(%esi)
subl %edx, 20(%edi)
jne .L140
movl 8(%edi), %eax
movl %eax, 16(%edi)
jmp .L140
.p2align 4,,7
.p2align 3
.L174:
movl %ecx, %edx
movl %ebp, %eax
call longest_match
cmpl $5, %eax
movl %eax, 96(%ebp)
ja .L171
cmpl $1, 136(%ebp)
je .L177
cmpl $3, %eax
je .L125
.L171:
movl 120(%ebp), %edx
movl 108(%ebp), %esi
jmp .L121
.L175:
movl 12(%esi), %eax
movl 16(%edi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%esi)
addl %edx, 16(%edi)
addl %edx, 20(%esi)
subl %edx, 16(%esi)
subl %edx, 20(%edi)
jne .L135
movl 8(%edi), %eax
movl %eax, 16(%edi)
jmp .L135
.L177:
movl 108(%ebp), %esi
.L124:
movl $2, 96(%ebp)
movl 120(%ebp), %edx
movl $2, %eax
jmp .L121
.L125:
movl 108(%ebp), %esi
movl %esi, %eax
subl 112(%ebp), %eax
cmpl $4096, %eax
ja .L124
movl 120(%ebp), %edx
movl $3, %eax
jmp .L121
.L119:
movl 104(%ebp), %edi
testl %edi, %edi
jne .L178
.L143:
movl 108(%ebp), %edx
movl $2, %eax
cmpl $2, %edx
cmovbe %edx, %eax
cmpl $4, 84(%esp)
movl %eax, 5812(%ebp)
je .L179
movl 5792(%ebp), %ecx
movl $1, %eax
testl %ecx, %ecx
je .L167
movl 92(%ebp), %eax
xorl %ecx, %ecx
subl %eax, %edx
testl %eax, %eax
js .L149
addl 56(%ebp), %eax
movl %eax, %ecx
.L149:
movl %edx, 8(%esp)
movl %ecx, 4(%esp)
movl $0, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %edi
movl 108(%ebp), %eax
movl 28(%edi), %esi
movl %eax, 92(%ebp)
movl %esi, (%esp)
call _tr_flush_bits
movl 20(%esi), %eax
movl 16(%edi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L180
.L151:
movl (%ebp), %eax
movl 16(%eax), %eax
testl %eax, %eax
setne %al
addl $60, %esp
popl %ebx
movzbl %al, %eax
popl %esi
popl %edi
popl %ebp
ret
.L178:
movl 108(%ebp), %eax
xorl %esi, %esi
movl 56(%ebp), %edx
movl 5796(%ebp), %ecx
movzbl -1(%edx,%eax), %edx
movl 5792(%ebp), %eax
movw %si, (%ecx,%eax,2)
movl 5784(%ebp), %ecx
leal 1(%eax), %esi
movl %esi, 5792(%ebp)
movb %dl, (%ecx,%eax)
addw $1, 148(%ebp,%edx,4)
movl $0, 104(%ebp)
jmp .L143
.L179:
movl 92(%ebp), %eax
xorl %ecx, %ecx
subl %eax, %edx
testl %eax, %eax
js .L145
addl 56(%ebp), %eax
movl %eax, %ecx
.L145:
movl %edx, 8(%esp)
movl %ecx, 4(%esp)
movl $1, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %edi
movl 108(%ebp), %eax
movl 28(%edi), %esi
movl %eax, 92(%ebp)
movl %esi, (%esp)
call _tr_flush_bits
movl 20(%esi), %eax
movl 16(%edi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L181
.L147:
movl (%ebp), %eax
cmpl $1, 16(%eax)
sbbl %eax, %eax
addl $60, %esp
popl %ebx
addl $3, %eax
popl %esi
popl %edi
popl %ebp
ret
.L180:
movl 12(%edi), %eax
movl 16(%esi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%edi)
addl %edx, 16(%esi)
addl %edx, 20(%edi)
subl %edx, 16(%edi)
subl %edx, 20(%esi)
jne .L151
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L151
.L181:
movl 12(%edi), %eax
movl 16(%esi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%edi)
addl %edx, 16(%esi)
addl %edx, 20(%edi)
subl %edx, 16(%edi)
subl %edx, 20(%esi)
jne .L147
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L147
.cfi_endproc
.size deflate_slow, .-deflate_slow
# ----------------------
.p2align 4,,15
# ----------------------
.local deflate_stored
.type deflate_stored, @function
deflate_stored:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $44, %esp
movl 64(%esp), %esi
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl 12(%esi), %eax
subl $5, %eax
movl %eax, %edi
cmpl $65535, %eax
movl $65535, %eax
cmovb %edi, %eax
movl %eax, 24(%esp)
jmp .L195
.p2align 4,,7
.p2align 3
.L191:
movl (%esi), %eax
movl 16(%eax), %ecx
testl %ecx, %ecx
je .L193
.L225:
movl 108(%esi), %edx
movl 92(%esi), %eax
.L188:
movl 44(%esi), %edi
subl %eax, %edx
leal -262(%edi), %ecx
cmpl %ecx, %edx
jnb .L223
.L195:
movl 116(%esi), %edx
cmpl $1, %edx
jbe .L224
.L184:
addl 108(%esi), %edx
movl 92(%esi), %eax
movl 24(%esp), %edi
testl %edx, %edx
movl %edx, 108(%esi)
movl $0, 116(%esi)
leal (%edi,%eax), %ecx
je .L187
cmpl %ecx, %edx
jb .L188
.L187:
subl %ecx, %edx
movl %edx, 116(%esi)
xorl %edx, %edx
movl %ecx, 108(%esi)
subl %eax, %ecx
testl %eax, %eax
js .L189
addl 56(%esi), %eax
movl %eax, %edx
.L189:
movl %edx, 4(%esp)
movl %ecx, 8(%esp)
movl $0, 12(%esp)
movl %esi, (%esp)
call _tr_flush_block
movl (%esi), %edi
movl 108(%esi), %eax
movl 28(%edi), %ebp
movl %eax, 92(%esi)
movl %ebp, (%esp)
call _tr_flush_bits
movl 20(%ebp), %eax
movl 16(%edi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
je .L191
movl 12(%edi), %eax
movl 16(%ebp), %ecx
movl %edx, 8(%esp)
movl %edx, 28(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 28(%esp), %edx
addl %edx, 12(%edi)
addl %edx, 16(%ebp)
addl %edx, 20(%edi)
subl %edx, 16(%edi)
subl %edx, 20(%ebp)
jne .L191
movl 8(%ebp), %eax
movl %eax, 16(%ebp)
movl (%esi), %eax
movl 16(%eax), %ecx
testl %ecx, %ecx
jne .L225
.L193:
xorl %eax, %eax
.L186:
addl $44, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L224:
movl %esi, %eax
call fill_window
movl 116(%esi), %edx
testl %edx, %edx
jne .L184
movl 68(%esp), %edi
testl %edi, %edi
je .L193
cmpl $4, 68(%esp)
movl $0, 5812(%esi)
je .L226
movl 108(%esi), %ecx
movl $1, %eax
movl 92(%esi), %edx
cmpl %edx, %ecx
jle .L186
subl %edx, %ecx
xorb %al, %al
testl %edx, %edx
js .L206
movl 56(%esi), %eax
addl %edx, %eax
.L206:
movl %ecx, 8(%esp)
movl %eax, 4(%esp)
movl $0, 12(%esp)
movl %esi, (%esp)
call _tr_flush_block
movl (%esi), %ebp
movl 108(%esi), %eax
movl 28(%ebp), %edi
movl %eax, 92(%esi)
movl %edi, (%esp)
call _tr_flush_bits
movl 20(%edi), %eax
movl 16(%ebp), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L227
.L208:
movl (%esi), %eax
movl 16(%eax), %eax
testl %eax, %eax
setne %al
movzbl %al, %eax
jmp .L186
.p2align 4,,7
.p2align 3
.L223:
xorl %ecx, %ecx
testl %eax, %eax
js .L196
addl 56(%esi), %eax
movl %eax, %ecx
.L196:
movl %edx, 8(%esp)
movl %ecx, 4(%esp)
movl $0, 12(%esp)
movl %esi, (%esp)
call _tr_flush_block
movl (%esi), %edi
movl 108(%esi), %eax
movl 28(%edi), %ebp
movl %eax, 92(%esi)
movl %ebp, (%esp)
call _tr_flush_bits
movl 20(%ebp), %eax
movl 16(%edi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L228
.L198:
movl (%esi), %eax
movl 16(%eax), %edx
testl %edx, %edx
jne .L195
jmp .L193
.p2align 4,,7
.p2align 3
.L228:
movl 12(%edi), %eax
movl 16(%ebp), %ecx
movl %edx, 8(%esp)
movl %edx, 28(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 28(%esp), %edx
addl %edx, 12(%edi)
addl %edx, 16(%ebp)
addl %edx, 20(%edi)
subl %edx, 16(%edi)
subl %edx, 20(%ebp)
jne .L198
movl 8(%ebp), %eax
movl %eax, 16(%ebp)
jmp .L198
.L226:
movl 92(%esi), %edx
xorl %ecx, %ecx
movl 108(%esi), %eax
subl %edx, %eax
testl %edx, %edx
js .L202
movl 56(%esi), %ecx
addl %edx, %ecx
.L202:
movl %eax, 8(%esp)
movl %ecx, 4(%esp)
movl $1, 12(%esp)
movl %esi, (%esp)
call _tr_flush_block
movl (%esi), %ebp
movl 108(%esi), %eax
movl 28(%ebp), %edi
movl %eax, 92(%esi)
movl %edi, (%esp)
call _tr_flush_bits
movl 20(%edi), %eax
movl 16(%ebp), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L229
.L204:
movl (%esi), %eax
cmpl $1, 16(%eax)
sbbl %eax, %eax
addl $3, %eax
jmp .L186
.L227:
movl 12(%ebp), %eax
movl 16(%edi), %ecx
movl %edx, 8(%esp)
movl %edx, 24(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 24(%esp), %edx
addl %edx, 12(%ebp)
addl %edx, 16(%edi)
addl %edx, 20(%ebp)
subl %edx, 16(%ebp)
subl %edx, 20(%edi)
jne .L208
movl 8(%edi), %eax
movl %eax, 16(%edi)
jmp .L208
.L229:
movl 12(%ebp), %eax
movl 16(%edi), %ecx
movl %edx, 8(%esp)
movl %edx, 24(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 24(%esp), %edx
addl %edx, 12(%ebp)
addl %edx, 16(%edi)
addl %edx, 20(%ebp)
subl %edx, 16(%ebp)
subl %edx, 20(%edi)
jne .L204
movl 8(%edi), %eax
movl %eax, 16(%edi)
jmp .L204
.cfi_endproc
.size deflate_stored, .-deflate_stored
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateSetDictionary
.type deflateSetDictionary, @function
deflateSetDictionary:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $76, %esp
movl 96(%esp), %ecx
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl 100(%esp), %esi
movl 104(%esp), %ebp
testl %ecx, %ecx
je .L251
movl 96(%esp), %eax
movl 28(%eax), %edi
testl %edi, %edi
je .L251
testl %esi, %esi
je .L251
movl 24(%edi), %eax
cmpl $2, %eax
movl %eax, 52(%esp)
je .L251
cmpl $1, %eax
je .L257
movl 116(%edi), %eax
testl %eax, %eax
jne .L251
movl 44(%edi), %eax
movl $0, 24(%edi)
cmpl %eax, %ebp
jnb .L258
.L235:
movl 96(%esp), %eax
movl 4(%eax), %eax
movl %eax, 56(%esp)
movl 96(%esp), %eax
movl (%eax), %eax
movl %eax, 60(%esp)
movl 96(%esp), %eax
movl %ebp, 4(%eax)
movl %esi, (%eax)
movl %edi, %eax
call fill_window
movl 116(%edi), %eax
cmpl $2, %eax
jbe .L237
movl %eax, %edx
.p2align 4,,7
.p2align 3
.L240:
movl 88(%edi), %ecx
movl 108(%edi), %esi
movl 68(%edi), %ebp
movl 72(%edi), %eax
movl %ecx, 28(%esp)
movl 56(%edi), %ecx
movl %edi, 20(%esp)
movl %ebp, 48(%esp)
movl %ecx, 32(%esp)
movl 84(%edi), %ecx
movl %ecx, 36(%esp)
movl 64(%edi), %ecx
movl %ecx, 40(%esp)
movl 52(%edi), %ecx
movl %ecx, 44(%esp)
leal -2(%esi,%edx), %ecx
movl %ecx, 24(%esp)
jmp .L239
.p2align 4,,7
.p2align 3
.L259:
movl %edx, %eax
.L239:
movl 32(%esp), %edx
movzbl 28(%esp), %ecx
movl 40(%esp), %ebp
movzbl 2(%edx,%esi), %edx
sall %cl, %eax
movl 44(%esp), %ecx
xorl %eax, %edx
movl 20(%esp), %eax
andl 36(%esp), %edx
andl %esi, %ecx
movl %edx, 72(%eax)
movl 48(%esp), %eax
leal (%eax,%edx,2), %eax
movzwl (%eax), %edi
movw %di, (%ebp,%ecx,2)
movw %si, (%eax)
addl $1, %esi
cmpl 24(%esp), %esi
jne .L259
movl 20(%esp), %edi
movl %esi, 108(%edi)
movl %edi, %eax
movl $2, 116(%edi)
call fill_window
movl 116(%edi), %edx
cmpl $2, %edx
ja .L240
movl %edx, %eax
.L237:
movl 108(%edi), %edx
movl %eax, 5812(%edi)
movl 60(%esp), %esi
movl $0, 116(%edi)
movl $2, 120(%edi)
addl %eax, %edx
movl 96(%esp), %eax
movl %edx, 108(%edi)
movl %edx, 92(%edi)
movl $2, 96(%edi)
movl $0, 104(%edi)
movl %esi, (%eax)
movl 56(%esp), %esi
movl %esi, 4(%eax)
movl 52(%esp), %eax
movl %eax, 24(%edi)
xorl %eax, %eax
.L253:
addl $76, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.L258:
movl 52(%esp), %edx
testl %edx, %edx
je .L260
.L234:
movl %ebp, %edx
movl %eax, %ebp
subl %eax, %edx
addl %edx, %esi
jmp .L235
.L257:
cmpl $42, 4(%edi)
jne .L251
movl 116(%edi), %edx
testl %edx, %edx
jne .L251
movl 96(%esp), %eax
movl %ebp, 8(%esp)
movl %esi, 4(%esp)
movl 48(%eax), %eax
movl %eax, (%esp)
call adler32@PLT
movl 96(%esp), %ecx
movl %eax, 48(%ecx)
movl 44(%edi), %eax
movl $0, 24(%edi)
cmpl %eax, %ebp
jnb .L234
jmp .L235
.L260:
movl 76(%edi), %eax
movl 68(%edi), %edx
addl $2147483647, %eax
leal (%eax,%eax), %ecx
movw $0, (%edx,%eax,2)
movl %ecx, 8(%esp)
movl $0, 4(%esp)
movl %edx, (%esp)
call memset@PLT
movl 44(%edi), %eax
movl $0, 108(%edi)
movl $0, 92(%edi)
movl $0, 5812(%edi)
jmp .L234
.L251:
movl $-2, %eax
jmp .L253
.cfi_endproc
.size deflateSetDictionary, .-deflateSetDictionary
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateResetKeep
.type deflateResetKeep, @function
deflateResetKeep:
.cfi_startproc
pushl %edi
pushl %esi
pushl %ebx
subl $16, %esp
movl 32(%esp), %esi
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
testl %esi, %esi
je .L271
movl 28(%esi), %edi
testl %edi, %edi
je .L271
movl 32(%esi), %edx
testl %edx, %edx
je .L271
movl 36(%esi), %eax
testl %eax, %eax
je .L271
movl 8(%edi), %eax
movl $0, 20(%esi)
movl $0, 8(%esi)
movl $0, 24(%esi)
movl $2, 44(%esi)
movl %eax, 16(%edi)
movl 24(%edi), %eax
movl $0, 20(%edi)
testl %eax, %eax
js .L263
jne .L264
movl $113, 4(%edi)
.L266:
movl $0, 8(%esp)
movl $0, 4(%esp)
movl $0, (%esp)
call adler32@PLT
.L267:
movl %eax, 48(%esi)
movl $0, 40(%edi)
movl %edi, (%esp)
call _tr_init
xorl %eax, %eax
.L273:
addl $16, %esp
popl %ebx
popl %esi
popl %edi
ret
.p2align 4,,7
.p2align 3
.L263:
negl %eax
movl %eax, 24(%edi)
.L264:
cmpl $2, %eax
movl $42, 4(%edi)
jne .L266
movl $0, 8(%esp)
movl $0, 4(%esp)
movl $0, (%esp)
call crc32@PLT
jmp .L267
.p2align 4,,7
.p2align 3
.L271:
movl $-2, %eax
jmp .L273
.cfi_endproc
.size deflateResetKeep, .-deflateResetKeep
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateReset
.type deflateReset, @function
deflateReset:
.cfi_startproc
pushl %edi
pushl %esi
pushl %ebx
subl $16, %esp
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl 32(%esp), %esi
movl %esi, (%esp)
call deflateResetKeep@PLT
testl %eax, %eax
movl %eax, %edi
jne .L276
movl 28(%esi), %esi
movl 44(%esi), %eax
movl 76(%esi), %ecx
addl %eax, %eax
movl %eax, 60(%esi)
movl 68(%esi), %eax
leal 2147483647(%ecx), %edx
leal (%edx,%edx), %ecx
movw $0, (%eax,%edx,2)
movl %ecx, 8(%esp)
movl $0, 4(%esp)
movl %eax, (%esp)
call memset@PLT
movl 132(%esi), %eax
movl $0, 108(%esi)
movl $0, 92(%esi)
movl $0, 116(%esi)
leal (%eax,%eax,2), %eax
leal configuration_table@GOTOFF(%ebx,%eax,4), %eax
movzwl 2(%eax), %edx
movl $0, 5812(%esi)
movl $2, 120(%esi)
movl $2, 96(%esi)
movl %edx, 128(%esi)
movzwl (%eax), %edx
movl $0, 104(%esi)
movl $0, 72(%esi)
movl %edx, 140(%esi)
movzwl 4(%eax), %edx
movzwl 6(%eax), %eax
movl %edx, 144(%esi)
movl %eax, 124(%esi)
.L276:
addl $16, %esp
movl %edi, %eax
popl %ebx
popl %esi
popl %edi
ret
.cfi_endproc
.size deflateReset, .-deflateReset
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateSetHeader
.type deflateSetHeader, @function
deflateSetHeader:
.cfi_startproc
movl 4(%esp), %eax
testl %eax, %eax
je .L282
movl 28(%eax), %eax
testl %eax, %eax
je .L282
cmpl $2, 24(%eax)
jne .L282
movl 8(%esp), %edx
movl %edx, 28(%eax)
xorl %eax, %eax
ret
.p2align 4,,7
.p2align 3
.L282:
movl $-2, %eax
ret
.cfi_endproc
.size deflateSetHeader, .-deflateSetHeader
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflatePending
.type deflatePending, @function
deflatePending:
.cfi_startproc
pushl %esi
movl 8(%esp), %eax
movl 12(%esp), %ecx
movl 16(%esp), %edx
testl %eax, %eax
je .L287
movl 28(%eax), %eax
testl %eax, %eax
je .L287
testl %ecx, %ecx
je .L285
movl 20(%eax), %esi
movl %esi, (%ecx)
.L285:
testl %edx, %edx
je .L288
movl 5820(%eax), %eax
movl %eax, (%edx)
xorl %eax, %eax
popl %esi
ret
.p2align 4,,7
.p2align 3
.L288:
xorl %eax, %eax
popl %esi
ret
.p2align 4,,7
.p2align 3
.L287:
movl $-2, %eax
popl %esi
ret
.cfi_endproc
.size deflatePending, .-deflatePending
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflatePrime
.type deflatePrime, @function
deflatePrime:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
subl $16, %esp
movl 32(%esp), %eax
movl 36(%esp), %ebp
testl %eax, %eax
je .L297
movl 28(%eax), %edi
testl %edi, %edi
je .L297
movl 16(%edi), %eax
addl $2, %eax
cmpl %eax, 5796(%edi)
jb .L298
.p2align 4,,7
.p2align 3
.L295:
movl 5820(%edi), %edx
movl $16, %esi
movl $1, %eax
subl %edx, %esi
cmpl %esi, %ebp
cmovle %ebp, %esi
movl %esi, %ecx
sall %cl, %eax
movl %edx, %ecx
subl $1, %eax
andl 40(%esp), %eax
sall %cl, %eax
orw %ax, 5816(%edi)
leal (%edx,%esi), %eax
movl %eax, 5820(%edi)
movl %edi, (%esp)
call _tr_flush_bits
movl %esi, %ecx
sarl %cl, 40(%esp)
subl %esi, %ebp
jne .L295
xorl %eax, %eax
.L294:
addl $16, %esp
popl %esi
popl %edi
popl %ebp
ret
.L298:
movl $-5, %eax
jmp .L294
.L297:
movl $-2, %eax
jmp .L294
.cfi_endproc
.size deflatePrime, .-deflatePrime
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateTune
.type deflateTune, @function
deflateTune:
.cfi_startproc
movl 4(%esp), %eax
testl %eax, %eax
je .L304
movl 28(%eax), %eax
testl %eax, %eax
je .L304
movl 8(%esp), %edx
movl %edx, 140(%eax)
movl 12(%esp), %edx
movl %edx, 128(%eax)
movl 16(%esp), %edx
movl %edx, 144(%eax)
movl 20(%esp), %edx
movl %edx, 124(%eax)
xorl %eax, %eax
ret
.p2align 4,,7
.p2align 3
.L304:
movl $-2, %eax
ret
.cfi_endproc
.size deflateTune, .-deflateTune
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateBound
.type deflateBound, @function
deflateBound:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
subl $8, %esp
movl 28(%esp), %ecx
movl 24(%esp), %esi
leal 7(%ecx), %edi
movl %edi, %edx
leal 63(%ecx), %eax
shrl $3, %edx
shrl $6, %eax
addl %edx, %eax
addl %ecx, %eax
testl %esi, %esi
je .L306
movl 28(%esi), %esi
testl %esi, %esi
je .L306
movl 24(%esi), %edx
cmpl $1, %edx
je .L310
cmpl $2, %edx
je .L311
cmpl $1, %edx
sbbl %edx, %edx
notl %edx
andl $6, %edx
.L309:
cmpl $15, 48(%esi)
je .L330
.L318:
addl $8, %esp
popl %esi
leal 5(%edx,%eax), %eax
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L311:
movl 28(%esi), %edx
testl %edx, %edx
movl %edx, (%esp)
je .L322
movl 16(%edx), %ebp
testl %ebp, %ebp
je .L323
movl 20(%edx), %edx
movl %edx, 4(%esp)
addl $20, %edx
.L313:
movl (%esp), %ebp
movl 28(%ebp), %ebp
testl %ebp, %ebp
je .L314
subl %edx, %ebp
.p2align 4,,7
.p2align 3
.L315:
addl $1, %edx
cmpb $0, -1(%ebp,%edx)
jne .L315
.L314:
movl (%esp), %ebp
movl 36(%ebp), %ebp
testl %ebp, %ebp
je .L316
subl %edx, %ebp
.p2align 4,,7
.p2align 3
.L317:
addl $1, %edx
cmpb $0, -1(%ebp,%edx)
jne .L317
.L316:
leal 2(%edx), %ebp
movl %ebp, 4(%esp)
movl (%esp), %ebp
movl 44(%ebp), %ebp
testl %ebp, %ebp
cmovne 4(%esp), %edx
cmpl $15, 48(%esi)
jne .L318
.L330:
cmpl $15, 80(%esi)
jne .L318
movl %ecx, %eax
movl %ecx, %esi
shrl $12, %eax
addl $8, %esp
addl %edi, %eax
shrl $14, %esi
addl %esi, %eax
shrl $25, %ecx
addl %ecx, %eax
popl %esi
addl %edx, %eax
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L310:
cmpl $1, 108(%esi)
sbbl %edx, %edx
andl $-4, %edx
addl $10, %edx
jmp .L309
.p2align 4,,7
.p2align 3
.L306:
addl $8, %esp
addl $11, %eax
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L322:
movl $18, %edx
jmp .L309
.p2align 4,,7
.p2align 3
.L323:
movl $18, %edx
jmp .L313
.cfi_endproc
.size deflateBound, .-deflateBound
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflate
.type deflate, @function
deflate:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $44, %esp
movl 64(%esp), %ecx
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
testl %ecx, %ecx
je .L490
movl 64(%esp), %eax
movl 28(%eax), %ebp
testl %ebp, %ebp
je .L490
cmpl $5, 68(%esp)
ja .L490
movl 12(%eax), %edx
testl %edx, %edx
je .L333
movl (%eax), %edi
testl %edi, %edi
je .L580
.L334:
movl 4(%ebp), %eax
cmpl $666, %eax
je .L581
.L335:
movl 64(%esp), %esi
movl 16(%esi), %ecx
testl %ecx, %ecx
je .L582
movl %esi, (%ebp)
movl 68(%esp), %edi
cmpl $42, %eax
movl 40(%ebp), %esi
movl %edi, 40(%ebp)
movl %esi, 24(%esp)
je .L583
cmpl $69, %eax
je .L556
.L593:
cmpl $73, %eax
movl 20(%ebp), %edx
je .L584
.L366:
cmpl $91, %eax
je .L585
.L341:
cmpl $103, %eax
je .L586
.L390:
testl %edx, %edx
movl 64(%esp), %eax
jne .L587
movl 4(%eax), %edx
testl %edx, %edx
jne .L400
movl 68(%esp), %eax
movl 24(%esp), %esi
cmpl $5, %eax
leal (%eax,%eax), %edx
sete %al
movzbl %al, %eax
xorl %ecx, %ecx
leal (%eax,%eax,8), %eax
subl %eax, %edx
movl %esi, %eax
addl %eax, %eax
cmpl $5, %esi
setge %cl
leal (%ecx,%ecx,8), %ecx
subl %ecx, %eax
cmpl %eax, %edx
jg .L403
cmpl $4, 68(%esp)
jne .L564
.L403:
movl 4(%ebp), %eax
.p2align 4,,7
.p2align 3
.L405:
movl 116(%ebp), %ecx
testl %ecx, %ecx
jne .L406
movl 68(%esp), %edx
testl %edx, %edx
je .L565
cmpl $666, %eax
jne .L406
.p2align 4,,7
.p2align 3
.L408:
cmpl $4, 68(%esp)
jne .L565
movl 24(%ebp), %eax
testl %eax, %eax
jle .L532
cmpl $2, %eax
je .L588
movl 64(%esp), %eax
movl 8(%ebp), %edi
movl 48(%eax), %edx
movl 20(%ebp), %eax
movl %edx, %ecx
leal 1(%eax), %esi
shrl $24, %edx
movl %esi, 20(%ebp)
shrl $16, %ecx
movb %dl, (%edi,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %esi
movl %esi, 20(%ebp)
movb %cl, (%edx,%eax)
movl 64(%esp), %eax
movl 8(%ebp), %edi
movzwl 48(%eax), %edx
movl 20(%ebp), %eax
movl %edx, %ecx
leal 1(%eax), %esi
shrl $8, %ecx
movl %esi, 20(%ebp)
movb %cl, (%edi,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %ecx
leal 1(%eax), %esi
movl %esi, 20(%ebp)
movb %dl, (%ecx,%eax)
movl 64(%esp), %eax
.L478:
movl 28(%eax), %esi
movl %esi, (%esp)
call _tr_flush_bits
movl 64(%esp), %edi
movl 20(%esi), %eax
movl 16(%edi), %edi
cmpl %eax, %edi
cmova %eax, %edi
testl %edi, %edi
jne .L589
.L480:
movl 24(%ebp), %eax
testl %eax, %eax
jle .L482
negl %eax
movl %eax, 24(%ebp)
.L482:
movl 20(%ebp), %edx
xorl %eax, %eax
testl %edx, %edx
sete %al
addl $44, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L581:
cmpl $4, 68(%esp)
je .L335
.L333:
movl z_errmsg@GOT(%ebx), %eax
movl 64(%esp), %esi
movl 16(%eax), %eax
movl %eax, 24(%esi)
movl $-2, %eax
jmp .L554
.p2align 4,,7
.p2align 3
.L587:
movl 28(%eax), %esi
movl %esi, (%esp)
call _tr_flush_bits
movl 64(%esp), %eax
movl 20(%esi), %edi
movl 16(%eax), %eax
cmpl %edi, %eax
cmovbe %eax, %edi
testl %edi, %edi
jne .L590
testl %eax, %eax
je .L563
.L399:
movl 64(%esp), %eax
movl 4(%eax), %edx
movl 4(%ebp), %eax
cmpl $666, %eax
je .L487
testl %edx, %edx
je .L405
.L406:
movl 136(%ebp), %eax
cmpl $2, %eax
je .L420
cmpl $3, %eax
je .L458
movl 132(%ebp), %eax
movl 68(%esp), %esi
movl %ebp, (%esp)
leal (%eax,%eax,2), %eax
movl %esi, 4(%esp)
call *configuration_table@GOTOFF+8(%ebx,%eax,4)
movl %eax, %edx
andl $-3, %edx
leal -2(%eax), %ecx
.L430:
cmpl $1, %ecx
jbe .L557
.L468:
testl %edx, %edx
jne .L469
.L544:
movl 64(%esp), %eax
movl 16(%eax), %eax
testl %eax, %eax
jne .L565
movl $-1, 40(%ebp)
.L565:
xorl %eax, %eax
.L554:
addl $44, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L583:
cmpl $2, 24(%ebp)
je .L591
movl 48(%ebp), %eax
sall $12, %eax
leal -30720(%eax), %ecx
xorl %eax, %eax
cmpl $1, 136(%ebp)
jle .L592
.L350:
movl 108(%ebp), %esi
orl %eax, %ecx
movl $138547333, %edx
movl %ecx, %eax
orl $32, %eax
movl $113, 4(%ebp)
testl %esi, %esi
movl 8(%ebp), %esi
cmovne %eax, %ecx
movl %ecx, %eax
mull %edx
movl 20(%ebp), %eax
subl %edx, %ecx
shrl $1, %ecx
addl %edx, %ecx
shrl $4, %ecx
movl %ecx, %edx
sall $5, %edx
subl %ecx, %edx
addl $31, %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movl %edx, %ecx
shrl $8, %ecx
movb %cl, (%esi,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %ecx
leal 1(%eax), %esi
movl %esi, 20(%ebp)
movb %dl, (%ecx,%eax)
movl 108(%ebp), %edi
testl %edi, %edi
je .L352
movl 64(%esp), %eax
movl 8(%ebp), %edi
movl 48(%eax), %edx
movl 20(%ebp), %eax
movl %edx, %ecx
leal 1(%eax), %esi
shrl $24, %edx
movl %esi, 20(%ebp)
shrl $16, %ecx
movb %dl, (%edi,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %esi
movl %esi, 20(%ebp)
movb %cl, (%edx,%eax)
movl 64(%esp), %eax
movl 8(%ebp), %esi
movzwl 48(%eax), %edx
movl 20(%ebp), %eax
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movl %edx, %ecx
shrl $8, %ecx
movb %cl, (%esi,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %ecx
leal 1(%eax), %esi
movl %esi, 20(%ebp)
movb %dl, (%ecx,%eax)
.L352:
movl $0, 8(%esp)
movl $0, 4(%esp)
movl $0, (%esp)
call adler32@PLT
movl 64(%esp), %edi
movl %eax, 48(%edi)
movl 4(%ebp), %eax
cmpl $69, %eax
jne .L593
.L556:
movl 28(%ebp), %eax
.L349:
movl 16(%eax), %edx
testl %edx, %edx
je .L354
movl 32(%ebp), %esi
movzwl 20(%eax), %ecx
movl 20(%ebp), %edx
cmpl %esi, %ecx
movl %edx, 20(%esp)
jbe .L355
movl %edx, %ecx
jmp .L362
.p2align 4,,7
.p2align 3
.L356:
leal 1(%ecx), %eax
movl %eax, 20(%ebp)
movl 16(%edi), %eax
movzbl (%eax,%esi), %eax
movl 8(%ebp), %esi
movb %al, (%esi,%ecx)
movl 32(%ebp), %eax
leal 1(%eax), %esi
movl 28(%ebp), %eax
movl %esi, 32(%ebp)
movzwl 20(%eax), %ecx
cmpl %esi, %ecx
jbe .L507
movl 20(%ebp), %ecx
.L362:
cmpl %ecx, 12(%ebp)
movl %eax, %edi
jne .L356
movl 44(%eax), %edi
testl %edi, %edi
je .L357
cmpl %edx, %ecx
ja .L594
.L357:
movl 64(%esp), %eax
movl 28(%eax), %esi
movl %esi, (%esp)
call _tr_flush_bits
movl 64(%esp), %edi
movl 20(%esi), %eax
movl 16(%edi), %edi
cmpl %eax, %edi
cmova %eax, %edi
testl %edi, %edi
jne .L595
.L359:
movl 20(%ebp), %edx
cmpl 12(%ebp), %edx
movl %edx, 20(%esp)
je .L596
movl 28(%ebp), %edi
movl %edx, %ecx
movl 32(%ebp), %esi
jmp .L356
.p2align 4,,7
.p2align 3
.L507:
movl 20(%ebp), %edx
.L355:
movl 44(%eax), %esi
testl %esi, %esi
je .L363
cmpl %edx, 20(%esp)
jb .L597
.L363:
movl 20(%eax), %edi
cmpl %edi, 32(%ebp)
je .L364
movl 4(%ebp), %eax
cmpl $73, %eax
jne .L366
.p2align 4,,7
.p2align 3
.L584:
movl 28(%ebp), %eax
jmp .L483
.p2align 4,,7
.p2align 3
.L599:
movl 92(%ebp), %edx
xorl %esi, %esi
subl %edx, %eax
testl %edx, %edx
js .L453
movl 56(%ebp), %esi
addl %edx, %esi
.L453:
movl %eax, 8(%esp)
movl %esi, 4(%esp)
movl $0, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %esi
movl 108(%ebp), %eax
movl 28(%esi), %edi
movl %eax, 92(%ebp)
movl %edi, (%esp)
call _tr_flush_bits
movl 20(%edi), %eax
movl 16(%esi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L598
.L455:
movl (%ebp), %eax
movl 16(%eax), %eax
testl %eax, %eax
je .L544
.L458:
movl 116(%ebp), %edi
jmp .L452
.p2align 4,,7
.p2align 3
.L432:
movl $0, 96(%ebp)
.L486:
movl 108(%ebp), %esi
movl 56(%ebp), %eax
testl %esi, %esi
jne .L437
movl $0, 20(%esp)
.L438:
movl 20(%esp), %esi
movl 5796(%ebp), %ecx
movzbl (%eax,%esi), %edx
xorl %esi, %esi
movl 5792(%ebp), %eax
movw %si, (%ecx,%eax,2)
movl 5784(%ebp), %ecx
leal 1(%eax), %esi
movl %esi, 5792(%ebp)
movb %dl, (%ecx,%eax)
addw $1, 148(%ebp,%edx,4)
xorl %edx, %edx
movl 5788(%ebp), %eax
subl $1, %eax
cmpl %eax, 5792(%ebp)
movl 116(%ebp), %eax
sete %dl
leal -1(%eax), %edi
movl 108(%ebp), %eax
movl %edi, 116(%ebp)
addl $1, %eax
movl %eax, 108(%ebp)
.L450:
testl %edx, %edx
jne .L599
.L452:
cmpl $258, %edi
ja .L432
movl %ebp, %eax
call fill_window
movl 116(%ebp), %edi
cmpl $258, %edi
ja .L432
movl 68(%esp), %eax
testl %eax, %eax
je .L544
testl %edi, %edi
je .L435
cmpl $2, %edi
movl $0, 96(%ebp)
ja .L486
movl 108(%ebp), %eax
movl %eax, 20(%esp)
movl 56(%ebp), %eax
jmp .L438
.p2align 4,,7
.p2align 3
.L601:
movl 92(%ebp), %eax
xorl %ecx, %ecx
subl %eax, %edx
testl %eax, %eax
js .L415
addl 56(%ebp), %eax
movl %eax, %ecx
.L415:
movl %edx, 8(%esp)
movl %ecx, 4(%esp)
movl $0, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %esi
movl 108(%ebp), %eax
movl 28(%esi), %edi
movl %eax, 92(%ebp)
movl %edi, (%esp)
call _tr_flush_bits
movl 20(%edi), %eax
movl 16(%esi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L600
.L417:
movl (%ebp), %eax
movl 16(%eax), %eax
testl %eax, %eax
je .L544
.L420:
movl 116(%ebp), %eax
jmp .L414
.p2align 4,,7
.p2align 3
.L410:
movl 108(%ebp), %eax
xorl %esi, %esi
movl 56(%ebp), %edx
movl $0, 96(%ebp)
movl 5796(%ebp), %ecx
movzbl (%edx,%eax), %edx
movl 5792(%ebp), %eax
movw %si, (%ecx,%eax,2)
movl 5784(%ebp), %ecx
leal 1(%eax), %esi
movl %esi, 5792(%ebp)
movb %dl, (%ecx,%eax)
addw $1, 148(%ebp,%edx,4)
movl 5788(%ebp), %eax
movl 108(%ebp), %esi
leal -1(%eax), %ecx
movl 116(%ebp), %eax
leal 1(%esi), %edx
movl %edx, 108(%ebp)
subl $1, %eax
cmpl %ecx, 5792(%ebp)
movl %eax, 116(%ebp)
je .L601
.L414:
testl %eax, %eax
jne .L410
movl %ebp, %eax
call fill_window
movl 116(%ebp), %eax
testl %eax, %eax
jne .L410
movl 68(%esp), %edi
testl %edi, %edi
je .L544
.L435:
cmpl $4, 68(%esp)
movl $0, 5812(%ebp)
je .L602
movl 5792(%ebp), %eax
testl %eax, %eax
je .L545
movl 92(%ebp), %edx
xorl %ecx, %ecx
movl 108(%ebp), %eax
subl %edx, %eax
testl %edx, %edx
js .L464
movl 56(%ebp), %ecx
addl %edx, %ecx
.L464:
movl %eax, 8(%esp)
movl %ecx, 4(%esp)
movl $0, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %edi
movl 108(%ebp), %eax
movl 28(%edi), %esi
movl %eax, 92(%ebp)
movl %esi, (%esp)
call _tr_flush_bits
movl 20(%esi), %eax
movl 16(%edi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L603
.L466:
movl (%ebp), %eax
movl 16(%eax), %eax
testl %eax, %eax
setne %al
movzbl %al, %eax
leal -2(%eax), %ecx
movl %eax, %edx
jmp .L430
.p2align 4,,7
.p2align 3
.L469:
cmpl $1, %eax
jne .L408
.L545:
cmpl $1, 68(%esp)
je .L604
cmpl $5, 68(%esp)
je .L472
movl $0, 12(%esp)
movl $0, 8(%esp)
movl $0, 4(%esp)
movl %ebp, (%esp)
call _tr_stored_block
cmpl $3, 68(%esp)
jne .L472
movl 76(%ebp), %esi
movl 68(%ebp), %eax
leal 2147483647(%esi), %edx
xorl %esi, %esi
leal (%edx,%edx), %ecx
movw %si, (%eax,%edx,2)
movl %ecx, 8(%esp)
movl $0, 4(%esp)
movl %eax, (%esp)
call memset@PLT
movl 116(%ebp), %edi
testl %edi, %edi
jne .L472
movl $0, 108(%ebp)
movl $0, 92(%ebp)
movl $0, 5812(%ebp)
.L472:
movl 64(%esp), %eax
movl 28(%eax), %esi
movl %esi, (%esp)
call _tr_flush_bits
movl 64(%esp), %eax
movl 20(%esi), %edi
movl 16(%eax), %eax
cmpl %edi, %eax
cmovbe %eax, %edi
testl %edi, %edi
jne .L605
.L475:
testl %eax, %eax
jne .L408
.L563:
movl $-1, 40(%ebp)
addl $44, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.L590:
movl 64(%esp), %eax
movl 16(%esi), %edx
movl 12(%eax), %eax
movl %edi, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 64(%esp), %eax
addl %edi, 12(%eax)
addl %edi, 16(%esi)
addl %edi, 20(%eax)
subl %edi, 16(%eax)
subl %edi, 20(%esi)
jne .L561
movl 8(%esi), %eax
movl %eax, 16(%esi)
.L561:
movl 64(%esp), %eax
movl 16(%eax), %eax
testl %eax, %eax
jne .L399
jmp .L563
.L364:
movl $0, 32(%ebp)
movl $73, 4(%ebp)
.L483:
movl 28(%eax), %ecx
testl %ecx, %ecx
je .L367
movl %edx, 20(%esp)
movl %edx, %ecx
jmp .L374
.p2align 4,,7
.p2align 3
.L368:
movl 28(%eax), %esi
movl 32(%ebp), %eax
leal 1(%eax), %edi
movl %edi, 32(%ebp)
movzbl (%esi,%eax), %eax
leal 1(%ecx), %edi
movl 8(%ebp), %esi
movl %edi, 20(%ebp)
testb %al, %al
movb %al, (%esi,%ecx)
je .L509
movl 20(%ebp), %ecx
movl 28(%ebp), %eax
.L374:
cmpl %ecx, 12(%ebp)
jne .L368
movl 44(%eax), %eax
testl %eax, %eax
je .L369
cmpl %ecx, %edx
jb .L606
.L369:
movl 64(%esp), %eax
movl 28(%eax), %esi
movl %esi, (%esp)
call _tr_flush_bits
movl 64(%esp), %edi
movl 20(%esi), %eax
movl 16(%edi), %edi
cmpl %eax, %edi
cmova %eax, %edi
testl %edi, %edi
jne .L607
.L371:
movl 20(%ebp), %edx
cmpl 12(%ebp), %edx
movl %edx, 20(%esp)
je .L508
movl 28(%ebp), %eax
movl %edx, %ecx
jmp .L368
.L592:
movl 132(%ebp), %edx
cmpl $1, %edx
jle .L350
cmpl $5, %edx
movb $64, %al
jle .L350
cmpl $6, %edx
movb $128, %al
movl $192, %edx
cmovne %edx, %eax
jmp .L350
.p2align 4,,7
.p2align 3
.L437:
leal -1(%eax,%esi), %ecx
movzbl (%ecx), %edx
movl %esi, 20(%esp)
movl %edx, 24(%esp)
movzbl (%ecx), %edx
cmpb %dl, 1(%ecx)
jne .L438
movzbl 2(%ecx), %edx
cmpl %edx, 24(%esp)
jne .L438
movzbl 3(%ecx), %edx
cmpl %edx, 24(%esp)
jne .L438
leal 258(%eax,%esi), %edx
addl $3, %ecx
movl %edx, 20(%esp)
movl 24(%esp), %edx
movl %ebp, 28(%esp)
jmp .L447
.p2align 4,,7
.p2align 3
.L439:
movzbl 2(%ecx), %ebp
cmpl %ebp, %edx
jne .L608
movzbl 3(%ecx), %ebp
cmpl %ebp, %edx
jne .L609
movzbl 4(%ecx), %ebp
cmpl %ebp, %edx
jne .L610
movzbl 5(%ecx), %ebp
cmpl %ebp, %edx
jne .L611
movzbl 6(%ecx), %ebp
cmpl %ebp, %edx
jne .L612
movzbl 7(%ecx), %ebp
cmpl %ebp, %edx
jne .L613
addl $8, %ecx
movzbl (%ecx), %ebp
cmpl %ebp, %edx
jne .L559
cmpl 20(%esp), %ecx
jnb .L559
.L447:
movzbl 1(%ecx), %ebp
cmpl %ebp, %edx
je .L439
movl 28(%esp), %ebp
addl $1, %ecx
.L440:
subl 20(%esp), %ecx
leal 258(%ecx), %edx
cmpl %edi, %edx
movl %edx, 96(%ebp)
jbe .L448
movl %edi, 96(%ebp)
movl %edi, %edx
.L449:
movl 5792(%ebp), %eax
movl $1, %edi
subl $3, %edx
movl 5796(%ebp), %ecx
leal 1(%eax), %esi
movw %di, (%ecx,%eax,2)
movl 5784(%ebp), %ecx
movl %esi, 5792(%ebp)
movb %dl, (%ecx,%eax)
movzbl %dl, %edx
movzbl _length_code@GOTOFF(%ebx,%edx), %eax
xorl %edx, %edx
addw $1, 1176(%ebp,%eax,4)
movzbl _dist_code@GOTOFF(%ebx), %eax
addw $1, 2440(%ebp,%eax,4)
movl 5788(%ebp), %eax
movl 116(%ebp), %edi
subl $1, %eax
cmpl %eax, 5792(%ebp)
movl 96(%ebp), %eax
movl $0, 96(%ebp)
sete %dl
subl %eax, %edi
addl 108(%ebp), %eax
movl %edi, 116(%ebp)
movl %eax, 108(%ebp)
jmp .L450
.p2align 4,,7
.p2align 3
.L607:
movl 64(%esp), %eax
movl 16(%esi), %edx
movl 12(%eax), %eax
movl %edi, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 64(%esp), %eax
addl %edi, 12(%eax)
addl %edi, 16(%esi)
addl %edi, 20(%eax)
subl %edi, 16(%eax)
subl %edi, 20(%esi)
jne .L371
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L371
.p2align 4,,7
.p2align 3
.L595:
movl 64(%esp), %eax
movl 16(%esi), %edx
movl 12(%eax), %eax
movl %edi, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 64(%esp), %eax
addl %edi, 12(%eax)
addl %edi, 16(%esi)
addl %edi, 20(%eax)
subl %edi, 16(%eax)
subl %edi, 20(%esi)
jne .L359
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L359
.p2align 4,,7
.p2align 3
.L400:
movl 4(%ebp), %eax
cmpl $666, %eax
jne .L406
.L487:
testl %edx, %edx
je .L405
.L564:
movl z_errmsg@GOT(%ebx), %eax
movl 64(%esp), %esi
movl 28(%eax), %eax
movl %eax, 24(%esi)
movl $-5, %eax
jmp .L554
.L602:
movl 92(%ebp), %edx
xorl %ecx, %ecx
movl 108(%ebp), %eax
subl %edx, %eax
testl %edx, %edx
js .L460
movl 56(%ebp), %ecx
addl %edx, %ecx
.L460:
movl %eax, 8(%esp)
movl %ecx, 4(%esp)
movl $1, 12(%esp)
movl %ebp, (%esp)
call _tr_flush_block
movl (%ebp), %edi
movl 108(%ebp), %eax
movl 28(%edi), %esi
movl %eax, 92(%ebp)
movl %esi, (%esp)
call _tr_flush_bits
movl 20(%esi), %eax
movl 16(%edi), %edx
cmpl %eax, %edx
cmova %eax, %edx
testl %edx, %edx
jne .L614
.L462:
movl (%ebp), %eax
movl 16(%eax), %ecx
cmpl $1, %ecx
sbbl %edx, %edx
addl $1, %edx
cmpl $1, %ecx
sbbl %eax, %eax
addl $3, %eax
.p2align 4,,7
.p2align 3
.L557:
movl $666, 4(%ebp)
jmp .L468
.p2align 4,,7
.p2align 3
.L509:
movl 20(%ebp), %edx
xorl %esi, %esi
.L373:
movl 28(%ebp), %eax
movl 44(%eax), %edi
testl %edi, %edi
je .L375
cmpl %edx, 20(%esp)
jb .L615
.L375:
testl %esi, %esi
je .L376
movl 4(%ebp), %eax
cmpl $91, %eax
jne .L341
.L585:
movl 28(%ebp), %eax
jmp .L484
.p2align 4,,7
.p2align 3
.L606:
subl %edx, %ecx
movl 64(%esp), %eax
movl %ecx, 8(%esp)
addl 8(%ebp), %edx
movl %edx, 4(%esp)
movl 48(%eax), %eax
movl %eax, (%esp)
call crc32@PLT
movl 64(%esp), %edi
movl %eax, 48(%edi)
jmp .L369
.p2align 4,,7
.p2align 3
.L580:
movl 4(%eax), %esi
testl %esi, %esi
je .L334
jmp .L333
.p2align 4,,7
.p2align 3
.L594:
subl %edx, %ecx
movl 64(%esp), %eax
movl %ecx, 8(%esp)
addl 8(%ebp), %edx
movl %edx, 4(%esp)
movl 48(%eax), %eax
movl %eax, (%esp)
call crc32@PLT
movl 64(%esp), %edi
movl %eax, 48(%edi)
jmp .L357
.p2align 4,,7
.p2align 3
.L598:
movl 12(%esi), %eax
movl 16(%edi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%esi)
addl %edx, 16(%edi)
addl %edx, 20(%esi)
subl %edx, 16(%esi)
subl %edx, 20(%edi)
jne .L455
movl 8(%edi), %eax
movl %eax, 16(%edi)
jmp .L455
.L376:
movl 28(%ebp), %eax
movl $0, 32(%ebp)
movl $91, 4(%ebp)
.L484:
movl 36(%eax), %ecx
testl %ecx, %ecx
je .L378
movl %edx, 20(%esp)
movl %edx, %ecx
jmp .L385
.p2align 4,,7
.p2align 3
.L379:
movl 36(%eax), %esi
movl 32(%ebp), %eax
leal 1(%eax), %edi
movl %edi, 32(%ebp)
movzbl (%esi,%eax), %eax
leal 1(%ecx), %edi
movl 8(%ebp), %esi
movl %edi, 20(%ebp)
testb %al, %al
movb %al, (%esi,%ecx)
je .L511
movl 20(%ebp), %ecx
movl 28(%ebp), %eax
.L385:
cmpl %ecx, 12(%ebp)
jne .L379
movl 44(%eax), %eax
testl %eax, %eax
je .L380
cmpl %ecx, %edx
jb .L616
.L380:
movl 64(%esp), %eax
movl 28(%eax), %esi
movl %esi, (%esp)
call _tr_flush_bits
movl 64(%esp), %edi
movl 20(%esi), %eax
movl 16(%edi), %edi
cmpl %eax, %edi
cmova %eax, %edi
testl %edi, %edi
jne .L617
.L382:
movl 20(%ebp), %edx
cmpl 12(%ebp), %edx
movl %edx, 20(%esp)
je .L510
movl 28(%ebp), %eax
movl %edx, %ecx
jmp .L379
.p2align 4,,7
.p2align 3
.L617:
movl 64(%esp), %eax
movl 16(%esi), %edx
movl 12(%eax), %eax
movl %edi, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 64(%esp), %eax
addl %edi, 12(%eax)
addl %edi, 16(%esi)
addl %edi, 20(%eax)
subl %edi, 16(%eax)
subl %edi, 20(%esi)
jne .L382
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L382
.p2align 4,,7
.p2align 3
.L511:
movl 20(%ebp), %edx
xorl %esi, %esi
.L384:
movl 28(%ebp), %eax
movl 44(%eax), %edi
testl %edi, %edi
je .L386
cmpl %edx, 20(%esp)
jb .L618
.L386:
testl %esi, %esi
je .L387
movl 4(%ebp), %eax
cmpl $103, %eax
jne .L390
.L586:
movl 28(%ebp), %eax
.L485:
movl 44(%eax), %esi
testl %esi, %esi
je .L391
leal 2(%edx), %eax
cmpl 12(%ebp), %eax
ja .L619
.L392:
movl 64(%esp), %esi
leal 1(%edx), %ecx
movl %ecx, 20(%ebp)
movl 8(%ebp), %eax
movl 48(%esi), %ecx
movb %cl, (%eax,%edx)
movl 20(%ebp), %edx
movl 8(%ebp), %ecx
leal 1(%edx), %eax
movl %eax, 20(%ebp)
movl 48(%esi), %eax
shrl $8, %eax
movb %al, (%ecx,%edx)
movl $0, 8(%esp)
movl $0, 4(%esp)
movl $0, (%esp)
call crc32@PLT
movl 64(%esp), %esi
movl 20(%ebp), %edx
movl %eax, 48(%esi)
movl $113, 4(%ebp)
jmp .L390
.p2align 4,,7
.p2align 3
.L616:
subl %edx, %ecx
movl 64(%esp), %eax
movl %ecx, 8(%esp)
addl 8(%ebp), %edx
movl %edx, 4(%esp)
movl 48(%eax), %eax
movl %eax, (%esp)
call crc32@PLT
movl 64(%esp), %esi
movl %eax, 48(%esi)
jmp .L380
.p2align 4,,7
.p2align 3
.L391:
movl $113, 4(%ebp)
jmp .L390
.L387:
movl $103, 4(%ebp)
movl 28(%ebp), %eax
jmp .L485
.L600:
movl 12(%esi), %eax
movl 16(%edi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%esi)
addl %edx, 16(%edi)
addl %edx, 20(%esi)
subl %edx, 16(%esi)
subl %edx, 20(%edi)
jne .L417
movl 8(%edi), %eax
movl %eax, 16(%edi)
jmp .L417
.L490:
movl $-2, %eax
jmp .L554
.L597:
movl 20(%esp), %eax
subl %eax, %edx
movl %edx, 8(%esp)
addl 8(%ebp), %eax
movl %eax, 4(%esp)
movl 64(%esp), %eax
movl 48(%eax), %eax
movl %eax, (%esp)
call crc32@PLT
movl 64(%esp), %edi
movl 20(%ebp), %edx
movl %eax, 48(%edi)
movl 28(%ebp), %eax
jmp .L363
.L603:
movl 12(%edi), %eax
movl 16(%esi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%edi)
addl %edx, 16(%esi)
subl %edx, 16(%edi)
addl %edx, 20(%edi)
subl %edx, 20(%esi)
jne .L466
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L466
.L589:
movl 64(%esp), %eax
movl 16(%esi), %edx
movl 12(%eax), %eax
movl %edi, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 64(%esp), %eax
addl %edi, 12(%eax)
addl %edi, 16(%esi)
addl %edi, 20(%eax)
subl %edi, 16(%eax)
subl %edi, 20(%esi)
jne .L480
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L480
.L510:
movl $1, %esi
jmp .L384
.L508:
movl $1, %esi
jmp .L373
.L596:
movl 28(%ebp), %eax
jmp .L355
.L354:
movl $73, 4(%ebp)
movl 20(%ebp), %edx
jmp .L483
.L582:
movl z_errmsg@GOT(%ebx), %eax
movl 28(%eax), %eax
movl %eax, 24(%esi)
movl $-5, %eax
jmp .L554
.L378:
movl $103, 4(%ebp)
jmp .L485
.L367:
movl $91, 4(%ebp)
jmp .L484
.L619:
movl 64(%esp), %eax
movl 28(%eax), %esi
movl %esi, (%esp)
call _tr_flush_bits
movl 64(%esp), %edi
movl 20(%esi), %eax
movl 16(%edi), %edi
cmpl %eax, %edi
cmova %eax, %edi
testl %edi, %edi
jne .L620
.L394:
movl 20(%ebp), %edx
leal 2(%edx), %eax
cmpl 12(%ebp), %eax
ja .L390
jmp .L392
.p2align 4,,7
.p2align 3
.L605:
movl 64(%esp), %eax
movl 16(%esi), %edx
movl 12(%eax), %eax
movl %edi, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 64(%esp), %eax
addl %edi, 12(%eax)
addl %edi, 16(%esi)
addl %edi, 20(%eax)
subl %edi, 16(%eax)
subl %edi, 20(%esi)
jne .L562
movl 8(%esi), %eax
movl %eax, 16(%esi)
.L562:
movl 64(%esp), %eax
movl 16(%eax), %eax
jmp .L475
.L588:
movl 20(%ebp), %eax
movl 64(%esp), %esi
movl 8(%ebp), %ecx
leal 1(%eax), %edx
movl %edx, 20(%ebp)
movl 48(%esi), %edx
movb %dl, (%ecx,%eax)
movl 20(%ebp), %edx
movl 8(%ebp), %ecx
leal 1(%edx), %eax
movl %eax, 20(%ebp)
movl 48(%esi), %eax
shrl $8, %eax
movb %al, (%ecx,%edx)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movzwl 50(%esi), %ecx
movb %cl, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movzbl 51(%esi), %ecx
movb %cl, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %ecx
leal 1(%eax), %edx
movl %edx, 20(%ebp)
movl 8(%esi), %edx
movb %dl, (%ecx,%eax)
movl 20(%ebp), %edx
movl 8(%ebp), %ecx
leal 1(%edx), %eax
movl %eax, 20(%ebp)
movl 8(%esi), %eax
shrl $8, %eax
movb %al, (%ecx,%edx)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movzwl 10(%esi), %ecx
movb %cl, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movzbl 11(%esi), %ecx
movb %cl, (%edx,%eax)
movl %esi, %eax
jmp .L478
.L591:
movl $0, 8(%esp)
movl $0, 4(%esp)
movl $0, (%esp)
call crc32@PLT
movl 64(%esp), %esi
movl 8(%ebp), %edx
movl %eax, 48(%esi)
movl 20(%ebp), %eax
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $31, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $139, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $8, (%edx,%eax)
movl 28(%ebp), %eax
testl %eax, %eax
je .L621
movl 20(%ebp), %esi
movl 8(%ebp), %edi
leal 1(%esi), %edx
movl %edx, 20(%ebp)
movl (%eax), %edx
testl %edx, %edx
setne %cl
cmpl $1, 44(%eax)
sbbl %edx, %edx
notl %edx
andl $2, %edx
addl %edx, %ecx
cmpl $1, 16(%eax)
sbbl %edx, %edx
notl %edx
andl $4, %edx
addl %edx, %ecx
cmpl $1, 28(%eax)
sbbl %edx, %edx
notl %edx
andl $8, %edx
addl %ecx, %edx
cmpl $1, 36(%eax)
sbbl %eax, %eax
notl %eax
andl $16, %eax
addl %edx, %eax
movb %al, (%edi,%esi)
movl 20(%ebp), %eax
movl 8(%ebp), %ecx
leal 1(%eax), %edx
movl %edx, 20(%ebp)
movl 28(%ebp), %edx
movl 4(%edx), %edx
movb %dl, (%ecx,%eax)
movl 20(%ebp), %edx
movl 8(%ebp), %ecx
leal 1(%edx), %eax
movl %eax, 20(%ebp)
movl 28(%ebp), %eax
movl 4(%eax), %eax
shrl $8, %eax
movb %al, (%ecx,%edx)
movl 20(%ebp), %eax
movl 8(%ebp), %ecx
leal 1(%eax), %edx
movl %edx, 20(%ebp)
movl 28(%ebp), %edx
movzwl 6(%edx), %edx
movb %dl, (%ecx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %ecx
leal 1(%eax), %edx
movl %edx, 20(%ebp)
movl 28(%ebp), %edx
movzbl 7(%edx), %edx
movb %dl, (%ecx,%eax)
movl 20(%ebp), %ecx
leal 1(%ecx), %eax
movl %eax, 20(%ebp)
movl 132(%ebp), %edx
movl $2, %eax
addl 8(%ebp), %ecx
cmpl $9, %edx
je .L346
cmpl $1, 136(%ebp)
movl $4, %eax
jle .L622
.L346:
movb %al, (%ecx)
movl 20(%ebp), %eax
movl 8(%ebp), %ecx
leal 1(%eax), %edx
movl %edx, 20(%ebp)
movl 28(%ebp), %edx
movl 12(%edx), %edx
movb %dl, (%ecx,%eax)
movl 28(%ebp), %eax
movl 16(%eax), %ecx
testl %ecx, %ecx
je .L347
movl 20(%ebp), %edx
movl 20(%eax), %eax
movl 8(%ebp), %esi
leal 1(%edx), %ecx
movl %ecx, 20(%ebp)
movb %al, (%esi,%edx)
movl 20(%ebp), %edx
movl 8(%ebp), %ecx
leal 1(%edx), %eax
movl %eax, 20(%ebp)
movl 28(%ebp), %eax
movl 20(%eax), %eax
shrl $8, %eax
movb %al, (%ecx,%edx)
movl 28(%ebp), %eax
.L347:
movl 44(%eax), %edx
testl %edx, %edx
jne .L623
.L348:
movl $0, 32(%ebp)
movl $69, 4(%ebp)
jmp .L349
.L618:
movl 20(%esp), %eax
subl %eax, %edx
movl %edx, 8(%esp)
addl 8(%ebp), %eax
movl %eax, 4(%esp)
movl 64(%esp), %eax
movl 48(%eax), %eax
movl %eax, (%esp)
call crc32@PLT
movl 64(%esp), %edi
movl 20(%ebp), %edx
movl %eax, 48(%edi)
jmp .L386
.L615:
movl 20(%esp), %eax
subl %eax, %edx
movl %edx, 8(%esp)
addl 8(%ebp), %eax
movl %eax, 4(%esp)
movl 64(%esp), %eax
movl 48(%eax), %eax
movl %eax, (%esp)
call crc32@PLT
movl 64(%esp), %edi
movl 20(%ebp), %edx
movl %eax, 48(%edi)
jmp .L375
.L532:
movl $1, %eax
jmp .L554
.L448:
cmpl $2, %edx
ja .L449
movl %esi, 20(%esp)
jmp .L438
.p2align 4,,7
.p2align 3
.L614:
movl 12(%edi), %eax
movl 16(%esi), %ecx
movl %edx, 8(%esp)
movl %edx, 20(%esp)
movl %eax, (%esp)
movl %ecx, 4(%esp)
call memcpy@PLT
movl 20(%esp), %edx
addl %edx, 12(%edi)
addl %edx, 16(%esi)
subl %edx, 16(%edi)
addl %edx, 20(%edi)
subl %edx, 20(%esi)
jne .L462
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L462
.L620:
movl 64(%esp), %eax
movl 16(%esi), %edx
movl 12(%eax), %eax
movl %edi, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 64(%esp), %eax
addl %edi, 12(%eax)
addl %edi, 16(%esi)
addl %edi, 20(%eax)
subl %edi, 16(%eax)
subl %edi, 20(%esi)
jne .L394
movl 8(%esi), %eax
movl %eax, 16(%esi)
jmp .L394
.L559:
movl 28(%esp), %ebp
jmp .L440
.L604:
movl %ebp, (%esp)
call _tr_align
jmp .L472
.L623:
movl 20(%ebp), %eax
movl %eax, 8(%esp)
movl 8(%ebp), %eax
movl %eax, 4(%esp)
movl 64(%esp), %eax
movl 48(%eax), %eax
movl %eax, (%esp)
call crc32@PLT
movl 64(%esp), %esi
movl %eax, 48(%esi)
movl 28(%ebp), %eax
jmp .L348
.L613:
movl 28(%esp), %ebp
addl $7, %ecx
jmp .L440
.L608:
movl 28(%esp), %ebp
addl $2, %ecx
jmp .L440
.L612:
movl 28(%esp), %ebp
addl $6, %ecx
jmp .L440
.L611:
movl 28(%esp), %ebp
addl $5, %ecx
jmp .L440
.L610:
movl 28(%esp), %ebp
addl $4, %ecx
jmp .L440
.L609:
movl 28(%esp), %ebp
addl $3, %ecx
jmp .L440
.L621:
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $0, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $0, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $0, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $0, (%edx,%eax)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $0, (%edx,%eax)
movl 20(%ebp), %ecx
movl 132(%ebp), %edx
leal 1(%ecx), %eax
addl 8(%ebp), %ecx
cmpl $9, %edx
movl %eax, 20(%ebp)
movl $2, %eax
je .L340
cmpl $1, 136(%ebp)
movl $4, %eax
jg .L340
cmpl $1, %edx
setle %al
sall $2, %eax
.L340:
movb %al, (%ecx)
movl 20(%ebp), %eax
movl 8(%ebp), %edx
leal 1(%eax), %ecx
movl %ecx, 20(%ebp)
movb $3, (%edx,%eax)
movl 20(%ebp), %edx
movl $113, 4(%ebp)
jmp .L390
.L622:
cmpl $1, %edx
setle %al
sall $2, %eax
jmp .L346
.cfi_endproc
.size deflate, .-deflate
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateParams
.type deflateParams, @function
deflateParams:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $28, %esp
movl 48(%esp), %edx
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl 52(%esp), %edi
testl %edx, %edx
je .L636
movl 28(%edx), %esi
testl %esi, %esi
je .L636
cmpl $-1, %edi
je .L634
cmpl $9, %edi
ja .L636
.L626:
cmpl $4, 56(%esp)
ja .L636
movl 132(%esi), %eax
leal configuration_table@GOTOFF(%ebx), %ebp
movl %eax, 12(%esp)
leal (%eax,%eax,2), %eax
movl 8(%ebp,%eax,4), %eax
movl %eax, %ecx
movl 56(%esp), %eax
cmpl %eax, 136(%esi)
je .L641
.L627:
movl 8(%edx), %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne .L642
.L628:
cmpl 12(%esp), %edi
je .L631
leal (%edi,%edi,2), %edx
leal (%ebp,%edx,4), %edx
movzwl 2(%edx), %ecx
movl %edi, 132(%esi)
movl %ecx, 128(%esi)
movzwl (%edx), %ecx
movl %ecx, 140(%esi)
movzwl 4(%edx), %ecx
movzwl 6(%edx), %edx
movl %ecx, 144(%esi)
movl %edx, 124(%esi)
.L631:
movl 56(%esp), %edi
movl %edi, 136(%esi)
.L625:
addl $28, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L634:
movl $6, %edi
jmp .L626
.p2align 4,,7
.p2align 3
.L641:
leal (%edi,%edi,2), %eax
cmpl %ecx, 8(%ebp,%eax,4)
jne .L627
xorl %eax, %eax
jmp .L628
.p2align 4,,7
.p2align 3
.L642:
movl $5, 4(%esp)
movl %edx, (%esp)
call deflate@PLT
cmpl $-5, %eax
je .L629
.L640:
movl 132(%esi), %ecx
movl %ecx, 12(%esp)
jmp .L628
.p2align 4,,7
.p2align 3
.L629:
movl 20(%esi), %edx
testl %edx, %edx
jne .L640
movl 132(%esi), %eax
movl %eax, 12(%esp)
xorl %eax, %eax
jmp .L628
.p2align 4,,7
.p2align 3
.L636:
movl $-2, %eax
jmp .L625
.cfi_endproc
.size deflateParams, .-deflateParams
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateEnd
.type deflateEnd, @function
deflateEnd:
.cfi_startproc
pushl %edi
pushl %esi
subl $20, %esp
movl 32(%esp), %esi
testl %esi, %esi
je .L652
movl 28(%esi), %eax
testl %eax, %eax
je .L652
movl 4(%eax), %edi
cmpl $42, %edi
jne .L685
.L645:
movl 8(%eax), %edx
testl %edx, %edx
je .L646
movl %edx, 4(%esp)
movl 40(%esi), %eax
movl %eax, (%esp)
call *36(%esi)
movl 28(%esi), %eax
.L646:
movl 68(%eax), %edx
testl %edx, %edx
je .L647
movl %edx, 4(%esp)
movl 40(%esi), %eax
movl %eax, (%esp)
call *36(%esi)
movl 28(%esi), %eax
.L647:
movl 64(%eax), %edx
testl %edx, %edx
je .L648
movl %edx, 4(%esp)
movl 40(%esi), %eax
movl %eax, (%esp)
call *36(%esi)
movl 28(%esi), %eax
.L648:
movl 56(%eax), %edx
testl %edx, %edx
je .L649
movl %edx, 4(%esp)
movl 40(%esi), %eax
movl %eax, (%esp)
call *36(%esi)
movl 28(%esi), %eax
.L649:
movl %eax, 4(%esp)
movl 40(%esi), %eax
movl %eax, (%esp)
call *36(%esi)
xorl %eax, %eax
cmpl $113, %edi
setne %al
movl $0, 28(%esi)
leal -3(%eax,%eax,2), %eax
.L644:
addl $20, %esp
popl %esi
popl %edi
ret
.p2align 4,,7
.p2align 3
.L685:
cmpl $69, %edi
je .L645
cmpl $73, %edi
je .L645
cmpl $91, %edi
.p2align 4,,2
je .L645
cmpl $103, %edi
.p2align 4,,2
je .L645
cmpl $113, %edi
.p2align 4,,2
je .L645
cmpl $666, %edi
je .L645
.L652:
movl $-2, %eax
jmp .L644
.cfi_endproc
.size deflateEnd, .-deflateEnd
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateInit2_
.type deflateInit2_, @function
deflateInit2_:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $44, %esp
movl 88(%esp), %eax
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl 64(%esp), %edi
movl 76(%esp), %ecx
testl %eax, %eax
je .L700
cmpb $49, (%eax)
jne .L700
cmpl $56, 92(%esp)
jne .L700
testl %edi, %edi
je .L694
movl 32(%edi), %eax
movl $0, 24(%edi)
testl %eax, %eax
je .L707
movl 36(%edi), %esi
testl %esi, %esi
je .L708
.L690:
cmpl $-1, 68(%esp)
movl $6, %edx
cmovne 68(%esp), %edx
testl %ecx, %ecx
movl %edx, 68(%esp)
js .L709
cmpl $15, %ecx
movl $1, %ebp
jg .L710
.L693:
movl 80(%esp), %edx
leal -1(%edx), %esi
cmpl $8, %esi
ja .L694
cmpl $8, 72(%esp)
jne .L694
leal -8(%ecx), %esi
cmpl $7, %esi
ja .L694
cmpl $9, 68(%esp)
ja .L694
cmpl $4, 84(%esp)
ja .L694
cmpl $8, %ecx
je .L704
movl %ecx, 24(%esp)
.L695:
movl $5828, 8(%esp)
movl $1, 4(%esp)
movl 40(%edi), %esi
movl %ecx, 28(%esp)
movl %esi, (%esp)
call *%eax
testl %eax, %eax
movl %eax, %esi
je .L705
movl 28(%esp), %ecx
movl $-1431655765, %edx
movl %eax, 28(%edi)
movl %ebp, 24(%eax)
movl $1, %ebp
movl %edi, (%eax)
movl $0, 28(%eax)
movl 24(%esp), %eax
sall %cl, %ebp
movl %ebp, 44(%esi)
movl %eax, 48(%esi)
leal -1(%ebp), %eax
movl %eax, 52(%esi)
movl 80(%esp), %eax
leal 7(%eax), %ecx
movl $1, %eax
sall %cl, %eax
movl %ecx, 80(%esi)
movl %eax, %ecx
movl %eax, 76(%esi)
movl 80(%esp), %eax
subl $1, %ecx
movl %ecx, 84(%esi)
addl $9, %eax
mull %edx
shrl $1, %edx
movl %edx, 88(%esi)
movl $2, 8(%esp)
movl %ebp, 4(%esp)
movl 40(%edi), %eax
movl %eax, (%esp)
call *32(%edi)
movl %eax, 56(%esi)
movl $2, 8(%esp)
movl 44(%esi), %eax
movl %eax, 4(%esp)
movl 40(%edi), %eax
movl %eax, (%esp)
call *32(%edi)
movl %eax, 64(%esi)
movl $2, 8(%esp)
movl 76(%esi), %eax
movl %eax, 4(%esp)
movl 40(%edi), %eax
movl %eax, (%esp)
call *32(%edi)
movl $0, 5824(%esi)
movl %eax, 68(%esi)
movl 80(%esp), %eax
leal 6(%eax), %ecx
movl $1, %eax
sall %cl, %eax
movl %eax, 5788(%esi)
movl $4, 8(%esp)
movl %eax, 4(%esp)
movl 40(%edi), %eax
movl %eax, (%esp)
call *32(%edi)
movl 5788(%esi), %edx
leal 0(,%edx,4), %ecx
movl %ecx, 12(%esi)
movl 56(%esi), %ecx
movl %eax, 8(%esi)
testl %ecx, %ecx
je .L696
movl 64(%esi), %ebp
testl %ebp, %ebp
je .L696
movl 68(%esi), %ecx
testl %ecx, %ecx
je .L696
testl %eax, %eax
je .L696
movl %edx, %ecx
andl $-2, %ecx
leal (%edx,%edx,2), %edx
addl %eax, %ecx
addl %edx, %eax
movl %eax, 5784(%esi)
movl 68(%esp), %eax
movl %ecx, 5796(%esi)
movb $8, 36(%esi)
movl %eax, 132(%esi)
movl 84(%esp), %eax
movl %eax, 136(%esi)
movl %edi, (%esp)
call deflateReset@PLT
.L687:
addl $44, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L710:
subl $16, %ecx
movw $2, %bp
jmp .L693
.p2align 4,,7
.p2align 3
.L709:
negl %ecx
xorl %ebp, %ebp
jmp .L693
.p2align 4,,7
.p2align 3
.L704:
movl $9, 24(%esp)
movl $9, %ecx
jmp .L695
.p2align 4,,7
.p2align 3
.L700:
addl $44, %esp
movl $-6, %eax
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L694:
addl $44, %esp
movl $-2, %eax
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L707:
movl 36(%edi), %esi
leal zcalloc@GOTOFF(%ebx), %eax
movl %eax, 32(%edi)
movl $0, 40(%edi)
testl %esi, %esi
jne .L690
.p2align 4,,7
.p2align 3
.L708:
leal zcfree@GOTOFF(%ebx), %edx
movl %edx, 36(%edi)
jmp .L690
.p2align 4,,7
.p2align 3
.L696:
movl z_errmsg@GOT(%ebx), %eax
movl $666, 4(%esi)
movl 24(%eax), %eax
movl %eax, 24(%edi)
movl %edi, (%esp)
call deflateEnd@PLT
movl $-4, %eax
jmp .L687
.p2align 4,,7
.p2align 3
.L705:
movl $-4, %eax
jmp .L687
.cfi_endproc
.size deflateInit2_, .-deflateInit2_
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateInit_
.type deflateInit_, @function
deflateInit_:
.cfi_startproc
pushl %ebx
subl $40, %esp
movl 60(%esp), %eax
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl $0, 20(%esp)
movl $8, 16(%esp)
movl %eax, 28(%esp)
movl 56(%esp), %eax
movl $15, 12(%esp)
movl $8, 8(%esp)
movl %eax, 24(%esp)
movl 52(%esp), %eax
movl %eax, 4(%esp)
movl 48(%esp), %eax
movl %eax, (%esp)
call deflateInit2_@PLT
addl $40, %esp
popl %ebx
ret
.cfi_endproc
.size deflateInit_, .-deflateInit_
# ----------------------
.p2align 4,,15
# ----------------------
.globl deflateCopy
.type deflateCopy, @function
deflateCopy:
.cfi_startproc
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $44, %esp
movl 68(%esp), %eax
call __x86.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
movl 64(%esp), %edx
testl %eax, %eax
je .L722
testl %edx, %edx
je .L722
movl 28(%eax), %esi
testl %esi, %esi
movl %esi, 24(%esp)
je .L722
movl (%eax), %ecx
movl %edx, 28(%esp)
movl %ecx, (%edx)
movl 4(%eax), %ecx
movl %ecx, 4(%edx)
movl 8(%eax), %ecx
movl %ecx, 8(%edx)
movl 12(%eax), %ecx
movl %ecx, 12(%edx)
movl 16(%eax), %ecx
movl %ecx, 16(%edx)
movl 20(%eax), %ecx
movl %ecx, 20(%edx)
movl 24(%eax), %ecx
movl %ecx, 24(%edx)
movl 28(%eax), %ecx
movl %ecx, 28(%edx)
movl 32(%eax), %ecx
movl %ecx, 32(%edx)
movl 36(%eax), %ecx
movl %ecx, 36(%edx)
movl 40(%eax), %ecx
movl %ecx, 40(%edx)
movl 44(%eax), %ecx
movl %ecx, 44(%edx)
movl 48(%eax), %ecx
movl %ecx, 48(%edx)
movl 52(%eax), %eax
movl %eax, 52(%edx)
movl $5828, 8(%esp)
movl $1, 4(%esp)
movl 40(%edx), %eax
movl %eax, (%esp)
call *32(%edx)
testl %eax, %eax
movl %eax, %ebp
je .L723
movl 28(%esp), %edx
testl $1, %ebp
movl %eax, %edi
movl %eax, 28(%edx)
movl $5828, %eax
jne .L740
.L715:
testl $2, %edi
jne .L741
.L716:
movl %eax, %ecx
shrl $2, %ecx
testb $2, %al
rep movsl
jne .L742
testb $1, %al
jne .L743
.L718:
movl %edx, (%ebp)
movl $2, 8(%esp)
movl 44(%ebp), %eax
movl %edx, 28(%esp)
movl %eax, 4(%esp)
movl 40(%edx), %eax
movl %eax, (%esp)
call *32(%edx)
movl 28(%esp), %edx
movl %eax, 56(%ebp)
movl $2, 8(%esp)
movl 44(%ebp), %eax
movl %eax, 4(%esp)
movl 40(%edx), %eax
movl %eax, (%esp)
call *32(%edx)
movl 28(%esp), %edx
movl %eax, 64(%ebp)
movl $2, 8(%esp)
movl 76(%ebp), %eax
movl %eax, 4(%esp)
movl 40(%edx), %eax
movl %eax, (%esp)
call *32(%edx)
movl 28(%esp), %edx
movl %eax, 68(%ebp)
movl $4, 8(%esp)
movl 5788(%ebp), %eax
movl %eax, 4(%esp)
movl 40(%edx), %eax
movl %eax, (%esp)
call *32(%edx)
movl 28(%esp), %edx
movl %eax, %esi
movl %eax, 8(%ebp)
movl 56(%ebp), %eax
testl %eax, %eax
je .L719
movl 64(%ebp), %edi
testl %edi, %edi
je .L719
movl 68(%ebp), %ecx
testl %ecx, %ecx
je .L719
testl %esi, %esi
je .L719
movl 44(%ebp), %edi
leal (%edi,%edi), %ecx
movl 24(%esp), %edi
movl 56(%edi), %edx
movl %ecx, 8(%esp)
movl %eax, (%esp)
movl %edx, 4(%esp)
call memcpy@PLT
movl 44(%ebp), %ecx
movl 64(%edi), %edx
movl 64(%ebp), %eax
addl %ecx, %ecx
movl %ecx, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 76(%ebp), %ecx
movl 68(%edi), %edx
movl 68(%ebp), %eax
addl %ecx, %ecx
movl %ecx, 8(%esp)
movl %edx, 4(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 8(%edi), %edx
movl 12(%ebp), %ecx
movl 8(%ebp), %eax
movl %edx, 4(%esp)
movl %ecx, 8(%esp)
movl %eax, (%esp)
call memcpy@PLT
movl 16(%edi), %eax
movl 8(%ebp), %edx
addl %edx, %eax
subl 8(%edi), %eax
movl %eax, 16(%ebp)
movl 5788(%ebp), %eax
movl %eax, %ecx
leal (%eax,%eax,2), %eax
andl $-2, %ecx
addl %eax, %edx
addl %ecx, %esi
leal 148(%ebp), %eax
movl %eax, 2840(%ebp)
leal 2440(%ebp), %eax
movl %eax, 2852(%ebp)
leal 2684(%ebp), %eax
movl %eax, 2864(%ebp)
xorl %eax, %eax
movl %esi, 5796(%ebp)
movl %edx, 5784(%ebp)
.L714:
addl $44, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
.p2align 4,,7
.p2align 3
.L743:
movzbl (%esi,%ecx), %eax
movb %al, (%edi,%ecx)
jmp .L718
.p2align 4,,7
.p2align 3
.L742:
movzwl (%esi), %ecx
testb $1, %al
movw %cx, (%edi)
movl $2, %ecx
je .L718
jmp .L743
.p2align 4,,7
.p2align 3
.L741:
movzwl (%esi), %ecx
addl $2, %edi
addl $2, %esi
subl $2, %eax
movw %cx, -2(%edi)
jmp .L716
.p2align 4,,7
.p2align 3
.L740:
movl 24(%esp), %esi
leal 1(%ebp), %edi
movzbl (%esi), %eax
leal 1(%esi), %esi
movb %al, (%ebp)
movl $5827, %eax
jmp .L715
.p2align 4,,7
.p2align 3
.L722:
movl $-2, %eax
jmp .L714
.p2align 4,,7
.p2align 3
.L719:
movl %edx, (%esp)
call deflateEnd@PLT
movl $-4, %eax
jmp .L714
.p2align 4,,7
.p2align 3
.L723:
movl $-4, %eax
jmp .L714
.cfi_endproc
.size deflateCopy, .-deflateCopy
# ----------------------
.section .data.rel.ro.local,"aw",@progbits
.align 32
.local configuration_table
.type configuration_table, @object
configuration_table:
.value 0
.value 0
.value 0
.value 0
.long deflate_stored
.value 4
.value 4
.value 8
.value 4
.long deflate_fast
.value 4
.value 5
.value 16
.value 8
.long deflate_fast
.value 4
.value 6
.value 32
.value 32
.long deflate_fast
.value 4
.value 4
.value 16
.value 16
.long deflate_slow
.value 8
.value 16
.value 32
.value 32
.long deflate_slow
.value 8
.value 16
.value 128
.value 128
.long deflate_slow
.value 8
.value 32
.value 128
.value 256
.long deflate_slow
.value 32
.value 128
.value 258
.value 1024
.long deflate_slow
.value 32
.value 258
.value 258
.value 4096
.long deflate_slow
.size configuration_table, 120
# ----------------------
.section .rodata
.align 32
.globl deflate_copyright
.type deflate_copyright, @object
deflate_copyright:
.string " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "
.size deflate_copyright, 68
# ----------------------
.section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
.hidden __x86.get_pc_thunk.bx
.globl __x86.get_pc_thunk.bx
.type __x86.get_pc_thunk.bx, @function
__x86.get_pc_thunk.bx:
.cfi_startproc
movl (%esp), %ebx
ret
.cfi_endproc
# ----------------------
.hidden zcfree
.hidden zcalloc
.hidden _tr_align
.hidden _tr_stored_block
.hidden _tr_init
.hidden _tr_flush_bits
.hidden _tr_flush_block
.hidden _dist_code
.hidden _length_code
.ident "GCC: (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4"
.section .note.GNU-stack,"",@progbits
| 21.549069 | 88 | 0.472518 |
b860215b6fd0b5dfb96d55d61c33344f8328b478 | 1,011 | asm | Assembly | programs/oeis/280/A280428.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/280/A280428.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/280/A280428.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A280428: a(n) = 1729*n^3.
; 1729,13832,46683,110656,216125,373464,593047,885248,1260441,1729000,2301299,2987712,3798613,4744376,5835375,7081984,8494577,10083528,11859211,13832000,16012269,18410392,21036743,23901696,27015625,30388904,34031907,37955008,42168581,46683000,51508639,56655872,62135073,67956616,74130875,80668224,87579037,94873688,102562551,110656000,119164409,128098152,137467603,147283136,157555125,168293944,179509967,191213568,203415121,216125000,229353579,243111232,257408333,272255256,287662375,303640064,320198697,337348648,355100291,373464000,392450149,412069112,432331263,453246976,474826625,497080584,520019227,543652928,567992061,593047000,618828119,645345792,672610393,700632296,729421875,758989504,789345557,820500408,852464431,885248000,918861489,953315272,988619723,1024785216,1061822125,1099740824,1138551687,1178265088,1218891401,1260441000,1302924259,1346351552,1390733253,1436079736,1482401375,1529708544,1578011617,1627320968,1677646971,1729000000
add $0,1
pow $0,3
mul $0,1729
| 144.428571 | 951 | 0.873393 |
df64fab58d39690dc3f9bc806a5cbe63a3418980 | 685 | asm | Assembly | oeis/222/A222739.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/222/A222739.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/222/A222739.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A222739: Partial sums of the first 10^n terms in A181482.
; Submitted by Jon Maiga
; 76,57256,55722556,55572225556,55557222255556,55555722222555556,55555572222225555556,55555557222222255555556,55555555722222222555555556,55555555572222222225555555556,55555555557222222222255555555556,55555555555722222222222555555555556,55555555555572222222222225555555555556,55555555555557222222222222255555555555556,55555555555555722222222222222555555555555556,55555555555555572222222222222225555555555555556,55555555555555557222222222222222255555555555555556
mov $1,10
pow $1,$0
mul $1,10
mov $0,$1
add $0,4
bin $1,2
div $1,5
add $1,1
mul $1,$0
mov $0,$1
sub $0,140
div $0,108
mul $0,60
add $0,76
| 36.052632 | 460 | 0.852555 |
131fac86e27d73bbeaa45be3022a17dff64e52ca | 4,004 | asm | Assembly | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0.log_21829_599.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0.log_21829_599.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0.log_21829_599.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r13
push %r14
push %rdi
push %rsi
lea addresses_UC_ht+0x12d34, %rdi
nop
nop
nop
nop
nop
cmp $23738, %r14
mov (%rdi), %esi
nop
xor %r13, %r13
pop %rsi
pop %rdi
pop %r14
pop %r13
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %rax
push %rbp
push %rbx
push %rdi
// Faulty Load
lea addresses_US+0x9934, %r15
nop
nop
nop
sub $61452, %rbp
movb (%r15), %bl
lea oracles, %r15
and $0xff, %rbx
shlq $12, %rbx
mov (%r15,%rbx,1), %rbx
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': True, 'size': 1}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'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
*/
| 64.580645 | 2,999 | 0.662338 |
5fd3afc5a163cd62f6dc4d8d27ee11ae617740a2 | 496 | asm | Assembly | libsrc/stdio/pc88/fgetc_cons.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/stdio/pc88/fgetc_cons.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/stdio/pc88/fgetc_cons.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ;
; NEC PC8801 Library
;
; getkey() Wait for keypress
;
; Stefano Bodrato - 2018
;
;
; $Id: fgetc_cons.asm $
;
SECTION code_clib
PUBLIC fgetc_cons
PUBLIC _fgetc_cons
EXTERN getk
; INCLUDE "target/pc88/def/n88bios.def"
.fgetc_cons
._fgetc_cons
push ix
;call CHGET
.wkey
; call 3241h
; jr nc,wkey
call getk
and a
jr nz,wkey
.wkey1
call getk
and a
jr z,wkey1
pop ix
IF STANDARDESCAPECHARS
cp 13
jr nz,not_return
ld a,10
.not_return
ENDIF
ld l,a
ld h,0
ret
| 10.333333 | 47 | 0.677419 |
96552a9de916b309f3aaae948d30e0c822786e18 | 240 | asm | Assembly | untested/x64/findFirstSet.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | untested/x64/findFirstSet.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | untested/x64/findFirstSet.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | global _findFirstSet
global _findFirstSet64
segment .text align=16
_findFirstSet:
bsf eax, edi
mov edx, -1
cmove eax, edx
inc rax
ret
align 16
_findFirstSet64:
bsf rax, rdi
mov rdx, -1
cmove rax, rdx
inc rax
cdqe
ret | 10 | 22 | 0.704167 |
9f1dd12aecb92d000f20040e86a69d12f1682ed8 | 4,468 | asm | Assembly | Transynther/x86/_processed/NC/_ht_st_zr_un_sm_/i7-7700_9_0x48.log_21829_2269.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NC/_ht_st_zr_un_sm_/i7-7700_9_0x48.log_21829_2269.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NC/_ht_st_zr_un_sm_/i7-7700_9_0x48.log_21829_2269.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %rax
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x3142, %rsi
lea addresses_A_ht+0xa782, %rdi
nop
nop
nop
xor $15605, %rax
mov $80, %rcx
rep movsw
add %r12, %r12
pop %rsi
pop %rdi
pop %rcx
pop %rax
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r9
push %rcx
push %rdi
// Store
mov $0x4d670d0000000942, %rcx
nop
nop
nop
nop
xor %rdi, %rdi
mov $0x5152535455565758, %r9
movq %r9, %xmm3
movups %xmm3, (%rcx)
sub %rcx, %rcx
// Faulty Load
mov $0x4d670d0000000942, %r10
clflush (%r10)
nop
nop
and %r12, %r12
movb (%r10), %cl
lea oracles, %r9
and $0xff, %rcx
shlq $12, %rcx
mov (%r9,%rcx,1), %rcx
pop %rdi
pop %rcx
pop %r9
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}}
{'ae': 28, '47': 19, 'dd': 1, 'a5': 1, 'ea': 3, '94': 1, '54': 1, 'e4': 2, '58': 16788, '29': 1, 'db': 5, '00': 2942, '22': 4, 'bb': 11, 'e0': 2022}
58 58 58 58 58 58 58 e0 00 58 e0 58 00 58 e0 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 00 00 58 58 58 58 58 58 58 e0 58 58 58 58 58 58 58 00 58 00 58 00 58 e0 58 58 58 58 58 58 00 00 58 58 58 58 58 58 00 58 58 00 58 58 58 00 58 58 58 58 00 58 58 e0 58 00 58 58 00 58 00 58 58 00 58 58 58 58 58 00 58 58 58 ae 58 58 58 58 e0 58 58 58 58 58 58 58 58 58 58 58 58 58 e0 e0 58 e0 00 00 58 58 e0 58 58 58 e0 58 e0 58 58 e0 58 58 58 58 e0 58 58 00 58 58 58 58 58 00 e0 58 e0 58 58 58 e0 58 58 58 58 00 e0 58 58 58 58 58 58 58 58 00 e0 58 58 58 58 58 58 58 58 58 00 58 58 58 e0 58 58 58 58 58 58 58 58 58 58 58 e0 58 58 58 58 58 58 58 e0 58 58 58 58 58 00 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 e0 58 58 e0 00 58 00 58 00 58 00 58 00 58 58 e0 58 e0 58 58 e0 58 e0 58 58 00 58 58 00 e0 58 00 58 00 e0 58 58 58 58 e0 58 00 58 58 00 58 58 58 00 58 58 58 58 58 58 00 00 58 58 58 58 58 58 58 e0 58 e0 58 e0 58 58 58 58 58 58 58 58 58 58 58 58 e0 58 58 58 58 58 58 e0 58 e0 00 58 58 58 58 58 58 00 58 58 00 58 00 e0 58 00 58 58 58 58 58 58 58 58 e0 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 e0 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 e0 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 e0 58 58 58 00 58 58 58 58 58 58 58 58 58 00 58 58 e0 58 58 58 58 58 00 58 58 e0 58 58 ae 58 58 00 00 58 e0 58 58 58 58 58 00 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 00 58 58 00 58 e0 58 e0 58 00 58 58 58 e0 58 e0 58 e0 e0 58 58 58 58 e0 e0 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 00 58 58 58 58 00 58 00 e0 58 58 58 58 58 58 58 58 58 e0 58 58 58 58 58 00 58 e0 58 e0 58 00 58 00 58 e0 58 58 58 00 e0 00 e0 58 00 58 58 58 58 00 58 58 e0 58 58 58 58 58 58 58 58 00 58 58 58 00 58 58 58 e0 58 58 00 e0 58 58 00 58 00 58 58 58 ae 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 e0 58 58 e0 58 00 58 58 e0 e0 58 e0 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 00 58 e0 58 58 58 58 00 58 e0 58 58 58 e0 58 e0 58 58 58 58 58 58 00 58 58 58 58 e0 58 58 e0 58 ae 00 58 58 58 e0 58 00 00 58 e0 58 58 58 58 58 00 58 58 58 58 58 00 00 58 00 58 58 58 58 58 58 58 00 58 58 58 e0 58 58 e0 58 58 58 58 58 58 58 58 e0 58 58 58 58 58 58 e0 e0 58 00 e0 58 58 58 58 e0 58 e0 58 58 00 58 58 58 00 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 e0 58 58 58 58 00 58 58 00 00 00 00 58 58 58 00 58 00 58 58 e0 00 58 00 58 e0 00 58 58 58 58 58 58 58 58 e0 58 58 58 58 58 58 58 58 00 58 00 58 58 58 58 58 58 00 58 00 58 58 e0 58 58 58 58 58 58 58 58 58 58 58 58 00 58 00 58 58 58 58 00 58 58 58 58 00 58 00 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 e0 58 58 58 e0 58 58 58 58 58 58 58 00 e0 58 58 58 00 58 58 58 58 58 58 e0 58 58 58 58 58 58 e0 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 00 58 e0 58 00 00 00 58 00 e0 00 58 58 ae 58 e0 58 00 58 58 58 58 e0 58 58 58 58 58
*/
| 60.378378 | 2,999 | 0.652865 |
0b36b8d50b4ec1e80675800d5cdba4807d00493b | 4,977 | asm | Assembly | Appl/Clock/clock.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Appl/Clock/clock.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Appl/Clock/clock.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1990 -- All Rights Reserved
PROJECT: PC GEOS
FILE: clock.asm
AUTHOR: Gene Anderson, Jan 22, 1991
REVISION HISTORY:
Name Date Description
---- ---- -----------
Gene 1/22/91 Initial revision
DESCRIPTION:
Manager file for PC/GEOS clock
$Id: clock.asm,v 1.1 97/04/04 14:50:22 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
include clock.def
;------------------------------------------------------------------------------
; File-specific Include Files
;------------------------------------------------------------------------------
include gstring.def ; For monikers (gstring macros)...
include initfile.def
include Internal/grWinInt.def ; for regions in there...
UseLib Internal/im.def
;------------------------------------------------------------------------------
; Resource Definitions
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
; Macros
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
; Constants
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
; Definitions
;------------------------------------------------------------------------------
;------------------------------------------------------------------------------
; Resources
;------------------------------------------------------------------------------
.warn -private ; no object context when defining the individual
; objects, so Esp whines about the pointers to the
; various color tables, which isn't helpful...
include clock.rdef
.warn @private
;------------------------------------------------------------------------------
; Variables
;------------------------------------------------------------------------------
idata segment
ClockClass mask CLASSF_NEVER_SAVED ;process class
ClockColorSelectorClass
idata ends
;---------------------------------------------------
;-----------------------------------------------------------------------------
CommonCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ClockBanishPrimary
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Take the primary off the screen.
CALLED BY: MSG_CLOCK_BANISH_PRIMARY
PASS: ds = es = dgroup
RETURN: nothing
DESTROYED: everything
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 2/ 3/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ClockBanishPrimary method dynamic ClockClass, MSG_CLOCK_BANISH_PRIMARY
.enter
;
; First take the primary off-screen so it gives up the app exclusive, &c
;
GetResourceHandleNS ClockPrimary, bx
mov si, offset ClockPrimary
mov ax, MSG_GEN_SET_NOT_USABLE
mov dl, VUM_NOW
clr di
call ObjMessage
;
; Set the application non-focusable and non-targetable.
;
mov ax, MSG_GEN_SET_ATTRS
GetResourceHandleNS ClockAppObj, bx
mov cx, mask GA_TARGETABLE shl 8 ; clear this bit
mov si, offset ClockAppObj
clr di
call ObjMessage
mov ax, MSG_GEN_APPLICATION_SET_STATE
clr cx
mov dx, mask AS_FOCUSABLE or mask AS_MODELABLE
clr di
call ObjMessage
.leave
ret
ClockBanishPrimary endm
CommonCode ends
;------------------------------------------------------------------------------
;
; ClockColorSelectorClass
;
;------------------------------------------------------------------------------
CommonCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ClockColorSelectorGenerateUI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Hack to make sure HINT_IF_SYSTEM_ATTRS has been processed
before we look at our hints.
CALLED BY: MSG_GEN_CONTROL_GENERATE_UI
PASS: ?
RETURN: ?
DESTROYED: ?
SIDE EFFECTS:
PSEUDO CODE/STRATEGY:
REVISION HISTORY:
Name Date Description
---- ---- -----------
ardeb 5/ 3/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ClockColorSelectorGenerateUI method dynamic ClockColorSelectorClass, MSG_GEN_CONTROL_GENERATE_UI
uses ax, cx, dx, bp
.enter
mov ax, MSG_SPEC_SCAN_GEOMETRY_HINTS
call ObjCallInstanceNoLock
.leave
mov di, offset ClockColorSelectorClass
GOTO ObjCallSuperNoLock
ClockColorSelectorGenerateUI endm
CommonCode ends
| 28.603448 | 97 | 0.418927 |
c3ef4bca9c10259659314383dd9cb1aaf789095e | 826 | asm | Assembly | asm/reverseString.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | asm/reverseString.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | asm/reverseString.asm | GabrielRavier/Generic-Assembly-Samples | fbf803960a14307b7fce0165058d0d4048abaf42 | [
"Unlicense"
] | null | null | null | global @ASM_reverseString@4
extern @ASM_strlen@4
%define ASM_strlen @ASM_strlen@4
segment .text align=16
%define string ecx
%define strlenRet eax
%define result eax
@ASM_reverseString@4:
push esi
push ebx
sub esp, 4
mov esi, string
test string, string
je .returnString
cmp byte [string], 0
jne .doReverse
.returnString:
mov result, esi
add esp, 4
pop ebx
pop esi
ret
.doReverse:
call ASM_strlen
lea eax, [strlenRet + esi - 1]
cmp esi, eax
jnb .returnString
mov edx, esi
.loop:
mov cl, byte [edx]
mov bl, byte [eax]
mov byte [edx], bl
mov byte [eax], cl
inc edx
dec eax
cmp edx, eax
jb .loop
mov result, esi
add esp, 4
pop ebx
pop esi
ret
| 15.296296 | 35 | 0.575061 |
80e223911028a7e69b34f622c61ddc46efc802ff | 212 | asm | Assembly | asm/section.asm | dyc-it/myos | 8b679feb34663d0c31c2ed88d8936778b42e6b66 | [
"MIT"
] | null | null | null | asm/section.asm | dyc-it/myos | 8b679feb34663d0c31c2ed88d8936778b42e6b66 | [
"MIT"
] | null | null | null | asm/section.asm | dyc-it/myos | 8b679feb34663d0c31c2ed88d8936778b42e6b66 | [
"MIT"
] | null | null | null | ;nasm section.asm -l section.lst -o section.bin
;hexdump section.bin
;check the section of the following sections
section data1 align=16
db 0x55
section data2 align=16
db 0xaa
section data3 align=16
db 0x99
| 17.666667 | 47 | 0.778302 |
8c281da4abb81d0186a1240958eb3b854be8ca78 | 382 | asm | Assembly | programs/count_255_0_stop.asm | blurpy/8-bit-computer-emulator | cc5fbdaccbe36c7be42b636d91837726f4e5b97c | [
"MIT"
] | 12 | 2021-03-28T13:31:18.000Z | 2022-03-23T04:17:32.000Z | programs/count_255_0_stop.asm | blurpy/8-bit-computer-emulator | cc5fbdaccbe36c7be42b636d91837726f4e5b97c | [
"MIT"
] | 1 | 2021-05-22T17:35:16.000Z | 2021-05-22T17:35:16.000Z | programs/count_255_0_stop.asm | blurpy/8-bit-computer-emulator | cc5fbdaccbe36c7be42b636d91837726f4e5b97c | [
"MIT"
] | null | null | null | SUB 15 ; Put the value from memory location 15 in the B-register, and store A-B in the A-register
OUT ; Output the value of the A-register
JZ 4 ; Jump to instruction 4 if the A-register is 0
JMP 0 ; Jump to instruction 0
HLT ; Halt the computer
ORG 15 ; Change memory location to 15
DB 1 ; Define a byte with the value 1 at memory location 15
| 47.75 | 101 | 0.672775 |
f531576cfffee5e2995e91cc63a4ebe4a98174f5 | 193 | asm | Assembly | ODD_OR_EVEN.asm | sekharkaredla/8085 | bca7395498d013c0a337f696aad49ead34f8cbdd | [
"MIT"
] | 1 | 2019-07-31T04:41:42.000Z | 2019-07-31T04:41:42.000Z | ODD_OR_EVEN.asm | sekharkaredla/8085 | bca7395498d013c0a337f696aad49ead34f8cbdd | [
"MIT"
] | null | null | null | ODD_OR_EVEN.asm | sekharkaredla/8085 | bca7395498d013c0a337f696aad49ead34f8cbdd | [
"MIT"
] | 1 | 2022-01-11T07:50:34.000Z | 2022-01-11T07:50:34.000Z | // OUPUT=1 FOR ODD 0 FOR EVEN
LXI H,4000
MOV A,M
MVI B,00
MVI C,02
ZONE: SUB C
JC TEST
JZ TYPE
JNZ ZONE
TEST: INR B
TYPE: MOV A,B
STA 5000
RST 1
| 11.352941 | 29 | 0.518135 |
55e491aa53a5d694a98787d3795bb7fd6c5930a9 | 308 | asm | Assembly | programs/oeis/100/A100109.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/100/A100109.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/100/A100109.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A100109: a(n) = n^3 - 2*n^2 + 2.
; 1,2,11,34,77,146,247,386,569,802,1091,1442,1861,2354,2927,3586,4337,5186,6139,7202,8381,9682,11111,12674,14377,16226,18227,20386,22709,25202,27871,30722,33761,36994,40427,44066,47917,51986,56279,60802,65561,70562
mov $1,$0
pow $0,2
add $0,$1
sub $0,1
mul $0,$1
add $0,1
| 30.8 | 214 | 0.701299 |
8c2623db46ab12ee2cf4b38ac26f4b9fcdba53c9 | 2,465 | asm | Assembly | third_party/libvpx/source/libvpx/vpx_dsp/x86/add_noise_mmx.asm | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 1 | 2020-09-15T08:43:34.000Z | 2020-09-15T08:43:34.000Z | third_party/libvpx/source/libvpx/vpx_dsp/x86/add_noise_mmx.asm | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | third_party/libvpx/source/libvpx/vpx_dsp/x86/add_noise_mmx.asm | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | ;
; Copyright (c) 2015 The WebM project authors. All Rights Reserved.
;
; Use of this source code is governed by a BSD-style license
; that can be found in the LICENSE file in the root of the source
; tree. An additional intellectual property rights grant can be found
; in the file PATENTS. All contributing project authors may
; be found in the AUTHORS file in the root of the source tree.
;
%include "vpx_ports/x86_abi_support.asm"
;void vpx_plane_add_noise_mmx (unsigned char *Start, unsigned char *noise,
; unsigned char blackclamp[16],
; unsigned char whiteclamp[16],
; unsigned char bothclamp[16],
; unsigned int Width, unsigned int Height, int Pitch)
global sym(vpx_plane_add_noise_mmx) PRIVATE
sym(vpx_plane_add_noise_mmx):
push rbp
mov rbp, rsp
SHADOW_ARGS_TO_STACK 8
GET_GOT rbx
push rsi
push rdi
; end prolog
; get the clamps in registers
mov rdx, arg(2) ; blackclamp
movq mm3, [rdx]
mov rdx, arg(3) ; whiteclamp
movq mm4, [rdx]
mov rdx, arg(4) ; bothclamp
movq mm5, [rdx]
.addnoise_loop:
call sym(LIBVPX_RAND) WRT_PLT
mov rcx, arg(1) ;noise
and rax, 0xff
add rcx, rax
mov rdi, rcx
movsxd rcx, dword arg(5) ;[Width]
mov rsi, arg(0) ;Pos
xor rax,rax
.addnoise_nextset:
movq mm1,[rsi+rax] ; get the source
psubusb mm1, mm3 ; subtract black clamp
paddusb mm1, mm5 ; add both clamp
psubusb mm1, mm4 ; subtract whiteclamp
movq mm2,[rdi+rax] ; get the noise for this line
paddb mm1,mm2 ; add it in
movq [rsi+rax],mm1 ; store the result
add rax,8 ; move to the next line
cmp rax, rcx
jl .addnoise_nextset
movsxd rax, dword arg(7) ; Pitch
add arg(0), rax ; Start += Pitch
sub dword arg(6), 1 ; Height -= 1
jg .addnoise_loop
; begin epilog
pop rdi
pop rsi
RESTORE_GOT
UNSHADOW_ARGS
pop rbp
ret
SECTION_RODATA
align 16
Blur:
times 16 dw 16
times 8 dw 64
times 16 dw 16
times 8 dw 0
rd:
times 4 dw 0x40
| 28.333333 | 80 | 0.54929 |
eb87bc10c3c5c4494a7f0dfb0cbed6d3aeb6c814 | 362 | asm | Assembly | oeis/165/A165405.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/165/A165405.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/165/A165405.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A165405: a(0)=1, a(1)=3,a(n)=6*a(n-2)-a(n-1).
; Submitted by Jon Maiga
; 1,3,3,15,3,87,-69,591,-1005,4551,-10581,37887,-101373,328695,-936933,2909103,-8530701,25985319,-77169525,233081439,-696098589,2094587223,-6271178757,18838702095,-56465774637,169497987207,-508292635029
mov $2,1
mov $3,1
lpb $0
sub $0,1
mul $2,2
add $2,$3
mul $3,-3
lpe
mov $0,$2
| 25.857143 | 202 | 0.679558 |
6eb45663166d0c84942a028f462c164856e2eef3 | 2,052 | asm | Assembly | programs/oeis/304/A304159.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/304/A304159.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/304/A304159.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A304159: a(n) = 2*n^3 - 4*n^2 + 6*n - 2 (n>=1).
; 2,10,34,86,178,322,530,814,1186,1658,2242,2950,3794,4786,5938,7262,8770,10474,12386,14518,16882,19490,22354,25486,28898,32602,36610,40934,45586,50578,55922,61630,67714,74186,81058,88342,96050,104194,112786,121838,131362,141370,151874,162886,174418,186482,199090,212254,225986,240298,255202,270710,286834,303586,320978,339022,357730,377114,397186,417958,439442,461650,484594,508286,532738,557962,583970,610774,638386,666818,696082,726190,757154,788986,821698,855302,889810,925234,961586,998878,1037122,1076330,1116514,1157686,1199858,1243042,1287250,1332494,1378786,1426138,1474562,1524070,1574674,1626386,1679218,1733182,1788290,1844554,1901986,1960598,2020402,2081410,2143634,2207086,2271778,2337722,2404930,2473414,2543186,2614258,2686642,2760350,2835394,2911786,2989538,3068662,3149170,3231074,3314386,3399118,3485282,3572890,3661954,3752486,3844498,3938002,4033010,4129534,4227586,4327178,4428322,4531030,4635314,4741186,4848658,4957742,5068450,5180794,5294786,5410438,5527762,5646770,5767474,5889886,6014018,6139882,6267490,6396854,6527986,6660898,6795602,6932110,7070434,7210586,7352578,7496422,7642130,7789714,7939186,8090558,8243842,8399050,8556194,8715286,8876338,9039362,9204370,9371374,9540386,9711418,9884482,10059590,10236754,10415986,10597298,10780702,10966210,11153834,11343586,11535478,11729522,11925730,12124114,12324686,12527458,12732442,12939650,13149094,13360786,13574738,13790962,14009470,14230274,14453386,14678818,14906582,15136690,15369154,15603986,15841198,16080802,16322810,16567234,16814086,17063378,17315122,17569330,17826014,18085186,18346858,18611042,18877750,19146994,19418786,19693138,19970062,20249570,20531674,20816386,21103718,21393682,21686290,21981554,22279486,22580098,22883402,23189410,23498134,23809586,24123778,24440722,24760430,25082914,25408186,25736258,26067142,26400850,26737394,27076786,27419038,27764162,28112170,28463074,28816886,29173618,29533282,29895890,30261454,30629986,31001498
mov $1,$0
mul $1,$0
add $1,2
add $1,$0
mul $1,$0
add $1,1
mul $1,2
| 186.545455 | 1,933 | 0.846491 |
f685c2fdfc4aa0b4cca69f6df966fe2a32f873ef | 25,487 | asm | Assembly | examples/pxScene2d/external/libnode-v0.12.7/deps/openssl/asm/x64-win32-masm/sha/sha256-x86_64.asm | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 2,494 | 2015-02-11T04:34:13.000Z | 2022-03-31T14:21:47.000Z | examples/pxScene2d/external/libnode-v0.12.7/deps/openssl/asm/x64-win32-masm/sha/sha256-x86_64.asm | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 1,432 | 2017-06-21T04:08:48.000Z | 2020-08-25T16:21:15.000Z | examples/pxScene2d/external/libnode-v0.12.7/deps/openssl/asm/x64-win32-masm/sha/sha256-x86_64.asm | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 442 | 2015-02-12T13:45:46.000Z | 2022-03-21T05:28:05.000Z | OPTION DOTNAME
.text$ SEGMENT ALIGN(64) 'CODE'
PUBLIC sha256_block_data_order
ALIGN 16
sha256_block_data_order PROC PUBLIC
mov QWORD PTR[8+rsp],rdi ;WIN64 prologue
mov QWORD PTR[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_sha256_block_data_order::
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
mov rcx,r9
push rbx
push rbp
push r12
push r13
push r14
push r15
mov r11,rsp
shl rdx,4
sub rsp,16*4+4*8
lea rdx,QWORD PTR[rdx*4+rsi]
and rsp,-64
mov QWORD PTR[((64+0))+rsp],rdi
mov QWORD PTR[((64+8))+rsp],rsi
mov QWORD PTR[((64+16))+rsp],rdx
mov QWORD PTR[((64+24))+rsp],r11
$L$prologue::
lea rbp,QWORD PTR[K256]
mov eax,DWORD PTR[rdi]
mov ebx,DWORD PTR[4+rdi]
mov ecx,DWORD PTR[8+rdi]
mov edx,DWORD PTR[12+rdi]
mov r8d,DWORD PTR[16+rdi]
mov r9d,DWORD PTR[20+rdi]
mov r10d,DWORD PTR[24+rdi]
mov r11d,DWORD PTR[28+rdi]
jmp $L$loop
ALIGN 16
$L$loop::
xor rdi,rdi
mov r12d,DWORD PTR[rsi]
mov r13d,r8d
mov r14d,eax
bswap r12d
ror r13d,14
mov r15d,r9d
mov DWORD PTR[rsp],r12d
ror r14d,9
xor r13d,r8d
xor r15d,r10d
ror r13d,5
add r12d,r11d
xor r14d,eax
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r8d
mov r11d,ebx
ror r14d,11
xor r13d,r8d
xor r15d,r10d
xor r11d,ecx
xor r14d,eax
add r12d,r15d
mov r15d,ebx
ror r13d,6
and r11d,eax
and r15d,ecx
ror r14d,2
add r12d,r13d
add r11d,r15d
add edx,r12d
add r11d,r12d
lea rdi,QWORD PTR[1+rdi]
add r11d,r14d
mov r12d,DWORD PTR[4+rsi]
mov r13d,edx
mov r14d,r11d
bswap r12d
ror r13d,14
mov r15d,r8d
mov DWORD PTR[4+rsp],r12d
ror r14d,9
xor r13d,edx
xor r15d,r9d
ror r13d,5
add r12d,r10d
xor r14d,r11d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,edx
mov r10d,eax
ror r14d,11
xor r13d,edx
xor r15d,r9d
xor r10d,ebx
xor r14d,r11d
add r12d,r15d
mov r15d,eax
ror r13d,6
and r10d,r11d
and r15d,ebx
ror r14d,2
add r12d,r13d
add r10d,r15d
add ecx,r12d
add r10d,r12d
lea rdi,QWORD PTR[1+rdi]
add r10d,r14d
mov r12d,DWORD PTR[8+rsi]
mov r13d,ecx
mov r14d,r10d
bswap r12d
ror r13d,14
mov r15d,edx
mov DWORD PTR[8+rsp],r12d
ror r14d,9
xor r13d,ecx
xor r15d,r8d
ror r13d,5
add r12d,r9d
xor r14d,r10d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,ecx
mov r9d,r11d
ror r14d,11
xor r13d,ecx
xor r15d,r8d
xor r9d,eax
xor r14d,r10d
add r12d,r15d
mov r15d,r11d
ror r13d,6
and r9d,r10d
and r15d,eax
ror r14d,2
add r12d,r13d
add r9d,r15d
add ebx,r12d
add r9d,r12d
lea rdi,QWORD PTR[1+rdi]
add r9d,r14d
mov r12d,DWORD PTR[12+rsi]
mov r13d,ebx
mov r14d,r9d
bswap r12d
ror r13d,14
mov r15d,ecx
mov DWORD PTR[12+rsp],r12d
ror r14d,9
xor r13d,ebx
xor r15d,edx
ror r13d,5
add r12d,r8d
xor r14d,r9d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,ebx
mov r8d,r10d
ror r14d,11
xor r13d,ebx
xor r15d,edx
xor r8d,r11d
xor r14d,r9d
add r12d,r15d
mov r15d,r10d
ror r13d,6
and r8d,r9d
and r15d,r11d
ror r14d,2
add r12d,r13d
add r8d,r15d
add eax,r12d
add r8d,r12d
lea rdi,QWORD PTR[1+rdi]
add r8d,r14d
mov r12d,DWORD PTR[16+rsi]
mov r13d,eax
mov r14d,r8d
bswap r12d
ror r13d,14
mov r15d,ebx
mov DWORD PTR[16+rsp],r12d
ror r14d,9
xor r13d,eax
xor r15d,ecx
ror r13d,5
add r12d,edx
xor r14d,r8d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,eax
mov edx,r9d
ror r14d,11
xor r13d,eax
xor r15d,ecx
xor edx,r10d
xor r14d,r8d
add r12d,r15d
mov r15d,r9d
ror r13d,6
and edx,r8d
and r15d,r10d
ror r14d,2
add r12d,r13d
add edx,r15d
add r11d,r12d
add edx,r12d
lea rdi,QWORD PTR[1+rdi]
add edx,r14d
mov r12d,DWORD PTR[20+rsi]
mov r13d,r11d
mov r14d,edx
bswap r12d
ror r13d,14
mov r15d,eax
mov DWORD PTR[20+rsp],r12d
ror r14d,9
xor r13d,r11d
xor r15d,ebx
ror r13d,5
add r12d,ecx
xor r14d,edx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r11d
mov ecx,r8d
ror r14d,11
xor r13d,r11d
xor r15d,ebx
xor ecx,r9d
xor r14d,edx
add r12d,r15d
mov r15d,r8d
ror r13d,6
and ecx,edx
and r15d,r9d
ror r14d,2
add r12d,r13d
add ecx,r15d
add r10d,r12d
add ecx,r12d
lea rdi,QWORD PTR[1+rdi]
add ecx,r14d
mov r12d,DWORD PTR[24+rsi]
mov r13d,r10d
mov r14d,ecx
bswap r12d
ror r13d,14
mov r15d,r11d
mov DWORD PTR[24+rsp],r12d
ror r14d,9
xor r13d,r10d
xor r15d,eax
ror r13d,5
add r12d,ebx
xor r14d,ecx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r10d
mov ebx,edx
ror r14d,11
xor r13d,r10d
xor r15d,eax
xor ebx,r8d
xor r14d,ecx
add r12d,r15d
mov r15d,edx
ror r13d,6
and ebx,ecx
and r15d,r8d
ror r14d,2
add r12d,r13d
add ebx,r15d
add r9d,r12d
add ebx,r12d
lea rdi,QWORD PTR[1+rdi]
add ebx,r14d
mov r12d,DWORD PTR[28+rsi]
mov r13d,r9d
mov r14d,ebx
bswap r12d
ror r13d,14
mov r15d,r10d
mov DWORD PTR[28+rsp],r12d
ror r14d,9
xor r13d,r9d
xor r15d,r11d
ror r13d,5
add r12d,eax
xor r14d,ebx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r9d
mov eax,ecx
ror r14d,11
xor r13d,r9d
xor r15d,r11d
xor eax,edx
xor r14d,ebx
add r12d,r15d
mov r15d,ecx
ror r13d,6
and eax,ebx
and r15d,edx
ror r14d,2
add r12d,r13d
add eax,r15d
add r8d,r12d
add eax,r12d
lea rdi,QWORD PTR[1+rdi]
add eax,r14d
mov r12d,DWORD PTR[32+rsi]
mov r13d,r8d
mov r14d,eax
bswap r12d
ror r13d,14
mov r15d,r9d
mov DWORD PTR[32+rsp],r12d
ror r14d,9
xor r13d,r8d
xor r15d,r10d
ror r13d,5
add r12d,r11d
xor r14d,eax
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r8d
mov r11d,ebx
ror r14d,11
xor r13d,r8d
xor r15d,r10d
xor r11d,ecx
xor r14d,eax
add r12d,r15d
mov r15d,ebx
ror r13d,6
and r11d,eax
and r15d,ecx
ror r14d,2
add r12d,r13d
add r11d,r15d
add edx,r12d
add r11d,r12d
lea rdi,QWORD PTR[1+rdi]
add r11d,r14d
mov r12d,DWORD PTR[36+rsi]
mov r13d,edx
mov r14d,r11d
bswap r12d
ror r13d,14
mov r15d,r8d
mov DWORD PTR[36+rsp],r12d
ror r14d,9
xor r13d,edx
xor r15d,r9d
ror r13d,5
add r12d,r10d
xor r14d,r11d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,edx
mov r10d,eax
ror r14d,11
xor r13d,edx
xor r15d,r9d
xor r10d,ebx
xor r14d,r11d
add r12d,r15d
mov r15d,eax
ror r13d,6
and r10d,r11d
and r15d,ebx
ror r14d,2
add r12d,r13d
add r10d,r15d
add ecx,r12d
add r10d,r12d
lea rdi,QWORD PTR[1+rdi]
add r10d,r14d
mov r12d,DWORD PTR[40+rsi]
mov r13d,ecx
mov r14d,r10d
bswap r12d
ror r13d,14
mov r15d,edx
mov DWORD PTR[40+rsp],r12d
ror r14d,9
xor r13d,ecx
xor r15d,r8d
ror r13d,5
add r12d,r9d
xor r14d,r10d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,ecx
mov r9d,r11d
ror r14d,11
xor r13d,ecx
xor r15d,r8d
xor r9d,eax
xor r14d,r10d
add r12d,r15d
mov r15d,r11d
ror r13d,6
and r9d,r10d
and r15d,eax
ror r14d,2
add r12d,r13d
add r9d,r15d
add ebx,r12d
add r9d,r12d
lea rdi,QWORD PTR[1+rdi]
add r9d,r14d
mov r12d,DWORD PTR[44+rsi]
mov r13d,ebx
mov r14d,r9d
bswap r12d
ror r13d,14
mov r15d,ecx
mov DWORD PTR[44+rsp],r12d
ror r14d,9
xor r13d,ebx
xor r15d,edx
ror r13d,5
add r12d,r8d
xor r14d,r9d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,ebx
mov r8d,r10d
ror r14d,11
xor r13d,ebx
xor r15d,edx
xor r8d,r11d
xor r14d,r9d
add r12d,r15d
mov r15d,r10d
ror r13d,6
and r8d,r9d
and r15d,r11d
ror r14d,2
add r12d,r13d
add r8d,r15d
add eax,r12d
add r8d,r12d
lea rdi,QWORD PTR[1+rdi]
add r8d,r14d
mov r12d,DWORD PTR[48+rsi]
mov r13d,eax
mov r14d,r8d
bswap r12d
ror r13d,14
mov r15d,ebx
mov DWORD PTR[48+rsp],r12d
ror r14d,9
xor r13d,eax
xor r15d,ecx
ror r13d,5
add r12d,edx
xor r14d,r8d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,eax
mov edx,r9d
ror r14d,11
xor r13d,eax
xor r15d,ecx
xor edx,r10d
xor r14d,r8d
add r12d,r15d
mov r15d,r9d
ror r13d,6
and edx,r8d
and r15d,r10d
ror r14d,2
add r12d,r13d
add edx,r15d
add r11d,r12d
add edx,r12d
lea rdi,QWORD PTR[1+rdi]
add edx,r14d
mov r12d,DWORD PTR[52+rsi]
mov r13d,r11d
mov r14d,edx
bswap r12d
ror r13d,14
mov r15d,eax
mov DWORD PTR[52+rsp],r12d
ror r14d,9
xor r13d,r11d
xor r15d,ebx
ror r13d,5
add r12d,ecx
xor r14d,edx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r11d
mov ecx,r8d
ror r14d,11
xor r13d,r11d
xor r15d,ebx
xor ecx,r9d
xor r14d,edx
add r12d,r15d
mov r15d,r8d
ror r13d,6
and ecx,edx
and r15d,r9d
ror r14d,2
add r12d,r13d
add ecx,r15d
add r10d,r12d
add ecx,r12d
lea rdi,QWORD PTR[1+rdi]
add ecx,r14d
mov r12d,DWORD PTR[56+rsi]
mov r13d,r10d
mov r14d,ecx
bswap r12d
ror r13d,14
mov r15d,r11d
mov DWORD PTR[56+rsp],r12d
ror r14d,9
xor r13d,r10d
xor r15d,eax
ror r13d,5
add r12d,ebx
xor r14d,ecx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r10d
mov ebx,edx
ror r14d,11
xor r13d,r10d
xor r15d,eax
xor ebx,r8d
xor r14d,ecx
add r12d,r15d
mov r15d,edx
ror r13d,6
and ebx,ecx
and r15d,r8d
ror r14d,2
add r12d,r13d
add ebx,r15d
add r9d,r12d
add ebx,r12d
lea rdi,QWORD PTR[1+rdi]
add ebx,r14d
mov r12d,DWORD PTR[60+rsi]
mov r13d,r9d
mov r14d,ebx
bswap r12d
ror r13d,14
mov r15d,r10d
mov DWORD PTR[60+rsp],r12d
ror r14d,9
xor r13d,r9d
xor r15d,r11d
ror r13d,5
add r12d,eax
xor r14d,ebx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r9d
mov eax,ecx
ror r14d,11
xor r13d,r9d
xor r15d,r11d
xor eax,edx
xor r14d,ebx
add r12d,r15d
mov r15d,ecx
ror r13d,6
and eax,ebx
and r15d,edx
ror r14d,2
add r12d,r13d
add eax,r15d
add r8d,r12d
add eax,r12d
lea rdi,QWORD PTR[1+rdi]
add eax,r14d
jmp $L$rounds_16_xx
ALIGN 16
$L$rounds_16_xx::
mov r13d,DWORD PTR[4+rsp]
mov r14d,DWORD PTR[56+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[36+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[rsp]
mov r13d,r8d
add r12d,r14d
mov r14d,eax
ror r13d,14
mov r15d,r9d
mov DWORD PTR[rsp],r12d
ror r14d,9
xor r13d,r8d
xor r15d,r10d
ror r13d,5
add r12d,r11d
xor r14d,eax
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r8d
mov r11d,ebx
ror r14d,11
xor r13d,r8d
xor r15d,r10d
xor r11d,ecx
xor r14d,eax
add r12d,r15d
mov r15d,ebx
ror r13d,6
and r11d,eax
and r15d,ecx
ror r14d,2
add r12d,r13d
add r11d,r15d
add edx,r12d
add r11d,r12d
lea rdi,QWORD PTR[1+rdi]
add r11d,r14d
mov r13d,DWORD PTR[8+rsp]
mov r14d,DWORD PTR[60+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[40+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[4+rsp]
mov r13d,edx
add r12d,r14d
mov r14d,r11d
ror r13d,14
mov r15d,r8d
mov DWORD PTR[4+rsp],r12d
ror r14d,9
xor r13d,edx
xor r15d,r9d
ror r13d,5
add r12d,r10d
xor r14d,r11d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,edx
mov r10d,eax
ror r14d,11
xor r13d,edx
xor r15d,r9d
xor r10d,ebx
xor r14d,r11d
add r12d,r15d
mov r15d,eax
ror r13d,6
and r10d,r11d
and r15d,ebx
ror r14d,2
add r12d,r13d
add r10d,r15d
add ecx,r12d
add r10d,r12d
lea rdi,QWORD PTR[1+rdi]
add r10d,r14d
mov r13d,DWORD PTR[12+rsp]
mov r14d,DWORD PTR[rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[44+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[8+rsp]
mov r13d,ecx
add r12d,r14d
mov r14d,r10d
ror r13d,14
mov r15d,edx
mov DWORD PTR[8+rsp],r12d
ror r14d,9
xor r13d,ecx
xor r15d,r8d
ror r13d,5
add r12d,r9d
xor r14d,r10d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,ecx
mov r9d,r11d
ror r14d,11
xor r13d,ecx
xor r15d,r8d
xor r9d,eax
xor r14d,r10d
add r12d,r15d
mov r15d,r11d
ror r13d,6
and r9d,r10d
and r15d,eax
ror r14d,2
add r12d,r13d
add r9d,r15d
add ebx,r12d
add r9d,r12d
lea rdi,QWORD PTR[1+rdi]
add r9d,r14d
mov r13d,DWORD PTR[16+rsp]
mov r14d,DWORD PTR[4+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[48+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[12+rsp]
mov r13d,ebx
add r12d,r14d
mov r14d,r9d
ror r13d,14
mov r15d,ecx
mov DWORD PTR[12+rsp],r12d
ror r14d,9
xor r13d,ebx
xor r15d,edx
ror r13d,5
add r12d,r8d
xor r14d,r9d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,ebx
mov r8d,r10d
ror r14d,11
xor r13d,ebx
xor r15d,edx
xor r8d,r11d
xor r14d,r9d
add r12d,r15d
mov r15d,r10d
ror r13d,6
and r8d,r9d
and r15d,r11d
ror r14d,2
add r12d,r13d
add r8d,r15d
add eax,r12d
add r8d,r12d
lea rdi,QWORD PTR[1+rdi]
add r8d,r14d
mov r13d,DWORD PTR[20+rsp]
mov r14d,DWORD PTR[8+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[52+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[16+rsp]
mov r13d,eax
add r12d,r14d
mov r14d,r8d
ror r13d,14
mov r15d,ebx
mov DWORD PTR[16+rsp],r12d
ror r14d,9
xor r13d,eax
xor r15d,ecx
ror r13d,5
add r12d,edx
xor r14d,r8d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,eax
mov edx,r9d
ror r14d,11
xor r13d,eax
xor r15d,ecx
xor edx,r10d
xor r14d,r8d
add r12d,r15d
mov r15d,r9d
ror r13d,6
and edx,r8d
and r15d,r10d
ror r14d,2
add r12d,r13d
add edx,r15d
add r11d,r12d
add edx,r12d
lea rdi,QWORD PTR[1+rdi]
add edx,r14d
mov r13d,DWORD PTR[24+rsp]
mov r14d,DWORD PTR[12+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[56+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[20+rsp]
mov r13d,r11d
add r12d,r14d
mov r14d,edx
ror r13d,14
mov r15d,eax
mov DWORD PTR[20+rsp],r12d
ror r14d,9
xor r13d,r11d
xor r15d,ebx
ror r13d,5
add r12d,ecx
xor r14d,edx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r11d
mov ecx,r8d
ror r14d,11
xor r13d,r11d
xor r15d,ebx
xor ecx,r9d
xor r14d,edx
add r12d,r15d
mov r15d,r8d
ror r13d,6
and ecx,edx
and r15d,r9d
ror r14d,2
add r12d,r13d
add ecx,r15d
add r10d,r12d
add ecx,r12d
lea rdi,QWORD PTR[1+rdi]
add ecx,r14d
mov r13d,DWORD PTR[28+rsp]
mov r14d,DWORD PTR[16+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[60+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[24+rsp]
mov r13d,r10d
add r12d,r14d
mov r14d,ecx
ror r13d,14
mov r15d,r11d
mov DWORD PTR[24+rsp],r12d
ror r14d,9
xor r13d,r10d
xor r15d,eax
ror r13d,5
add r12d,ebx
xor r14d,ecx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r10d
mov ebx,edx
ror r14d,11
xor r13d,r10d
xor r15d,eax
xor ebx,r8d
xor r14d,ecx
add r12d,r15d
mov r15d,edx
ror r13d,6
and ebx,ecx
and r15d,r8d
ror r14d,2
add r12d,r13d
add ebx,r15d
add r9d,r12d
add ebx,r12d
lea rdi,QWORD PTR[1+rdi]
add ebx,r14d
mov r13d,DWORD PTR[32+rsp]
mov r14d,DWORD PTR[20+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[28+rsp]
mov r13d,r9d
add r12d,r14d
mov r14d,ebx
ror r13d,14
mov r15d,r10d
mov DWORD PTR[28+rsp],r12d
ror r14d,9
xor r13d,r9d
xor r15d,r11d
ror r13d,5
add r12d,eax
xor r14d,ebx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r9d
mov eax,ecx
ror r14d,11
xor r13d,r9d
xor r15d,r11d
xor eax,edx
xor r14d,ebx
add r12d,r15d
mov r15d,ecx
ror r13d,6
and eax,ebx
and r15d,edx
ror r14d,2
add r12d,r13d
add eax,r15d
add r8d,r12d
add eax,r12d
lea rdi,QWORD PTR[1+rdi]
add eax,r14d
mov r13d,DWORD PTR[36+rsp]
mov r14d,DWORD PTR[24+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[4+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[32+rsp]
mov r13d,r8d
add r12d,r14d
mov r14d,eax
ror r13d,14
mov r15d,r9d
mov DWORD PTR[32+rsp],r12d
ror r14d,9
xor r13d,r8d
xor r15d,r10d
ror r13d,5
add r12d,r11d
xor r14d,eax
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r8d
mov r11d,ebx
ror r14d,11
xor r13d,r8d
xor r15d,r10d
xor r11d,ecx
xor r14d,eax
add r12d,r15d
mov r15d,ebx
ror r13d,6
and r11d,eax
and r15d,ecx
ror r14d,2
add r12d,r13d
add r11d,r15d
add edx,r12d
add r11d,r12d
lea rdi,QWORD PTR[1+rdi]
add r11d,r14d
mov r13d,DWORD PTR[40+rsp]
mov r14d,DWORD PTR[28+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[8+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[36+rsp]
mov r13d,edx
add r12d,r14d
mov r14d,r11d
ror r13d,14
mov r15d,r8d
mov DWORD PTR[36+rsp],r12d
ror r14d,9
xor r13d,edx
xor r15d,r9d
ror r13d,5
add r12d,r10d
xor r14d,r11d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,edx
mov r10d,eax
ror r14d,11
xor r13d,edx
xor r15d,r9d
xor r10d,ebx
xor r14d,r11d
add r12d,r15d
mov r15d,eax
ror r13d,6
and r10d,r11d
and r15d,ebx
ror r14d,2
add r12d,r13d
add r10d,r15d
add ecx,r12d
add r10d,r12d
lea rdi,QWORD PTR[1+rdi]
add r10d,r14d
mov r13d,DWORD PTR[44+rsp]
mov r14d,DWORD PTR[32+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[12+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[40+rsp]
mov r13d,ecx
add r12d,r14d
mov r14d,r10d
ror r13d,14
mov r15d,edx
mov DWORD PTR[40+rsp],r12d
ror r14d,9
xor r13d,ecx
xor r15d,r8d
ror r13d,5
add r12d,r9d
xor r14d,r10d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,ecx
mov r9d,r11d
ror r14d,11
xor r13d,ecx
xor r15d,r8d
xor r9d,eax
xor r14d,r10d
add r12d,r15d
mov r15d,r11d
ror r13d,6
and r9d,r10d
and r15d,eax
ror r14d,2
add r12d,r13d
add r9d,r15d
add ebx,r12d
add r9d,r12d
lea rdi,QWORD PTR[1+rdi]
add r9d,r14d
mov r13d,DWORD PTR[48+rsp]
mov r14d,DWORD PTR[36+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[16+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[44+rsp]
mov r13d,ebx
add r12d,r14d
mov r14d,r9d
ror r13d,14
mov r15d,ecx
mov DWORD PTR[44+rsp],r12d
ror r14d,9
xor r13d,ebx
xor r15d,edx
ror r13d,5
add r12d,r8d
xor r14d,r9d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,ebx
mov r8d,r10d
ror r14d,11
xor r13d,ebx
xor r15d,edx
xor r8d,r11d
xor r14d,r9d
add r12d,r15d
mov r15d,r10d
ror r13d,6
and r8d,r9d
and r15d,r11d
ror r14d,2
add r12d,r13d
add r8d,r15d
add eax,r12d
add r8d,r12d
lea rdi,QWORD PTR[1+rdi]
add r8d,r14d
mov r13d,DWORD PTR[52+rsp]
mov r14d,DWORD PTR[40+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[20+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[48+rsp]
mov r13d,eax
add r12d,r14d
mov r14d,r8d
ror r13d,14
mov r15d,ebx
mov DWORD PTR[48+rsp],r12d
ror r14d,9
xor r13d,eax
xor r15d,ecx
ror r13d,5
add r12d,edx
xor r14d,r8d
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,eax
mov edx,r9d
ror r14d,11
xor r13d,eax
xor r15d,ecx
xor edx,r10d
xor r14d,r8d
add r12d,r15d
mov r15d,r9d
ror r13d,6
and edx,r8d
and r15d,r10d
ror r14d,2
add r12d,r13d
add edx,r15d
add r11d,r12d
add edx,r12d
lea rdi,QWORD PTR[1+rdi]
add edx,r14d
mov r13d,DWORD PTR[56+rsp]
mov r14d,DWORD PTR[44+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[24+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[52+rsp]
mov r13d,r11d
add r12d,r14d
mov r14d,edx
ror r13d,14
mov r15d,eax
mov DWORD PTR[52+rsp],r12d
ror r14d,9
xor r13d,r11d
xor r15d,ebx
ror r13d,5
add r12d,ecx
xor r14d,edx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r11d
mov ecx,r8d
ror r14d,11
xor r13d,r11d
xor r15d,ebx
xor ecx,r9d
xor r14d,edx
add r12d,r15d
mov r15d,r8d
ror r13d,6
and ecx,edx
and r15d,r9d
ror r14d,2
add r12d,r13d
add ecx,r15d
add r10d,r12d
add ecx,r12d
lea rdi,QWORD PTR[1+rdi]
add ecx,r14d
mov r13d,DWORD PTR[60+rsp]
mov r14d,DWORD PTR[48+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[28+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[56+rsp]
mov r13d,r10d
add r12d,r14d
mov r14d,ecx
ror r13d,14
mov r15d,r11d
mov DWORD PTR[56+rsp],r12d
ror r14d,9
xor r13d,r10d
xor r15d,eax
ror r13d,5
add r12d,ebx
xor r14d,ecx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r10d
mov ebx,edx
ror r14d,11
xor r13d,r10d
xor r15d,eax
xor ebx,r8d
xor r14d,ecx
add r12d,r15d
mov r15d,edx
ror r13d,6
and ebx,ecx
and r15d,r8d
ror r14d,2
add r12d,r13d
add ebx,r15d
add r9d,r12d
add ebx,r12d
lea rdi,QWORD PTR[1+rdi]
add ebx,r14d
mov r13d,DWORD PTR[rsp]
mov r14d,DWORD PTR[52+rsp]
mov r12d,r13d
mov r15d,r14d
ror r12d,11
xor r12d,r13d
shr r13d,3
ror r12d,7
xor r13d,r12d
mov r12d,DWORD PTR[32+rsp]
ror r15d,2
xor r15d,r14d
shr r14d,10
ror r15d,17
add r12d,r13d
xor r14d,r15d
add r12d,DWORD PTR[60+rsp]
mov r13d,r9d
add r12d,r14d
mov r14d,ebx
ror r13d,14
mov r15d,r10d
mov DWORD PTR[60+rsp],r12d
ror r14d,9
xor r13d,r9d
xor r15d,r11d
ror r13d,5
add r12d,eax
xor r14d,ebx
add r12d,DWORD PTR[rdi*4+rbp]
and r15d,r9d
mov eax,ecx
ror r14d,11
xor r13d,r9d
xor r15d,r11d
xor eax,edx
xor r14d,ebx
add r12d,r15d
mov r15d,ecx
ror r13d,6
and eax,ebx
and r15d,edx
ror r14d,2
add r12d,r13d
add eax,r15d
add r8d,r12d
add eax,r12d
lea rdi,QWORD PTR[1+rdi]
add eax,r14d
cmp rdi,64
jb $L$rounds_16_xx
mov rdi,QWORD PTR[((64+0))+rsp]
lea rsi,QWORD PTR[64+rsi]
add eax,DWORD PTR[rdi]
add ebx,DWORD PTR[4+rdi]
add ecx,DWORD PTR[8+rdi]
add edx,DWORD PTR[12+rdi]
add r8d,DWORD PTR[16+rdi]
add r9d,DWORD PTR[20+rdi]
add r10d,DWORD PTR[24+rdi]
add r11d,DWORD PTR[28+rdi]
cmp rsi,QWORD PTR[((64+16))+rsp]
mov DWORD PTR[rdi],eax
mov DWORD PTR[4+rdi],ebx
mov DWORD PTR[8+rdi],ecx
mov DWORD PTR[12+rdi],edx
mov DWORD PTR[16+rdi],r8d
mov DWORD PTR[20+rdi],r9d
mov DWORD PTR[24+rdi],r10d
mov DWORD PTR[28+rdi],r11d
jb $L$loop
mov rsi,QWORD PTR[((64+24))+rsp]
mov r15,QWORD PTR[rsi]
mov r14,QWORD PTR[8+rsi]
mov r13,QWORD PTR[16+rsi]
mov r12,QWORD PTR[24+rsi]
mov rbp,QWORD PTR[32+rsi]
mov rbx,QWORD PTR[40+rsi]
lea rsp,QWORD PTR[48+rsi]
$L$epilogue::
mov rdi,QWORD PTR[8+rsp] ;WIN64 epilogue
mov rsi,QWORD PTR[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_sha256_block_data_order::
sha256_block_data_order ENDP
ALIGN 64
K256::
DD 0428a2f98h,071374491h,0b5c0fbcfh,0e9b5dba5h
DD 03956c25bh,059f111f1h,0923f82a4h,0ab1c5ed5h
DD 0d807aa98h,012835b01h,0243185beh,0550c7dc3h
DD 072be5d74h,080deb1feh,09bdc06a7h,0c19bf174h
DD 0e49b69c1h,0efbe4786h,00fc19dc6h,0240ca1cch
DD 02de92c6fh,04a7484aah,05cb0a9dch,076f988dah
DD 0983e5152h,0a831c66dh,0b00327c8h,0bf597fc7h
DD 0c6e00bf3h,0d5a79147h,006ca6351h,014292967h
DD 027b70a85h,02e1b2138h,04d2c6dfch,053380d13h
DD 0650a7354h,0766a0abbh,081c2c92eh,092722c85h
DD 0a2bfe8a1h,0a81a664bh,0c24b8b70h,0c76c51a3h
DD 0d192e819h,0d6990624h,0f40e3585h,0106aa070h
DD 019a4c116h,01e376c08h,02748774ch,034b0bcb5h
DD 0391c0cb3h,04ed8aa4ah,05b9cca4fh,0682e6ff3h
DD 0748f82eeh,078a5636fh,084c87814h,08cc70208h
DD 090befffah,0a4506cebh,0bef9a3f7h,0c67178f2h
EXTERN __imp_RtlVirtualUnwind:NEAR
ALIGN 16
se_handler PROC PRIVATE
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64
mov rax,QWORD PTR[120+r8]
mov rbx,QWORD PTR[248+r8]
lea r10,QWORD PTR[$L$prologue]
cmp rbx,r10
jb $L$in_prologue
mov rax,QWORD PTR[152+r8]
lea r10,QWORD PTR[$L$epilogue]
cmp rbx,r10
jae $L$in_prologue
mov rax,QWORD PTR[((64+24))+rax]
lea rax,QWORD PTR[48+rax]
mov rbx,QWORD PTR[((-8))+rax]
mov rbp,QWORD PTR[((-16))+rax]
mov r12,QWORD PTR[((-24))+rax]
mov r13,QWORD PTR[((-32))+rax]
mov r14,QWORD PTR[((-40))+rax]
mov r15,QWORD PTR[((-48))+rax]
mov QWORD PTR[144+r8],rbx
mov QWORD PTR[160+r8],rbp
mov QWORD PTR[216+r8],r12
mov QWORD PTR[224+r8],r13
mov QWORD PTR[232+r8],r14
mov QWORD PTR[240+r8],r15
$L$in_prologue::
mov rdi,QWORD PTR[8+rax]
mov rsi,QWORD PTR[16+rax]
mov QWORD PTR[152+r8],rax
mov QWORD PTR[168+r8],rsi
mov QWORD PTR[176+r8],rdi
mov rdi,QWORD PTR[40+r9]
mov rsi,r8
mov ecx,154
DD 0a548f3fch
mov rsi,r9
xor rcx,rcx
mov rdx,QWORD PTR[8+rsi]
mov r8,QWORD PTR[rsi]
mov r9,QWORD PTR[16+rsi]
mov r10,QWORD PTR[40+rsi]
lea r11,QWORD PTR[56+rsi]
lea r12,QWORD PTR[24+rsi]
mov QWORD PTR[32+rsp],r10
mov QWORD PTR[40+rsp],r11
mov QWORD PTR[48+rsp],r12
mov QWORD PTR[56+rsp],rcx
call QWORD PTR[__imp_RtlVirtualUnwind]
mov eax,1
add rsp,64
popfq
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
pop rdi
pop rsi
DB 0F3h,0C3h ;repret
se_handler ENDP
.text$ ENDS
.pdata SEGMENT READONLY ALIGN(4)
ALIGN 4
DD imagerel $L$SEH_begin_sha256_block_data_order
DD imagerel $L$SEH_end_sha256_block_data_order
DD imagerel $L$SEH_info_sha256_block_data_order
.pdata ENDS
.xdata SEGMENT READONLY ALIGN(8)
ALIGN 8
$L$SEH_info_sha256_block_data_order::
DB 9,0,0,0
DD imagerel se_handler
.xdata ENDS
END
| 13.456705 | 49 | 0.705379 |
81688025d4e7d6c7c14c26f58c4a79061f7cac8d | 460 | asm | Assembly | libsrc/enterprise/set_exos_variable.asm | andydansby/z88dk-mk2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | 1 | 2020-09-15T08:35:49.000Z | 2020-09-15T08:35:49.000Z | libsrc/enterprise/set_exos_variable.asm | andydansby/z88dk-MK2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | null | null | null | libsrc/enterprise/set_exos_variable.asm | andydansby/z88dk-MK2 | 51c15f1387293809c496f5eaf7b196f8a0e9b66b | [
"ClArtistic"
] | null | null | null | ;
; Enterprise 64/128 specific routines
; by Stefano Bodrato, 2011
;
; set_exos_variable(unsigned char variable, unsigned char value);
;
;
; $Id: set_exos_variable.asm,v 1.2 2011/03/15 14:34:08 stefano Exp $
;
XLIB set_exos_variable
LIB set_exos_variable_callee
XREF ASMDISP_SET_EXOS_VARIABLE_CALLEE
set_exos_variable:
pop bc
pop de
pop hl
push hl
push de
push bc
jp set_exos_variable_callee + ASMDISP_SET_EXOS_VARIABLE_CALLEE
| 16.428571 | 68 | 0.752174 |
cfec308c167510d1948f2e0015e2c9f2d41a21ec | 510 | asm | Assembly | programs/oeis/106/A106149.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/106/A106149.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/106/A106149.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A106149: Number of prime factors with multiplicity of the difference between consecutive primes.
; 0,1,1,2,1,2,1,2,2,1,2,2,1,2,2,2,1,2,2,1,2,2,2,3,2,1,2,1,2,2,2,2,1,2,1,2,2,2,2,2,1,2,1,2,1,3,3,2,1,2,2,1,2,2,2,2,1,2,2,1,2,2,2,1,2,2,2,2,1,2,2,3,2,2,2,2,3,2,3,2,1
add $0,1
seq $0,40 ; The prime numbers.
div $0,2
mul $0,2
sub $0,1
seq $0,64722 ; a(1) = 0; for n >= 2, a(n) = n - (largest prime <= n).
seq $0,1222 ; Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)).
| 46.363636 | 163 | 0.62549 |
21493f5d3f1a9ccc1a41b298d7357c1f450e194d | 10,531 | asm | Assembly | src/graphics.asm | indigodarkwolf/x16-spiral | 89e70163fbc28de73c4a4c71d897a0b76d53bebe | [
"MIT"
] | 1 | 2020-09-14T15:32:32.000Z | 2020-09-14T15:32:32.000Z | src/graphics.asm | indigodarkwolf/x16-spiral | 89e70163fbc28de73c4a4c71d897a0b76d53bebe | [
"MIT"
] | null | null | null | src/graphics.asm | indigodarkwolf/x16-spiral | 89e70163fbc28de73c4a4c71d897a0b76d53bebe | [
"MIT"
] | null | null | null | .ifndef GRAPHICS_ASM
GRAPHICS_ASM=1
.include "debug.inc"
.include "vera.inc"
GRAPHICS_TABLES_BANK = $02
Gfx_palette_decrement_table = $A000
Gfx_palette = $A100
Gfx_palette_gb = $A100
Gfx_palette_gb_0 = $A100
Gfx_palette_gb_1 = $A110
Gfx_palette_gb_2 = $A120
Gfx_palette_gb_3 = $A130
Gfx_palette_gb_4 = $A140
Gfx_palette_gb_5 = $A150
Gfx_palette_gb_6 = $A160
Gfx_palette_gb_7 = $A170
Gfx_palette_gb_8 = $A180
Gfx_palette_gb_9 = $A190
Gfx_palette_gb_10 = $A1A0
Gfx_palette_gb_11 = $A1B0
Gfx_palette_gb_12 = $A1C0
Gfx_palette_gb_13 = $A1D0
Gfx_palette_gb_14 = $A1E0
Gfx_palette_gb_15 = $A1F0
Gfx_palette_r = $A200
Gfx_palette_r_0 = $A200
Gfx_palette_r_1 = $A210
Gfx_palette_r_2 = $A220
Gfx_palette_r_3 = $A230
Gfx_palette_r_4 = $A240
Gfx_palette_r_5 = $A250
Gfx_palette_r_6 = $A260
Gfx_palette_r_7 = $A270
Gfx_palette_r_8 = $A280
Gfx_palette_r_9 = $A290
Gfx_palette_r_10 = $A2A0
Gfx_palette_r_11 = $A2B0
Gfx_palette_r_12 = $A2C0
Gfx_palette_r_13 = $A2D0
Gfx_palette_r_14 = $A2E0
Gfx_palette_r_15 = $A2F0
.data
Gfx_idle_flag: .byte $00
.define GRAPHICS_TABLES_NAME "graphics_tables.seq"
GRAPHICS_TABLES_STR: .asciiz GRAPHICS_TABLES_NAME
;=================================================
;=================================================
;
; General-purpose graphics routines
;
;-------------------------------------------------
.code
;=================================================
; graphics_init
; Initialize the graphics subsystem, loading tables
; and initializing values.
;
;-------------------------------------------------
; INPUTS: A Lhs
; Y Rhs
;
;-------------------------------------------------
; OUTPUTS: X Low-byte
; A High-byte
;
;-------------------------------------------------
; MODIFIES: A, X, Y
.proc graphics_init
; Load tables into himem
SYS_SET_BANK GRAPHICS_TABLES_BANK
KERNAL_SETLFS 1, 8, 0
KERNAL_SETNAM .strlen(GRAPHICS_TABLES_NAME), GRAPHICS_TABLES_STR
KERNAL_LOAD 0, $A000
rts
.endproc
;=================================================
; graphics_decrement_palette
; Fade the palette one step towards black
;-------------------------------------------------
; INPUTS: (none)
;
;-------------------------------------------------
; MODIFIES: A, X, Y, Gfx_idle_flag
;
.proc graphics_decrement_palette
; This is an optimistic flag: have we cleared the entire palette?
; We'll falsify if not.
lda #1
sta Gfx_idle_flag
; The first thing I'm doing is trying to spin through the palette until there's work to be done.
; If we can quickly determine the whole palette is done, then bonus, we didn't have to do a lot
; of work.
;
; But also, there's a that optimistic flag, and it's senseless to clear it more than once, so we'll
; scan through data until we find work, then clear the flag, then do work and not worry about the flag
; again.
;
; So if you imagine one loop that does everything, what I've done is cloned it, deleted all the actual work
; from one, and the optimstic flag from the other, and I use the section under "has_work" to bridge from
; one clone to the other.
;
; Finally, I've broken the entire palette into two sets of 256 bytes. Not the first 128 colors followed
; by the second 128, but all 256 colors' low byte (the gb portion), followed by all 256 colors' high byte
; (the r portion). This allows me to duplicate a minimal amount of code and avoid needless loops and stack
; variables. 256 is a magic number in the 8-bit world, it's always helpful to not exceed it.
check_for_work:
lda Gfx_palette_gb,y
; Don't need to decrement if already #0 (black)
cmp #0
bne has_work_gb
lda Gfx_palette_r,y
; Don't need to decrement if already #0 (black)
cmp #0
bne has_work_r
iny
bne check_for_work
; If we get here, we had no work to do. Huzzah! So much time saved.
rts
has_work_gb:
tax
lda #0
sta Gfx_idle_flag
bra continue_with_work_gb
has_work_r:
tax
lda #0
sta Gfx_idle_flag
bra continue_with_work_r
decrement_entry:
lda Gfx_palette_gb,y
cmp #0
beq next_byte
; The first byte is %ggggbbbb, so we need to decrement
; each half if not 0. Instead of complex assembly to do that, I'm just
; going to precompute to a table and do a lookup of the next value.
;
; The second byte is %0000rrrr, but since I did a table for the first
; byte, and the table results are good for this too, I do the same
; thing for the second.
tax
continue_with_work_gb:
lda Gfx_palette_decrement_table,x
sta Gfx_palette_gb,y
next_byte:
lda Gfx_palette_r,y
cmp #0
beq next_entry
tax
continue_with_work_r:
lda Gfx_palette_decrement_table,x
sta Gfx_palette_r,y
next_entry:
iny
bne decrement_entry
rts
.endproc
;=================================================
; graphics_increment_palette
; Fade the palette one step towards a set of desired values
;-------------------------------------------------
; INPUTS: $FA-$FB Address of intended palette
; $FC First color in palette
; $FD Last color of palette
;
;-------------------------------------------------
; MODIFIES: A, X, Y, $FE-$FF, Gfx_idle_flag
;
.proc graphics_increment_palette
DEBUG_LABEL graphics_increment_palette
lda $FA
sta $FE
lda $FB
sta $FF
inc $FD
; This is an optimistic flag: have we cleared the entire palette?
; We'll falsify if not.
lda #1
sta Gfx_idle_flag
ldy $FC ; 256 colors in palette
check_palette_entry:
lda Gfx_palette_gb,y
; Don't need to increment if already at target value
cmp ($FE),y
bne has_work_gb
inc $FE
bne :+
inc $FF
:
lda Gfx_palette_r,y
; Don't need to increment if already at target value
cmp ($FE),y
bne has_work_r
iny
cpy $FD
bne check_palette_entry
dec $FD
rts
has_work_gb:
tax
lda #0
sta Gfx_idle_flag
bra continue_gb
has_work_r:
tax
lda #0
sta Gfx_idle_flag
txa
bra continue_r
; The first byte is %ggggbbbb, which means we have to increment these separately.
; We're going to xor with the intended color. This gives us some bits like %aaaabbbb
; where any 'b' bits set mean we increment the bottom half, then any 'a' bits set mean we
; increment the top half.
; --- I'm a little proud of realizing how much branching an XOR saves me, because I'm
; a hack and I was literally staring at C++ code that did this:
;
; unsigned short increment(unsigned short color, unsigned short target) {
; color = ((color & 0xF0) < (target & 0xF0)) ? color + 0x10 : color;
; color = ((color & 0x0F) < (target & 0x0F)) ? color + 0x01 : color;
; return color;
; }
;
; Yeah. What a waste of electricity compared to:
;
; unsigned short increment(unsigned short color, unsigned short target) {
; unsigned short bit_diff = color ^ target
; if(bit_diff >= 0x10) color += 0x10;
; if(bit_diff & 0x0F) color += 0x01;
; }
increment_palette_entry:
lda Gfx_palette_gb,y
; Don't need to increment if already at target value
cmp ($FE),y
beq next_byte
tax
continue_gb:
eor ($FE),y
cmp #$10
bcc low_nibble
txa
clc
adc #$10
tax
low_nibble:
txa
eor ($FE),y
and #$0F
beq :+
inx
:
txa
sta Gfx_palette_gb,y
next_byte:
; Y holds the number of colors we've copied, so increment our starting address here instead.
; we'll still increment Y at the bottom.
inc $FE
bne :+
inc $FF
:
lda Gfx_palette_r,y
; Don't need to increment if already at target value
cmp ($FE),y
beq next_palette_entry
continue_r:
; The second byte is %0000rrrr, which means we can get away with just an increment
clc
adc #1
and #$0F
sta Gfx_palette_r,y
next_palette_entry:
iny
cpy $FD
bne increment_palette_entry
dec $FD
rts
.endproc
;=================================================
; graphics_apply_palette
; Apply the current palette to the VERA
;-------------------------------------------------
; INPUTS: (none)
;
;-------------------------------------------------
; MODIFIES: A, X, Y
;
.proc graphics_apply_palette
VERA_SET_CTRL 0
VERA_SET_PALETTE 0
ldy #0
stream_byte:
lda Gfx_palette_gb,y
sta VERA_data
lda Gfx_palette_r,y
sta VERA_data
iny
lda Gfx_palette_gb,y
sta VERA_data
lda Gfx_palette_r,y
sta VERA_data
iny
bne stream_byte
rts
.endproc
;=================================================
; graphics_fade_out
; Use palette decrementing to fade out the screen to black.
;-------------------------------------------------
; INPUTS: A Number of frames to wait between fade out steps
;
;-------------------------------------------------
; MODIFIES: A, X, Y
;
.proc graphics_fade_out
DEBUG_LABEL graphics_fade_out
pha
SYS_SET_BANK GRAPHICS_TABLES_BANK
loop:
jsr graphics_decrement_palette
jsr graphics_apply_palette
pla
pha
jsr sys_wait_for_frame
lda Gfx_idle_flag
cmp #0
beq loop
pla
rts
.endproc
;=================================================
; graphics_fade_in
; Use palette incmenting to fade in the screen from black.
;-------------------------------------------------
; INPUTS: $FA-$FB Address of intended palette
; $FC First color in the palette
; $FD Last color in the palette
; A Number of frames to wait between fade in steps
;
;-------------------------------------------------
; MODIFIES: A, X, Y, $FE-$FF
;
.proc graphics_fade_in
DEBUG_LABEL graphics_fade_in
pha
SYS_SET_BANK GRAPHICS_TABLES_BANK
loop:
jsr graphics_increment_palette
jsr graphics_apply_palette
pla
pha
jsr sys_wait_for_frame
lda Gfx_idle_flag
cmp #0
beq loop
pla
rts
.endproc
.code
.endif ; GRAPHICS_ASM | 25.622871 | 111 | 0.579242 |
2ffd56187498127f8cf8bcda8b4cdd7674f48756 | 383 | asm | Assembly | programs/oeis/094/A094195.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/094/A094195.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/094/A094195.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A094195: G.f.: (1-4*x)/((1-5*x)*(1-x)^2).
; 1,3,10,42,199,981,4888,24420,122077,610359,3051766,15258798,76293955,381469737,1907348644,9536743176,47683715833,238418579115,1192092895522,5960464477554,29802322387711,149011611938493,745058059692400,3725290298461932,18626451492309589
lpb $0
sub $0,1
add $2,1
add $3,$2
add $1,$3
add $1,1
mov $2,$3
mul $3,4
lpe
add $1,1
| 27.357143 | 237 | 0.720627 |
723ca2172eb0bfe873fbefbe410f51964c4db960 | 202 | asm | Assembly | libsrc/math/mbf64/c/sccz80/pi.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/math/mbf64/c/sccz80/pi.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/math/mbf64/c/sccz80/pi.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | SECTION code_fp_mbf64
PUBLIC pi
EXTERN ___mbf64_FA
pi:
ld hl,pi_value
ld de,___mbf64_FA
ld bc,8
ldir
ret
SECTION rodata_fp_mbf64
pi_value:
defb 0xc0,0x68,0x21,0xa2,0xda,0x0f,0x49,0x82
| 11.222222 | 48 | 0.752475 |
261ea877337be21fd534d83665a179c7860846d9 | 2,570 | asm | Assembly | test/11_amx.asm | x86128/pymesm | 4f5f2fe9ae06fd7023ef1022040774e157fd0792 | [
"MIT"
] | 2 | 2021-04-30T19:30:58.000Z | 2021-04-30T21:29:44.000Z | test/11_amx.asm | x86128/pymesm | 4f5f2fe9ae06fd7023ef1022040774e157fd0792 | [
"MIT"
] | null | null | null | test/11_amx.asm | x86128/pymesm | 4f5f2fe9ae06fd7023ef1022040774e157fd0792 | [
"MIT"
] | null | null | null | #
# Test for instruction AMX.
#
org 1
ptr start
vtm stack,15
ntr 3 # без нормализации и округления
vtm 64,14
ita 14
amx f65 # целое 65 без порядка
uza fail # |64| - |65| = -1
aex minus1 # целое -1 без порядка
uia fail
#-------------------------
xta minus1
amx minus1
uia fail
#
aox 0 # |-1| - |-1| = 0
uia fail
#-------------------------
xta b2
xts b3
amx 0,15 # |3| - |2| = 1
uia fail
#
aex b1
uia fail
#-------------------------
xta b0067777777777777
amx b1
aex b0050000000000000
uia fail
#-------------------------
xta b4050000000000000 # =e'1' b4050000000000000
xts b6427777777777777 # =e'-549755813889' b6427777777777777
amx 0,15
aex b6410000000000000 # =e'549755813888' b6410000000000000
uia fail
#-------------------------
ntr 0 # с нормализацией и округлением
xta b6410000000000002 # =e'549755813890' b6410000000000002
xts b6410000000000003 # =e'549755813891' 6410000000000003
amx 0,15
aex b4050000000000000 # =e'1' b4050000000000000
uia fail
#
xta b4060000000000000 # -2
amx b4057777777777765 # 1.99999999998
aex b1653000000000000 # 2.0008883439004e-11
uia fail
#-------------------------
lbl pass
stop 0o12345,6
lbl fail
stop 0o76543,2
#-------------------------
dorg 0o2000 # данные с адреса 2000
arr minus1 0o0037777777777777 # целое -1 без порядка
arr b1 1
arr b2 2
arr b3 3
arr b0067777777777777 0o0067777777777777
arr b0050000000000000 0o0050000000000000
arr b4050000000000000 0o4050000000000000
arr b6427777777777777 0o6427777777777777
arr b6410000000000000 0o6410000000000000
arr b6410000000000002 0o6410000000000002
arr b6410000000000003 0o6410000000000003
arr b4060000000000000 0o4060000000000000
arr b4057777777777765 0o4057777777777765
arr b1653000000000000 0o1653000000000000
mem stack 10 # стек
arr f65 65
fin
| 33.815789 | 78 | 0.483268 |
656a6fb0f482df4a3839f392d681b92d38679fc3 | 554 | asm | Assembly | programs/oeis/295/A295773.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/295/A295773.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/295/A295773.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A295773: a(n) = Sum_{k=0..n} binomial(k^2, k).
; 1,2,8,92,1912,55042,2002834,87903418,4514068786,265401903136,17575711359576,1294325676386112,104913619501093500,9281271920245432932,889811788303594625412,91895379599481072720852,10170646981621794947354052,1200909691326112843842751962,150683402025521278557881512098,20021550455569277282691129207498,2808382534126466015155542202201578,414695778870693864837776269557603768
mov $2,$0
add $2,1
mov $4,$0
lpb $2
mov $0,$4
sub $2,1
sub $0,$2
mov $3,$0
pow $0,2
bin $0,$3
add $1,$0
lpe
mov $0,$1
| 32.588235 | 371 | 0.788809 |
14bfc657a44021eb794e7b521122a2aa0ec550b4 | 1,409 | asm | Assembly | programs/oeis/022/A022106.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/022/A022106.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/022/A022106.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A022106: Fibonacci sequence beginning 1, 16.
; 1,16,17,33,50,83,133,216,349,565,914,1479,2393,3872,6265,10137,16402,26539,42941,69480,112421,181901,294322,476223,770545,1246768,2017313,3264081,5281394,8545475,13826869,22372344,36199213,58571557,94770770,153342327,248113097,401455424,649568521,1051023945,1700592466,2751616411,4452208877,7203825288,11656034165,18859859453,30515893618,49375753071,79891646689,129267399760,209159046449,338426446209,547585492658,886011938867,1433597431525,2319609370392,3753206801917,6072816172309,9826022974226,15898839146535,25724862120761,41623701267296,67348563388057,108972264655353,176320828043410,285293092698763,461613920742173,746907013440936,1208520934183109,1955427947624045,3163948881807154,5119376829431199,8283325711238353,13402702540669552,21686028251907905,35088730792577457,56774759044485362,91863489837062819,148638248881548181,240501738718611000,389139987600159181,629641726318770181,1018781713918929362,1648423440237699543,2667205154156628905,4315628594394328448,6982833748550957353,11298462342945285801,18281296091496243154,29579758434441528955,47861054525937772109,77440812960379301064,125301867486317073173,202742680446696374237,328044547933013447410,530787228379709821647,858831776312723269057,1389619004692433090704,2248450781005156359761,3638069785697589450465
mov $1,1
mov $3,16
lpb $0
sub $0,1
mov $2,$1
mov $1,$3
add $3,$2
lpe
mov $0,$1
| 108.384615 | 1,273 | 0.887864 |
17873521719bfddb086cf33d70211eb5a8cc0e0b | 485 | asm | Assembly | programs/oeis/037/A037158.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/037/A037158.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/037/A037158.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A037158: Convolution of natural numbers n >= 1 with Fibonacci numbers F(k), for k >= -7, with F(-n)=(-1)^(n+1)*F(n).
; 13,18,28,35,44,52,61,70,80,91,104,120,141,170,212,275,372,524,765,1150,1768,2763,4368,6960,11149,17922,28876,46595,75260,121636,196669,318070,514496,832315,1346552,2178600,3524877,5703194,9227780,14930675
mov $4,7
mov $5,$0
lpb $0,1
sub $0,1
add $1,$2
mov $3,$2
mov $2,$4
sub $2,2
sub $4,3
add $4,$3
lpe
lpb $5,1
add $1,5
sub $5,1
lpe
add $1,13
| 24.25 | 206 | 0.651546 |
3b45853ac325b8af5d64a32f451ff76b1178085f | 5,836 | asm | Assembly | Dark soft/Buhtrap Source Code/3.loaders/nsisloadrestart_with_document_execution/loader/config_encoder/source/config_encoder.asm | ExaByt3s/hack_scripts | cc801b36ea25f3b5a82d2900f53f5036e7abd8ad | [
"WTFPL"
] | 3 | 2021-01-22T19:32:23.000Z | 2022-01-03T01:06:44.000Z | Dark soft/Buhtrap Source Code/3.loaders/nsisloadrestart_with_document_execution/loader/config_encoder/source/config_encoder.asm | a04512/hack_scripts | cc801b36ea25f3b5a82d2900f53f5036e7abd8ad | [
"WTFPL"
] | null | null | null | Dark soft/Buhtrap Source Code/3.loaders/nsisloadrestart_with_document_execution/loader/config_encoder/source/config_encoder.asm | a04512/hack_scripts | cc801b36ea25f3b5a82d2900f53f5036e7abd8ad | [
"WTFPL"
] | 1 | 2019-06-18T22:10:53.000Z | 2019-06-18T22:10:53.000Z |
format PE GUI 4.0
entry main
include 'win32ax.inc'
section '.text' code readable executable
proc main
locals
hSrcFile dd ?
hDstFile dd ?
lSrcData dd ?
lDstData dd ?
pSrcData dd ?
pDstData dd ?
BytesCount dd ?
endl
invoke CreateFile,_source_file_path,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL
.if ~(eax=-1)
mov [hSrcFile],eax
invoke SetFilePointer,[hSrcFile],0,NULL,FILE_END
.if ~(eax=-1)&(eax)
mov [lSrcData],eax
invoke LocalAlloc,LMEM_FIXED,[lSrcData]
.if eax
mov [pSrcData],eax
invoke SetFilePointer,[hSrcFile],0,NULL,FILE_BEGIN
.if ~(eax=-1)
invoke ReadFile,[hSrcFile],[pSrcData],[lSrcData],addr BytesCount,NULL
.if (eax)
mov eax,[lSrcData]
shl eax,1
invoke LocalAlloc,LMEM_FIXED,eax
.if eax
mov [pDstData],eax
stdcall encode_text_variables,[pDstData],[pSrcData],[lSrcData]
.if eax
mov [lDstData],eax
invoke CreateFile,_output_file_path,GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL
.if ~(eax=-1)
mov [hDstFile],eax
invoke SetFilePointer,[hDstFile],0,NULL,FILE_BEGIN
.if ~(eax=-1)
invoke WriteFile,[hDstFile],[pDstData],[lDstData],addr BytesCount,NULL
.endif
invoke CloseHandle,[hDstFile]
.endif
.endif
invoke LocalFree,[pDstData]
.endif
.endif
.endif
invoke LocalFree,[pSrcData]
.endif
.endif
invoke CloseHandle,[hSrcFile]
.endif
invoke ExitProcess,0
endp
proc encode_text_variables uses ebx esi edi,pDstData,pSrcData,lSrcData
locals
lDstData dd ?
endl
xor eax,eax
mov [lDstData],eax
mov esi,[pSrcData]
mov edi,[pDstData]
mov ebx,[lSrcData]
.while (ebx)
dec ebx
lodsb
.if (al=09h)|(al=0Ah)|(al=0Dh)|(al=20h)
inc [lDstData]
stosb
.elseif (al=';')
inc [lDstData]
stosb
.while (ebx)&~(al=0Ah)&~(al=0Dh)
dec ebx
lodsb
inc [lDstData]
stosb
.endw
.if (al=0Ah)|(al=0Dh)
.while (ebx)&((al=0Ah)|(al=0Dh))
dec ebx
lodsb
inc [lDstData]
stosb
.endw
inc ebx
dec esi
dec [lDstData]
dec edi
.endif
.elseif (al='!')
inc [lDstData]
stosb
.if (ebx>sizeof_define_sample)
push esi
push edi
mov edi,_define_sample
mov ecx,sizeof_define_sample
xor eax,eax
xor edx,edx
.while ecx&(al=dl)
dec ecx
mov al,[esi]
mov dl,[edi]
inc esi
inc edi
and al,0DFh
and dl,0DFh
.endw
pop edi
pop esi
.if ~(ecx)&(al=dl)
mov ecx,sizeof_define_sample
sub ebx,ecx
add [lDstData],ecx
rep movsb
.while (ebx)&~(al=0Ah)&~(al=0Dh)
dec ebx
lodsb
inc [lDstData]
stosb
.if (ebx)&(al='`')
dec ebx
lodsb
inc [lDstData]
stosb
.if (ebx)&(al="'")
xor eax,eax
xor ecx,ecx
push edi
mov edi,string
.while (ebx)&~(al="'")
dec ebx
lodsb
.if ~(al="'")
inc ecx
stosb
.endif
.endw
pop edi
.if (ecx)
push eax
stdcall base64_encode,string,base64_string,ecx
invoke lstrlen,base64_string
stdcall base64_encode,base64_string,base64_string_base64_string,eax
;
invoke lstrlen,base64_string_base64_string
stdcall base64_encode,base64_string_base64_string,base64_string_base64_string_base64_string,eax
;
invoke lstrcpy,edi,base64_string_base64_string_base64_string
invoke lstrlen,base64_string_base64_string_base64_string
add edi,eax
add [lDstData],eax
pop eax
.endif
.if (ebx)&(al="'")
inc [lDstData]
stosb
dec ebx
lodsb
.if (ebx)&(al='`')
inc [lDstData]
stosb
.else
inc ebx
dec esi
.endif
.endif
.endif
.endif
.endw
.endif
.endif
.endif
.endw
mov eax,[lDstData]
ret
endp
proc base64_encode uses ebx esi edi,dFrom,dTo,dSize
mov esi,[dFrom]
mov edi,[dTo]
mov ecx,[dSize]
or ecx,ecx
jz .r3
.encode_loop:
lodsd
mov edx,eax
cmp ecx,3
jae .remainder_ok
and edx,0ffffh
cmp ecx,2
jae .remainder_ok
and edx,0ffh
.remainder_ok:
bswap edx
mov eax,edx
shr eax,26
and eax,00111111b
mov al,[base64_table+eax]
stosb
mov eax,edx
shr eax,20
and eax,00111111b
mov al,[base64_table+eax]
stosb
dec ecx
jz .r2
mov eax,edx
shr eax,14
and eax,00111111b
mov al,[base64_table+eax]
stosb
dec ecx
jz .r1
mov eax,edx
shr eax,8
and eax,00111111b
mov al,[base64_table+eax]
stosb
dec esi
dec ecx
jnz .encode_loop
jmp .r3
.r2:
mov al,'='
stosb
.r1:
mov al,'='
stosb
.r3:
xor eax,eax
stosb
ret
endp
section '.data' data readable writeable
_source_file_path db '..\settings.txt',0
_output_file_path db '..\settings.nsh',0
align 4
_define_sample db 'define'
sizeof_define_sample = $ - _define_sample
align 4
base64_table db "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
db "abcdefghijklmnopqrstuvwxyz"
db "0123456789+/"
decode_table rb 100h
string rb 2000h
base64_string rb 3000h
base64_string_base64_string rb 3000h
base64_string_base64_string_base64_string rb 3000h
section '.idata' import data readable writeable
library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL'
include 'api\kernel32.inc'
include 'api\user32.inc'
| 21.29927 | 120 | 0.588588 |
8feeeb8db3dd10a9b8c163d210a1bb9700e56aeb | 7,380 | asm | Assembly | debugMatrices.asm | ped7g/EliteNext | 6e930f9b9924b295d7281ee6acb879600d7e597f | [
"Unlicense"
] | 9 | 2021-09-29T22:08:15.000Z | 2022-03-23T05:35:43.000Z | debugMatrices.asm | ped7g/EliteNext | 6e930f9b9924b295d7281ee6acb879600d7e597f | [
"Unlicense"
] | 1 | 2022-01-21T12:35:42.000Z | 2022-01-21T17:47:24.000Z | debugMatrices.asm | ped7g/EliteNext | 6e930f9b9924b295d7281ee6acb879600d7e597f | [
"Unlicense"
] | 1 | 2022-01-15T10:13:49.000Z | 2022-01-15T10:13:49.000Z |
DEBUGSETNODES: ld hl,DEBUGUBNKDATA
ld de,UBnKxlo
ld bc,9
ldir
ld hl,DEBUGROTMATDATA
ld de,UBnkrotmatSidevX
ld bc,6*3
ldir
ret
DEBUGSETPOS: ld hl,DEBUGUBNKDATA
ld de,UBnKxlo
ld bc,9 - 3
ldir
ret
; culltest
;DEBUGUBNKDATA: db $00, $00, $00, $00, $00, $00, $31, $03, $00
DEBUGUBNKDATA: db $00, $00, $00, $00, $00, $00, $5C, $07, $00
DEBUGROTMATDATA: db $00, $60, $00, $00, $00, $00
db $00, $00, $00, $60, $00, $00
db $00, $00, $00, $00, $00, $E0
; FAILS due to sharp angle, OK now
;DEBUGUBNKDATA: db $39, $01, $00, $43, $01, $00, $EF, $03, $00
;DEBUGROTMATDATA: db $01, $2F, $B2, $CC, $4C, $27
; db $17, $46, $87, $3C, $95, $20
; db $E2, $32, $31, $8C, $EF, $D1
; TOP RIGHT CORNER Passes as python and cobra
;DEBUGUBNKDATA: db $39, $01, $00, $43, $01, $00, $5B, $04, $00
;DEBUGROTMATDATA: db $E2, $03, $3A, $16, $F5, $60
; db $D3, $CE, $F3, $BA, $4E, $0F
; db $03, $BE, $4A, $4B, $DB, $8C
; Looks OK
;DEBUGUBNKDATA: db $39, $01, $00, $43, $01, $00, $EE, $02, $00
;DEBUGROTMATDATA: db $35, $d8, $98, $9f, $b0, $1a
; db $4B, $26, $CE, $d6, $60, $16
; db $89, $90, $c4, $9f, $dd, $d9
;
; Massive horizontal line
; 15th line (or line 14 has corrodinates 05,00 to D8,00) which looks wrong
; node array looks OK, looks liek its sorted as it was both -ve Y off screen fix added
;DEBUGUBNKDATA: db $39, $01, $00, $43, $01, $00, $BD, $03, $00
;DEBUGROTMATDATA: db $59, $CF, $06, $B6, $61, $8D
; db $AD, $B1, $97, $4F, $C9, $98
; db $61, $99, $E0, $0D, $11, $5C
; Line lost in clipping
;DEBUGUBNKDATA: db $39, $01, $00, $43, $01, $00, $8B, $04, $00
;DEBUGROTMATDATA: db $A3, $4D, $A9, $28, $F8, $AF
; db $FB, $97, $8C, $B5, $FB, $D0
; db $DB, $3A, $29, $CA, $29, $1C
;DEBUGUBNKDATA: db $5E, $02, $00, $FE, $00, $FE, $E5, $09, $00
;DEBUGROTMATDATA: db $A6, $88, $89, $BB, $53, $4D
; db $6D, $D9, $F0, $99, $BA, $9E
; db $4A, $A8, $89, $47, $DF, $33
;
;DEBUGUBNKDATA: db $ED, $05, $00, $FE, $00, $FE, $F1, $0A, $00
;DEBUGROTMATDATA: db $1B, $33, $DE, $B4, $ED, $C5
; db $73, $C4, $BC, $1E, $96, $C4
; db $55, $B9, $35, $D1, $80, $0F
; top left off right issue
;DEBUGUBNKDATA: db $39, $01, $00, $43, $01, $00, $2F, $03, $00
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
; db $E6, $01, $81, $AD, $B0, $55
; test middle of screen
;DEBUGUBNKDATA: db $00, $00, $00, $00, $00, $00, $20, $01, $00
;
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
; db $E6, $01, $81, $AD, $B0, $55
; test middle of screen futher away
;DEBUGUBNKDATA: db $00, $00, $00, $00, $00, $00, $20, $02, $00
;
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
; db $E6, $01, $81, $AD, $B0, $55
; Test left center clip still warping
;DEBUGUBNKDATA: db $80, $00, $80, $00, $00, $00, $20, $01, $00
;
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
; db $E6, $01, $81, $AD, $B0, $55
; Test right center clip - seems to be warping values towards bottom of screen on clip
;DEBUGUBNKDATA: db $80, $00, $00, $00, $00, $00, $20, $01, $00
;
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
; db $E6, $01, $81, $AD, $B0, $55
; Test top center clip test 1 - good test many ships fail
;DEBUGUBNKDATA: db $19, $00, $00, $50, $00, $00, $20, $01, $00
;
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
; db $E6, $01, $81, $AD, $B0, $55
; Test top center clip test 2 - Poss 2nd ship has an issue with a small line
;DEBUGUBNKDATA: db $19, $00, $00, $60, $00, $00, $2F, $01, $00
;
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
; db $E6, $01, $81, $AD, $B0, $55
; Test bottom center clip ; complet shambles as if its forcing cip to below 128
; looks better now may have some clipping issues maybe ship data
;DEBUGUBNKDATA: db $19, $00, $00, $50, $00, $80, $20, $01, $00
;
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
db $E6, $01, $81, $AD, $B0, $55
; Test left top center clip
; Test right top center clip
; Test left bottom center clip
; Test right bottom center clip
; Tests with no clip
;DEBUGUBNKDATA: db $39, $00, $00, $43, $00, $00, $2F, $04, $00
;
;DEBUGROTMATDATA: db $FD, $50, $47, $B0, $53, $9A
; db $73, $B7, $98, $C8, $80, $A3
; db $E6, $01, $81, $AD, $B0, $55
;
;DEBUGUBNKDATA: db $00, $00, $00, $00, $00, $00, $1F, $00, $00
;
; UBNKPOs example 39,01,00,43,01,00,f4,03,00
; rotmat example b1, 83,ae,5d,b0,1a,5e,de,82,8a,69,16,70,99,52,19,dd,d9
| 57.209302 | 100 | 0.345799 |
97d6a74526342d3d09bc636f8b7425f8ab3549c7 | 6,892 | asm | Assembly | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_783.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_783.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_zr_/i9-9900K_12_0xa0.log_21829_783.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r14
push %r8
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xa38f, %r11
nop
nop
nop
nop
sub %rbx, %rbx
and $0xffffffffffffffc0, %r11
vmovaps (%r11), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %rax
nop
nop
nop
and %rdi, %rdi
lea addresses_WC_ht+0xbcc7, %r11
clflush (%r11)
and $42417, %rdx
mov $0x6162636465666768, %r14
movq %r14, %xmm2
vmovups %ymm2, (%r11)
nop
inc %r14
lea addresses_normal_ht+0x1038f, %rdi
nop
nop
sub %r8, %r8
mov (%rdi), %dx
nop
nop
nop
nop
nop
cmp %r8, %r8
lea addresses_WC_ht+0x1e28f, %rdx
nop
nop
nop
nop
cmp %r14, %r14
movb (%rdx), %bl
nop
add %rdi, %rdi
lea addresses_UC_ht+0x502f, %rsi
lea addresses_WC_ht+0x12f6b, %rdi
xor $29241, %r8
mov $48, %rcx
rep movsb
nop
mfence
lea addresses_WC_ht+0xcb8f, %rbx
and %r8, %r8
movups (%rbx), %xmm0
vpextrq $1, %xmm0, %rsi
nop
nop
nop
cmp %r14, %r14
lea addresses_UC_ht+0x1338f, %rsi
lea addresses_UC_ht+0xdb8f, %rdi
nop
nop
nop
nop
add %rbx, %rbx
mov $28, %rcx
rep movsq
nop
nop
nop
inc %r11
lea addresses_normal_ht+0x13bd7, %rsi
lea addresses_A_ht+0x738f, %rdi
nop
nop
nop
nop
cmp %rdx, %rdx
mov $64, %rcx
rep movsl
nop
sub %r11, %r11
lea addresses_WT_ht+0x127cf, %rbx
nop
cmp $63478, %r8
movw $0x6162, (%rbx)
xor $39146, %rbx
lea addresses_A_ht+0x1b2a3, %r11
clflush (%r11)
nop
nop
nop
cmp $60938, %r8
mov (%r11), %ebx
nop
dec %rbx
lea addresses_normal_ht+0x750f, %rbx
cmp $46393, %rax
movw $0x6162, (%rbx)
nop
nop
nop
xor $44689, %rdi
lea addresses_WT_ht+0x4acf, %rcx
nop
and %r8, %r8
mov (%rcx), %si
nop
sub %rcx, %rcx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r8
pop %r14
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r13
push %r8
push %rbx
push %rdi
push %rsi
// Faulty Load
lea addresses_A+0x18b8f, %r11
and %r8, %r8
movb (%r11), %bl
lea oracles, %r13
and $0xff, %rbx
shlq $12, %rbx
mov (%r13,%rbx,1), %rbx
pop %rsi
pop %rdi
pop %rbx
pop %r8
pop %r13
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_A', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'NT': True, 'same': False, 'congruent': 11, 'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'src': {'same': True, 'congruent': 3, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 2, 'type': 'addresses_WC_ht'}}
{'src': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 10, 'type': 'addresses_UC_ht'}}
{'src': {'same': True, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 4, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}}
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2}}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'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
*/
| 38.719101 | 2,999 | 0.655978 |
d08ac2197fc22879cdde11fdbee9b5c0dfef9278 | 275 | asm | Assembly | libsrc/_DEVELOPMENT/compress/zx7/c/sdcc/dzx7_agile_rcs_back.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/compress/zx7/c/sdcc/dzx7_agile_rcs_back.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/compress/zx7/c/sdcc/dzx7_agile_rcs_back.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z |
; void dzx7_agile_rcs_back(void *src, void *dst)
SECTION code_clib
SECTION code_compress_zx7
PUBLIC _dzx7_agile_rcs_back
EXTERN asm_dzx7_agile_rcs_back
_dzx7_agile_rcs_back:
pop af
pop hl
pop de
push de
push hl
push af
jp asm_dzx7_agile_rcs_back
| 12.5 | 48 | 0.763636 |
9a9b16d232857238623a17c6567830b1a3b9ef50 | 7,151 | asm | Assembly | apps/hbios/hbios.asm | vipoo/RomWBW-Env | bdef7be6b05d9a02af13a2c7926ffe457eb7c9bd | [
"MIT"
] | 1 | 2021-01-05T17:09:24.000Z | 2021-01-05T17:09:24.000Z | apps/hbios/hbios.asm | vipoo/RomWBW-Env | bdef7be6b05d9a02af13a2c7926ffe457eb7c9bd | [
"MIT"
] | null | null | null | apps/hbios/hbios.asm | vipoo/RomWBW-Env | bdef7be6b05d9a02af13a2c7926ffe457eb7c9bd | [
"MIT"
] | null | null | null | ;===============================================================================
; Util to invoke a HBIOS function
; Usage B C ....
;
stksiz .equ $200 ; Working stack size
restart .equ $0000 ; CP/M restart vector
bdos .equ $0005 ; BDOS invocation vector
#DEFINE PRTS(S) CALL prtstrd \ .TEXT S
;===============================================================================
; Entry
;===============================================================================
.org $100
; setup stack
LD (stksav), sp ; save stack
LD sp, stack ; set new stack
PRTS( "HBIOS Test Utility v0.3\r\n$")
CALL parse ; parse command line
LD iy, bcValue
LD B, 'B'
LD C, 'C'
CALL prtregs
LD iy, deValue
LD B, 'D'
LD C, 'E'
CALL prtregs
LD iy, hlValue
LD B, 'H'
LD C, 'L'
CALL prtregs
CALL invokehbios
PRTS( "Ret AF: 0x$")
LD IY, afResult
CALL prtreg
PRTS( "\r\nRet BC: 0x$")
LD IY, bcResult
CALL prtreg
PRTS( "\r\nRet DE: 0x$")
LD IY, deResult
CALL prtreg
PRTS( "\r\nRet HL: 0x$")
LD IY, hlResult
CALL prtreg
PRTS( "\r\nRet DE:HL: 0x$")
LD IY, deResult
CALL prtreg
LD IY, hlResult
CALL prtreg
PRTS( "\r\nReturned registers\r\n$")
exit:
CALL crlf ; formatting
LD sp, (stksav) ; restore stack
RET ; return to CP/M
prtregs: ; iy is location of data to print
LD a, b
call prtchr
PRTS( ": 0x$")
LD a, (iy+1) ; b is chr of 1st register
call prthex
CALL crlf
LD a, c
call prtchr
PRTS( ": 0x$")
LD a, (iy) ; b is chr of 1st register
call prthex
call crlf
RET
;===============================================================================
prtreg: ; print 16 bit value at IY
LD E, (IY)
LD d, (IY + 1)
LD a, d
CALL prthex
LD a, e
JP prthex
invokehbios:
LD bc, (bcValue)
LD de, (deValue)
LD hl, (hlValue)
RST 08
LD (bcResult), bc
LD (deResult), de
LD (hlResult), hl
PUSH AF
POP BC
LD (afResult), BC
RET
;===============================================================================
; convert char in A to a number from 0-15 based on it HEX string value
fromchar: ; value is returned in B
SUB '0' ;
CP 10 ; greater than 9
JR c, numchar
SUB 'A' - '0'
CP 7 ; greater than F
JP nc, errprm
ADD a, 10
numchar:
LD b, a
RET
;===============================================================================
readhexbyte: ; Read 2 chars - and convert to a byte - returned in A
LD a, (hl)
OR a
JP z, errprm
CALL fromchar
LD a, b
RLCA
RLCA
RLCA
RLCA
LD c, a
INC hl
LD a, (hl)
OR a
JP z, errprm
CALL fromchar
LD a, b
INC hl
OR c
LD c, a
RET
;===============================================================================
; Parse command line
; if parse error, writes error string and then jp to exit
parse:
LD hl, $81 ; point to start of command tail (after length byte)
LD IY, bcValue
CALL parsehexbyte
LD a, (hl) ; if no more args
OR a
RET z
LD IY, deValue ; D and E values
CALL parsehexbyte
LD a, (hl) ; if no more args
OR a
RET z
LD IY, hlValue ; H and L values
CALL parsehexbyte
RET
parsehexbyte:
CALL nonblank ; skip blanks
CALL readhexbyte ; read value for register B
LD a, c
LD (IY + 1), a
CALL nonblank ; skip blanks
CALL readhexbyte ; read value for register C
LD a, c
LD (IY), a
RET
;===============================================================================
; Print character in A without destroying any registers
prtchr:
PUSH bc ; save registers
PUSH de
PUSH hl
LD e, a ; character to print in E
LD c, $02 ; BDOS function to output a character
CALL bdos ; do it
POP hl ; restore registers
POP de
POP bc
RET
;===============================================================================
; Print a $ terminated string at (HL) without destroying any registers
prtstrz:
LD a, (hl) ; get next char
INC hl
CP '$'
RET z
CALL prtchr
JR prtstrz
;===============================================================================
; Print the value in A in hex without destroying any registers
prthex:
PUSH af ; save AF
PUSH de ; save DE
CALL hexascii ; convert value in A to hex chars in DE
LD a, d ; get the high order hex char
CALL prtchr ; print it
LD a, e ; get the low order hex char
CALL prtchr ; print it
POP de ; restore DE
POP af ; restore AF
RET ; done
;===============================================================================
; Convert binary value in A to ascii hex characters in DE
hexascii:
LD d, a ; save A in D
CALL hexconv ; convert low nibble of A to hex
LD e, a ; save it in E
LD a, d ; get original value back
RLCA ; rotate high order nibble to low bits
RLCA
RLCA
RLCA
CALL hexconv ; convert nibble
LD d, a ; save it in D
RET ; done
;===============================================================================
; Convert low nibble of A to ascii hex
hexconv:
AND $0F ; low nibble only
ADD a, $90
DAA
ADC a, $40
DAA
RET
;===============================================================================
; Start a new line
crlf:
LD a, 13 ; <CR>
CALL prtchr ; print it
LD a, 10 ; <LF>
JR prtchr ; print it
;===============================================================================
; Get the next non-blank character from (HL).
nonblank:
LD a, (hl) ; load next character
OR a
JP z, erruse
cp ' ' ; string ends with a null
JR nz, errprm ; if no blank found as expected, return error to user
skipblank:
INC hl ; if blank, increment character pointer
LD a, (hl) ; load next character
OR a ; string ends with a null
RET z ; if null, return pointing to null
CP ' ' ; check for blank
RET nz ; return if not blank
JR skipblank ; and loop
;===============================================================================
; Errors
erruse: ; command usage error (syntax)
LD hl, msguse
JR err
errprm: ; command parameter error (syntax)
LD hl, msgprm
err: ; print error string and return error signal
CALL crlf ; print newline
CALL prtstrz ; print error string
JP exit
;===============================================================================
; PRINT A STRING DIRECT: REFERENCED BY POINTER AT TOP OF STACK
; STRING MUST BE TERMINATED BY '$'
; USAGE:
; CALL PRTSTR
; .DB "HELLO$"
prtstrd:
EX (SP), HL
CALL prtstrz
EX (SP), HL
RET
;===============================================================================
; Storage Section
;===============================================================================
stksav .dw 0 ; stack pointer saved at start
.fill stksiz, 0 ; stack
stack .equ $ ; stack top
;===============================================================================
; Messages
msguse .db "Usage: HBIOS BB CC [DD EE] [HH LL]$"
msgprm .db "Parameter error$"
;===============================================================================
; Register values to supply to hbios
bcValue .dw 0
deValue .dw 0
hlValue .dw 0
;===============================================================================
; Captured register returned by hbios call
afResult .dw 0
bcResult .dw 0
deResult .dw 0
hlResult .dw 0
.end | 20.909357 | 80 | 0.492379 |
3f03f6824dc9ab6b3df9403327eadca89638ec2b | 288 | asm | Assembly | programs/oeis/130/A130794.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/130/A130794.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/130/A130794.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A130794: Periodic sequence with period 1,5,3.
; 1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1,5,3,1
mul $0,4
mov $1,$0
mod $1,6
add $1,1
| 36 | 201 | 0.541667 |
0ab71ba96c354fcb8f2b5f77268b514595275948 | 903 | asm | Assembly | masm/7_conver.asm | oceanwavechina/assembly | 803e4a4c03645fbbc026092b3329ea472e070cab | [
"Apache-2.0"
] | null | null | null | masm/7_conver.asm | oceanwavechina/assembly | 803e4a4c03645fbbc026092b3329ea472e070cab | [
"Apache-2.0"
] | null | null | null | masm/7_conver.asm | oceanwavechina/assembly | 803e4a4c03645fbbc026092b3329ea472e070cab | [
"Apache-2.0"
] | null | null | null | ; 这段代码是演示如何使用位运算进行大小写转换,
; 以及在代码中定义静态字符串的方法
assume cs:code,ds:data
; 定义数据段,开辟空间
data segment
db 'BaSiC' ; 相当于 db 75h,6eh,49h,58h, 要把这个转为大写
db 'iNfoRMaTioN' ; 把这个转为小写
data ends
code segment
start:
mov ax, data ; 数据段
mov dx, ax ;
mov bx, 0 ; 数据指针重置
mov cx, 5 ; 第一个字符串'BaSiC' 有5个byte
s0:
mov al, [bx] ; 注意是数据段的第一个byte放到al中
add al, 11011111B ; 从低到高有效位,第5位为0时是大写
mov [bx], al ; 转化好了就返回数据段中,覆盖掉内存中原来的值
inc bx ; 因为是1个byte1个byte的操作,所以+1就可以
loop s0
; 重置数据偏移和计数器
mov bx, 5 ; 数据段中第5个byte就是第二个字符串的起始位置(既然是连续的,干嘛不第一次吧cx加大就好了?)
mov cx, 11 ; 栈里边有8个数据,所以也要循环8次
s1:
mov al, [bx] ; 同理,数据段的地址也放到dx中了
or al, 00100000B ; 从低到高有效位,第5位为1时是小写
mov [bx], al ; 步进
inc bx
loop s1
mov ax, 4c00h
int 21h
code ends
end start | 21.5 | 74 | 0.570321 |
fff2cac304c620dd60e9109c99cb120ea26ed5cc | 1,058 | asm | Assembly | programs/oeis/265/A265411.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/265/A265411.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/265/A265411.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A265411: a(0) = 1, a(1) = 7, otherwise, if A240025(n-1) = 1 [when n is in A033638] a(n) = 3, otherwise a(n) = 1.
; 1,7,3,3,1,3,1,3,1,1,3,1,1,3,1,1,1,3,1,1,1,3,1,1,1,1,3,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,3,1,1,1,1,1,1,3,1,1,1,1,1,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1
mov $7,$0
mov $8,2
lpb $8
sub $8,1
add $0,$8
sub $0,1
mov $2,$0
mov $5,$0
mul $5,2
lpb $2
mul $5,2
lpb $5
add $6,2
trn $5,$6
add $5,1
mov $10,$6
lpe
add $10,1
lpb $6
sub $6,$6
lpe
pow $2,$3
sub $2,1
mov $5,$10
add $5,1
lpe
mov $4,$8
mov $9,$5
lpb $4
mov $1,$9
sub $4,1
lpe
lpe
lpb $7
sub $1,$9
mov $7,0
lpe
div $1,2
mul $1,2
add $1,1
| 24.045455 | 501 | 0.47259 |
49ec3e224e1d4e89a26e1cc69506e5761ba786d0 | 438 | asm | Assembly | programs/oeis/017/A017353.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/017/A017353.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/017/A017353.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A017353: a(n) = 10n + 7.
; 7,17,27,37,47,57,67,77,87,97,107,117,127,137,147,157,167,177,187,197,207,217,227,237,247,257,267,277,287,297,307,317,327,337,347,357,367,377,387,397,407,417,427,437,447,457,467,477,487,497,507,517,527,537,547,557,567,577,587,597,607,617,627,637,647,657,667,677,687,697,707,717,727,737,747,757,767,777,787,797,807,817,827,837,847,857,867,877,887,897,907,917,927,937,947,957,967,977,987,997
mul $0,10
add $0,7
| 73 | 390 | 0.714612 |
3fdc3931e1bee19fe6941d37280b7b24a7a28b9b | 1,550 | asm | Assembly | example_files/cmd/others/example.asm | d1ego77/themes | 7b1cb5e6804dab601cd8ec246eb56f897a88a00f | [
"MIT"
] | 1 | 2020-11-30T09:42:38.000Z | 2020-11-30T09:42:38.000Z | example_files/cmd/others/example.asm | d1ego77/themes | 7b1cb5e6804dab601cd8ec246eb56f897a88a00f | [
"MIT"
] | 1 | 2021-11-08T09:57:11.000Z | 2021-11-08T09:57:11.000Z | example_files/cmd/others/example.asm | d1ego77/themes | 7b1cb5e6804dab601cd8ec246eb56f897a88a00f | [
"MIT"
] | 1 | 2021-05-18T21:38:15.000Z | 2021-05-18T21:38:15.000Z | global _start
; Guess the number: example taken from http://www.rosettacode.org/
section .data
rand dd 0
guess dd 0
msg1 db "Guess my number (1-10)", 10
len1 equ $ - msg1
msg2 db "Wrong, try again!", 10
len2 equ $ - msg2
msg3 db "Well guessed!", 10
len3 equ $ - msg3
section .text
_start:
; random number using time
mov eax, 13
mov ebx, rand
int 80h
mov eax, [ebx]
mov ebx, 10
xor edx, edx
div ebx
inc edx
mov [rand], edx
; print msg1
mov eax, 4
mov ebx, 1
mov ecx, msg1
mov edx, len1
int 80h
input:
; get input
mov eax, 3
xor ebx, ebx
mov ecx, msg1
mov edx, 1
int 80h
mov al, [ecx]
cmp al, 48
jl check
cmp al, 57
jg check
; if number
sub al, 48
xchg eax, [guess]
mov ebx, 10
mul ebx
add [guess], eax
jmp input
check:
; else check number
mov eax, 4
inc ebx
mov ecx, [guess]
cmp ecx, [rand]
je done
; if not equal
mov ecx, msg2
mov edx, len2
mov dword [guess], 0
int 80h
jmp input
done:
; well guessed
mov ecx, msg3
mov edx, len3
int 80h
; exit
mov eax, 1
xor ebx, ebx
int 80h | 20.12987 | 69 | 0.437419 |
c6cf49086cd6100ac34279c9777ec620906197da | 1,523 | asm | Assembly | programs/oeis/059/A059839.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/059/A059839.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/059/A059839.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A059839: a(n) = n^8 + n^6 + n^4 + n^2 + 1.
; 1,5,341,7381,69905,406901,1727605,5884901,17043521,43584805,101010101,216145205,432988561,820586261,1483357205,2574332101,4311810305,6999978821,11054078101,17030739605,25664160401,37908820405,54989488181,78459301541,110266749505,152832422501,209136438005,282817489141,378284504081,500841944405,656829810901,853779465605,1100586419201,1407701273221,1787340046805,2253715158101,2823288370705,3515047055861,4350805161461,5355530319205,6557698561601,7989678160805,9688144141621,11694525061301,14055483689105,16823433258901,20057091008405,23822070758981,28191516330241,33246777624005,39078131252501,45785547626005,53479506455441,62281862665781,72326764756405,83761627684901,96748162391105,111463464118501,128101161730421,146872630258805,168008268963601,191758847221205,218396920600661,248218319526661,281543712968705,318720249636101,360123279198805,406158156094421,457262128522001,513906315263605,576597773014901,645881656946405,722343477257281,806611454523941,899358976686005,1001307160552501,1113227520751505,1235944749086741,1370339607304981,1517351936318405,1677983784966401,1853302661441605,2044444910545301,2252619219977621,2479110258908305,2725282452114101,2992583893009205,3282550398935461,3596809712119361,3937085849743205,4305203606618101,4703093213986805,5132795158024721,5596465161647701,6096379333275605,6634939486240901,7214678632571905,7838266654920581,8508516160445141
mov $1,$0
mul $1,$0
mov $2,$1
pow $2,3
add $2,$1
add $1,1
mul $1,$2
div $1,4
mul $1,4
add $1,1
| 108.785714 | 1,381 | 0.885752 |
f17c1d14aad1e6cc9bd38d7eacbcee383e9d4772 | 1,129 | asm | Assembly | programs/oeis/061/A061803.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/061/A061803.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/061/A061803.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A061803: Sum of n-th row of triangle of 4th powers: 1; 1 16 1; 1 16 81 16 1; 1 16 81 256 81 16 1; ...
; 1,18,115,452,1333,3254,6951,13448,24105,40666,65307,100684,149981,216958,305999,422160,571217,759714,995011,1285332,1639813,2068550,2582647,3194264,3916665,4764266,5752683,6898780,8220717,9737998,11471519,13443616,15678113,18200370,21037331,24217572,27771349,31730646,36129223,41002664,46388425,52325882,58856379,66023276,73871997,82450078,91807215,101995312,113068529,125083330,138098531,152175348,167377445,183770982,201424663,220409784,240800281,262672778,286106635,311183996,337989837,366612014,397141311,429671488,464299329,501124690,540250547,581783044,625831541,672508662,721930343,774215880,829487977,887872794,949499995,1014502796,1083018013,1155186110,1231151247,1311061328,1395068049,1483326946,1575997443,1673242900,1775230661,1882132102,1994122679,2111381976,2234093753,2362445994,2496630955,2636845212,2783289709,2936169806,3095695327,3262080608,3435544545,3616310642,3804607059,4000666660
lpb $0
mov $2,$0
sub $0,1
seq $2,8514 ; 4-dimensional centered cube numbers.
add $1,$2
lpe
add $1,1
mov $0,$1
| 94.083333 | 905 | 0.832595 |
f222364b2a015100ce167002bc865545ddf2fe06 | 419 | asm | Assembly | programs/oeis/052/A052343.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/052/A052343.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/052/A052343.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A052343: Number of ways to write n as the unordered sum of two triangular numbers (zero allowed).
; 1,1,1,1,1,0,2,1,0,1,1,1,1,1,0,1,2,0,1,0,1,2,1,0,1,1,0,1,1,1,1,2,0,0,1,0,2,1,1,1,0,0,2,1,0,1,2,0,1,1,0,2,0,0,0,2,2,1,1,0,1,1,0,0,1,1,2,1,0,1,1,0,2,1,0,0,2,0,1,1,0,3,0,1,1,0,0,1,1,0,1,2,1,1,2,0,0,1,0,1
seq $0,8441 ; Number of ways of writing n as the sum of 2 triangular numbers.
mov $2,$0
add $2,1
div $2,2
mov $0,$2
| 46.555556 | 201 | 0.608592 |
ced76214986c7472934b6a1f4bb11ca4d54b9052 | 1,877 | asm | Assembly | src/x86/cdef16_sse.asm | Luni-4/rav1e | 784aeab92cff18684b3f0bb50a670e430a51e3fc | [
"BSD-2-Clause"
] | null | null | null | src/x86/cdef16_sse.asm | Luni-4/rav1e | 784aeab92cff18684b3f0bb50a670e430a51e3fc | [
"BSD-2-Clause"
] | null | null | null | src/x86/cdef16_sse.asm | Luni-4/rav1e | 784aeab92cff18684b3f0bb50a670e430a51e3fc | [
"BSD-2-Clause"
] | null | null | null | ; Copyright (c) 2017-2021, The rav1e contributors
; Copyright (c) 2021, Nathan Egge
; All rights reserved.
;
; This source code is subject to the terms of the BSD 2 Clause License and
; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
; was not distributed with this source code in the LICENSE file, you can
; obtain it at www.aomedia.org/license/software. If the Alliance for Open
; Media Patent License 1.0 was not distributed with this source code in the
; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
%include "config.asm"
%include "ext/x86/x86inc.asm"
%ifn ARCH_X86_64
SECTION_RODATA 16
pq_dir_shr: dq 2, 4
%endif
SECTION .text
cextern cdef_dir_8bpc_ssse3
INIT_XMM ssse3
cglobal cdef_dir_16bpc, 2, 4, 4, 32 + 8*8, src, ss, var, bdmax
bsr bdmaxd, bdmaxm
%if ARCH_X86_64
movzx bdmaxq, bdmaxw
sub bdmaxq, 7
movq m4, bdmaxq
%else
push r4
sub bdmaxd, 9
LEA r4, pq_dir_shr
movq m4, [r4 + bdmaxd*4]
pop r4
%endif
DEFINE_ARGS src, ss, var, ss3
lea ss3q, [ssq*3]
mova m0, [srcq + ssq*0]
mova m1, [srcq + ssq*1]
mova m2, [srcq + ssq*2]
mova m3, [srcq + ss3q]
psraw m0, m4
psraw m1, m4
psraw m2, m4
psraw m3, m4
packuswb m0, m1
packuswb m2, m3
mova [rsp + 32 + 0*8], m0
mova [rsp + 32 + 2*8], m2
lea srcq, [srcq + ssq*4]
mova m0, [srcq + ssq*0]
mova m1, [srcq + ssq*1]
mova m2, [srcq + ssq*2]
mova m3, [srcq + ss3q]
psraw m0, m4
psraw m1, m4
psraw m2, m4
psraw m3, m4
packuswb m0, m1
packuswb m2, m3
mova [rsp + 32 + 4*8], m0
mova [rsp + 32 + 6*8], m2
lea srcq, [rsp + 32] ; WIN64 shadow space
mov ssq, 8
%if ARCH_X86_64
call mangle(private_prefix %+ _cdef_dir_8bpc %+ SUFFIX)
%else
movifnidn vard, varm
push eax ; align stack
push vard
push ssd
push srcd
call mangle(private_prefix %+ _cdef_dir_8bpc)
add esp, 0x10
%endif
RET
| 23.4625 | 77 | 0.677144 |
87016aa89ab194059959040aae5d69a063a2600e | 2,404 | asm | Assembly | scripts/billshouse2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 16 | 2018-08-28T21:47:01.000Z | 2022-02-20T20:29:59.000Z | scripts/billshouse2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 5 | 2019-04-03T19:53:11.000Z | 2022-03-11T22:49:34.000Z | scripts/billshouse2.asm | adhi-thirumala/EvoYellow | 6fb1b1d6a1fa84b02e2d982f270887f6c63cdf4c | [
"Unlicense"
] | 2 | 2019-12-09T19:46:02.000Z | 2020-12-05T21:36:30.000Z | Func_f2418:
ld hl, BillsHouseText_f243b
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
jr nz, .asm_f2433
.asm_f2427
ld hl, BillsHouseText_f2440
call PrintText
ld a, $2
ld [wBillsHouseCurScript], a
ret
.asm_f2433
ld hl, BillsHouseText_f2445
call PrintText
jr .asm_f2427
BillsHouseText_f243b:
TX_FAR _BillsHouseText_1e865
db "@"
BillsHouseText_f2440:
TX_FAR _BillsHouseText_1e86a
db "@"
BillsHouseText_f2445:
TX_FAR _BillsHouseText_1e86f
db "@"
Func_f244a:
CheckEvent EVENT_GOT_SS_TICKET
jr nz, .asm_f247e
ld hl, BillsHouseText_f248c
call PrintText
lb bc, S_S_TICKET, 1
call GiveItem
jr nc, .asm_f2485
ld hl, BillsHouseText_f2491
call PrintText
SetEvent EVENT_GOT_SS_TICKET
ld a, HS_CERULEAN_GUARD_1
ld [wMissableObjectIndex], a
predef ShowObject
ld a, HS_CERULEAN_GUARD_2
ld [wMissableObjectIndex], a
predef HideObject
.asm_f247e
ld hl, BillsHouseText_f249d
call PrintText
ret
.asm_f2485
ld hl, BillsHouseText_f2498
call PrintText
ret
BillsHouseText_f248c:
TX_FAR _BillThankYouText
db "@"
BillsHouseText_f2491:
TX_FAR _SSTicketReceivedText
TX_SFX_KEY_ITEM
TX_BUTTON_SOUND
db "@"
BillsHouseText_f2498:
TX_FAR _SSTicketNoRoomText
db "@"
BillsHouseText_f249d:
TX_FAR _BillsHouseText_1e8cb
db "@"
Func_f24a2:
ld hl, BillsHouseText_f24a9
call PrintText
ret
BillsHouseText_f24a9:
TX_FAR _BillsHouseText_1e8da
db "@"
Func_f24ae:
ld a, [wCurMap]
cp BILLS_HOUSE
jr nz, .asm_f24d2
call CheckPikachuFollowingPlayer
jr z, .asm_f24d2
ld a, [wBillsHouseCurScript]
cp $5
ld e, $1b
ret z
cp $0
ld e, $17
ret z
CheckEventHL EVENT_MET_BILL_2
ld e, $20
ret z
ld e, $1f
ret
.asm_f24d2
ld e, $ff
ret
Func_f24d5:
ld a, $ff
ld [wJoyIgnore], a
xor a
ld [wPlayerMovingDirection], a
call UpdateSprites
call UpdateSprites
ld hl, Data_f2505
call ApplyPikachuMovementData
ld a, $f ; pikachu
ld [wEmotionBubbleSpriteIndex], a
ld a, $1
ld [wWhichEmotionBubble], a
predef EmotionBubble
call DisablePikachuFollowingPlayer
callab InitializePikachuTextID
ret
Data_f2505:
db $00
db $20
db $20
db $20
db $1e
db $3f
Func_f250b:
ld hl, Data_f251c
ld b, SPRITE_FACING_UP
call TryApplyPikachuMovementData
ld hl, Data_f2521
ld b, SPRITE_FACING_RIGHT
call TryApplyPikachuMovementData
ret
Data_f251c:
db $00
db $1f
db $1d
db $38
db $3f
Data_f2521:
db $00
db $1e
db $1f
db $1f
db $1d
db $38
db $3f
| 15.119497 | 35 | 0.763727 |
5b50f420d0b3bd1b7d7f709c315e7f43d40f2103 | 170 | asm | Assembly | examples/lm3s6965evb/bare/startup_m3.asm | jsdelivrbot/ppci-mirror | 67195d628275e2332ceaf44c9e13fc58d0877157 | [
"BSD-2-Clause"
] | null | null | null | examples/lm3s6965evb/bare/startup_m3.asm | jsdelivrbot/ppci-mirror | 67195d628275e2332ceaf44c9e13fc58d0877157 | [
"BSD-2-Clause"
] | null | null | null | examples/lm3s6965evb/bare/startup_m3.asm | jsdelivrbot/ppci-mirror | 67195d628275e2332ceaf44c9e13fc58d0877157 | [
"BSD-2-Clause"
] | null | null | null |
dd 0x20000678 ; Setup stack pointer
dd 0x00000009 ; Reset vector, jump to address 8
B hello_main ; Branch to main (this is actually in the interrupt vector)
| 28.333333 | 81 | 0.723529 |
4a5b127eaa61d8ae66206957dbf2d696e42daabc | 466 | asm | Assembly | 04/mult/Mult.asm | leafvmaple/Nand2Tetris | d736953d47707848a8de025102583df2194cf49f | [
"BSD-3-Clause"
] | 1 | 2020-12-03T20:57:59.000Z | 2020-12-03T20:57:59.000Z | 04/mult/Mult.asm | leafvmaple/Nand2Tetris | d736953d47707848a8de025102583df2194cf49f | [
"BSD-3-Clause"
] | null | null | null | 04/mult/Mult.asm | leafvmaple/Nand2Tetris | d736953d47707848a8de025102583df2194cf49f | [
"BSD-3-Clause"
] | null | null | null | // This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/04/Mult.asm
// Multiplies R0 and R1 and stores the result in R2.
// (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.)
// Put your code here.
@R2
M=0
@I
M=1
(LOOP)
@R0
D=M
@I
D=M&D
@NOT_ADD
D;JEQ
@R1
D=M
@R2
M=M+D
(NOT_ADD)
@R1
D=M
M=M+D
@I
D=M
M=M+D
D=M
@R0
D=M-D
@LOOP
D;JGE
(END)
@END
0;JMP
| 11.365854 | 66 | 0.645923 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.