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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e08c9cc97f03fb7d91ef3a09665822869c07a61d | 1,927 | asm | Assembly | maps/Route40BattleTowerGate.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 28 | 2019-11-08T07:19:00.000Z | 2021-12-20T10:17:54.000Z | maps/Route40BattleTowerGate.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 13 | 2020-01-11T17:00:40.000Z | 2021-09-14T01:27:38.000Z | maps/Route40BattleTowerGate.asm | Dev727/ancientplatinum | 8b212a1728cc32a95743e1538b9eaa0827d013a7 | [
"blessing"
] | 22 | 2020-05-28T17:31:38.000Z | 2022-03-07T20:49:35.000Z | object_const_def ; object_event constants
const ROUTE40BATTLETOWERGATE_ROCKER
const ROUTE40BATTLETOWERGATE_TWIN
Route40BattleTowerGate_MapScripts:
db 0 ; scene scripts
db 1 ; callbacks
callback MAPCALLBACK_OBJECTS, .ShowSailor
.ShowSailor:
clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
return
Route40BattleTowerGateRockerScript:
jumptextfaceplayer Route40BattleTowerGateRockerText
Route40BattleTowerGateTwinScript:
jumptextfaceplayer Route40BattleTowerGateTwinText
UnknownText_0x9f66f:
text "Did you come to"
line "see the BATTLE"
cont "TOWER too?"
para "But I guess you"
line "can't go in yet."
done
UnknownText_0x9f6ba:
text "BATTLE TOWER has"
line "opened."
para "I want to go, but"
line "I haven't thought"
para "up a cool line for"
line "when I win."
done
Route40BattleTowerGateRockerText:
text "Are you going to"
line "the BATTLE TOWER?"
para "This is a secret,"
line "but if you win a"
para "whole lot, you can"
line "win special gifts."
done
UnknownText_0x9f783:
text "I'm going to train"
line "my #MON so I'll"
para "be all ready for"
line "the BATTLE TOWER."
done
Route40BattleTowerGateTwinText:
text "The levels of the"
line "#MON I want to"
para "use are all"
line "different."
para "I have to go train"
line "them now!"
done
Route40BattleTowerGate_MapEvents:
db 0, 0 ; filler
db 4 ; warp events
warp_event 4, 7, ROUTE_40, 1
warp_event 5, 7, ROUTE_40, 1
warp_event 4, 0, BATTLE_TOWER_OUTSIDE, 1
warp_event 5, 0, BATTLE_TOWER_OUTSIDE, 2
db 0 ; coord events
db 0 ; bg events
db 2 ; object events
object_event 3, 3, SPRITE_ROCKER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route40BattleTowerGateRockerScript, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
object_event 7, 5, SPRITE_TWIN, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route40BattleTowerGateTwinScript, -1
| 22.149425 | 189 | 0.761806 |
fdf0dbd78cd94b21745dbcdd099533b28a328734 | 557 | asm | Assembly | oeis/005/A005055.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/005/A005055.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/005/A005055.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A005055: 7*5^n.
; 7,35,175,875,4375,21875,109375,546875,2734375,13671875,68359375,341796875,1708984375,8544921875,42724609375,213623046875,1068115234375,5340576171875,26702880859375,133514404296875,667572021484375,3337860107421875,16689300537109375,83446502685546875,417232513427734375,2086162567138671875,10430812835693359375,52154064178466796875,260770320892333984375,1303851604461669921875,6519258022308349609375,32596290111541748046875,162981450557708740234375,814907252788543701171875,4074536263942718505859375
mov $1,5
pow $1,$0
mul $1,7
mov $0,$1
| 69.625 | 499 | 0.885099 |
55143d730ba23495846c0873ea8385c53c9f5bb8 | 1,029 | asm | Assembly | data/tilesets/bookshelf_tile_ids.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | 1 | 2022-02-15T00:19:44.000Z | 2022-02-15T00:19:44.000Z | data/tilesets/bookshelf_tile_ids.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | data/tilesets/bookshelf_tile_ids.asm | opiter09/ASM-Machina | 75d8e457b3e82cc7a99b8e70ada643ab02863ada | [
"CC0-1.0"
] | null | null | null | bookshelf_tile: MACRO
db \1, \2
db_tx_pre \3
ENDM
BookshelfTileIDs:
; tileset id, bookshelf tile id, text id
bookshelf_tile PLATEAU, $30, IndigoPlateauStatues
bookshelf_tile HOUSE, $3D, TownMapText
bookshelf_tile HOUSE, $1E, BookOrSculptureText
bookshelf_tile MANSION, $32, BookOrSculptureText
bookshelf_tile REDS_HOUSE_1, $32, BookOrSculptureText
bookshelf_tile LAB, $28, BookOrSculptureText
bookshelf_tile LOBBY, $16, ElevatorText
bookshelf_tile GYM, $1D, BookOrSculptureText
bookshelf_tile DOJO, $1D, BookOrSculptureText
bookshelf_tile GATE, $22, BookOrSculptureText
bookshelf_tile MART, $54, PokemonStuffText
bookshelf_tile MART, $55, PokemonStuffText
bookshelf_tile POKECENTER, $54, PokemonStuffText
bookshelf_tile POKECENTER, $55, PokemonStuffText
bookshelf_tile LOBBY, $50, PokemonStuffText
bookshelf_tile LOBBY, $52, PokemonStuffText
bookshelf_tile SHIP, $36, BookOrSculptureText
db -1 ; end
| 39.576923 | 55 | 0.727891 |
d2dbac8f84a101c32e62bacc28e9aa9e1933ffa6 | 891 | asm | Assembly | oeis/267/A267879.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/267/A267879.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/267/A267879.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A267879: Binary representation of the middle column of the "Rule 233" elementary cellular automaton starting with a single ON (black) cell.
; Submitted by Christian Krause
; 1,10,101,1010,10101,101011,1010111,10101111,101011111,1010111111,10101111111,101011111111,1010111111111,10101111111111,101011111111111,1010111111111111,10101111111111111,101011111111111111,1010111111111111111,10101111111111111111,101011111111111111111,1010111111111111111111,10101111111111111111111,101011111111111111111111,1010111111111111111111111,10101111111111111111111111,101011111111111111111111111,1010111111111111111111111111,10101111111111111111111111111,101011111111111111111111111111
seq $0,267880 ; Decimal representation of the middle column of the "Rule 233" elementary cellular automaton starting with a single ON (black) cell.
seq $0,204093 ; Numbers whose set of base-10 digits is {0,6}.
div $0,6
| 111.375 | 496 | 0.863075 |
0b34b8672225128e686563fa94ab8b39b06141c3 | 306 | asm | Assembly | programs/oeis/211/A211665.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/211/A211665.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/211/A211665.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A211665: Minimal number of iterations of log_10 applied to n until the result is < 1.
; 1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
trn $0,8
cmp $0,0
gcd $0,2
| 43.714286 | 189 | 0.575163 |
2359aae380eafa662e4c78048827ed2c658fbbee | 6,591 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1049.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1049.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i3-7100_9_0x84_notsx.log_21829_1049.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 %r15
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x2280, %r15
nop
nop
nop
nop
add %rdi, %rdi
mov $0x6162636465666768, %rsi
movq %rsi, (%r15)
nop
nop
nop
nop
nop
sub %rcx, %rcx
lea addresses_normal_ht+0x6280, %rax
sub %rcx, %rcx
movw $0x6162, (%rax)
nop
nop
cmp %rsi, %rsi
lea addresses_normal_ht+0x2280, %rdi
nop
nop
nop
cmp %r9, %r9
mov (%rdi), %cx
nop
nop
nop
nop
nop
and %r15, %r15
lea addresses_normal_ht+0xd56c, %rcx
nop
nop
nop
nop
sub $62726, %r15
movups (%rcx), %xmm7
vpextrq $0, %xmm7, %rdi
nop
cmp %rdi, %rdi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r15
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r9
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
// REPMOV
lea addresses_WT+0x6a80, %rsi
lea addresses_WC+0x1e420, %rdi
nop
nop
nop
nop
and %rdx, %rdx
mov $48, %rcx
rep movsq
nop
nop
nop
nop
nop
sub $13904, %rsi
// Store
lea addresses_D+0x1b4fc, %rbx
nop
xor $65279, %rdx
mov $0x5152535455565758, %rdi
movq %rdi, %xmm6
vmovups %ymm6, (%rbx)
xor %rdi, %rdi
// Store
lea addresses_D+0x5b80, %rax
nop
nop
nop
nop
inc %rdx
mov $0x5152535455565758, %rbx
movq %rbx, %xmm5
movups %xmm5, (%rax)
nop
nop
nop
nop
cmp %rbx, %rbx
// Store
lea addresses_D+0x1ba94, %rdx
sub %rax, %rax
mov $0x5152535455565758, %rbx
movq %rbx, %xmm1
movups %xmm1, (%rdx)
nop
nop
nop
nop
nop
sub $53669, %rax
// REPMOV
lea addresses_UC+0x1ac80, %rsi
lea addresses_UC+0x19b28, %rdi
clflush (%rsi)
nop
nop
cmp %r9, %r9
mov $24, %rcx
rep movsq
nop
nop
add $40813, %r9
// Store
lea addresses_PSE+0x12440, %rbx
nop
add $52112, %r10
mov $0x5152535455565758, %rdx
movq %rdx, %xmm1
vmovups %ymm1, (%rbx)
nop
nop
add %rbx, %rbx
// Faulty Load
lea addresses_WT+0x6a80, %rsi
nop
nop
nop
nop
add %rax, %rax
mov (%rsi), %di
lea oracles, %r9
and $0xff, %rdi
shlq $12, %rdi
mov (%r9,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r9
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_WT', 'same': False, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_WC', 'congruent': 3, 'same': False}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 32, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 8, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_D', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_UC', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC', 'congruent': 1, 'same': True}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 32, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_WT', 'same': True, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': True, 'size': 2, 'congruent': 9, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 16, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 34.150259 | 2,999 | 0.65635 |
00a60208821b107776a44d298a7db8b38c096611 | 328 | asm | Assembly | use_c_printf.asm | dev001hajipro/study_nasm | ffac80d3bf073990e5305e421d3fd091b1f819e9 | [
"MIT"
] | null | null | null | use_c_printf.asm | dev001hajipro/study_nasm | ffac80d3bf073990e5305e421d3fd091b1f819e9 | [
"MIT"
] | null | null | null | use_c_printf.asm | dev001hajipro/study_nasm | ffac80d3bf073990e5305e421d3fd091b1f819e9 | [
"MIT"
] | null | null | null | ;
; $ nasm -f elf64 pri.asm && gcc pri.o -o pri && ./pri
; PIC対応なのでprintfは以下のようにWRT ..pltを記述して呼び出す
; call printf WRT ..plt
;
extern printf
section .data
fmt: db "x=%d", 0x0A, 0
section .text
global main
main:
mov rdi, fmt
mov rsi, 198
xor rax, rax
call printf WRT ..plt
; sys_exit
mov rax, 60
mov rdi, 1
syscall
| 14.26087 | 54 | 0.655488 |
ed386819f35465080b098fb55c848976060eb5e2 | 784 | asm | Assembly | boot/bootv2.asm | bigpengry/EOS | a411e52af11cb33249352d4708920798ba2400fb | [
"MIT"
] | null | null | null | boot/bootv2.asm | bigpengry/EOS | a411e52af11cb33249352d4708920798ba2400fb | [
"MIT"
] | null | null | null | boot/bootv2.asm | bigpengry/EOS | a411e52af11cb33249352d4708920798ba2400fb | [
"MIT"
] | null | null | null | ;============= 建立引导扇区
org 0x7c00
BaseOfStack equ 0x7c00
BaseOfLoader equ 0x1000
OffsetOfLoader equ 0x00
RootDirSector equ 14
SectorNumOfRootDirstatus equ 19
SectorNumOfFAT1Start equ 1
SectorBalance equ 17
jmp short Label_Start
nop
BS_OEMName db 'MINEboot'
BPB_BytesPerSec dw 512
BPB_SecPerClus db 1
BPB_RsvdSecCnt dw 1
BPB_NumFATs db 2
BPB_RootEntCnt dw 224
BPB_TotSec16 dw 2880
BPB_Media db 0xf0
BPB_FATSz16 dw 9
BPB_SecPerTrk dw 18
BPB_NumHeads dw 2
BPB_hiddSec dd 0
BPB_TotSec32 dd 0
BS_DrvNum db 0
BS_Reserved1 db 0
BS_BootSig db 29h
BS_VolID dd 0
BS_VolLab db 'boot loader'
BS_FileSysType db 'FAT12 '
;============ read one sector from floppy
Func_ReadOneSector:
push bp
mov bp,sp
sub esp,2
mov byte [bp-2],cl
| 18.666667 | 41 | 0.728316 |
73071e76bcb8115bb22b1204ab75acc64764720d | 808 | asm | Assembly | 04/mult/mult.asm | romualdo97/controladores | 8634c44029bb1f0b1a372db32daa7345c034850f | [
"MIT"
] | 1 | 2018-11-04T22:18:39.000Z | 2018-11-04T22:18:39.000Z | 04/mult/mult.asm | romualdo97/controladores | 8634c44029bb1f0b1a372db32daa7345c034850f | [
"MIT"
] | null | null | null | 04/mult/mult.asm | romualdo97/controladores | 8634c44029bb1f0b1a372db32daa7345c034850f | [
"MIT"
] | null | null | null | // This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/04/Mult.asm
// Multiplies R0 and R1 and stores the result in R2.
// (R0, R1, R2 refer to RAM[0], RAM[1], and RAM[2], respectively.)
// Put your code here.
@i
M = 1
// default value for R2
@R2
M = 0
(LOOP)
// not condition for i <= R1 is i - R1 > 0
@R1 // A = R1
D = M // D = RAM[R1]
@i // A = i
D = M - D // D = i - RAM[R1]
@END // A = END
D; JGT // if (i - R1 > 0) goto END
// code block 1
// add R0 to R2
@R0 // A = R0
D = M // D = RAM[R0]
@R2 // A = R2
M = M + D // RAM[R2] = RAM[R2] + RAM[R0]
// increment 'i'
@i // A = i
M = M + 1 // RAM[i] = RAM[i] + 1
@LOOP
0; JMP
(END)
// code block 2
@END
0; JMP | 17.191489 | 66 | 0.528465 |
ba6b15134252a6b615e1941f90ff773bcff2dfe1 | 509 | asm | Assembly | programs/oeis/165/A165983.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/165/A165983.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/165/A165983.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A165983: Period 16: repeat 1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4.
; 1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4,1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4,1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4,1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4,1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4,1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4,1,1,1,2,1,1,1,2,1
sub $3,$0
sub $3,1
mov $0,$3
mov $1,$3
cal $0,3415 ; a(n) = n' = arithmetic derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m).
sub $1,1
mov $2,$1
mov $1,4
mov $4,$0
dif $4,2
add $4,1
mul $2,$4
add $2,1
gcd $1,$2
| 28.277778 | 211 | 0.514735 |
672d9f3a7b82d982d88ce45f9b7cbc7be9c2d7bc | 2,360 | asm | Assembly | programs/oeis/239/A239186.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/239/A239186.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/239/A239186.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A239186: Sum of the largest two parts in the partitions of 4n into 4 parts with smallest part equal to 1.
; 2,23,93,243,492,878,1432,2165,3123,4337,5810,7596,9726,12195,15065,18367,22088,26298,31028,36257,42063,48477,55470,63128,71482,80495,90261,100811,112100,124230,137232,151053,165803,181513,198122,215748,234422,254075,274833,296727,319680,343826,369196,395705,423495,452597,482918,514608,547698,582087,617933,655267,693980,734238,776072,819365,864291,910881,959010,1008860,1060462,1113683,1168713,1225583,1284152,1344618,1407012,1471185,1537343,1605517,1675550,1747656,1821866,1898015,1976325,2056827,2139348,2224118,2311168,2400317,2491803,2585657,2681690,2780148,2881062,2984235,3089921,3198151,3308720,3421890,3537692,3655913,3776823,3900453,4026582,4155488,4287202,4421495,4558653,4698707,4841420,4987086,5135736,5287125,5441555,5599057,5759378,5922828,6089438,6258947,6431673,6607647,6786600,6968858,7154452,7343105,7535151,7730621,7929230,8131320,8336922,8545743,8758133,8974123,9193412,9416358,9642992,9873005,10106763,10344297,10585290,10830116,11078806,11331035,11587185,11847287,12111008,12378738,12650508,12925977,13205543,13489237,13776710,14068368,14364242,14663975,14967981,15276291,15588540,15905150,16226152,16551173,16880643,17214593,17552642,17895228,18242382,18593715,18949673,19310287,19675160,20044746,20419076,20797745,21181215,21569517,21962238,22359848,22762378,23169407,23581413,23998427,24420020,24846678,25278432,25714845,26156411,26603161,27054650,27511380,27973382,28440203,28912353,29389863,29872272,30360098,30853372,31351625,31855383,32364677,32879030,33398976,33924546,34455255,34991645,35533747,36081068,36634158,37193048,37757237,38327283,38903217,39484530,40071788,40665022,41263715,41868441,42479231,43095560,43718010,44346612,44980833,45621263,46267933,46920302,47578968,48243962,48914735,49591893,50275467,50964900,51660806,52363216,53071565,53786475,54507977,55235498,55969668,56710518,57457467,58211153,58971607,59738240,60511698,61292012,62078585,62872071,63672501,64479270,65293040,66113842,66941063,67775373,68616803,69464732,70319838,71182152,72051045,72927203,73810657
mov $4,$0
mul $0,2
cal $0,239195 ; Sum of the next to smallest parts in the partitions of 4n into 4 parts with smallest part = 1.
sub $0,2
mov $1,$0
add $1,3
mov $2,$4
mul $2,3
add $1,$2
mov $3,$4
mul $3,$4
mov $2,$3
mul $2,2
add $1,$2
| 131.111111 | 2,014 | 0.844915 |
dd71cb4589f5a225a61788e177bb572b8a07e812 | 823 | asm | Assembly | oeis/290/A290075.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/290/A290075.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/290/A290075.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A290075: Number of monomials in c(n) where c(1) = x, c(2) = y, c(n+2) = c(n+1) + c(n)^2.
; Submitted by Christian Krause
; 1,1,2,3,5,8,14,24,44,80,152,288,560,1088,2144,4224,8384,16640,33152,66048,131840,263168,525824,1050624,2100224,4198400,8394752,16785408,33566720,67125248,134242304,268468224,536920064,1073807360,2147581952,4295098368,8590131200,17180131328,34360131584,68720001024,137439739904,274878955520,549757386752,1099513724928,2199026401280,4398050705408,8796099313664,17592194433024,35184384671744,70368760954880,140737513521152,281475010265088,562950003752960,1125899973951488,2251799914348544
trn $0,1
mov $3,$0
seq $0,209726 ; 1/4 the number of (n+1) X 8 0..2 arrays with every 2 X 2 subblock having distinct clockwise edge differences.
mov $2,2
sub $3,1
pow $2,$3
add $0,$2
sub $0,16
div $0,2
add $0,1
| 54.866667 | 487 | 0.782503 |
cb8c16ebf37c90feda8109cd484e4729b94ac38c | 115 | asm | Assembly | libpal/intel_64bit_systemv_nasm/write_cr0.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 26 | 2020-01-06T23:53:17.000Z | 2022-02-01T08:58:21.000Z | libpal/intel_64bit_systemv_nasm/write_cr0.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 30 | 2019-11-13T00:55:22.000Z | 2022-01-06T08:09:35.000Z | libpal/intel_64bit_systemv_nasm/write_cr0.asm | mars-research/pal | 5977394cda8750ff5dcb89c2bf193ec1ef4cd137 | [
"MIT"
] | 14 | 2019-11-15T16:56:22.000Z | 2021-12-22T10:14:17.000Z | bits 64
default rel
section .text
global pal_execute_write_cr0
pal_execute_write_cr0 :
mov cr0, rdi
ret
| 11.5 | 29 | 0.756522 |
c355c6bb4a099ee1da780af0c9a85ca222be0bb0 | 230 | asm | Assembly | solutions/50 - Cubical Communication/size-7_speed-73.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 45 | 2018-09-05T04:56:59.000Z | 2021-11-22T08:57:26.000Z | solutions/50 - Cubical Communication/size-7_speed-73.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 36 | 2018-09-01T11:34:26.000Z | 2021-05-19T23:20:49.000Z | solutions/50 - Cubical Communication/size-7_speed-73.asm | michaelgundlach/7billionhumans | 02c6f3963364362c95cb516cbc6ef1efc073bb2e | [
"MIT"
] | 36 | 2018-09-01T07:44:19.000Z | 2021-09-10T19:07:35.000Z | -- 7 Billion Humans (2231) --
-- 50: Cubical Communication --
-- Author: michaelgundlach
-- Size: 7
-- Speed: 73
mem2 = calc sw x 7
a:
mem2 = calc mem2 - 1
if mem2 < 5 and
mem2 >= 0:
takefrom s
giveto se
step w
endif
jump a
| 12.777778 | 31 | 0.634783 |
a35f901e617377eeb7b7ec2befe44bee9a5b03ab | 719 | asm | Assembly | oeis/260/A260619.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/260/A260619.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/260/A260619.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A260619: Arithmetic derivative of hyperfactorial(n).
; 0,0,4,216,165888,604800000,48372940800000,43156963184025600000,1392410948543163924480000000,668916177911197542484208831692800000,8199617664717905359483850194944000000000000000,2401010998878767104110478543683244630474752000000000000000,30190283035522586999225732358755041384304725030537789440000000000000000,9310137650478449019629748402758691778593164943174587300377810377375744000000000000000,120080899155983530830823765234297043949523358453535047509351057007724582409725762600960000000000000000
seq $0,2109 ; Hyperfactorials: Product_{k = 1..n} k^k.
seq $0,3415 ; a(n) = n' = arithmetic derivative of n: a(0) = a(1) = 0, a(prime) = 1, a(mn) = m*a(n) + n*a(m).
| 119.833333 | 497 | 0.856745 |
edcd5585a1032b4c03580c600242a6d7c1a42581 | 2,401 | asm | Assembly | loader_load.asm | defame-demogroup/street_gang_loader | aa8d6a779d3f89e711c7db1812b1b8b6304d9f3f | [
"MIT"
] | null | null | null | loader_load.asm | defame-demogroup/street_gang_loader | aa8d6a779d3f89e711c7db1812b1b8b6304d9f3f | [
"MIT"
] | null | null | null | loader_load.asm | defame-demogroup/street_gang_loader | aa8d6a779d3f89e711c7db1812b1b8b6304d9f3f | [
"MIT"
] | null | null | null | /*
example usage - loading multiple parts
seems like the y register is preserved between calls to load
ce80 20 00 cc jsr $cc00
ce83 a2 46 ldx #$46
ce85 a0 30 ldy #$30
ce87 20 00 cf jsr $cf00
ce8a c8 iny
ce8b c0 34 cpy #$34
ce8d d0 f8 bne $ce87
ce8f a9 40 lda #$40
ce91 8d f9 ff sta $fff9
ce94 a9 f9 lda #$f9
ce96 8d fa ff sta $fffa
ce99 a9 ff lda #$ff
ce9b 8d fb ff sta $fffb
ce9e 4c 42 41 jmp $4142
*/
load:
lda $dd00
and #$0f
sta l_cfce + 1
eor #$10
sta l_cfbf + 1
eor #$30
sta l_cf6a + 1
eor #$b0
sta l_cf95 + 1
eor #$50
sta l_cfa4 + 1
sta l_cfe8 + 1
lda #$02
jsr l_cf63
jsr l_cfdc
jsr l_cf83
bit $fe
jsr l_cf83
bit $ff
ldy #$00
l_cf33:
jsr l_cf83
cmp #$ac
bne l_cf4f
jsr l_cf83
cmp #$ac
beq l_cf4f
cmp #$ff
beq l_cf59
cmp #$f7
beq l_cf5a
jsr l_cfdc
jmp l_cf33
l_cf4f:
sta ($fe),y
iny
bne l_cf56
inc $ff
l_cf56:
jmp l_cf33
l_cf59:
clc
l_cf5a:
ldx l_cff9
ldy l_cffa
lda #$00
rts
l_cf63:
pha
stx l_cff9
sty l_cffa
l_cf6a:
lda #$27
sta $dd00
jsr l_cfdc
pla
jsr l_cfb0
lda l_cff9
jsr l_cfb0
lda l_cffa
jsr l_cfb0
rts
l_cf83:
jsr l_cf95
jsr l_cf95
jsr l_cf95
jsr l_cf95
jsr l_cf94
lda $fd
l_cf94:
rts
l_cf95:
ldx #$97
lda $dd00
stx $dd00
asl
ror $fd
pha
pla
pha
pla
l_cfa4:
ldx #$c7
lda $dd00
stx $dd00
asl
ror $fd
rts
l_cfb0:
sta $fd
jsr l_cfbf
jsr l_cfbf
jsr l_cfbf
jsr l_cfbf
rts
l_cfbf:
lda #$17
lsr $fd
bcc l_cfc7
ora #$20
l_cfc7:
sta $dd00
nop
nop
nop
nop
l_cfce:
lda #$07
lsr $fd
bcc l_cfd6
ora #$20
l_cfd6:
sta $dd00
nop
nop
rts
l_cfdc:
ldx #$32
l_cfde:
dex
bne l_cfde
l_cfe1:
lda $dd00
and #$40
beq l_cfe1
l_cfe8:
lda #$c7
sta $dd00
lda #$fe
sta l_cffb
ldx #$05
l_cff4:
dex
bne l_cff4
rts
/*
cff8 05 2d ora $2d
cffa 30 fe bmi $cffa
cffc 31 30 and ($30),y
cffe fe 00 00 inc $0000,x
*/
l_cff8: .byte $05
l_cff9: .byte $2d
l_cffa: .byte $30
l_cffb: .byte $fe
l_cffc: .byte $31
l_cffd: .byte $30
l_cffe: .byte $fe
l_cfff: .byte $00
| 14.040936 | 60 | 0.541025 |
6d2d4f53ad864ac089c41fb995727d5c050fdb0a | 393 | asm | Assembly | oeis/049/A049510.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/049/A049510.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/049/A049510.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A049510: Numbers k such that prime(k) == 9 (mod 10).
; Submitted by Christian Krause
; 8,10,17,22,24,29,34,35,41,46,50,52,57,70,72,75,77,80,81,85,87,92,95,97,104,109,114,120,127,128,131,136,140,145,146,149,157,158,169,171,175,176,180,186,189,201,204,205,207,209,215,222,223,226,228,232,237,239
seq $0,30433 ; Primes of form 10*k + 9.
seq $0,230980 ; Number of primes <= n, starting at n=0.
| 56.142857 | 208 | 0.692112 |
f3f6eb88d583c52552b9deb937130366d005e8a4 | 6,987 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca_notsx.log_21829_1162.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_1162.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_1162.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x14aad, %r14
nop
sub $44837, %rbx
movw $0x6162, (%r14)
nop
nop
nop
cmp $36478, %rdx
lea addresses_UC_ht+0x4ffd, %rcx
nop
nop
xor %r14, %r14
vmovups (%rcx), %ymm4
vextracti128 $0, %ymm4, %xmm4
vpextrq $1, %xmm4, %rsi
nop
nop
sub %rcx, %rcx
lea addresses_A_ht+0x154fd, %rsi
lea addresses_normal_ht+0x1db77, %rdi
inc %r13
mov $26, %rcx
rep movsq
dec %rdx
lea addresses_normal_ht+0x30fd, %r13
nop
nop
nop
xor %rcx, %rcx
mov (%r13), %rbx
nop
nop
dec %rdx
lea addresses_WC_ht+0x1ccbd, %rdx
nop
nop
nop
and %rbx, %rbx
movups (%rdx), %xmm5
vpextrq $1, %xmm5, %r10
nop
nop
nop
add $16401, %r10
lea addresses_UC_ht+0x89fd, %r14
nop
nop
sub $25248, %r13
mov (%r14), %ecx
nop
nop
nop
nop
nop
inc %rsi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r14
push %r9
push %rcx
push %rdi
push %rsi
// Store
lea addresses_UC+0xd495, %r13
nop
nop
nop
cmp %r10, %r10
mov $0x5152535455565758, %r14
movq %r14, %xmm7
movups %xmm7, (%r13)
cmp %r14, %r14
// REPMOV
lea addresses_normal+0x50fd, %rsi
lea addresses_A+0x1aafd, %rdi
nop
nop
nop
nop
nop
dec %r13
mov $58, %rcx
rep movsw
nop
nop
nop
nop
nop
and %r11, %r11
// Store
lea addresses_WT+0x14ccd, %r10
nop
nop
nop
nop
xor $47634, %r11
movl $0x51525354, (%r10)
nop
nop
add %r11, %r11
// Load
lea addresses_WT+0x17bd, %r11
xor $57147, %r13
movups (%r11), %xmm5
vpextrq $0, %xmm5, %rcx
nop
nop
nop
nop
add $58377, %r9
// Store
lea addresses_UC+0x89fd, %r14
nop
nop
and $49838, %rdi
movl $0x51525354, (%r14)
nop
inc %r9
// Store
lea addresses_UC+0x3b5, %rdi
nop
nop
nop
and %rsi, %rsi
movb $0x51, (%rdi)
nop
nop
nop
nop
nop
inc %r11
// Faulty Load
lea addresses_PSE+0x129fd, %r14
nop
nop
nop
nop
inc %r9
vmovups (%r14), %ymm4
vextracti128 $1, %ymm4, %xmm4
vpextrq $0, %xmm4, %r10
lea oracles, %rdi
and $0xff, %r10
shlq $12, %r10
mov (%rdi,%r10,1), %r10
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r14
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 1}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_normal'}, 'dst': {'same': False, 'congruent': 8, 'type': 'addresses_A'}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 4}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WT', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 11}}
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_UC', 'NT': False, 'AVXalign': False, 'size': 1, 'congruent': 3}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'type': 'addresses_PSE', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'same': False, 'type': 'addresses_normal_ht', 'NT': True, 'AVXalign': False, 'size': 2, 'congruent': 3}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 8}}
{'OP': 'REPM', 'src': {'same': False, 'congruent': 8, 'type': 'addresses_A_ht'}, 'dst': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_normal_ht', 'NT': False, 'AVXalign': False, 'size': 8, 'congruent': 5}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_WC_ht', 'NT': False, 'AVXalign': False, 'size': 16, 'congruent': 6}}
{'OP': 'LOAD', 'src': {'same': False, 'type': 'addresses_UC_ht', 'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 9}}
{'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
*/
| 33.591346 | 2,999 | 0.654787 |
99c0f2459953d01f409e2e5cedf3a6404af554da | 44 | asm | Assembly | assembler/tests/data/word_directive.asm | dalloriam/slang | 1f96ecfe69c8ba8084c8044bd479637503961988 | [
"MIT"
] | null | null | null | assembler/tests/data/word_directive.asm | dalloriam/slang | 1f96ecfe69c8ba8084c8044bd479637503961988 | [
"MIT"
] | 33 | 2020-05-16T20:31:40.000Z | 2020-07-05T02:18:12.000Z | assembler/tests/data/word_directive.asm | dalloriam/slang | 1f96ecfe69c8ba8084c8044bd479637503961988 | [
"MIT"
] | null | null | null | .data
hello: .word 42
world: .word 18
.text
| 8.8 | 15 | 0.681818 |
b88edcc6a73f9a186222c010ca69cf3c7c9a8a7f | 1,391 | asm | Assembly | C/LoDosLib/yield.asm | p-k-p/SysToolsLib | 827be2799e541410cb5c11358cd4ce6859e171ad | [
"Apache-2.0"
] | 232 | 2016-04-27T21:56:11.000Z | 2022-03-29T09:02:15.000Z | C/LoDosLib/yield.asm | p-k-p/SysToolsLib | 827be2799e541410cb5c11358cd4ce6859e171ad | [
"Apache-2.0"
] | 31 | 2016-05-09T09:05:36.000Z | 2022-03-29T19:17:45.000Z | C/LoDosLib/yield.asm | p-k-p/SysToolsLib | 827be2799e541410cb5c11358cd4ce6859e171ad | [
"Apache-2.0"
] | 94 | 2016-06-01T18:10:39.000Z | 2022-03-26T10:44:57.000Z | page ,132
;*****************************************************************************;
; ;
; File Name: yield.asm ;
; ;
; Description: MS-DOS idle signalling ;
; ;
; Notes: ;
; ;
; History: ;
; 1997/01/10 JFL Created this file. ;
; ;
; (c) Copyright 1997-2017 Hewlett Packard Enterprise Development LP ;
; Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 ;
;*****************************************************************************;
.MODEL small, C
.CODE
;-----------------------------------------------------------------------------;
; ;
; Function: ReleaseTimeSlice ;
; ;
; Description: Release the current VM time slice ;
; ;
; Parameters: None ;
; ;
; Returns: None ;
; ;
; Notes: ;
; ;
; Regs altered: AX. ;
; ;
; History: ;
; ;
; 1997/01/10 JFL Created this routine ;
; ;
;-----------------------------------------------------------------------------;
ReleaseTimeSlice proc public
mov ax, 1680H
int 2Fh
ret
ReleaseTimeSlice endp
END
| 27.82 | 79 | 0.309849 |
882944f301bff860c835dc2660ad56c66f7c3d32 | 16,027 | asm | Assembly | boot.asm | pjimenezmateo/curriculum-bootloader | 90545a72dea675ef617a2a1db9f43e9fe0bdd587 | [
"CC-BY-3.0"
] | 544 | 2019-03-09T03:59:17.000Z | 2021-06-12T21:49:20.000Z | boot.asm | pablojimenezmateo/curriculum-bootloader | 90545a72dea675ef617a2a1db9f43e9fe0bdd587 | [
"CC-BY-3.0"
] | 4 | 2019-03-09T04:41:37.000Z | 2019-03-12T19:42:38.000Z | boot.asm | pablojimenezmateo/curriculum-bootloader | 90545a72dea675ef617a2a1db9f43e9fe0bdd587 | [
"CC-BY-3.0"
] | 30 | 2019-03-09T04:18:54.000Z | 2021-02-23T17:02:16.000Z | bits 16
boot:
; This is a BPB, so that the BIOS does not overwrite our code
; https://stackoverflow.com/questions/47277702/custom-bootloader-booted-via-usb-drive-produces-incorrect-output-on-some-compute
jmp start
TIMES 3-($-$$) DB 0x90 ; Support 2 or 3 byte encoded JMPs before BPB.
; Dos 4.0 EBPB 1.44MB floppy
OEMname: db "mkfs.fat" ; mkfs.fat is what OEMname mkdosfs uses
bytesPerSector: dw 512
sectPerCluster: db 1
reservedSectors: dw 1
numFAT: db 2
numRootDirEntries: dw 224
numSectors: dw 2880
mediaType: db 0xf0
numFATsectors: dw 9
sectorsPerTrack: dw 18
numHeads: dw 2
numHiddenSectors: dd 0
numSectorsHuge: dd 0
driveNum: db 0
reserved: db 0
signature: db 0x29
volumeID: dd 0x2d7e5a1a
volumeLabel: db "NO NAME "
fileSysType: db "FAT12 "
; This is used to offset all memory addresses by 8 bytes, or the size of the PDF magic numbers
dw 0xffff, 0xffff, 0xffff, 0xffff
start:
; In real hardware the BIOS puts the address of the booting drive on the dl register
; so I am writing that addres into memory at [bootdrv]
mov [bootdrv], dl
; Setting the stack
mov ax, 07C0h
add ax, 288
mov ss, ax ; ss = stack space
mov sp, 4096 ; sp = stack pointer
mov ax, 07C0h
mov ds, ax ; ds = data segment
mov ah, 00d ; Set video mode to graphical
mov al, 13d ; 13h - graphical mode, 40x25. 256 colors.;320x200 pixels. 1 page.
int 10h ; Call
; The function print_text accepts a message and position and writes it to screen in
; mode 13h
push 9 ; column
push 5 ; row
push 20 ; msg length
push msg1 ; msg to write
call print_text
push 11 ; column
push 6 ; row
push 17 ; msg length
push msg2 ; msg to write
call print_text
; draw_border is in charge of calling draw_rock in a loop to draw all the cave border
; no parameters
call draw_border
; You only have 512 bytes of space on the first stage, and my napking maths told me that
; the sprites were too much. So on the first stage I write the text and draw the border
; (or else I would not have enough space on second stage), and then jump to second stagr
; https://stackoverflow.com/questions/2065370/how-to-load-second-stage-boot-loader-from-first-stage
; Restore the direction of the booting drive
mov dl, [bootdrv]
; I need this label in case the boot fails, in real hardware the BIOS puts the drive address on dl,
; but if you are using qemu dl must be 0x80 for it to boot. So I try to boot normally first and if it
; fails I retry for qemu
jump_to_stage2:
mov ah, 0x02
mov al, 1 ; Number of sectors to read
mov ch, 0 ; Cylinder number
mov dh, 0 ; Head number
mov cl, 2 ; Starting sector number. 2 because 1 was already loaded.
mov bx, stage2 ; Where the stage 2 code is
int 0x13
mov dl, 0x80
jc jump_to_stage2 ; If error loading, set dl to 0x80 and try again, this should make it work in qemu
jmp stage2
; Stage 1 functions
; This function calls draw_rock on a loop in order to draw the whole border
draw_border:
; You will notice that I use xor a lot
; this is to set a register to 0
; is on byte less than mov and I need those bytes
xor cx, cx ; Draw horizontally
xor dx, dx ; Border index
; The inits set the initial parameters for each border
; di = Initial x position
; si = Initial y position
; ax = When to stop
; cx = Draw horizontally (0) or vertically (1)
.top_border_init:
xor si, si
xor di, di
mov ax, 320
jmp .draw
.bottom_left_border_init:
mov si, 176
xor di, di
mov ax, 128
jmp .draw
.bottom_right_border_init:
mov di, 192
mov ax, 304
jmp .draw
.right_border_init:
xor si, si
xor di, di
mov ax, 192
mov cx, 1 ; draw vertically
jmp .draw
.left_border_init:
xor si, si
mov di, 304
.draw:
push si ; Initial y position to draw the rock
push di ; Initial x position to draw the rock
call draw_rock_tile
cmp cx, 0 ; If we are drawing horizontally
jne .vertical_index_update
; Update the horizontal index (di)
add di, 16
cmp di, ax
je .check_finish
jmp .draw
; Update the vertical index (si)
.vertical_index_update:
add si, 16
cmp si, ax
je .check_finish
jmp .draw
; If we go here, we have finished a border, increment the border index
; and continue
.check_finish:
inc dx ; we have finished a border
cmp dx, 1
je .bottom_left_border_init
cmp dx, 2
je .bottom_right_border_init
cmp dx, 3
je .right_border_init
cmp dx, 4
je .left_border_init
jmp .done
.done:
ret
; This function draws a rock, the coordinates are the top-left corner
;
; The rock sprite is encoded as following
;
; - The tile is 16x16px
; - Each 1 represents a brown pixel
; - Each 0 represents a black pixel (or no draw since the background is black)
;
; So we iterate through every bit on [rock] to do that. Each byte is a row.
;
; Parameters:
;
; - [bp + 4] x coordinate
; - [bp + 6] y coordinate
;
draw_rock_tile:
push bp ; Save old base pointer
mov bp, sp ; Use the current stack pointer as new base pointer
pusha
mov cx, [bp + 4] ; x coordinate
mov dx, [bp + 6] ; y coordinate
; Initializing to 0, saves one byte from using mov
xor si, si ; Index of the bit we are checking (width)
xor di, di ; How many bytes have we read
.row: ; Main loop, this will iterate over every bit of [rock]
cmp si, 16 ; Check if we have to move to the next byte/row
jne .same_row ; We are still on the same row
; This executes if we move to the next row
xor si, si ; Set the index of the bit to 0
cmp di, 32 ; If we have read all the bytes (finished with the tile)
je .done
add di, 2 ; Next row/byte
inc dx
mov cx, [bp + 4] ; Restore the x coordinate
.same_row:
mov ax, [rock + di] ; Get the Byte
bt ax, si ; Store the bit in position si on the carry flag (CF)
jnc .pass ; jnc = jump if no carry, a.k.a. if it is a 0
; It is a 1, draw
mov ah, 0Ch
xor bh, bh ; Page number 0
mov al, 06h ; Color brown
int 10h
.pass: ; Increment the counters
inc si
inc cx
jmp .row
.done: ; Restore the stack and return
popa
mov sp, bp
pop bp
ret 4
; Given a row, a column, a text and a length draws it to screen
;
; - [bp + 4] message direction
; - [bp + 6] length of string
; - [bp + 8] row to put the string
; - [bp + 10] column to put the string
;
print_text:
push bp ; Save old base pointer
mov bp, sp ; Use the current stack pointer as new base pointer
pusha
mov ax, 7c0h ; Beginning of the code
mov es, ax
mov cx, [bp + 6] ; Length of string
mov dh, [bp + 8] ; Row to put string
mov dl, [bp + 10] ; Column to put string
mov bp, [bp + 4]
mov ah, 13h ; Function 13 - write string
mov al, 01h ; Attrib in bl, move cursor
mov bl, 0Fh ; Color white
int 10h
; Restore the stack and return
popa
mov sp, bp
pop bp
ret 8
; Store the drive addres given by the BIOS
bootdrv: db 0
; Data
msg1: db "IT'S DANGEROUS TO GO"
msg2: db "ALONE! TAKE ME."
rock: dw 0xC3B7, 0xDFCF, 0xFFCF, 0x7FCF, 0x7FE6, 0xFFEF, 0xBFEF, 0xBFEF, 0x7FE7, 0xFFEF, 0x7DE7, 0x3C9B, 0x7DFD, 0xBC7D, 0xFCFF, 0x2CFC ; 32 bytes
; The first sector MUST be 512 bytes and the last 2 bytes have to be 0xAA55 for it
; to be bootable
times 510 - ($ - $$) db 0 ; Padding with 0 at the end
dw 0xAA55 ; PC boot signature
stage2:
; So apparently I was unable to pass the memory address of the current sprite as an argument
; so I copy it to a new memory location and execute from there
; Copy the current sprite
mov cx, 32 ; How many bytes
lea di, [current_sprite] ; To where
lea si, [wiseman_left] ; From where
rep movsb
push 32 ; How many bytes the sprite has
push 06h ; First color, brown
push 04h ; Second color, red
push 90 ; y coordinate
push 152 ; x coordinate
call draw_sprite
; Copy the current sprite
mov cx, 32
lea di, [current_sprite]
lea si, [wiseman_right]
rep movsb
; Now, the trick that saved most bytes (and the project) is to reuse the values stored in the stack
; between sprites. So I reuse coordinates and sprite size. When the draw_sprite returns it DOES NOT
; pop all the arguments, only the x coordinate
push 160 ; x coordinate
call draw_sprite
; Copy the current sprite
mov cx, 32
lea di, [current_sprite]
lea si, [fire_left]
rep movsb
; We need to change the colors, therefore we need to pop them
pop si
pop si
pop si
; We draw the two left parts of the fire to reuse the stack
push 0Eh ; First color, yellow
push 0Ch ; Second color, light red
push 90 ; y coordinate
push 80 ; x coordinate
call draw_sprite
push 224 ; x coordinate
call draw_sprite
; Copy the current sprite
mov cx, 32
lea di, [current_sprite]
lea si, [fire_right]
rep movsb
; Same y, same colors
push 88 ; x coordinate
call draw_sprite
push 232 ; x coordinate
call draw_sprite
; Copy the current sprite
mov cx, 44 ; This one is 44 bytes instead of 32
lea di, [current_sprite]
lea si, [gef_left]
rep movsb
; Delete the arguments on the stack
pop si
pop si
pop si
pop si
push 44 ; How many bytes the sprite has
push 07h ; First color, gray
push 06h ; Second color, brown
push 120 ; y coordinate
push 152 ; x coordinate
call draw_sprite
; Copy the current sprite
mov cx, 44
lea di, [current_sprite]
lea si, [gef_right]
rep movsb
push 160 ; x coordinate
call draw_sprite
cli
hlt
; This function is in charge of drawing a sprite, the sprite MUST be 16 pixels wide
; but can be as high as necessary. Note that the coordinates are for the top-left corner
;
; The sprites are encoded as following:
;
; - Each sprite has a maximum of 4 colors
; - Each pixel is encoded in 2 bits
; - 00 is always black
; - 11 is always white
; - 01 is the first color
; - 10 is the second color
;
; Parameters:
;
; - [bp + 4] x coordinate
; - [bp + 6] y coordinate
; - [bp + 8] Second color
; - [bp + 10] First color
; - [bp + 12] How many bytes/rows the sprite has
; - [current_sprite] The sprite
;
draw_sprite:
push bp ; Save old base pointer
mov bp, sp ; Use the current stack pointer as new base pointer
pusha
mov cx, [bp + 4] ; x coordinate
mov dx, [bp + 6] ; y coordinate
; Initializing to 0, saves one byte from using mov
xor si, si ; Index of the bit we are checking (width)
xor di, di ; How many bytes we have checked
.row: ; Main loop, we get 2 bits at a time to check the color
cmp si, 16 ; Check if we have to move to the next byte/row
jne .same_row ; Same byte
; This executes if we move to the next row
xor si, si ; Start from 0
add di, 2 ; Next row/byte
cmp di, [bp + 12] ; If we have checked all bytes
je .done
; Increment byte and x coordinate
inc dx
mov cx, [bp + 4] ; x coordinate
.same_row:
xor bh, bh ; We will store the color index here
mov ax, [current_sprite + di] ; Get the current byte
bt ax, si ; First bit
jnc .next_bit ; If it is 1 increment bh by one
inc bh
.next_bit:
inc si
bt ax, si ; Second bit
jnc .end_bit ; If it is 1 increment bh by two
add bh, 2
.end_bit:
cmp bh, 0 ; If the color is 0 (black) we just don't draw anything
je .pass
mov ah, 0Ch ; Draw instruction
cmp bh, 1 ; Draw first color
je .first_color
cmp bh, 2 ; Draw second color
je .second_color
jmp .white ; Draw white
.first_color:
mov al, [bp + 10] ; Set the first color
jmp .draw
.second_color:
mov al, [bp + 8] ; Set the second color
jmp .draw
.white:
mov al, 0Fh ; Set white
jmp .draw
.draw:
xor bh, bh ; First page, funny note if you remove this instruction qemu will
; still execute but it won't work in real hardware
int 10h
.pass:
; Increment indexes and move on
inc si
inc cx
jmp .row
.done:
popa
mov sp, bp
pop bp
ret 2 ; Only pop the y
current_sprite: dw 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,0x0000, 0x0000, 0x0000, 0x0000 ; 32 bytes
fire_left: dw 0x2020, 0x8020, 0x8800, 0xA810, 0xA880, 0xA288, 0xA6A8, 0xAAA2, 0x9AA2, 0x66AA, 0x55AA, 0x7568, 0xFD68, 0xF5A0, 0x56A0, 0xAA00 ; 32 bytes
fire_right: dw 0x0808, 0x0802, 0x0022, 0x042A, 0x022A, 0x228A, 0x2A9A, 0x8AAA, 0x8AA6, 0xAA99, 0xAA55, 0x295D, 0x297F, 0x0A5F, 0x0A95, 0x00AA ; 32 bytes
wiseman_left: dw 0x5400, 0x7700, 0x4500, 0x4500, 0x5E00, 0xFF80, 0x0FA0, 0xFBE8, 0xFAE9, 0xFAA9, 0xE8A9, 0xA8A8, 0xA8A8, 0xAA20, 0xAA00, 0x9680 ; 32 bytes
wiseman_right: dw 0x0015, 0x00dd, 0x0051, 0x0051, 0x00b5, 0x02ff, 0x0af0, 0x2bef, 0x6baf, 0x6aaf, 0x6a2b, 0x2a2a, 0x2a2a, 0x08aa, 0x00aa, 0x0296 ; 32 bytes
gef_left: dw 0xAA00, 0xAA80, 0xAAA0, 0x88A8, 0x1818, 0x5158, 0x5558, 0x56A8, 0x5558, 0x5018, 0x5ED8, 0x5ED0, 0x9550, 0x65A0, 0x2A80, 0xBC00, 0x3F00, 0x33C0, 0x30F0, 0x3040, 0x0000, 0x2000 ; 44 bytes
gef_right: dw 0x00aa, 0x02aa, 0x0aaa, 0x2a22, 0x2424, 0x2545, 0x2555, 0x2a95, 0x2555, 0x2405, 0x27b5, 0x07b5, 0x0556, 0x0a59, 0x02a8, 0x003e, 0x00fc, 0x03cc, 0x0f0c, 0x010c, 0x0000, 0x0008 ; 44 bytes
; The PDF header needs to be at most, here in 03FA (it must start at 1018 bytes) a lots of bytes were sacrified for this to work | 30.296786 | 203 | 0.563611 |
8374dfecf2aa0e14dd4ee040ec16b68061500c01 | 7,274 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_971.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_971.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_st_/i7-7700_9_0x48.log_21829_971.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 %r8
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0xa85c, %rsi
lea addresses_UC_ht+0x97c, %rdi
cmp $4240, %r12
mov $125, %rcx
rep movsb
inc %rdx
lea addresses_WC_ht+0x4d8d, %r8
nop
nop
cmp %rbx, %rbx
mov $0x6162636465666768, %rsi
movq %rsi, %xmm1
vmovups %ymm1, (%r8)
nop
sub $4019, %rdx
lea addresses_WC_ht+0xaf7c, %rsi
lea addresses_UC_ht+0x148ec, %rdi
xor %r14, %r14
mov $70, %rcx
rep movsq
nop
nop
and $11556, %rdi
lea addresses_A_ht+0x1a988, %rsi
lea addresses_D_ht+0xe97c, %rdi
nop
add %r8, %r8
mov $0, %rcx
rep movsq
nop
nop
xor $35559, %rdi
lea addresses_D_ht+0x8ffc, %rsi
lea addresses_A_ht+0x1dafc, %rdi
nop
nop
nop
nop
nop
xor $53060, %rdx
mov $119, %rcx
rep movsb
add $8906, %r14
lea addresses_UC_ht+0x157fc, %rsi
nop
sub $4196, %r12
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
vmovups %ymm2, (%rsi)
nop
xor $33953, %r12
lea addresses_UC_ht+0x1ef90, %rsi
nop
nop
nop
nop
inc %r12
movups (%rsi), %xmm0
vpextrq $0, %xmm0, %rdi
nop
nop
add $22370, %rsi
lea addresses_A_ht+0x529c, %r12
cmp $42916, %r14
movb $0x61, (%r12)
nop
sub $57240, %rbx
lea addresses_WC_ht+0x14d7c, %rsi
lea addresses_D_ht+0x106d0, %rdi
add %r14, %r14
mov $25, %rcx
rep movsb
nop
nop
cmp %rbx, %rbx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r8
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r14
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdx
// Store
mov $0x1e2ed0000000097c, %r9
nop
nop
add %r14, %r14
mov $0x5152535455565758, %r15
movq %r15, %xmm3
vmovups %ymm3, (%r9)
nop
add %rbp, %rbp
// Store
lea addresses_RW+0x1172c, %r15
nop
add $25247, %rbp
mov $0x5152535455565758, %rcx
movq %rcx, (%r15)
sub $31211, %rdx
// Store
mov $0x29c, %r15
nop
nop
nop
add $3664, %r8
movb $0x51, (%r15)
nop
nop
nop
sub %rdx, %rdx
// Store
lea addresses_A+0x2820, %rbp
nop
dec %rcx
mov $0x5152535455565758, %r9
movq %r9, %xmm7
vmovups %ymm7, (%rbp)
nop
nop
nop
nop
sub %rbp, %rbp
// Faulty Load
lea addresses_D+0x1117c, %rcx
clflush (%rcx)
nop
dec %r8
mov (%rcx), %r9d
lea oracles, %r14
and $0xff, %r9
shlq $12, %r9
mov (%r14,%r9,1), %r9
pop %rdx
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r14
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 10, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 4, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 1, 'size': 32, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': True}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 4, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 11, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
| 37.885417 | 2,999 | 0.655348 |
55836661d05cc51fe40849636bec81fb9af15894 | 2,406 | asm | Assembly | Transynther/x86/_processed/US/_ht_zr_un_/i7-7700_9_0x48.log_13_1759.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_ht_zr_un_/i7-7700_9_0x48.log_13_1759.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_ht_zr_un_/i7-7700_9_0x48.log_13_1759.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r14
push %r15
push %r8
push %rax
push %rcx
lea addresses_normal_ht+0x4972, %r12
nop
nop
cmp %r8, %r8
movb (%r12), %r10b
nop
and $20583, %rcx
lea addresses_WC_ht+0x15506, %r14
clflush (%r14)
nop
add %r10, %r10
movups (%r14), %xmm2
vpextrq $1, %xmm2, %r15
nop
nop
nop
nop
nop
dec %r14
lea addresses_normal_ht+0x1f72, %rcx
nop
nop
cmp %r15, %r15
movups (%rcx), %xmm5
vpextrq $1, %xmm5, %r8
nop
sub $48862, %r14
lea addresses_D_ht+0xe187, %r12
cmp %rax, %rax
movw $0x6162, (%r12)
nop
nop
nop
nop
xor %r10, %r10
pop %rcx
pop %rax
pop %r8
pop %r15
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r8
push %r9
push %rax
push %rbp
push %rbx
// Store
mov $0x76313f0000000572, %r12
nop
nop
nop
nop
nop
xor $26883, %r8
mov $0x5152535455565758, %rax
movq %rax, (%r12)
nop
nop
nop
nop
and %r8, %r8
// Store
lea addresses_PSE+0x65c6, %r13
inc %r9
movl $0x51525354, (%r13)
nop
inc %rax
// Faulty Load
lea addresses_US+0x5972, %r9
nop
cmp $16913, %rbx
vmovups (%r9), %ymm2
vextracti128 $0, %ymm2, %xmm2
vpextrq $0, %xmm2, %r8
lea oracles, %rax
and $0xff, %r8
shlq $12, %r8
mov (%rax,%r8,1), %r8
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 7, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 2, 'size': 16, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': True, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'48': 1, '44': 2, 'ff': 8, '00': 2}
ff ff 44 ff ff 48 44 00 00 ff ff ff ff
*/
| 19.560976 | 128 | 0.639235 |
5abe8a793daca1d570d8621c14dc4b5dcfb1337a | 512 | asm | Assembly | PRG/levels/Plains/W3HBD.asm | narfman0/smb3_pp1 | 38a58adafff67a403591e38875e9fae943a5fe76 | [
"Unlicense"
] | null | null | null | PRG/levels/Plains/W3HBD.asm | narfman0/smb3_pp1 | 38a58adafff67a403591e38875e9fae943a5fe76 | [
"Unlicense"
] | null | null | null | PRG/levels/Plains/W3HBD.asm | narfman0/smb3_pp1 | 38a58adafff67a403591e38875e9fae943a5fe76 | [
"Unlicense"
] | null | null | null | ; Original address was $BDD8
; End of 3-8
.word $0000 ; Alternate level layout
.word $0000 ; Alternate object layout
.byte LEVEL1_SIZE_01 | LEVEL1_YSTART_180
.byte LEVEL2_BGPAL_02 | LEVEL2_OBJPAL_08 | LEVEL2_XSTART_18
.byte LEVEL3_TILESET_00 | LEVEL3_VSCROLL_LOCKED
.byte LEVEL4_BGBANK_INDEX(1) | LEVEL4_INITACT_NOTHING
.byte LEVEL5_BGM_BATTLE | LEVEL5_TIME_200
.byte $12, $03, $E2, $32, $07, $16, $13, $0D, $E2, $16, $01, $00, $36, $07, $16, $19
.byte $06, $99, $1A, $00, $C0, $0F, $36, $0A, $07, $FF
| 39.384615 | 85 | 0.695313 |
5daa8acab1d08577de598c1715163c26961ed2ff | 1,754 | asm | Assembly | x86/proj.asm | MikelThief/ECOAR-Shape-Detection | 8ebdaef532d9d92fd1c9c00ca8ea8f3dc9ddff10 | [
"MIT"
] | 1 | 2021-04-08T08:07:42.000Z | 2021-04-08T08:07:42.000Z | x86/proj.asm | MikelThief/ECOAR-Shape-Detection | 8ebdaef532d9d92fd1c9c00ca8ea8f3dc9ddff10 | [
"MIT"
] | null | null | null | x86/proj.asm | MikelThief/ECOAR-Shape-Detection | 8ebdaef532d9d92fd1c9c00ca8ea8f3dc9ddff10 | [
"MIT"
] | 1 | 2021-01-20T20:06:53.000Z | 2021-01-20T20:06:53.000Z | %macro prologue 1
push ebp
mov ebp,esp
sub esp,%1
%endmacro
global FindShape
; symbolic adressess and variables
%define imageDataArray [ebp+8]
%define row_bytes edi
%define black_counter edx
%define frame_start eax
FindShape:
; creating the frame
prologue 0
; pushing used registers
push esi
push ecx
push edi
push edx
; the address of image to esi
mov esi, imageDataArray
mov ecx, 1
;length of row in bytes
mov row_bytes, 960
; looking for black
LookForBlack:
cmp BYTE [esi], 0
je blackPixelFound
cmp ecx, 76800
je NoShape
add esi, 3
inc ecx
jmp LookForBlack
blackPixelFound:
mov frame_start, esi
mov ecx, 1
findWidthOfFrame:
cmp BYTE [esi], 0
jne StartProcess
add esi, 3
inc ecx
jmp findWidthOfFrame
StartProcess:
sub ecx,1
mov black_counter,ecx
mov esi, frame_start
add esi, row_bytes
mov ecx,1
LookForWhite:
cmp ecx,black_counter
je switchNextRow
cmp BYTE [esi], 0
jne GoBack
add esi,3
inc ecx
jmp LookForWhite
switchNextRow:
mov ecx,1
mov esi, frame_start
add esi, row_bytes
mov frame_start, esi
jmp LookForWhite
GoBack:
sub esi,3
ShapeChoose:
cmp BYTE [esi], 0
jne Shape2
add esi, 3
cmp BYTE [esi], 0
je Shape1
sub esi, 3
add esi, row_bytes
jmp ShapeChoose
Shape1:
mov eax, 1
jmp Exit
Shape2:
mov eax, 2
jmp Exit
NoShape:
mov eax, 0
Exit:
; ściągnięcie rejestrów ze stosu
pop edx
pop edi
pop ecx
pop esi
; powrót z procedury
mov esp, ebp
pop ebp
ret | 16.392523 | 43 | 0.602623 |
f38d9a57be53aa84692edd031883a328a80d88bb | 839 | asm | Assembly | programs/oeis/006/A006491.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/006/A006491.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/006/A006491.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A006491: Generalized Lucas numbers.
; 1,0,4,5,15,28,60,117,230,440,834,1560,2891,5310,9680,17527,31545,56468,100590,178395,315106,554530,972564,1700400,2964325,5153868,8938300,15465497,26700915,46004620,79112304,135801105,232715006,398151740,680164470,1160259912,1976536655,3362733738,5714071880,9698177515,16441808061,27844934660,47108654274,79621871895,134449546810,226828970758,382354164840,643985657952,1083786390025,1822558858200,3062684743924,5143013746925,8630558088471,14473595373820,24257180351460,40629363701997,68011840221590,113784306919808,190257446459370,317958274698360,531098560953491,886673334930390,1479593392280384,2467844018371615,4114297651017345,6856179949208948
mov $1,2
mov $2,$0
cal $0,6367 ; Number of binary vectors of length n+1 beginning with 0 and containing just 1 singleton.
add $1,$2
mul $1,$0
div $1,2
| 83.9 | 648 | 0.853397 |
118e07d0c90a6afcc20cfc73186f03f71ff0950f | 324 | asm | Assembly | programs/oeis/043/A043649.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/043/A043649.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/043/A043649.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A043649: Numbers whose base-11 representation has exactly 6 runs.
; 162393,162395,162396,162397,162398,162399,162400,162401,162402,162403,162404,162405,162407,162408,162409,162410,162411,162412,162413,162414,162415,162416,162417,162419,162420,162421,162422
mov $1,10
add $1,$0
div $1,11
add $1,$0
add $1,162393
mov $0,$1
| 32.4 | 190 | 0.780864 |
8bf246849ebd7fe88414b1af0f9c89625025597c | 1,100 | asm | Assembly | src/pi_basics.asm | DigiDwrf/neon64v2-easybuild | 94fa46fbc8ddb2af593cb42162df58f65a03ebc4 | [
"0BSD"
] | 36 | 2020-07-08T11:27:17.000Z | 2022-03-15T08:38:52.000Z | src/pi_basics.asm | DigiDwrf/neon64v2-easybuild | 94fa46fbc8ddb2af593cb42162df58f65a03ebc4 | [
"0BSD"
] | 19 | 2020-07-12T23:14:03.000Z | 2021-12-14T07:57:40.000Z | src/pi_basics.asm | DigiDwrf/neon64v2-easybuild | 94fa46fbc8ddb2af593cb42162df58f65a03ebc4 | [
"0BSD"
] | 6 | 2021-07-17T09:57:46.000Z | 2022-03-13T07:50:25.000Z | constant rom_cart_addr(0x1000'0000)
constant sram_cart_addr(0x0800'0000)
macro pi_wait(pi_base, tmp) {
-
lw {tmp}, PI_STATUS ({pi_base})
andi {tmp}, 0b11 // DMA or I/O busy
bnez {tmp},-
nop
}
scope PI {
// Note: a1 and a2 should be aligned to 32 bytes (ICACHE_LINE)
// a0: PI space address
// a1: DRAM address
// a2: Length
ReadSyncInvalidateIDCache:
addi t0, a2, -ICACHE_LINE
add t1, a1, t0
-
cache inst_hit_invalidate, 0 (t1)
addi t1, -ICACHE_LINE
bnez t0,-
addi t0, -ICACHE_LINE
// fall through
// Note: a1 and a2 should be aligned to 16 bytes (DCACHE_LINE)
// a0: PI space address
// a1: DRAM address
// a2: Length
ReadSyncInvalidateDCache:
addi t0, a2, -DCACHE_LINE
add t1, a1, t0
-
cache data_hit_invalidate, 0 (t1)
addi t1, -DCACHE_LINE
bnez t0,-
addi t0, -DCACHE_LINE
// fall through
// Note: Does not invalidate cache
// a0: PI space address
// a1: DRAM address
// a2: Length
ReadSync:
lui t0, PI_BASE
pi_wait(t0, t1)
sw a0, PI_CART_ADDR(t0)
sw a1, PI_DRAM_ADDR(t0)
addi t1, a2, -1
sw t1, PI_WR_LEN(t0)
pi_wait(t0, t1)
jr ra
nop
}
| 16.666667 | 62 | 0.676364 |
3dddbc86fa89b62f20f955d956db00d5dd827c0e | 16,816 | asm | Assembly | iod/con2/ql/sprite/0.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | iod/con2/ql/sprite/0.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | iod/con2/ql/sprite/0.asm | olifink/smsqe | c546d882b26566a46d71820d1539bed9ea8af108 | [
"BSD-2-Clause"
] | null | null | null | ; Default sprite 0 V0.0 1985 Tony Tebby
;
section sprite
;
xdef sp_arrow
;
sp_arrow
dc.w $0100,$0000 4 colour mode
dc.w 14,7,0,0 14*7 pixel sprite origin at 0,0
dc.l s4p_arro-*
dc.l s4m_arro-*
dc.l s8_arrow-*
;
s4p_arro
dc.w %0000000000000000,%0000000000000000
dc.w %0011111100111111,%0000000000000000
dc.w %0011110000111100,%0000000000000000
dc.w %0011001100110011,%0000000000000000
dc.w %0000000000000000,%1100000011000000
dc.w %0000000000000000,%0010000000100000
dc.w %0000000000000000,%0000000000000000
s4m_arro
dc.w %0011111100111111,%1100000011000000
dc.w %1111111111111111,%0000000000000000
dc.w %1111111111111111,%0000000000000000
dc.w %1111111111111111,%1100000011000000
dc.w %1100001111000011,%1111000011110000
dc.w %0000000000000000,%1111110011111100
dc.w %0000000000000000,%0011100000111000
s8_arrow
dc.w $0101,$0000 8 colour mode
dc.w 14,7,0,0 14*7 pixel sprite origin at 0,0
dc.l s8p_arro-*
dc.l s8m_arro-*
dc.l 0
;
s8p_arro
dc.w %0000000000000000,%0000000000000000
dc.w %0010101000111111,%0000000000000000
dc.w %0010100000111100,%0000000000000000
dc.w %0010001000110011,%0000000000000000
dc.w %0000000000000000,%1000000011000000
dc.w %0000000000000000,%0010000000110000
dc.w %0000000000000000,%0000000000000000
s8m_arro
dc.w %0011111100111111,%1100000011000000
dc.w %1111111111111111,%0000000000000000
dc.w %1111111111111111,%0000000000000000
dc.w %1111111111111111,%1100000011000000
dc.w %1100001111000011,%1111000011110000
dc.w %0000000000000000,%1111110011111100
dc.w %0000000000000000,%0011000000110000
;
; Locked sprite V0.0 1985 Jonathan Oakley QJUMP
;
xdef sp_lock
sp_lock
dc.w $0100,$0000 4 colour mode
dc.w 13,11,6,6 13*12 pixel sprite origin at 6,6
dc.l s4p_lock-*
dc.l s4m_lock-*
dc.l s8_lock-*
;
s4p_lock
dc.w %0000000000000000,%0000000000000000
dc.w %0001111100011111,%1100000011000000
dc.w %0011000000110000,%0110000001100000
dc.w %0010000000100000,%0010000000100000
dc.w %0111111101111111,%1111000011110000
dc.w %0111110101111101,%1111000011110000
dc.w %0111100001111000,%1111000011110000
dc.w %0111110101111101,%1111000011110000
dc.w %0011110100111101,%1110000011100000
dc.w %0001111100011111,%1100000011000000
dc.w %0000000000000000,%0000000000000000
s4m_lock
dc.w %0011111100111111,%1110000011100000
dc.w %0111111101111111,%1111000011110000
dc.w %0111111101111111,%1111000011110000
dc.w %1111111111111111,%1111100011111000
dc.w %1111111111111111,%1111100011111000
dc.w %1111111111111111,%1111100011111000
dc.w %1111111111111111,%1111100011111000
dc.w %1111111111111111,%1111100011111000
dc.w %1111111111111111,%1111100011111000
dc.w %0111111101111111,%1111000011110000
dc.w %0011111100111111,%1110000011100000
;
s8_lock
dc.w $0101,$0000 8 colour mode
dc.w 14,12,6,6 14*12 pixel sprite origin at 6,6
dc.l s8p_lock-*
dc.l s8m_lock-*
dc.l 0
;
s8p_lock
dc.w %0000000000000000,%0000000000000000 bbb
dc.w %0000001000000011,%0000000000000000 bbwbb
dc.w %0000100000001100,%1000000011000000 bbw wbb
dc.w %0010000000110000,%0010000000110000 bw wb
dc.w %0010000000110000,%0010000000110000 bw wb
dc.w %0010101000101010,%1010000010100000 byyyyyb
dc.w %0010100000101000,%1010000010100000 byybyyb
dc.w %0010100000101000,%1010000010100000 byybyyb
dc.w %0010100000101000,%1010000010100000 byybyyb
dc.w %0010101000101010,%1010000010100000 byyyyyb
dc.w %0000101000001010,%1000000010000000 bbyyybb
dc.w %0000000000000000,%0000000000000000 bbbbb
;
s8m_lock
dc.w %0000111100001111,%1100000011000000
dc.w %0011111100111111,%1111000011110000
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %0011111111001111,%1111000011110000
;
; Null pointer v0.0
;
xdef sp_null
sp_null
dc.w $0100,$0000 4 colour mode
dc.w 12,8,6,4 12x8 pixel sprite origin at 6,4
dc.l s4p_null-*
dc.l s4m_null-*
dc.l s8_null-*
;
s4p_null
dc.w %1111111111111111,%1111000011110000
dc.w %1100000011000000,%0011000000110000
dc.w %1100000011000000,%0011000000110000
dc.w %1100000011000000,%0011000000110000
dc.w %1100000011000000,%0011000000110000
dc.w %1100000011000000,%0011000000110000
dc.w %1100000011000000,%0011000000110000
dc.w %1111111111111111,%1111000011110000
;
s4m_null
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
;
s8_null
dc.w $0101,$0000 8 colour mode
dc.w 12,8,6,4 12x8 pixel sprite origin at 6,4
dc.l s8p_null-*
dc.l s8m_null-*
dc.l 0
;
s8p_null
dc.w %1010101011111111,%1010000011110000
dc.w %1000000011000000,%0010000000110000
dc.w %1000000011000000,%0010000000110000
dc.w %1000000011000000,%0010000000110000
dc.w %1000000011000000,%0010000000110000
dc.w %1000000011000000,%0010000000110000
dc.w %1000000011000000,%0010000000110000
dc.w %1010101011111111,%1010000011110000
;
s8m_null
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
;
; Wrong mode v0.0
;
xdef sp_mode,sp_mode4
;
sp_mode
dc.w $0100,$0000 4 colour mode
dc.w 12,9,6,4 12x9 pixel sprite origin at 6,4
dc.l s4p_mode-*
dc.l s4m_mode-*
dc.l s8_mode-*
;
s4p_mode
dc.w %1111111111111111,%1111000011110000 wwwwwwwwwwww
dc.w %1100000011000000,%0011000000110000 ww........ww
dc.w %1100011011000000,%0011000000110000 ww...gg...ww
dc.w %1100100111000000,%0011000000110000 ww..g..g..ww
dc.w %1100011011000000,%0011000000110000 ww...gg...ww
dc.w %1100100111000000,%0011000000110000 ww..g..g..ww
dc.w %1100011011000000,%0011000000110000 ww...gg...ww
dc.w %1100000011000000,%0011000000110000 ww........ww
dc.w %1111111111111111,%1111000011110000 wwwwwwwwwwww
;
s4m_mode
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
sp_mode4
s8_mode
dc.w $0101,$0000 8 colour mode
dc.w 14,9,6,4 14x9 pixel sprite origin at 7,4
dc.l s8p_mode-*
dc.l s8m_mode-*
dc.l 0
;
s8p_mode
dc.w %1010101011111111,%1010100011111100 wwwwwww
dc.w %1000000011000000,%0000100000001100 w.....w
dc.w %1000000011000000,%0000100011001100 w...m.w
dc.w %1000000011000011,%0000100011001100 w..mm.w
dc.w %1000000011001100,%0000100011001100 w.m.m.w
dc.w %1000000011111111,%0000100011111100 wmmmmmw
dc.w %1000000011000000,%0000100011001100 w...m.w
dc.w %1000000011000000,%0000100000001100 w.....w
dc.w %1010101011111111,%1010100011111100 wwwwwww
;
s8m_mode
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
;
; Keyboard input v0.0
;
xdef sp_key
;
sp_key
dc.w $0100,$0000 4 colour mode
dc.w 14,9,6,4 14x9 pixel sprite origin at 7,4
dc.l s4p_key-*
dc.l s4m_key-*
dc.l s8_key-*
;
s4p_key
dc.w %1111111111111111,%1111110011111100 wwwwwwwwwwwwww
dc.w %1100111111001111,%1100110011001100 ww..wwwwww..ww
dc.w %1100111111001111,%0011110000111100 ww..wwww..wwww
dc.w %1100110011001100,%1111110011111100 ww..ww..wwwwww
dc.w %1100001111000011,%1111110011111100 ww....wwwwwwww
dc.w %1100110011001100,%1111110011111100 ww..ww..wwwwww
dc.w %1100111111001111,%0011110000111100 ww..wwww..wwww
dc.w %1100111111001111,%1100110011001100 ww..wwwwww..ww
dc.w %1111111111111111,%1111110011111100 wwwwwwwwwwwwww
;
s4m_key
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
;
s8_key
dc.w $0101,$0000 8 colour mode
dc.w 14,9,6,4 14x9 pixel sprite origin at 7,4
dc.l s8p_key-*
dc.l s8m_key-*
dc.l 0
;
s8p_key
dc.w %1010101011111111,%1010100011111100 wwwwwww
dc.w %1000101011001111,%1000100011001100 w.www.w
dc.w %1000101011001111,%0010100000111100 w.ww.ww
dc.w %1000100011001100,%1010100011111100 w.w.www
dc.w %1000001011000011,%1010100011111100 w..wwww
dc.w %1000100011001100,%1010100011111100 w.w.www
dc.w %1000101011001111,%0010100000111100 w.ww.ww
dc.w %1000101011001111,%1000100011001100 w.www.w
dc.w %1010101011111111,%1010100011111100 wwwwwww
;
s8m_key
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
;
; Busy sprite (no entry)
;
xdef sp_busy
;
sp_busy
dc.w $0100,$0000 4 colour mode
dc.w 14,12,6,5 14*12 pixel sprite origin at 6,5
dc.l s4p_busy-*
dc.l s4m_busy-*
dc.l s8_busy-*
;
s4p_busy
dc.w %0000000000000000,%0000000000000000
dc.w %0000000000000111,%0000000010000000
dc.w %0000000000011111,%0000000011100000
dc.w %0000000000111111,%0000000011110000
dc.w %0000000000111111,%0000000011110000
dc.w %0001111101111111,%1110000011111000
dc.w %0001111101111111,%1110000011111000
dc.w %0000000000111111,%0000000011110000
dc.w %0000000000111111,%0000000011110000
dc.w %0000000000011111,%0000000011100000
dc.w %0000000000000111,%0000000010000000
dc.w %0000000000000000,%0000000000000000
s4m_busy
dc.w %0000111100001111,%1100000011000000
dc.w %0011111100111111,%1111000011110000
dc.w %0111111101111111,%1111100011111000
dc.w %0111111101111111,%1111100011111000
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %1111111111111111,%1111110011111100
dc.w %0111111101111111,%1111100011111000
dc.w %0111111101111111,%1111100011111000
dc.w %0011111100111111,%1111000011110000
dc.w %0000111100001111,%1100000011000000
;
s8_busy
dc.w $0101,$0000 8 colour mode
dc.w 16,12,7,5 16*12 pixel sprite origin at 7,5
dc.l s8p_busy-*
dc.l s8m_busy-*
dc.l 0
;
s8p_busy
dc.w %0000000000000000,%0000000000000000
dc.w %0000000000000010,%0000000010000000
dc.w %0000000000001010,%0000000010100000
dc.w %0000000000101010,%0000000010101000
dc.w %0000000000101010,%0000000010101000
dc.w %0000101000101111,%1010000011111000
dc.w %0000101000101111,%1010000011111000
dc.w %0000000000101010,%0000000010101000
dc.w %0000000000101010,%0000000010101000
dc.w %0000000000001010,%0000000010100000
dc.w %0000000000000010,%0000000010000000
dc.w %0000000000000000,%0000000000000000
s8m_busy
dc.w %0000111100001111,%1111000011110000
dc.w %0011111100111111,%1111110011111100
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %0011111100111111,%1111110011111100
dc.w %0000111100001111,%1111000011110000
;
; Window Move sprite V0.0 1985 Tony Tebby QJUMP
;
xdef sp_wmovep
;
sp_wmovep
dc.w $0100,$0000 4 colour mode
dc.w 16,10,8,4 16*10 pixel sprite origin at 8,4
dc.l s4p_wmov-*
dc.l s4m_wmov-*
dc.l s8_wmove-*
;
s4p_wmov
dc.w %0000000000000000,%0000000000000000 ............
dc.w %0011111100111111,%1100000011000000 ..wwwwwwww..
dc.w %0011000000111111,%1100000011000000 ..wwrrrrww..
dc.w %0011000000111111,%1100000011000000 ..wwrrrrww......
dc.w %0011001100111111,%1111110011111100 ..wwrrwwwwwwww..
dc.w %0011111100111111,%1100110011111100 ..wwwwwwwwrrww..
dc.w %0000001100000011,%0000110011111100 ......wwrrrrww..
dc.w %0000001100000011,%0000110011111100 ..wwrrrrww..
dc.w %0000001100000011,%1111110011111100 ..wwwwwwww..
dc.w %0000000000000000,%0000000000000000 ............
s4m_wmov
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %0000111100001111,%1111111111111111
dc.w %0000111100001111,%1111111111111111
dc.w %0000111100001111,%1111111111111111
;
s8_wmove
dc.w $0101,$0000 8 colour mode
dc.w 16,10,8,4 16*10 pixel sprite origin at 8,4
dc.l s8p_wmov-*
dc.l s8m_wmov-*
dc.l 0
;
s8p_wmov
dc.w %0000000000000000,%0000000000000000 ............
dc.w %0010101000111111,%1000000011000000 ..wwwwwwww..
dc.w %0010000000111010,%1000000011000000 ..wwrrrrww..
dc.w %0010000000111010,%1000000011000000 ..wwrrrrww......
dc.w %0010001000111011,%1010100011111100 ..wwrrwwwwwwww..
dc.w %0010101000111111,%1000100011101100 ..wwwwwwwwrrww..
dc.w %0000001000000011,%0000100010101100 ......wwrrrrww..
dc.w %0000001000000011,%0000100010101100 ..wwrrrrww..
dc.w %0000001000000011,%1010100011111100 ..wwwwwwww..
dc.w %0000000000000000,%0000000000000000 ............
s8m_wmov
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111000011110000
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %0000111100001111,%1111111111111111
dc.w %0000111100001111,%1111111111111111
dc.w %0000111100001111,%1111111111111111
;
; Window Size sprite V0.0 1985 Tony Tebby QJUMP
;
xdef sp_wsizep
;
sp_wsizep
dc.w $0100,$0000 4 colour mode
dc.w 16,9,8,4 16*9 pixel sprite origin at 8,4
dc.l s4p_wsiz-*
dc.l s4m_wsiz-*
dc.l s8_wsize-*
;
s4p_wsiz
dc.w %0000000000000000,%0000000000000000 ................
dc.w %0011111100111111,%1111110011111100 ..wwwwwwwwwwww..
dc.w %0011000000111111,%0000110011111100 ..wwrrrrrrrrww..
dc.w %0011000000111111,%0000110011111100 ..wwrrrrrrrrww..
dc.w %0011001100111111,%1111110011111100 ..wwrrwwwwwwww..
dc.w %0011001100111111,%0000110011111100 ..wwrrwwrrrrww..
dc.w %0011001100111111,%0000110011111100 ..wwrrwwrrrrww..
dc.w %0011111100111111,%1111110011111100 ..wwwwwwwwwwww..
dc.w %0000000000000000,%0000000000000000 ................
s4m_wsiz
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
;
s8_wsize
dc.w $0101,$0000 8 colour mode
dc.w 16,9,8,4 16*9 pixel sprite origin at 8,4
dc.l s8p_wsiz-*
dc.l s8m_wsiz-*
dc.l 0
;
s8p_wsiz
dc.w %0000000000000000,%0000000000000000 ................
dc.w %0010101000111111,%1010100011111100 ..wwwwwwwwwwww..
dc.w %0010000000111010,%0000100010101100 ..wwrrrrrrrrww..
dc.w %0010000000111010,%0000100010101100 ..wwrrrrrrrrww..
dc.w %0010001000111011,%1010100011111100 ..wwrrwwwwwwww..
dc.w %0010001000111011,%0000100010101100 ..wwrrwwrrrrww..
dc.w %0010001000111011,%0000100010101100 ..wwrrwwrrrrww..
dc.w %0010101000111111,%1010100011111100 ..wwwwwwwwwwww..
dc.w %0000000000000000,%0000000000000000 ................
s8m_wsiz
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
dc.w %1111111111111111,%1111111111111111
end
| 33.56487 | 58 | 0.787226 |
80af5d1754d4a937620dc1dcba79abad57394c8b | 7,283 | asm | Assembly | Palmtree.Math.Core.Implements/vs_build/x64_Release/cpuid.asm | rougemeilland/Palmtree.Math.Core.Implements | 52f4f6c765d16c9b0baf1fd212c61a33daae138c | [
"MIT"
] | null | null | null | Palmtree.Math.Core.Implements/vs_build/x64_Release/cpuid.asm | rougemeilland/Palmtree.Math.Core.Implements | 52f4f6c765d16c9b0baf1fd212c61a33daae138c | [
"MIT"
] | null | null | null | Palmtree.Math.Core.Implements/vs_build/x64_Release/cpuid.asm | rougemeilland/Palmtree.Math.Core.Implements | 52f4f6c765d16c9b0baf1fd212c61a33daae138c | [
"MIT"
] | null | null | null | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27026.1
include listing.inc
INCLUDELIB MSVCRT
INCLUDELIB OLDNAMES
PUBLIC GetCPUInfo
; COMDAT pdata
pdata SEGMENT
$pdata$GetCPUInfo DD imagerel $LN23
DD imagerel $LN23+162
DD imagerel $unwind$GetCPUInfo
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$_ZERO_MEMORY_BYTE DD imagerel _ZERO_MEMORY_BYTE
DD imagerel _ZERO_MEMORY_BYTE+21
DD imagerel $unwind$_ZERO_MEMORY_BYTE
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$cpuid DD imagerel cpuid
DD imagerel cpuid+36
DD imagerel $unwind$cpuid
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$cpuidex DD imagerel cpuidex
DD imagerel cpuidex+37
DD imagerel $unwind$cpuidex
pdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$cpuidex DD 020501H
DD 013405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$cpuid DD 020501H
DD 013405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$_ZERO_MEMORY_BYTE DD 020501H
DD 017405H
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$GetCPUInfo DD 040a01H
DD 04340aH
DD 07006120aH
xdata ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\cpuid.c
; COMDAT cpuidex
_TEXT SEGMENT
op$ = 8
subop$ = 16
reg_eax$ = 24
reg_ebx$ = 32
reg_ecx$ = 40
reg_edx$ = 48
cpuidex PROC ; COMDAT
; 50 : {
mov QWORD PTR [rsp+8], rbx
; 51 : _UINT32_T regbuf[4];
; 52 : __cpuidex(regbuf, op, subop);
mov eax, ecx
mov ecx, edx
cpuid
; 53 : *reg_eax = regbuf[0];
mov DWORD PTR [r8], eax
; 54 : *reg_ebx = regbuf[1];
; 55 : *reg_ecx = regbuf[2];
mov rax, QWORD PTR reg_ecx$[rsp]
mov DWORD PTR [r9], ebx
; 56 : *reg_edx = regbuf[3];
; 57 : }
mov rbx, QWORD PTR [rsp+8]
mov DWORD PTR [rax], ecx
mov rax, QWORD PTR reg_edx$[rsp]
mov DWORD PTR [rax], edx
ret 0
cpuidex ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\cpuid.c
; COMDAT cpuid
_TEXT SEGMENT
op$ = 8
reg_eax$ = 16
reg_ebx$ = 24
reg_ecx$ = 32
reg_edx$ = 40
cpuid PROC ; COMDAT
; 40 : {
mov QWORD PTR [rsp+8], rbx
; 41 : _UINT32_T regbuf[4];
; 42 : __cpuid(regbuf, op);
mov eax, ecx
mov r10, rdx
xor ecx, ecx
cpuid
; 43 : *reg_eax = regbuf[0];
mov DWORD PTR [r10], eax
; 44 : *reg_ebx = regbuf[1];
; 45 : *reg_ecx = regbuf[2];
; 46 : *reg_edx = regbuf[3];
mov rax, QWORD PTR reg_edx$[rsp]
mov DWORD PTR [r8], ebx
; 47 : }
mov rbx, QWORD PTR [rsp+8]
mov DWORD PTR [r9], ecx
mov DWORD PTR [rax], edx
ret 0
cpuid ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; COMDAT _ZERO_MEMORY_BYTE
_TEXT SEGMENT
d$ = 8
count$ = 16
_ZERO_MEMORY_BYTE PROC ; COMDAT
; 94 : {
mov QWORD PTR [rsp+8], rdi
; 95 : __stosb(d, 0, count);
mov rdi, rcx
xor eax, eax
mov rcx, rdx
rep stosb
; 96 : }
mov rdi, QWORD PTR [rsp+8]
ret 0
_ZERO_MEMORY_BYTE ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\cpuid.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\cpuid.c
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\cpuid.c
; COMDAT GetCPUInfo
_TEXT SEGMENT
feature$ = 32
GetCPUInfo PROC ; COMDAT
; 60 : {
$LN23:
mov QWORD PTR [rsp+8], rbx
push rdi
sub rsp, 16
mov r8, rcx
; 42 : __cpuid(regbuf, op);
xor eax, eax
xor ecx, ecx
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 95 : __stosb(d, 0, count);
mov rdi, r8
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\cpuid.c
; 42 : __cpuid(regbuf, op);
cpuid
mov r9d, eax
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\pmc_inline_func.h
; 95 : __stosb(d, 0, count);
mov ecx, 4
xor eax, eax
rep stosb
; File z:\sources\lunor\repos\rougemeilland\palmtree.math.core.implements\palmtree.math.core.implements\cpuid.c
; 71 : if (max_function_no >= 1)
cmp r9d, 1
jb SHORT $LN20@GetCPUInfo
; 72 : {
; 73 : cpuid(1, ®_eax, ®_ebx, ®_ecx, ®_edx);
; 74 : feature->PROCESSOR_FEATURE_POPCNT = (reg_ecx >> 23) & 1;
and DWORD PTR [r8], -2 ; fffffffeH
; 42 : __cpuid(regbuf, op);
xor ecx, ecx
mov eax, 1
cpuid
; 72 : {
; 73 : cpuid(1, ®_eax, ®_ebx, ®_ecx, ®_edx);
; 74 : feature->PROCESSOR_FEATURE_POPCNT = (reg_ecx >> 23) & 1;
shr ecx, 23
and ecx, 1
or DWORD PTR [r8], ecx
$LN20@GetCPUInfo:
; 75 : }
; 76 : if (max_function_no >= 7)
cmp r9d, 7
jb SHORT $LN21@GetCPUInfo
; 77 : {
; 78 : cpuidex(7, 0, ®_eax, ®_ebx, ®_ecx, ®_edx);
; 79 : max_subleaf_no = reg_eax;
; 80 : feature->PROCESSOR_FEATURE_BMI1 = (reg_ebx >> 3) & 1;
; 81 : feature->PROCESSOR_FEATURE_ADX = (reg_ebx >> 8) & 1;
; 82 : feature->PROCESSOR_FEATURE_BMI2 = (reg_ebx >> 19) & 1;
and DWORD PTR [r8], -15 ; fffffff1H
; 52 : __cpuidex(regbuf, op, subop);
xor ecx, ecx
mov eax, 7
cpuid
; 77 : {
; 78 : cpuidex(7, 0, ®_eax, ®_ebx, ®_ecx, ®_edx);
; 79 : max_subleaf_no = reg_eax;
; 80 : feature->PROCESSOR_FEATURE_BMI1 = (reg_ebx >> 3) & 1;
; 81 : feature->PROCESSOR_FEATURE_ADX = (reg_ebx >> 8) & 1;
; 82 : feature->PROCESSOR_FEATURE_BMI2 = (reg_ebx >> 19) & 1;
mov ecx, ebx
mov eax, ebx
shr ecx, 9
and eax, 256 ; 00000100H
and ecx, 1024 ; 00000400H
and ebx, 8
or ecx, eax
shr ecx, 6
or ecx, ebx
shr ecx, 1
or DWORD PTR [r8], ecx
$LN21@GetCPUInfo:
; 42 : __cpuid(regbuf, op);
xor ecx, ecx
mov eax, -2147483648 ; ffffffff80000000H
cpuid
; 83 : }
; 84 : cpuid(0x80000000, ®_eax, ®_ebx, ®_ecx, ®_edx);
; 85 : max_ex_function_no = reg_eax;
; 86 : if (max_ex_function_no >= 0x80000001)
cmp eax, -2147483647 ; 80000001H
jb SHORT $LN4@GetCPUInfo
; 87 : {
; 88 : cpuid(0x80000001, ®_eax, ®_ebx, ®_ecx, ®_edx);
; 89 : feature->PROCESSOR_FEATURE_ABM = (reg_ecx >> 5) & 1;
and DWORD PTR [r8], -17 ; ffffffefH
; 42 : __cpuid(regbuf, op);
xor ecx, ecx
mov eax, -2147483647 ; ffffffff80000001H
cpuid
; 87 : {
; 88 : cpuid(0x80000001, ®_eax, ®_ebx, ®_ecx, ®_edx);
; 89 : feature->PROCESSOR_FEATURE_ABM = (reg_ecx >> 5) & 1;
shr ecx, 1
and ecx, 16
or DWORD PTR [r8], ecx
$LN4@GetCPUInfo:
; 90 : }
; 91 : }
mov rbx, QWORD PTR [rsp+32]
add rsp, 16
pop rdi
ret 0
GetCPUInfo ENDP
_TEXT ENDS
END
| 22.830721 | 121 | 0.661266 |
3759636fb65a2a1ff440387798fd1f88b02bd1f5 | 78,051 | asm | Assembly | non_regression/switch_x64_linux_3.att.s.asm | LRGH/plasmasm | 4cd50546c3dc895763d72dd60b7c46179c1916bc | [
"Apache-2.0"
] | 1 | 2021-02-28T21:31:18.000Z | 2021-02-28T21:31:18.000Z | non_regression/switch_x64_linux_3.att.s.asm | LRGH/plasmasm | 4cd50546c3dc895763d72dd60b7c46179c1916bc | [
"Apache-2.0"
] | null | null | null | non_regression/switch_x64_linux_3.att.s.asm | LRGH/plasmasm | 4cd50546c3dc895763d72dd60b7c46179c1916bc | [
"Apache-2.0"
] | null | null | null | .file "compileX.c"
.section .rodata.str1.1,"aMS",@progbits,1
.LC01:
.section .text.unlikely,"ax",@progbits
.LCOLDB1:
.section .rodata.str1.1,"aMS",@progbits,1
.LC0:
.string "lg()"
.LC1:
.string "unfinished string"
.LC7:
.string "compilecast, type unknown %ld"
.LC9:
.string "if"
.LC10:
.string "_void_if"
.LC11:
.string "my"
.LC12:
.string "local"
.LC13:
.string "global"
.LC14:
.string "O"
.LC15:
.string "o"
.LC16:
.string "wrong number of arguments"
.LC17:
.string "O(_^_)"
.LC18:
.string "_^s"
.LC20:
.string "unknown function"
.LC21:
.string "too few arguments"
.LC22:
.string "missing mandatory argument"
.LC23:
.string "unexpected ';'"
.LC25:
.string "_eval_mnemonic"
.LC26:
.string "expected character: '&'"
.LC27:
.string "missing variable name"
.LC28:
.string "Str"
.LC31:
.string "PPproto %d in compilefunc"
.LC32:
.string "too many arguments"
.LC39:
.string "optimizenode"
.LC40:
.string "unexpected character '&'"
# ----------------------
.section .text.unlikely,"ax",@progbits
.LCOLDB2:
.LCOLDE2:
.LCOLDB5:
.LCOLDE5:
.LCOLDB8:
.LCOLDE8:
.LCOLDB33:
.LCOLDE33:
.LCOLDB38:
.LCOLDE38:
.LCOLDB41:
.LCOLDE41:
.LCOLDB43:
.LCOLDE43:
# ----------------------
.text
.LHOTB2:
# ----------------------
.p2align 4,,15
# ----------------------
.globl strntoGENexp
.type strntoGENexp, @function
strntoGENexp:
.cfi_startproc
pushq %r14
pushq %r13
movq %rdi, %r13
pushq %r12
pushq %rbp
movq %rsi, %r12
movq avma@GOTPCREL(%rip), %rbp
pushq %rbx
leaq 6(%rsi), %rbx
shrq $3, %rbx
movq (%rbp), %rax
addq $1, %rbx
leaq 0(,%rbx,8), %rdx
movq %rax, %r14
subq %rdx, %r14
movq bot@GOTPCREL(%rip), %rdx
subq (%rdx), %rax
shrq $3, %rax
cmpq %rax, %rbx
jbe .L2
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L2:
movq $-72057594037927936, %rax
movq %r14, (%rbp)
testq %rax, %rbx
je .L3
leaq .LC0(%rip), %rsi
movl $15, %edi
xorl %eax, %eax
call pari_err@PLT
.L3:
movq $3026418949592973312, %rax
leaq 8(%r14), %rbp
addq %r13, %r12
orq %rax, %rbx
movq %rbx, (%r14)
leaq 1(%r13), %rbx
.L4:
cmpq %r12, %rbx
jbe .L25
jmp .L12
.p2align 4,,10
.p2align 3
.L30:
cmpb $116, %dl
je .L7
cmpb $101, %dl
je .L27
movb %dl, (%rbp)
cmpb $0, 1(%rbx)
je .L28
.p2align 4,,10
.p2align 3
.L9:
addq $2, %rbx
addq $1, %rbp
.L25:
movzbl (%rbx), %eax
cmpb $92, %al
jne .L29
movzbl 1(%rbx), %edx
cmpb $110, %dl
jne .L30
movb $10, (%rbp)
jmp .L9
.p2align 4,,10
.p2align 3
.L27:
movb $27, (%rbp)
jmp .L9
.p2align 4,,10
.p2align 3
.L7:
movb $9, (%rbp)
jmp .L9
.p2align 4,,10
.p2align 3
.L29:
cmpb $34, %al
je .L31
movb %al, (%rbp)
addq $1, %rbx
addq $1, %rbp
jmp .L4
.p2align 4,,10
.p2align 3
.L28:
leaq .LC1(%rip), %rdi
movq %r13, %rsi
call compile_err@PLT
jmp .L9
.p2align 4,,10
.p2align 3
.L31:
cmpb $34, 1(%rbx)
je .L32
.L12:
movb $0, (%rbp)
movq %r14, %rax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
ret
.L32:
addq $2, %rbx
jmp .L4
.LHOTE2:
.LHOTB5:
.cfi_endproc
.size strntoGENexp, .-strntoGENexp
# ----------------------
.section .rodata.str1.8,"aMS",@progbits,1
.align 8
.LC3:
.string "function has incomplete prototype"
.align 8
.LC4:
.string "function prototype is not supported"
.align 8
.LC6:
.string "this should be a small integer"
.align 8
.LC19:
.string "expected character: ',' or ')' instead of"
.align 8
.LC24:
.string "missing flag in string function signature"
.align 8
.LC29:
.string "Unknown prototype code `%c' for `%.*s'"
.align 8
.LC30:
.string "Unknown prototype code `%c*' for `%.*s'"
.align 8
.LC34:
.string "too many parameters for closure `%s'"
.align 8
.LC35:
.string "Unknown prototype code `D%c' for `%s'"
.align 8
.LC36:
.string "Unknown prototype code `D...,%c,' for `%s'"
.align 8
.LC37:
.string "Unknown prototype code `%c*' for `%s'"
.align 8
.LC42:
.string "expected character: '=' instead of"
# ----------------------
.text
.p2align 4,,15
# ----------------------
.globl parseproto
.type parseproto, @function
parseproto:
.cfi_startproc
pushq %r12
pushq %rbp
movq %rsi, %r12
pushq %rbx
movq (%rdi), %rbx
movq %rdi, %rbp
movzbl (%rbx), %eax
cmpb $68, %al
je .L35
jle .L97
cmpb $102, %al
je .L40
jg .L41
cmpb $80, %al
je .L40
cmpb $86, %al
jne .L34
cmpb $61, 1(%rbx)
je .L98
movb $86, (%rsi)
jmp .L96
.p2align 4,,10
.p2align 3
.L97:
cmpb $10, %al
je .L56
jle .L99
cmpb $38, %al
jne .L100
addq $1, %rbx
movb $42, (%rsi)
movl $1, %eax
movq %rbx, (%rdi)
popq %rbx
popq %rbp
popq %r12
ret
.p2align 4,,10
.p2align 3
.L41:
cmpb $112, %al
je .L40
cmpb $115, %al
jne .L34
cmpb $42, 1(%rbx)
je .L101
.L34:
movb %al, (%r12)
.L96:
addq $1, %rbx
movl $1, %eax
movq %rbx, (%rbp)
.L37:
popq %rbx
popq %rbp
popq %r12
ret
.p2align 4,,10
.p2align 3
.L100:
cmpb $67, %al
jne .L34
.L40:
addq $1, %rbx
movb %al, (%r12)
movl $5, %eax
movq %rbx, (%rbp)
popq %rbx
popq %rbp
popq %r12
ret
.p2align 4,,10
.p2align 3
.L35:
movzbl 1(%rbx), %ecx
cmpb $80, %cl
je .L45
jg .L46
cmpb $69, %cl
je .L45
jg .L47
testb %cl, %cl
jne .L102
leaq .LC3(%rip), %rdi
movq %rdx, %rsi
call compile_err@PLT
movzbl 1(%rbx), %ecx
.L45:
addq $2, %rbx
movb %cl, (%r12)
movl $2, %eax
movq %rbx, (%rbp)
jmp .L37
.p2align 4,,10
.p2align 3
.L99:
testb %al, %al
jne .L34
.L56:
popq %rbx
xorl %eax, %eax
popq %rbp
popq %r12
ret
.p2align 4,,10
.p2align 3
.L101:
addq $2, %rbx
movb $115, (%rsi)
movl $4, %eax
movq %rbx, (%rdi)
jmp .L37
.p2align 4,,10
.p2align 3
.L102:
cmpb $38, %cl
je .L45
.L44:
xorl %ecx, %ecx
jmp .L51
.p2align 4,,10
.p2align 3
.L103:
cmpq $1, %rcx
jg .L52
.L51:
cmpb $44, %al
sete %al
addq $1, %rbx
movzbl %al, %eax
addq %rax, %rcx
movzbl (%rbx), %eax
testb %al, %al
jne .L103
cmpq $1, %rcx
jg .L52
leaq .LC3(%rip), %rdi
movq %rdx, %rsi
call compile_err@PLT
.L52:
movzbl -2(%rbx), %eax
movb %al, (%r12)
movq %rbx, (%rbp)
movl $3, %eax
jmp .L37
.p2align 4,,10
.p2align 3
.L46:
cmpb $110, %cl
je .L45
jg .L49
leal -86(%rcx), %esi
cmpb $1, %sil
ja .L44
jmp .L45
.p2align 4,,10
.p2align 3
.L98:
cmpb $71, 2(%rbx)
je .L54
leaq .LC4(%rip), %rdi
movq %rdx, %rsi
call compile_err@PLT
.L54:
movb $61, (%r12)
addq $2, %rbx
jmp .L96
.p2align 4,,10
.p2align 3
.L47:
cmpb $71, %cl
je .L45
cmpb $73, %cl
jne .L44
jmp .L45
.p2align 4,,10
.p2align 3
.L49:
leal -114(%rcx), %esi
cmpb $1, %sil
ja .L44
jmp .L45
.LHOTE5:
.LHOTB8:
.cfi_endproc
.size parseproto, .-parseproto
# ----------------------
.p2align 4,,15
# ----------------------
.globl compilecast_loc
.type compilecast_loc, @function
compilecast_loc:
.cfi_startproc
cmpl %esi, %edi
je .L104
cmpl $1, %esi
je .L107
jle .L116
cmpl $3, %esi
je .L110
cmpl $4, %esi
jne .L106
cmpl $1, %edi
je .L117
testl %edi, %edi
je .L118
.L104:
rep; ret
.p2align 4,,10
.p2align 3
.L116:
testl %esi, %esi
jne .L106
movl $1, %esi
movl $71, %edi
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L106:
movl %esi, %edx
leaq .LC7(%rip), %rsi
movl $2, %edi
xorl %eax, %eax
jmp pari_err@PLT
.p2align 4,,10
.p2align 3
.L110:
cmpl $4, %edi
je .L119
movq %rdx, %rdi
jmp compile_varerr@PLT
.p2align 4,,10
.p2align 3
.L107:
cmpl $4, %edi
je .L120
testl %edi, %edi
jne .L113
xorl %esi, %esi
movb $65, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L113:
leaq .LC6(%rip), %rdi
movq %rdx, %rsi
jmp compile_err@PLT
.p2align 4,,10
.p2align 3
.L118:
xorl %esi, %esi
movb $66, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L119:
movl $-1, %esi
movb $75, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L117:
xorl %esi, %esi
movb $72, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L120:
movl $-1, %esi
movb $73, %dil
xorl %eax, %eax
jmp op_push_loc@PLT
.LHOTE8:
.LHOTB33:
.cfi_endproc
.size compilecast_loc, .-compilecast_loc
# ----------------------
.p2align 4,,15
# ----------------------
.globl compilefunc
.type compilefunc, @function
compilefunc:
.cfi_startproc
pushq %r15
pushq %r14
leaq (%rsi,%rsi,2), %rax
pushq %r13
pushq %r12
pushq %rbp
pushq %rbx
salq $4, %rax
movq $72057594037927935, %rbp
subq $456, %rsp
movq %rcx, 88(%rsp)
movq avma@GOTPCREL(%rip), %rcx
movq %rax, 16(%rsp)
movq %rdi, 56(%rsp)
movq %rsi, 40(%rsp)
movl $11, %esi
movl %edx, 104(%rsp)
movq (%rcx), %rcx
movq %rcx, 64(%rsp)
movq pari_tree@GOTPCREL(%rip), %rcx
addq (%rcx), %rax
movq 16(%rax), %r13
movq 8(%rax), %r12
xorl %eax, %eax
movq %r13, %rdi
call listtogen@PLT
movslq %eax, %rbx
movl $3, %esi
xorl %eax, %eax
movq %rbx, %rdi
movq %rbx, 24(%rsp)
call first_safe_arg@PLT
cltq
movl $1, %esi
movq %rbx, %rdi
movq %rax, 72(%rsp)
xorl %eax, %eax
call first_safe_arg@PLT
andq (%rbx), %rbp
cltq
cmpq $39, %r12
movq %rax, 80(%rsp)
leaq -1(%rbp), %rax
movq %rax, 8(%rsp)
jle .L122
movq pari_tree@GOTPCREL(%rip), %rax
leaq (%r12,%r12,2), %rdx
salq $4, %rdx
movq (%rax), %rax
movq 24(%rax,%rdx), %r14
addq 16(%rsp), %rax
cmpl $4, (%rax)
je .L341
.L129:
leaq .LC9(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L132
movl 104(%rsp), %eax
testl %eax, %eax
jne .L132
leaq .LC10(%rip), %rdi
call is_entry@PLT
movq %rax, 56(%rsp)
.L131:
movq 56(%rsp), %rcx
cmpq $0, 16(%rcx)
movq 32(%rcx), %rax
movq %rax, 232(%rsp)
je .L342
.L166:
movq s_opcode@GOTPCREL(%rip), %rax
leaq 224(%rsp), %rcx
leaq 220(%rsp), %rdx
movq 8(%rax), %rax
movq %rax, 136(%rsp)
movq 56(%rsp), %rax
movq 56(%rax), %rsi
leaq 232(%rsp), %rax
movq %rax, 32(%rsp)
movq %rax, %rdi
xorl %eax, %eax
call get_ret_type@PLT
movq 232(%rsp), %rbp
movl %eax, 108(%rsp)
cmpb $0, (%rbp)
je .L272
leaq (%r12,%r12,2), %rax
movq $0, 144(%rsp)
movq $0, 96(%rsp)
movq $0, 152(%rsp)
movl $1, %ebx
movq %r14, 112(%rsp)
salq $4, %rax
movq %rax, 120(%rsp)
leaq 219(%rsp), %rax
movq %rax, 48(%rsp)
movq 8(%rsp), %rax
addq $1, %rax
movq %rax, 128(%rsp)
leaq 240(%rsp), %rax
movq %rax, 160(%rsp)
.p2align 4,,10
.p2align 3
.L168:
movq pari_tree@GOTPCREL(%rip), %rax
movq 16(%rsp), %rcx
movq 48(%rsp), %rsi
movq 32(%rsp), %rdi
movq (%rax), %rax
movq 24(%rax,%rcx), %rdx
call parseproto@PLT
testl %eax, %eax
je .L343
cmpq 8(%rsp), %rbx
jg .L169
movq 24(%rsp), %rcx
movq (%rcx,%rbx,8), %rdx
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%rdx,%rdx,2), %rdx
salq $4, %rdx
addq (%rcx), %rdx
cmpl $10, (%rdx)
je .L170
leal -2(%rax), %edx
cmpl $1, %edx
jbe .L171
.L170:
cmpl $5, %eax
ja .L249
leaq .L259(%rip), %rdx
movl %eax, %ecx
movslq (%rdx,%rcx,4), %rcx
addq %rcx, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L132:
leaq .LC11(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L133
movq avma@GOTPCREL(%rip), %rax
movq $72057594037927935, %rdx
andq (%rbx), %rdx
movq (%rax), %rax
leaq 0(,%rdx,8), %rcx
movq %rax, %r12
subq %rcx, %r12
movq bot@GOTPCREL(%rip), %rcx
subq (%rcx), %rax
shrq $3, %rax
cmpq %rax, %rdx
ja .L344
.L134:
movq avma@GOTPCREL(%rip), %rax
movq %r12, (%rax)
movq $-72057594037927937, %rax
andq (%rbx), %rax
cmpq $0, 8(%rsp)
movq %rax, (%r12)
je .L335
jle .L137
movl $1, %r13d
jmp .L139
.p2align 4,,10
.p2align 3
.L138:
xorl %eax, %eax
call getvar@PLT
cltq
xorl %edi, %edi
movl $1, %esi
movq %rax, (%r12,%r13,8)
xorl %eax, %eax
addq $1, %r13
call var_push@PLT
cmpq %rbp, %r13
je .L345
.L139:
movq (%rbx,%r13,8), %rdi
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%rdi,%rdi,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $4, (%rax)
jne .L138
movq 8(%rax), %rdi
jmp .L138
.p2align 4,,10
.p2align 3
.L122:
cmpq $2, 8(%rsp)
je .L346
cmpq $1, 8(%rsp)
je .L347
movq pari_tree@GOTPCREL(%rip), %rcx
movq 16(%rsp), %rax
addq (%rcx), %rax
movq 24(%rax), %r14
jmp .L329
.p2align 4,,10
.p2align 3
.L299:
addq $1, %r14
.L329:
cmpb $41, (%r14)
je .L299
cmpl $4, (%rax)
jne .L129
.L341:
movq avma@GOTPCREL(%rip), %rax
movq (%rax), %rbx
movq bot@GOTPCREL(%rip), %rax
movq %rbx, %rcx
subq (%rax), %rcx
leaq -24(%rbx), %rbp
movq %rbp, 24(%rsp)
cmpq $23, %rcx
jbe .L348
.L130:
movq avma@GOTPCREL(%rip), %rax
movq %r12, -16(%rbx)
movq %r13, -8(%rbx)
movq $2, 8(%rsp)
movq $2, 80(%rsp)
movq $2, 72(%rsp)
movq %rbp, (%rax)
movq $3170534137668829187, %rax
movq %rax, -24(%rbx)
jmp .L131
.p2align 4,,10
.p2align 3
.L133:
leaq .LC12(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L147
movq avma@GOTPCREL(%rip), %rax
movq $72057594037927935, %rdx
andq (%rbx), %rdx
movq (%rax), %rax
leaq 0(,%rdx,8), %rcx
movq %rax, %rsi
subq %rcx, %rsi
movq bot@GOTPCREL(%rip), %rcx
movq %rsi, 16(%rsp)
subq (%rcx), %rax
shrq $3, %rax
cmpq %rax, %rdx
jbe .L148
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L148:
movq 16(%rsp), %rcx
movq avma@GOTPCREL(%rip), %rsi
movq $-72057594037927937, %rax
movl $1, %r12d
movq %rcx, (%rsi)
andq (%rbx), %rax
cmpq $0, 8(%rsp)
movq %rax, (%rcx)
jle .L152
movq %rbp, 8(%rsp)
movq %rcx, %r15
movq %r12, %rbp
jmp .L297
.p2align 4,,10
.p2align 3
.L150:
movq %r12, %rdi
xorl %eax, %eax
call getvar@PLT
movslq %eax, %r13
movq %r12, %rdx
movl %r14d, %edi
movq %r13, (%r15,%rbp,8)
movq %r13, %rsi
xorl %eax, %eax
call op_push@PLT
xorl %esi, %esi
xorl %eax, %eax
movq %r13, %rdi
call var_push@PLT
addq $1, %rbp
cmpq 8(%rsp), %rbp
je .L152
.L297:
movq (%rbx,%rbp,8), %r12
movq pari_tree@GOTPCREL(%rip), %rcx
movl $113, %r14d
leaq (%r12,%r12,2), %r13
salq $4, %r13
movq %r13, %rax
addq (%rcx), %rax
cmpl $4, (%rax)
jne .L150
movq 16(%rax), %rdi
xorl %eax, %eax
call is_node_zero@PLT
testl %eax, %eax
je .L349
.L151:
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq 8(%rax,%r13), %r12
jmp .L150
.p2align 4,,10
.p2align 3
.L218:
movzbl 219(%rsp), %eax
cmpb $80, %al
je .L228
jle .L350
cmpb $102, %al
je .L222
cmpb $112, %al
jne .L189
movq 40(%rsp), %rdx
xorl %esi, %esi
movl $78, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.p2align 4,,10
.p2align 3
.L237:
movzbl 219(%rsp), %eax
cmpb $115, %al
jne .L320
movq 128(%rsp), %r14
movq avma@GOTPCREL(%rip), %rax
subq %rbx, %r14
movq (%rax), %rax
leaq 1(%r14), %rbp
leaq 0(,%rbp,8), %rdx
movq %rax, %r12
subq %rdx, %r12
movq bot@GOTPCREL(%rip), %rdx
subq (%rdx), %rax
shrq $3, %rax
cmpq %rax, %rbp
jbe .L240
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L240:
movq avma@GOTPCREL(%rip), %rax
movq %r12, (%rax)
movq $-72057594037927936, %rax
testq %rax, %rbp
je .L241
leaq .LC0(%rip), %rsi
movl $15, %edi
xorl %eax, %eax
call pari_err@PLT
.L241:
movq $2449958197289549824, %rax
orq %rax, %rbp
testq %r14, %r14
movq %rbp, (%r12)
jle .L242
movq 24(%rsp), %rax
xorl %r13d, %r13d
movl $1, %ebp
movq $72057594037927935, %r15
leaq (%rax,%rbx,8), %rbx
.p2align 4,,10
.p2align 3
.L243:
movq -8(%rbx,%rbp,8), %rdi
xorl %eax, %eax
movl $19, %esi
call cattovec@PLT
cltq
movq %r15, %rcx
movq %rax, (%r12,%rbp,8)
andq (%rax), %rcx
addq $1, %rbp
cmpq %rbp, %r14
leaq -1(%r13,%rcx), %r13
jge .L243
movq 112(%rsp), %rdx
leaq 1(%r13), %rsi
movl $80, %edi
xorl %eax, %eax
movl $1, %ebp
movl $1, %ebx
movq $72057594037927935, %r13
call op_push_loc@PLT
.p2align 4,,10
.p2align 3
.L265:
movq (%r12,%rbp,8), %rax
movq %r13, %rdx
movl $1, %r15d
andq (%rax), %rdx
cmpq $1, %rdx
jle .L248
.p2align 4,,10
.p2align 3
.L296:
movq (%rax,%r15,8), %rdi
movl $1, %edx
movl $4, %esi
call compilenode@PLT
movq (%r12,%rbp,8), %rax
movq %rbx, %rsi
movl $83, %edi
addq $1, %rbx
movq (%rax,%r15,8), %rdx
xorl %eax, %eax
addq $1, %r15
call op_push@PLT
movq (%r12,%rbp,8), %rax
movq %r13, %rdx
andq (%rax), %rdx
cmpq %r15, %rdx
jg .L296
.L248:
addq $1, %rbp
cmpq %rbp, %r14
jge .L265
.L246:
movq 112(%rsp), %rdx
movl $1, %esi
movl $71, %edi
xorl %eax, %eax
call op_push_loc@PLT
movq 128(%rsp), %rbx
jmp .L189
.p2align 4,,10
.p2align 3
.L231:
movzbl 219(%rsp), %esi
addq $1, %rbx
leal -71(%rsi), %eax
cmpb $44, %al
ja .L225
leaq .L234(%rip), %rdx
movzbl %al, %eax
movslq (%rdx,%rax,4), %rax
addq %rax, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L224:
movzbl 219(%rsp), %esi
addq $1, %rbx
leal -38(%rsi), %eax
cmpb $77, %al
ja .L225
leaq .L227(%rip), %rdx
movzbl %al, %eax
movslq (%rdx,%rax,4), %rax
addq %rax, %rdx
jmp *%rdx
.L152:
movq 16(%rsp), %rsi
movq %rbx, %rdi
xorl %eax, %eax
call checkdups@PLT
.L335:
movl 104(%rsp), %edx
movq 40(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
call compilecast@PLT
.L336:
movq avma@GOTPCREL(%rip), %rax
movq 64(%rsp), %rcx
movq %rcx, (%rax)
.L121:
addq $456, %rsp
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
popq %r15
ret
.p2align 4,,10
.p2align 3
.L249:
leaq .LC31(%rip), %rsi
movl %eax, %edx
movl $2, %edi
xorl %eax, %eax
call pari_err@PLT
.p2align 4,,10
.p2align 3
.L189:
movq 232(%rsp), %rbp
jmp .L168
.L172:
movq pari_tree@GOTPCREL(%rip), %rcx
movq 16(%rsp), %rax
leaq .LC21(%rip), %rdi
addq (%rcx), %rax
movq 32(%rax), %rdx
movq 24(%rax), %rax
leaq -1(%rax,%rdx), %rsi
call compile_err@PLT
.L171:
movzbl 219(%rsp), %r14d
leal -69(%r14), %eax
testb $-5, %al
je .L173
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rcx
movq 24(%rsp), %rax
movq (%rax,%rbx,8), %rax
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq %rcx, %rax
movl (%rax), %edx
movq 8(%rax), %rsi
cmpq $10, %rdx
je .L351
testq %rdx, %rdx
jne .L173
leaq (%rsi,%rsi,2), %rax
leaq .LC23(%rip), %rdi
salq $4, %rax
movq 24(%rcx,%rax), %rsi
addq 32(%rcx,%rax), %rsi
call compile_err@PLT
movzbl 219(%rsp), %r14d
.p2align 4,,10
.p2align 3
.L173:
leal -38(%r14), %eax
cmpb $77, %al
ja .L175
movzbl %al, %edx
leaq .L177(%rip), %rax
movslq (%rax,%rdx,4), %rdx
addq %rdx, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L169:
cmpl $5, %eax
ja .L249
leaq .L260(%rip), %rcx
movl %eax, %edx
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L343:
cmpq 8(%rsp), %rbx
movq 112(%rsp), %r14
jle .L352
.L251:
movq 56(%rsp), %rsi
movl 108(%rsp), %edi
xorl %eax, %eax
movq %r14, %rdx
call op_push_loc@PLT
testb $2, 224(%rsp)
je .L252
testb $2, 88(%rsp)
je .L353
.L252:
movl 220(%rsp), %esi
cmpl $4, %esi
je .L354
movl 104(%rsp), %edx
movq 40(%rsp), %rdi
xorl %eax, %eax
call compilecast@PLT
cmpq $0, 96(%rsp)
je .L336
.L258:
movq 96(%rsp), %rsi
movq %r14, %rdx
movl $89, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L336
.p2align 4,,10
.p2align 3
.L272:
movl $1, %ebx
cmpq 8(%rsp), %rbx
movq $0, 96(%rsp)
jg .L251
.L352:
movq 24(%rsp), %rax
movq pari_tree@GOTPCREL(%rip), %rcx
leaq .LC32(%rip), %rdi
movq (%rax,%rbx,8), %rax
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rcx), %rax
movq 24(%rax), %rsi
call compile_err@PLT
jmp .L251
.L320:
movq pari_tree@GOTPCREL(%rip), %rcx
movq 120(%rsp), %rsi
movsbl %al, %edx
movl $5, %edi
xorl %eax, %eax
addq (%rcx), %rsi
movq 32(%rsi), %rcx
movq 24(%rsi), %r8
leaq .LC30(%rip), %rsi
call pari_err@PLT
jmp .L189
.L147:
leaq .LC13(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L153
cmpq $0, 8(%rsp)
movl $1, %r14d
jg .L298
jmp .L335
.p2align 4,,10
.p2align 3
.L155:
movq %r12, %rdi
xorl %eax, %eax
call getvar@PLT
movq %r12, %rdx
movslq %eax, %rsi
movl $102, %edi
xorl %eax, %eax
call op_push@PLT
movq %r12, %rdx
movl $1, %esi
movl $71, %edi
xorl %eax, %eax
call op_push@PLT
.L156:
addq $1, %r14
cmpq %rbp, %r14
je .L335
.L298:
movq (%rbx,%r14,8), %r12
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%r12,%r12,2), %r13
salq $4, %r13
movq %r13, %rax
addq (%rcx), %rax
cmpl $4, (%rax)
jne .L155
movq 16(%rax), %rdi
xorl %edx, %edx
movl $4, %esi
call compilenode@PLT
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rax
movq 8(%rax,%r13), %r12
xorl %eax, %eax
movq %r12, %rdi
call getvar@PLT
movq %r12, %rdx
movslq %eax, %rsi
movl $103, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L156
.L346:
movq pari_tree@GOTPCREL(%rip), %rax
movq 8(%rbx), %rdx
movq (%rax), %rax
leaq (%rdx,%rdx,2), %rdx
salq $4, %rdx
movq 24(%rax,%rdx), %rcx
addq 32(%rax,%rdx), %rcx
addq 16(%rsp), %rax
movq %rcx, %r14
jmp .L329
.L350:
cmpb $67, %al
jne .L189
xorl %eax, %eax
call pack_localvars@PLT
movl %eax, %edi
xorl %eax, %eax
call data_push@PLT
movq 40(%rsp), %rdx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L344:
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
jmp .L134
.L348:
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
jmp .L130
.L236:
movq pari_tree@GOTPCREL(%rip), %rax
movq 16(%rsp), %rcx
movq %rbp, %rsi
movq 232(%rsp), %rdi
movq (%rax), %rax
movq 24(%rax,%rcx), %rdx
xorl %eax, %eax
call str_defproto@PLT
movq 40(%rsp), %rdx
movl $-1, %esi
movl $74, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L235:
leaq 1(%rbp), %rdi
xorl %esi, %esi
movl $10, %edx
call strtol@PLT
movq 40(%rsp), %rdx
movq %rax, %rsi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L233:
leaq 1(%rbp), %rdi
xorl %esi, %esi
movl $10, %edx
call strtol@PLT
movq 40(%rsp), %rdx
movq %rax, %rsi
movl $69, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L228:
movq 40(%rsp), %rdx
xorl %esi, %esi
movl $79, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L230:
movq 40(%rsp), %rdx
movl $-1, %esi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L229:
movq 144(%rsp), %rax
movq $-1, 288(%rsp,%rax,8)
addq $1, %rax
movq %rax, 144(%rsp)
jmp .L189
.L226:
movq 40(%rsp), %rdx
xorl %esi, %esi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L353:
movq %r14, %rdx
xorl %esi, %esi
movl $76, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L252
.L225:
movq pari_tree@GOTPCREL(%rip), %rcx
movq 120(%rsp), %rax
movsbl %sil, %edx
addq (%rcx), %rax
movq 32(%rax), %rcx
.L332:
movq 24(%rax), %r8
leaq .LC29(%rip), %rsi
movl $5, %edi
xorl %eax, %eax
call pari_err@PLT
jmp .L189
.L345:
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
call checkdups@PLT
movq 8(%rsp), %rsi
movq %r14, %rdx
movl $100, %edi
xorl %eax, %eax
movl $1, %r13d
call op_push_loc@PLT
movq %r12, %rdi
xorl %eax, %eax
call frame_push@PLT
movq %rbx, %rcx
movq s_lvar@GOTPCREL(%rip), %r15
movq localvars@GOTPCREL(%rip), %r14
movq 8(%rsp), %rbx
jmp .L144
.p2align 4,,10
.p2align 3
.L142:
movq %r13, %rax
movq (%r12,%r13,8), %rdx
addq $1, %r13
subq %rbx, %rax
addq 8(%r15), %rax
salq $4, %rax
addq (%r14), %rax
cmpq %rbp, %r13
movq %rdx, -8(%rax)
je .L335
.L144:
movq (%rcx,%r13,8), %r8
movq pari_tree@GOTPCREL(%rip), %rdi
leaq (%r8,%r8,2), %rsi
salq $4, %rsi
movq %rsi, %rax
addq (%rdi), %rax
cmpl $4, (%rax)
jne .L142
movq 16(%rax), %rdi
xorl %eax, %eax
movq %rcx, 24(%rsp)
movq %rsi, 16(%rsp)
movq %r8, 8(%rsp)
call is_node_zero@PLT
testl %eax, %eax
movq 16(%rsp), %rsi
movq 24(%rsp), %rcx
jne .L142
movq pari_tree@GOTPCREL(%rip), %rax
movl $2, %edx
movq %rcx, 16(%rsp)
movq (%rax), %rax
movq 16(%rax,%rsi), %rdi
movl $4, %esi
call compilenode@PLT
movq 8(%rsp), %r8
movq %r13, %rsi
movl $107, %edi
subq %rbp, %rsi
xorl %eax, %eax
movq %r8, %rdx
call op_push@PLT
movq 16(%rsp), %rcx
jmp .L142
.L354:
cmpq $0, 96(%rsp)
jne .L254
movq 136(%rsp), %rax
movq s_opcode@GOTPCREL(%rip), %rcx
subq $-128, %rax
cmpq %rax, 8(%rcx)
jg .L355
.L255:
movl 104(%rsp), %edx
movq 40(%rsp), %rdi
xorl %eax, %eax
call compilecast@PLT
jmp .L336
.L347:
movq pari_tree@GOTPCREL(%rip), %rax
movq 8(%rbx), %rdx
movq (%rax), %rax
leaq (%rdx,%rdx,2), %rdx
salq $4, %rdx
movq 24(%rax,%rdx), %r14
addq 16(%rsp), %rax
jmp .L329
.L222:
movq 40(%rsp), %rdx
leaq foo.20737(%rip), %rsi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L254:
movl 104(%rsp), %edx
movq 40(%rsp), %rdi
movl $4, %esi
xorl %eax, %eax
call compilecast@PLT
jmp .L258
.L349:
movq pari_tree@GOTPCREL(%rip), %rax
movl $2, %edx
movl $4, %esi
movb $112, %r14b
movq (%rax), %rax
movq 16(%rax,%r13), %rdi
call compilenode@PLT
jmp .L151
.L187:
movq 24(%rsp), %rax
leaq 1(%rbx), %r12
movl $19, %esi
movq $72057594037927935, %rbp
movq (%rax,%rbx,8), %rbx
xorl %eax, %eax
movq %rbx, %rdi
call cattovec@PLT
movslq %eax, %r14
andq (%r14), %rbp
leaq -1(%rbp), %rcx
cmpq $1, %rcx
je .L356
xorl %eax, %eax
movq %rbx, %rdx
movq %rbp, %rsi
movl $80, %edi
movq %rcx, 168(%rsp)
movl $1, %r13d
call op_push@PLT
movq 168(%rsp), %rcx
testq %rcx, %rcx
jle .L217
.p2align 4,,10
.p2align 3
.L295:
movq (%r14,%r13,8), %rdi
movl $1, %edx
movl $4, %esi
call compilenode@PLT
movq %r13, %rsi
xorl %eax, %eax
movq %rbx, %rdx
movl $83, %edi
addq $1, %r13
call op_push@PLT
cmpq %rbp, %r13
jne .L295
.L217:
movq %rbx, %rdx
movl $1, %esi
movl $71, %edi
xorl %eax, %eax
call op_push@PLT
leaq .LC28(%rip), %rdi
call is_entry@PLT
movq %rbx, %rdx
movq %rax, %rsi
movl $95, %edi
xorl %eax, %eax
call op_push@PLT
.L333:
movq %rbx, %rdx
movl $-1, %esi
movl $74, %edi
xorl %eax, %eax
movq %r12, %rbx
call op_push@PLT
jmp .L189
.L176:
movq 24(%rsp), %rax
cmpb $38, %r14b
leaq 1(%rbx), %rbp
movq (%rax,%rbx,8), %rdi
je .L357
.L196:
xorl %eax, %eax
call detag@PLT
movslq %eax, %rbx
xorl %eax, %eax
movq %rbx, %rdi
call getlvalue@PLT
movslq %eax, %r12
xorl %eax, %eax
movq %r12, %rdi
call getmvar@PLT
movslq %eax, %rsi
movq pari_tree@GOTPCREL(%rip), %rax
leaq (%rbx,%rbx,2), %rdx
salq $4, %rdx
addq (%rax), %rdx
cmpl $16, (%rdx)
movq 40(%rsp), %rdx
je .L358
testq %rsi, %rsi
je .L201
movl $108, %edi
xorl %eax, %eax
call op_push@PLT
.L202:
movq %rbx, %rdi
xorl %eax, %eax
call compilelvalue@PLT
movq 40(%rsp), %rdx
xorl %esi, %esi
movl $88, %edi
xorl %eax, %eax
call op_push@PLT
.L200:
addq $1, 96(%rsp)
movq %rbp, %rbx
jmp .L189
.L178:
movq 24(%rsp), %rax
leaq 1(%rbx), %r12
movq 144(%rsp), %rcx
movl $4, %esi
movq (%rax,%rbx,8), %rax
movq pari_tree@GOTPCREL(%rip), %rbx
leaq 1(%rcx), %rbp
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rbx), %rax
movq %r12, %rbx
movq 8(%rax), %rdx
movq 16(%rax), %rdi
movq %rdx, 288(%rsp,%rcx,8)
movl $2, %edx
call compilenode@PLT
movq %rbp, 144(%rsp)
jmp .L189
.L179:
leaq 1(%rbx), %rax
movq 160(%rsp), %rdi
movq %rax, 184(%rsp)
movq 24(%rsp), %rax
movq (%rax,%rbx,8), %rax
movq %rax, 168(%rsp)
movq %rax, %rbx
xorl %eax, %eax
cmpb $73, %r14b
setne %al
sall $2, %eax
movl %eax, 200(%rsp)
xorl %eax, %eax
call getcodepos@PLT
cmpq $0, 144(%rsp)
jne .L204
leaq (%rbx,%rbx,2), %rax
salq $4, %rax
movq %rax, 176(%rsp)
movq %rax, %rcx
.L205:
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rax
cmpl $10, (%rax,%rcx)
je .L359
movl 200(%rsp), %esi
movq 168(%rsp), %rdi
xorl %edx, %edx
cmpb $73, %r14b
setne %dl
call compilenode@PLT
.L213:
movq 160(%rsp), %rdi
xorl %eax, %eax
call getclosure@PLT
movl %eax, %edi
xorl %eax, %eax
call data_push@PLT
movq 168(%rsp), %rdx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
call op_push@PLT
movq 184(%rsp), %rbx
jmp .L189
.L180:
xorl %edx, %edx
cmpq 80(%rsp), %rbx
jl .L188
xorl %edx, %edx
cmpq 72(%rsp), %rbx
setl %dl
leaq 2(%rdx,%rdx), %rdx
.L188:
movq 24(%rsp), %rax
movl $4, %esi
movq (%rax,%rbx,8), %rdi
addq $1, %rbx
call compilenode@PLT
jmp .L189
.L181:
movq 24(%rsp), %rax
movq (%rax,%rbx,8), %r13
.L192:
xorl %edx, %edx
movl $1, %esi
movq %r13, %rdi
addq $1, %rbx
call compilenode@PLT
jmp .L189
.L182:
movq pari_tree@GOTPCREL(%rip), %rax
movq (%rax), %rdx
movq 24(%rsp), %rax
leaq (%rax,%rbx,8), %rbp
movq (%rbp), %r13
leaq (%r13,%r13,2), %r12
salq $4, %r12
addq %rdx, %r12
movl (%r12), %ecx
cmpl $14, %ecx
je .L192
cmpq $0, 152(%rsp)
je .L360
.L193:
movq 152(%rsp), %rdi
movl $10, %esi
movl %ecx, 200(%rsp)
movq %rdx, 168(%rsp)
call strchr@PLT
testq %rax, %rax
movq %rax, %r14
movq 168(%rsp), %rdx
movl 200(%rsp), %ecx
je .L361
.L194:
leaq 1(%r14), %rax
cmpl $13, %ecx
movq %rax, 152(%rsp)
jne .L195
cmpq $0, 8(%r12)
je .L362
.L195:
xorl %edx, %edx
movq %r13, %rdi
movl $4, %esi
call compilenode@PLT
movq 40(%rsp), %r14
movq 152(%rsp), %rsi
movl $65, %edi
xorl %eax, %eax
addq $1, %rbx
movq %r14, %rdx
call op_push@PLT
leaq .LC25(%rip), %rdi
call is_entry@PLT
movq %r14, %rdx
movq %rax, %rsi
movl $96, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L183:
movq 24(%rsp), %rax
leaq 1(%rbx), %rbp
movq (%rax,%rbx,8), %rbx
xorl %eax, %eax
movq %rbx, %rdi
call getvar@PLT
movq 144(%rsp), %rax
movq %rbx, 288(%rsp,%rax,8)
addq $1, %rax
movq %rbp, %rbx
movq %rax, 144(%rsp)
jmp .L189
.L184:
movq 24(%rsp), %rax
leaq (%rax,%rbx,8), %rbp
xorl %eax, %eax
movq (%rbp), %rdi
call getlvalue@PLT
movslq %eax, %r12
xorl %eax, %eax
movq %r12, %rdi
call getmvar@PLT
movslq %eax, %rsi
movq 40(%rsp), %rdx
testq %rsi, %rsi
je .L190
movl $121, %edi
xorl %eax, %eax
call op_push@PLT
.L191:
movq (%rbp), %rdi
movl $2, %edx
movl $4, %esi
addq $1, %rbx
call compilenode@PLT
jmp .L189
.L185:
movq 24(%rsp), %rax
leaq 1(%rbx), %rbp
xorl %edx, %edx
movl $3, %esi
movq (%rax,%rbx,8), %rdi
movq %rbp, %rbx
call compilenode@PLT
jmp .L189
.L186:
movq 24(%rsp), %rax
leaq 1(%rbx), %rbp
movq (%rax,%rbx,8), %rdi
movq pari_tree@GOTPCREL(%rip), %rax
leaq (%rdi,%rdi,2), %rdx
movq (%rax), %rcx
salq $4, %rdx
addq %rcx, %rdx
cmpl $16, (%rdx)
je .L363
movl $2, %edx
movl $4, %esi
call compilenode@PLT
movq 40(%rsp), %rdx
.L334:
movl $-1, %esi
movl $74, %edi
xorl %eax, %eax
call op_push@PLT
movq %rbp, %rbx
jmp .L189
.L355:
movq 136(%rsp), %rdi
movq %r14, %rcx
xorl %edx, %edx
movb $118, %sil
xorl %eax, %eax
call op_insert_loc@PLT
xorl %esi, %esi
movq %r14, %rdx
movl $119, %edi
xorl %eax, %eax
call op_push_loc@PLT
movl 220(%rsp), %esi
jmp .L255
.L175:
movq pari_tree@GOTPCREL(%rip), %rcx
movq 120(%rsp), %rax
movsbl %r14b, %edx
addq (%rcx), %rax
movq 32(%rax), %rcx
jmp .L332
.L153:
leaq .LC14(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
jne .L162
movq compatible@GOTPCREL(%rip), %rax
cmpq $3, (%rax)
je .L364
.L161:
cmpq $33, %r12
je .L365
cmpq $37, %r12
je .L366
cmpq $2, 8(%rsp)
jne .L165
cmpq $18, %r12
jne .L165
movq 16(%rbx), %rax
movq pari_tree@GOTPCREL(%rip), %rcx
movq $2, 8(%rsp)
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $14, (%rax)
jne .L131
leaq .LC18(%rip), %rdi
call is_entry@PLT
movq %rax, 56(%rsp)
jmp .L131
.p2align 4,,10
.p2align 3
.L342:
movq pari_tree@GOTPCREL(%rip), %rax
movq 16(%rsp), %rcx
leaq .LC20(%rip), %rdi
movq (%rax), %rax
movq 24(%rax,%rcx), %rsi
call compile_err@PLT
jmp .L166
.L351:
movq 24(%rax), %rsi
leaq .LC22(%rip), %rdi
call compile_err@PLT
movzbl 219(%rsp), %r14d
jmp .L173
.L364:
leaq .LC15(%rip), %rsi
xorl %eax, %eax
movq %r12, %rdi
call is_func_named@PLT
testl %eax, %eax
je .L161
.L162:
cmpq $1, 8(%rsp)
je .L160
movq pari_tree@GOTPCREL(%rip), %rcx
movq 16(%rsp), %rax
leaq .LC16(%rip), %rdi
addq (%rcx), %rax
movq 32(%rax), %rdx
movq 24(%rax), %rax
leaq -1(%rax,%rdx), %rsi
call compile_err@PLT
.L160:
leaq .LC17(%rip), %rdi
call is_entry@PLT
movq %rax, 56(%rsp)
movq 8(%rbx), %rax
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $18, (%rax)
jne .L131
cmpq $18, 8(%rax)
jne .L131
movq 16(%rax), %rdi
movl $11, %esi
xorl %eax, %eax
call listtogen@PLT
cltq
movl $3, %esi
movq %rax, %rbx
movq %rax, 24(%rsp)
movq $72057594037927935, %rax
andq (%rbx), %rax
movq %rbx, %rdi
subq $1, %rax
movq %rax, 8(%rsp)
xorl %eax, %eax
call first_safe_arg@PLT
cltq
movl $1, %esi
movq %rbx, %rdi
movq %rax, 72(%rsp)
xorl %eax, %eax
call first_safe_arg@PLT
cltq
movq %rax, 80(%rsp)
jmp .L131
.p2align 4,,10
.p2align 3
.L242:
movq 112(%rsp), %rdx
movl $1, %esi
movl $80, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L246
.L190:
movq %r12, %rsi
movl $120, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L191
.L137:
movq %r12, %rsi
movq %rbx, %rdi
xorl %eax, %eax
call checkdups@PLT
movq 8(%rsp), %rsi
movq %r14, %rdx
movl $100, %edi
xorl %eax, %eax
call op_push_loc@PLT
movq %r12, %rdi
xorl %eax, %eax
call frame_push@PLT
jmp .L335
.L201:
movq %r12, %rsi
movl $104, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L202
.L165:
cmpq $19, %r12
jne .L131
movq 8(%rbx), %rax
movq pari_tree@GOTPCREL(%rip), %rcx
leaq .LC19(%rip), %rdi
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%rcx), %rax
movq 32(%rax), %rsi
addq 24(%rax), %rsi
call compile_err@PLT
jmp .L131
.L359:
movl 200(%rsp), %edx
movq 168(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
call compilecast@PLT
jmp .L213
.L204:
movq 144(%rsp), %rax
movq bot@GOTPCREL(%rip), %rcx
leaq 1(%rax), %rdx
movq avma@GOTPCREL(%rip), %rax
leaq 0(,%rdx,8), %rbx
movq (%rax), %rax
movq %rax, %rbp
subq (%rcx), %rax
subq %rbx, %rbp
shrq $3, %rax
cmpq %rax, %rdx
jbe .L206
movl $14, %edi
xorl %eax, %eax
movq %rdx, 176(%rsp)
call pari_err@PLT
movq 176(%rsp), %rdx
.L206:
movq avma@GOTPCREL(%rip), %rax
movq %rbp, (%rax)
movq $-72057594037927936, %rax
testq %rax, %rdx
jne .L367
movq avma@GOTPCREL(%rip), %rax
movq $3170534137668829184, %r12
orq %rdx, %r12
movq %r12, (%rbp)
movq (%rax), %rax
movq %rax, %rcx
subq %rbx, %rcx
movq %rcx, %rbx
movq bot@GOTPCREL(%rip), %rcx
subq (%rcx), %rax
shrq $3, %rax
cmpq %rax, %rdx
jbe .L331
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L331:
movq avma@GOTPCREL(%rip), %rax
movq %rbx, (%rax)
.L261:
movq 168(%rsp), %rax
movq %r12, (%rbx)
xorl %r13d, %r13d
leaq 288(%rsp), %r12
movq 144(%rsp), %r15
movb %r14b, 207(%rsp)
leaq (%rax,%rax,2), %rax
salq $4, %rax
movq %rax, 192(%rsp)
movq %rax, 176(%rsp)
jmp .L211
.p2align 4,,10
.p2align 3
.L210:
movq %r14, %rdi
xorl %eax, %eax
call getvar@PLT
movslq %eax, %rdi
movl $1, %esi
xorl %eax, %eax
movq %rdi, 8(%rbp,%r13,8)
movq %r14, 8(%rbx,%r13,8)
addq $1, %r13
call var_push@PLT
cmpq %r13, %r15
jle .L368
.L211:
movq (%r12,%r13,8), %r14
testq %r14, %r14
jns .L210
movq pari_tree@GOTPCREL(%rip), %rax
movq 192(%rsp), %rcx
leaq .LC27(%rip), %rdi
movq (%rax), %rax
movq 24(%rax,%rcx), %rsi
subq $1, %rsi
call compile_err@PLT
jmp .L210
.L368:
movq %rbp, %rsi
movq %rbx, %rdi
xorl %eax, %eax
movzbl 207(%rsp), %r14d
call checkdups@PLT
movq %rbp, %rdi
xorl %eax, %eax
call frame_push@PLT
movq 176(%rsp), %rcx
jmp .L205
.L356:
movq 8(%r14), %rdi
movl $2, %edx
movl $4, %esi
call compilenode@PLT
jmp .L333
.L363:
movq 8(%rdx), %rax
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq %rcx, %rax
movq 32(%rax), %rsi
movq 24(%rax), %rdi
call strntoGENstr@PLT
movq %rax, %rdi
xorl %eax, %eax
call data_push@PLT
movq 40(%rsp), %rbx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push@PLT
movq %rbx, %rdx
jmp .L334
.L358:
testq %rsi, %rsi
je .L199
movl $109, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L200
.L357:
leaq (%rdi,%rdi,2), %rbx
movq pari_tree@GOTPCREL(%rip), %rcx
salq $4, %rbx
movq %rbx, %rax
addq (%rcx), %rax
cmpl $12, (%rax)
je .L197
movq 24(%rax), %rsi
leaq .LC26(%rip), %rdi
call compile_err@PLT
movq pari_tree@GOTPCREL(%rip), %rcx
movq %rbx, %rax
addq (%rcx), %rax
.L197:
movq 8(%rax), %rdi
jmp .L196
.L360:
movq 56(%rsp), %rax
movq 32(%rax), %rax
movq %rax, 152(%rsp)
jmp .L193
.L362:
movq 32(%r12), %rsi
movq 24(%r12), %rdi
addq $1, %rbx
call strntoGENexp@PLT
movq 152(%rsp), %rsi
movq %rax, %rdi
call eval_mnemonic@PLT
movq 40(%rsp), %rdx
movq %rax, %rsi
movl $65, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L189
.L366:
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%r13,%r13,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $9, (%rax)
jne .L131
movq avma@GOTPCREL(%rip), %rax
movq 64(%rsp), %rcx
movl $82, %edx
movl 104(%rsp), %esi
movq %r13, %rdi
movq %rcx, (%rax)
xorl %eax, %eax
call compilevec@PLT
jmp .L121
.p2align 4,,10
.p2align 3
.L365:
movq pari_tree@GOTPCREL(%rip), %rcx
leaq (%r13,%r13,2), %rax
salq $4, %rax
addq (%rcx), %rax
cmpl $14, (%rax)
jne .L131
movq 8(%rax), %rsi
movq avma@GOTPCREL(%rip), %rcx
movq %r13, %rdi
movq 64(%rsp), %rbx
movl 104(%rsp), %edx
xorl %eax, %eax
negq %rsi
movq %rbx, (%rcx)
call compilesmall@PLT
jmp .L121
.p2align 4,,10
.p2align 3
.L367:
leaq .LC0(%rip), %rsi
xorl %eax, %eax
movl $15, %edi
movq %rdx, 176(%rsp)
movq $3170534137668829184, %r12
call pari_err@PLT
movq 176(%rsp), %rdx
movq avma@GOTPCREL(%rip), %rax
orq %rdx, %r12
movq %r12, (%rbp)
movq (%rax), %rax
movq %rax, %rcx
subq %rbx, %rcx
movq %rcx, %rbx
movq bot@GOTPCREL(%rip), %rcx
subq (%rcx), %rax
shrq $3, %rax
cmpq %rax, %rdx
jbe .L330
movl $14, %edi
xorl %eax, %eax
call pari_err@PLT
.L330:
movq avma@GOTPCREL(%rip), %rax
leaq .LC0(%rip), %rsi
movl $15, %edi
movq %rbx, (%rax)
xorl %eax, %eax
call pari_err@PLT
jmp .L261
.L199:
movq %r12, %rsi
movl $105, %edi
xorl %eax, %eax
call op_push@PLT
jmp .L200
.L361:
movq 16(%rsp), %rax
leaq .LC24(%rip), %rdi
movq 24(%rdx,%rax), %rsi
call compile_err@PLT
movq (%rbp), %r13
movq pari_tree@GOTPCREL(%rip), %rax
leaq (%r13,%r13,2), %r12
salq $4, %r12
addq (%rax), %r12
movl (%r12), %ecx
jmp .L194
.LHOTE33:
.LHOTB38:
.cfi_endproc
.size compilefunc, .-compilefunc
# ----------------------
.section .rodata
.align 4
.L259:
.long .L249-.L259
.long .L171-.L259
.long .L224-.L259
.long .L231-.L259
.long .L237-.L259
.long .L218-.L259
.align 4
.L234:
.long .L233-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L235-.L234
.long .L235-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L225-.L234
.long .L236-.L234
.long .L236-.L234
.align 4
.L227:
.long .L226-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L226-.L227
.long .L225-.L227
.long .L226-.L227
.long .L225-.L227
.long .L226-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L228-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L229-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L230-.L227
.long .L225-.L227
.long .L225-.L227
.long .L225-.L227
.long .L226-.L227
.long .L226-.L227
.align 4
.L177:
.long .L176-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L176-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L178-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L179-.L177
.long .L175-.L177
.long .L180-.L177
.long .L175-.L177
.long .L179-.L177
.long .L175-.L177
.long .L175-.L177
.long .L181-.L177
.long .L182-.L177
.long .L175-.L177
.long .L175-.L177
.long .L181-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L183-.L177
.long .L184-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L185-.L177
.long .L175-.L177
.long .L175-.L177
.long .L175-.L177
.long .L186-.L177
.long .L187-.L177
.align 4
.L260:
.long .L249-.L260
.long .L172-.L260
.long .L224-.L260
.long .L231-.L260
.long .L237-.L260
.long .L218-.L260
.align 4
.L395:
.long .L420-.L395
.long .L394-.L395
.long .L396-.L395
.long .L397-.L395
.long .L398-.L395
.long .L399-.L395
.align 4
.L410:
.long .L409-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L411-.L410
.long .L411-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L408-.L410
.long .L412-.L410
.long .L412-.L410
.align 4
.L405:
.long .L399-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L399-.L405
.long .L404-.L405
.long .L399-.L405
.long .L404-.L405
.long .L399-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L406-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L399-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L407-.L405
.long .L404-.L405
.long .L404-.L405
.long .L404-.L405
.long .L399-.L405
.long .L399-.L405
.align 4
.L400:
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L401-.L400
.long .L401-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L420-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L407-.L400
.long .L399-.L400
.long .L399-.L400
.long .L399-.L400
.long .L403-.L400
.long .L403-.L400
.align 4
.L454:
.long .L453-.L454
.long .L452-.L454
.long .L452-.L454
.long .L452-.L454
.long .L455-.L454
.long .L456-.L454
.long .L452-.L454
.long .L452-.L454
.long .L457-.L454
.long .L458-.L454
.long .L459-.L454
.long .L452-.L454
.long .L460-.L454
.long .L459-.L454
.long .L459-.L454
.long .L461-.L454
.long .L459-.L454
.long .L462-.L454
.long .L463-.L454
.long .L464-.L454
.align 4
.L504:
.long .L501-.L504
.long .L478-.L504
.long .L494-.L504
.long .L494-.L504
.long .L496-.L504
.long .L530-.L504
.align 4
.L483:
.long .L482-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L482-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L484-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L485-.L483
.long .L481-.L483
.long .L486-.L483
.long .L481-.L483
.long .L485-.L483
.long .L481-.L483
.long .L481-.L483
.long .L486-.L483
.long .L486-.L483
.long .L481-.L483
.long .L481-.L483
.long .L486-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L487-.L483
.long .L488-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L486-.L483
.long .L481-.L483
.long .L481-.L483
.long .L481-.L483
.long .L487-.L483
.long .L489-.L483
.align 4
.L506:
.long .L501-.L506
.long .L479-.L506
.long .L494-.L506
.long .L494-.L506
.long .L496-.L506
.long .L473-.L506
# ----------------------
.text
.p2align 4,,15
# ----------------------
.globl genclosure
.type genclosure, @function
genclosure:
.cfi_startproc
pushq %r15
pushq %r14
xorl %r14d, %r14d
pushq %r13
pushq %r12
xorl %r12d, %r12d
pushq %rbp
pushq %rbx
xorl %ebp, %ebp
xorl %ebx, %ebx
subq $152, %rsp
movq 32(%rdi), %rax
movq %rdi, 16(%rsp)
movq %rdx, 8(%rsp)
leaq 68(%rsp), %rdx
movl %ecx, 24(%rsp)
leaq 88(%rsp), %rcx
movq %rsi, (%rsp)
movq %rax, 72(%rsp)
movq 56(%rdi), %rax
leaq 72(%rsp), %rdi
leaq 67(%rsp), %r13
leaq 80(%rsp), %r15
movq %rax, 32(%rsp)
movq %rax, %rsi
xorl %eax, %eax
call get_ret_type@PLT
movl %eax, 44(%rsp)
movq 72(%rsp), %rax
movq %rax, 80(%rsp)
.p2align 4,,10
.p2align 3
.L370:
xorl %edx, %edx
movq %r13, %rsi
movq %r15, %rdi
call parseproto@PLT
testl %eax, %eax
je .L442
cmpl $5, %eax
je .L416
testq %r12, %r12
jne .L420
movzbl 67(%rsp), %ecx
cmpb $86, %cl
je .L370
addq %rbx, %rbx
addq %rbp, %rbp
addq $1, %r14
cmpl $1, %eax
je .L373
cmpl $2, %eax
jne .L370
subl $38, %ecx
cmpb $35, %cl
ja .L370
movl $1, %eax
movq %rbp, %rdx
salq %cl, %rax
movq $36507222017, %rcx
orq $1, %rdx
testq %rcx, %rax
cmovne %rdx, %rbp
jmp .L370
.p2align 4,,10
.p2align 3
.L416:
movl $1, %r12d
jmp .L370
.p2align 4,,10
.p2align 3
.L373:
orq $1, %rbx
jmp .L370
.p2align 4,,10
.p2align 3
.L420:
xorl %eax, %eax
.L372:
addq $152, %rsp
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
popq %r15
ret
.p2align 4,,10
.p2align 3
.L442:
movl 24(%rsp), %eax
testl %eax, %eax
je .L376
testq %rbx, %rbx
jne .L376
movq 16(%rsp), %rax
testb $1, 9(%rax)
je .L376
movq gen_0@GOTPCREL(%rip), %rax
movq (%rax), %rax
jmp .L372
.p2align 4,,10
.p2align 3
.L376:
leaq 96(%rsp), %rax
movq %rax, 56(%rsp)
movq %rax, %rdi
xorl %eax, %eax
call getcodepos@PLT
cmpq %r14, 8(%rsp)
movq dbgstart@GOTPCREL(%rip), %rax
movq (%rsp), %rsi
movq %rsi, (%rax)
jg .L443
cmpq $0, 8(%rsp)
jle .L382
.L378:
movl $1, %r12d
movq %r14, 24(%rsp)
movq %rbx, 48(%rsp)
movq (%rsp), %r14
movq %r12, %rbx
movq 8(%rsp), %r12
.p2align 4,,10
.p2align 3
.L381:
xorl %edi, %edi
xorl %eax, %eax
addq $1, %rbx
call data_push@PLT
movq %r14, %rdx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
call op_push_loc@PLT
cmpq %rbx, %r12
jge .L381
movq 24(%rsp), %r14
movq 48(%rsp), %rbx
.L382:
testq %rbx, %rbx
jne .L444
.L380:
testq %rbp, %rbp
jne .L445
.L383:
movq 72(%rsp), %rax
movq %rax, 80(%rsp)
.p2align 4,,10
.p2align 3
.L384:
xorl %edx, %edx
movq %r13, %rsi
movq %r15, %rdi
call parseproto@PLT
testl %eax, %eax
je .L446
cmpl $5, %eax
jne .L384
movzbl 67(%rsp), %eax
cmpb $80, %al
je .L387
jle .L447
cmpb $102, %al
je .L390
cmpb $112, %al
jne .L384
movq (%rsp), %rdx
xorl %esi, %esi
movl $78, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L384
.p2align 4,,10
.p2align 3
.L447:
cmpb $67, %al
jne .L384
xorl %eax, %eax
call pack_localvars@PLT
movl %eax, %edi
xorl %eax, %eax
call data_push@PLT
movq (%rsp), %rdx
movl %eax, %esi
movl $67, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L384
.p2align 4,,10
.p2align 3
.L390:
movq (%rsp), %rdx
leaq foo.20841(%rip), %rsi
movl $65, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L384
.p2align 4,,10
.p2align 3
.L387:
movq (%rsp), %rdx
xorl %esi, %esi
movl $79, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L384
.p2align 4,,10
.p2align 3
.L446:
movq 32(%rsp), %rax
movq 72(%rsp), %rbx
leaq .L395(%rip), %rbp
leaq .L400(%rip), %r12
movq %r14, 24(%rsp)
negq %rax
movq %rbx, 80(%rsp)
movq %rax, %r14
.L393:
xorl %edx, %edx
movq %r13, %rsi
movq %r15, %rdi
call parseproto@PLT
testl %eax, %eax
je .L448
cmpl $5, %eax
ja .L420
movl %eax, %eax
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L398:
movsbl 67(%rsp), %edx
cmpb $115, %dl
je .L420
movq 16(%rsp), %rax
leaq .LC37(%rip), %rsi
movl $5, %edi
movq (%rax), %rcx
xorl %eax, %eax
call pari_err@PLT
.L399:
movq 80(%rsp), %rbx
addq $1, %r14
jmp .L393
.p2align 4,,10
.p2align 3
.L397:
movsbl 67(%rsp), %edx
leal -71(%rdx), %eax
cmpb $44, %al
ja .L408
leaq .L410(%rip), %rsi
movzbl %al, %eax
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L396:
movsbl 67(%rsp), %edx
leal -38(%rdx), %eax
cmpb $77, %al
ja .L404
leaq .L405(%rip), %rbx
movzbl %al, %eax
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L394:
movzbl 67(%rsp), %eax
subl $38, %eax
cmpb $77, %al
ja .L399
movzbl %al, %eax
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L443:
movq 16(%rsp), %rax
leaq .LC34(%rip), %rsi
movl $5, %edi
movq (%rax), %rdx
xorl %eax, %eax
call pari_err@PLT
jmp .L378
.p2align 4,,10
.p2align 3
.L407:
movq (%rsp), %rdx
movq %r14, %rsi
movl $75, %edi
xorl %eax, %eax
addq $1, %r14
call op_push_loc@PLT
movq 80(%rsp), %rbx
jmp .L393
.L406:
movq (%rsp), %rbx
xorl %esi, %esi
movl $79, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push_loc@PLT
.L440:
movq %rbx, %rdx
movq %r14, %rsi
movl $117, %edi
xorl %eax, %eax
addq $1, %r14
call op_push_loc@PLT
movq 80(%rsp), %rbx
jmp .L393
.L412:
movq (%rsp), %rdx
movq 80(%rsp), %rdi
movq %rbx, %rsi
xorl %eax, %eax
call str_defproto@PLT
movq (%rsp), %rbx
movq %r14, %rsi
movl $116, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push_loc@PLT
movq %rbx, %rdx
movq %r14, %rsi
movl $74, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L399
.L411:
leaq 1(%rbx), %rdi
xorl %esi, %esi
movl $10, %edx
call strtol@PLT
movq (%rsp), %rbx
movq %rax, %rsi
movl $65, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push_loc@PLT
jmp .L440
.L409:
leaq 1(%rbx), %rdi
xorl %esi, %esi
movl $10, %edx
call strtol@PLT
movq (%rsp), %rbx
movq %rax, %rsi
movl $69, %edi
xorl %eax, %eax
movq %rbx, %rdx
call op_push_loc@PLT
movq %rbx, %rdx
movq %r14, %rsi
movl $116, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L399
.L403:
movq (%rsp), %rdx
movq %r14, %rsi
movl $74, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L399
.L401:
movq (%rsp), %rdx
movq %r14, %rsi
movl $73, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L399
.L408:
movq 16(%rsp), %rax
leaq .LC36(%rip), %rsi
movl $5, %edi
movq (%rax), %rcx
xorl %eax, %eax
call pari_err@PLT
jmp .L399
.L404:
movq 16(%rsp), %rax
leaq .LC35(%rip), %rsi
movl $5, %edi
movq (%rax), %rcx
xorl %eax, %eax
call pari_err@PLT
jmp .L399
.p2align 4,,10
.p2align 3
.L445:
movq (%rsp), %rdx
movq %rbp, %rsi
movl $115, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L383
.p2align 4,,10
.p2align 3
.L444:
movq (%rsp), %rdx
movq %rbx, %rsi
movl $114, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L380
.L448:
movq (%rsp), %rdx
movq 16(%rsp), %rsi
movl 44(%rsp), %edi
movq 24(%rsp), %r14
call op_push_loc@PLT
cmpq $2, 88(%rsp)
je .L449
.L415:
movq (%rsp), %rdx
movl 68(%rsp), %edi
movl $4, %esi
call compilecast_loc@PLT
movq 16(%rsp), %rax
movq (%rax), %rdi
call strtoGENstr@PLT
movq %r14, %rsi
subq 8(%rsp), %rsi
movq 56(%rsp), %rdi
movq %rax, %rcx
xorl %edx, %edx
xorl %eax, %eax
call getfunction@PLT
cltq
jmp .L372
.L449:
movq (%rsp), %rdx
xorl %esi, %esi
movl $76, %edi
xorl %eax, %eax
call op_push_loc@PLT
jmp .L415
.LHOTE38:
.LHOTB41:
.cfi_endproc
.size genclosure, .-genclosure
# ----------------------
.p2align 4,,15
# ----------------------
.globl optimizenode
.type optimizenode, @function
optimizenode:
.cfi_startproc
testq %rdi, %rdi
pushq %r14
pushq %r13
pushq %r12
pushq %rbp
pushq %rbx
movq %rdi, %rbx
js .L469
.L451:
movq pari_tree@GOTPCREL(%rip), %r12
leaq (%rbx,%rbx,2), %rbp
salq $4, %rbp
movq (%r12), %rcx
leaq (%rcx,%rbp), %rax
cmpl $19, (%rax)
movq 8(%rax), %r13
movq 16(%rax), %r14
ja .L452
movl (%rax), %esi
leaq .L454(%rip), %rdx
movslq (%rdx,%rsi,4), %rsi
addq %rsi, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L463:
movq %rbx, %rdi
xorl %eax, %eax
call getfunc@PLT
movslq %eax, %rdi
movq 8(%rdi), %rax
andl $253, %eax
cmpq $100, %rax
jne .L470
.L462:
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizecall@PLT
.p2align 4,,10
.p2align 3
.L464:
movq %r14, %rdi
call optimizenode@PLT
movq (%r12), %rax
movq $3, 40(%rax,%rbp)
.L450:
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
ret
.p2align 4,,10
.p2align 3
.L453:
leaq (%r13,%r13,2), %rbx
salq $4, %rbx
cmpl $10, (%rcx,%rbx)
je .L465
movq %r13, %rdi
call optimizenode@PLT
.L465:
movq %r14, %rdi
call optimizenode@PLT
movq (%r12), %rax
leaq (%r14,%r14,2), %rdx
salq $4, %rdx
movq 40(%rax,%rdx), %rdx
andq 40(%rax,%rbx), %rdx
movq %rdx, 40(%rax,%rbp)
jmp .L450
.p2align 4,,10
.p2align 3
.L455:
movq %r13, %rdi
call optimizenode@PLT
movq %r14, %rdi
call optimizenode@PLT
movq (%r12), %rax
movq $0, 40(%rax,%rbp)
jmp .L450
.p2align 4,,10
.p2align 3
.L456:
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizefacteurmat@PLT
.p2align 4,,10
.p2align 3
.L457:
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizemat@PLT
.p2align 4,,10
.p2align 3
.L458:
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizevec@PLT
.p2align 4,,10
.p2align 3
.L459:
movq $3, 40(%rax)
jmp .L450
.p2align 4,,10
.p2align 3
.L460:
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
movq 24(%rax), %rsi
leaq .LC40(%rip), %rdi
jmp compile_err@PLT
.p2align 4,,10
.p2align 3
.L461:
movq %r13, %rdi
call optimizenode@PLT
movq (%r12), %rdx
leaq (%r13,%r13,2), %rax
salq $4, %rax
movq 40(%rdx,%rax), %rax
movq %rax, 40(%rdx,%rbp)
jmp .L450
.p2align 4,,10
.p2align 3
.L452:
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
leaq .LC39(%rip), %rsi
movl $2, %edi
xorl %eax, %eax
jmp pari_err@PLT
.p2align 4,,10
.p2align 3
.L469:
leaq .LC39(%rip), %rsi
movl $2, %edi
xorl %eax, %eax
call pari_err@PLT
jmp .L451
.p2align 4,,10
.p2align 3
.L470:
movq %rbx, %rsi
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
jmp optimizefunc@PLT
.LHOTE41:
.LHOTB43:
.cfi_endproc
.size optimizenode, .-optimizenode
# ----------------------
.p2align 4,,15
# ----------------------
.globl optimizefunc
.type optimizefunc, @function
optimizefunc:
.cfi_startproc
pushq %r15
pushq %r14
pushq %r13
pushq %r12
leaq (%rsi,%rsi,2), %r13
pushq %rbp
pushq %rbx
movl $11, %esi
salq $4, %r13
subq $104, %rsp
movq avma@GOTPCREL(%rip), %rax
movq pari_tree@GOTPCREL(%rip), %r12
movq 32(%rdi), %rdx
movq (%rax), %rax
movq %rdx, 80(%rsp)
movq %rax, 40(%rsp)
movq %r13, %rax
addq (%r12), %rax
movq 8(%rax), %rbx
movq 16(%rax), %rax
movq %rax, %rdi
xorl %eax, %eax
call listtogen@PLT
cmpq $0, 80(%rsp)
cltq
movq %rax, 32(%rsp)
movq (%rax), %rbp
je .L507
leaq 80(%rsp), %rax
leaq 88(%rsp), %rcx
leaq 76(%rsp), %rdx
movl $2, %esi
movq %rax, 16(%rsp)
movq %rax, %rdi
xorl %eax, %eax
call get_ret_type@PLT
movq 80(%rsp), %rax
testq %rax, %rax
je .L509
cmpb $0, (%rax)
je .L509
movq $72057594037927935, %rax
movq (%r12), %rcx
andq %rax, %rbp
leaq -1(%rbp), %rax
movq %rbp, 48(%rsp)
movl $1, %ebp
movq %rax, 8(%rsp)
leaq (%rbx,%rbx,2), %rax
movl $3, %ebx
salq $4, %rax
movq %rax, 56(%rsp)
leaq 75(%rsp), %rax
movq %rax, 24(%rsp)
.p2align 4,,10
.p2align 3
.L473:
movq 24(%rcx,%r13), %rdx
movq 24(%rsp), %rsi
movq 16(%rsp), %rdi
call parseproto@PLT
testl %eax, %eax
je .L503
cmpq 8(%rsp), %rbp
jg .L474
movq 32(%rsp), %rsi
movq (%r12), %rcx
leaq (%rsi,%rbp,8), %r14
movq (%r14), %rdx
leaq (%rdx,%rdx,2), %rdx
salq $4, %rdx
addq %rcx, %rdx
cmpl $10, (%rdx)
je .L475
leal -2(%rax), %edx
cmpl $1, %edx
jbe .L529
cmpl $4, %eax
je .L496
cmpl $5, %eax
je .L473
cmpl $1, %eax
je .L529
.L501:
leaq .LC31(%rip), %rsi
movl %eax, %edx
movl $2, %edi
xorl %eax, %eax
call pari_err@PLT
.L530:
movq (%r12), %rcx
jmp .L473
.p2align 4,,10
.p2align 3
.L509:
movl $3, %ebx
.L472:
movq 32(%rsp), %rdi
xorl %eax, %eax
call vec_optimize@PLT
.L503:
movq avma@GOTPCREL(%rip), %rax
movq 40(%rsp), %rcx
movq %rcx, (%rax)
movq (%r12), %rax
movq %rbx, 40(%rax,%r13)
addq $104, %rsp
popq %rbx
popq %rbp
popq %r12
popq %r13
popq %r14
popq %r15
ret
.p2align 4,,10
.p2align 3
.L474:
cmpl $5, %eax
ja .L501
leaq .L504(%rip), %rcx
movl %eax, %edx
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmp *%rdx
.p2align 4,,10
.p2align 3
.L496:
movsbl 75(%rsp), %edx
cmpb $115, %dl
jne .L525
movq 48(%rsp), %r14
movq 32(%rsp), %rax
subq %rbp, %r14
leaq (%rax,%rbp,8), %r15
movl $1, %ebp
testq %r14, %r14
jle .L531
.p2align 4,,10
.p2align 3
.L518:
movq -8(%r15,%rbp,8), %rdi
movl $19, %esi
xorl %eax, %eax
addq $1, %rbp
call cattovec@PLT
movl %eax, %edi
xorl %eax, %eax
call vec_optimize@PLT
cltq
andq %rax, %rbx
cmpq %rbp, %r14
jge .L518
.L531:
movq (%r12), %rcx
movq 48(%rsp), %rbp
jmp .L473
.p2align 4,,10
.p2align 3
.L494:
cmpq 8(%rsp), %rbp
jg .L530
movq 32(%rsp), %rax
leaq 1(%rbp), %r14
movq (%rax,%rbp,8), %rdi
movq %r14, %rbp
call optimizenode@PLT
movq (%r12), %rcx
jmp .L473
.p2align 4,,10
.p2align 3
.L478:
movq %r13, %rax
addq (%r12), %rax
leaq .LC21(%rip), %rdi
movq 32(%rax), %rdx
movq 24(%rax), %rax
leaq -1(%rax,%rdx), %rsi
call compile_err@PLT
movq 32(%rsp), %rax
leaq (%rax,%rbp,8), %r14
movq (%r14), %rax
leaq (%rax,%rax,2), %rdx
salq $4, %rdx
addq (%r12), %rdx
cmpl $10, (%rdx)
jne .L529
.L479:
movzbl 75(%rsp), %esi
leal -69(%rsi), %eax
testb $-5, %al
je .L480
movq 24(%rdx), %rsi
leaq .LC22(%rip), %rdi
call compile_err@PLT
.p2align 4,,10
.p2align 3
.L529:
movzbl 75(%rsp), %esi
.L480:
leal -38(%rsi), %eax
cmpb $77, %al
ja .L481
leaq .L483(%rip), %rcx
movzbl %al, %eax
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmp *%rax
.p2align 4,,10
.p2align 3
.L475:
cmpl $5, %eax
ja .L501
leaq .L506(%rip), %rdi
movl %eax, %esi
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmp *%rsi
.p2align 4,,10
.p2align 3
.L507:
xorl %ebx, %ebx
jmp .L472
.p2align 4,,10
.p2align 3
.L525:
movq 56(%rsp), %rax
addq (%r12), %rax
leaq .LC30(%rip), %rsi
movl $5, %edi
movq 32(%rax), %rcx
movq 24(%rax), %r8
xorl %eax, %eax
call pari_err@PLT
movq (%r12), %rcx
jmp .L473
.p2align 4,,10
.p2align 3
.L489:
movq (%r14), %rdi
movl $19, %esi
xorl %eax, %eax
addq $1, %rbp
call cattovec@PLT
movl %eax, %edi
xorl %eax, %eax
call vec_optimize@PLT
cltq
movq (%r12), %rcx
andq %rax, %rbx
jmp .L473
.p2align 4,,10
.p2align 3
.L488:
movq (%r14), %rdi
addq $1, %rbp
xorl %ebx, %ebx
call optimizenode@PLT
movq (%r12), %rcx
jmp .L473
.p2align 4,,10
.p2align 3
.L487:
movq (%r14), %rax
movq (%r12), %rcx
addq $1, %rbp
leaq (%rax,%rax,2), %rax
salq $4, %rax
movq $3, 40(%rcx,%rax)
jmp .L473
.p2align 4,,10
.p2align 3
.L486:
movq (%r14), %rdi
addq $1, %rbp
call optimizenode@PLT
movq (%r14), %rax
movq (%r12), %rcx
leaq (%rax,%rax,2), %rax
salq $4, %rax
andq 40(%rcx,%rax), %rbx
jmp .L473
.p2align 4,,10
.p2align 3
.L485:
movq (%r14), %rdi
addq $1, %rbp
call optimizenode@PLT
movq (%r14), %rax
movq (%r12), %rcx
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq %rcx, %rax
andq 40(%rax), %rbx
movq $3, 40(%rax)
jmp .L473
.p2align 4,,10
.p2align 3
.L484:
movq (%r14), %rax
addq $1, %rbp
leaq (%rax,%rax,2), %rax
salq $4, %rax
addq (%r12), %rax
cmpl $4, (%rax)
movq 16(%rax), %r14
je .L493
movq 32(%rax), %rsi
addq 24(%rax), %rsi
leaq .LC42(%rip), %rdi
call compile_err@PLT
.L493:
movq %r14, %rdi
call optimizenode@PLT
movq (%r12), %rcx
leaq (%r14,%r14,2), %rax
salq $4, %rax
andq 40(%rcx,%rax), %rbx
jmp .L473
.p2align 4,,10
.p2align 3
.L482:
cmpb $38, %sil
movq (%r14), %rdi
je .L532
.L491:
call optimizenode@PLT
movq (%r14), %rax
movq (%r12), %rcx
addq $1, %rbp
xorl %ebx, %ebx
leaq (%rax,%rax,2), %rax
salq $4, %rax
movq $3, 40(%rcx,%rax)
jmp .L473
.p2align 4,,10
.p2align 3
.L481:
movq 56(%rsp), %rax
addq (%r12), %rax
movsbl %sil, %edx
leaq .LC29(%rip), %rsi
movl $5, %edi
movq 32(%rax), %rcx
movq 24(%rax), %r8
xorl %eax, %eax
call pari_err@PLT
movq (%r12), %rcx
jmp .L473
.L532:
leaq (%rdi,%rdi,2), %rbx
salq $4, %rbx
movq %rbx, %rax
addq (%r12), %rax
cmpl $12, (%rax)
je .L492
movq 24(%rax), %rsi
leaq .LC26(%rip), %rdi
call compile_err@PLT
movq %rbx, %rax
addq (%r12), %rax
.L492:
movq 8(%rax), %rdi
jmp .L491
.LHOTE43:
.cfi_endproc
.size optimizefunc, .-optimizefunc
# ----------------------
.local foo.20841
.comm foo.20841,8,8
# ----------------------
.local foo.20737
.comm foo.20737,8,8
# ----------------------
.comm frames,8,8
# ----------------------
.comm dbgstart,8,8
# ----------------------
.comm dbginfo,8,8
# ----------------------
.comm localvars,8,8
# ----------------------
.comm offset,8,8
# ----------------------
.comm data,8,8
# ----------------------
.comm operand,8,8
# ----------------------
.comm opcode,8,8
# ----------------------
.comm s_frame,32,32
# ----------------------
.comm s_dbginfo,32,32
# ----------------------
.comm s_lvar,32,32
# ----------------------
.comm s_data,32,32
# ----------------------
.comm s_operand,32,32
# ----------------------
.comm s_opcode,32,32
# ----------------------
.ident "GCC: (Debian 4.9.2-10) 4.9.2"
.section .note.GNU-stack,"",@progbits
| 20.577643 | 53 | 0.507553 |
4ef0614ee570aaf134de188aaae5cca462fdb0d3 | 1,760 | asm | Assembly | 1-source-files/main-sources/elite-readme.asm | markmoxon/elite-beebasm | 3365030efacb30ca602e00ee67a73ffb2311f1bb | [
"Unlicense"
] | 251 | 2020-08-30T18:02:53.000Z | 2021-04-19T00:03:18.000Z | 1-source-files/main-sources/elite-readme.asm | markmoxon/elite-beebasm | 3365030efacb30ca602e00ee67a73ffb2311f1bb | [
"Unlicense"
] | null | null | null | 1-source-files/main-sources/elite-readme.asm | markmoxon/elite-beebasm | 3365030efacb30ca602e00ee67a73ffb2311f1bb | [
"Unlicense"
] | 23 | 2020-08-30T21:59:46.000Z | 2021-03-10T06:53:03.000Z | \ ******************************************************************************
\
\ ELITE README
\
\ Elite was written by Ian Bell and David Braben and is copyright Acornsoft 1984
\
\ The code on this site is identical to the source discs released on Ian Bell's
\ personal website at http://www.elitehomepage.org/ (it's just been reformatted
\ to be more readable)
\
\ The commentary is copyright Mark Moxon, and any misunderstandings or mistakes
\ in the documentation are entirely my fault
\
\ The terminology and notations used in this commentary are explained at
\ https://www.bbcelite.com/about_site/terminology_used_in_this_commentary.html
\
\ The deep dive articles referred to in this commentary can be found at
\ https://www.bbcelite.com/deep_dives
\
\ ------------------------------------------------------------------------------
\
\ This source file produces the following binary file:
\
\ * README.txt
\
\ ******************************************************************************
INCLUDE "1-source-files/main-sources/elite-header.h.asm"
_SOURCE_DISC = (_RELEASE = 1)
_TEXT_SOURCES = (_RELEASE = 2)
.readme
EQUB 10, 13
EQUS "---------------------------------------"
EQUB 10, 13
EQUS "Acornsoft Elite"
EQUB 10, 13
EQUB 10, 13
EQUS "Version: BBC Micro cassette"
EQUB 10, 13
IF _SOURCE_DISC
EQUS "Release: Ian Bell's source disc"
EQUB 10, 13
EQUS " Acornsoft SBG38 v1.0"
EQUB 10, 13
ELIF _TEXT_SOURCES
EQUS "Release: Ian Bell's text sources"
EQUB 10, 13
EQUS " Acornsoft SBG38 v1.1"
EQUB 10, 13
ENDIF
EQUB 10, 13
EQUS "See www.bbcelite.com for details"
EQUB 10, 13
EQUS "---------------------------------------"
EQUB 10, 13
SAVE "3-assembled-output/README.txt", readme, P%
| 25.882353 | 80 | 0.586364 |
54df672c8f02cdae60234a34fecf7311b1ed31fe | 757 | asm | Assembly | oeis/187/A187306.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/187/A187306.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/187/A187306.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A187306: Alternating sum of Motzkin numbers A001006.
; Submitted by Jon Maiga
; 1,0,2,2,7,14,37,90,233,602,1586,4212,11299,30536,83098,227474,625993,1730786,4805596,13393688,37458331,105089228,295673995,834086420,2358641377,6684761124,18985057352,54022715450,154000562759,439742222070,1257643249141,3602118427250,10331450919457,29671013856626,85317692667644,245613376802184,707854577312179,2042162142208812,5897493615536453,17047255430494496,49320944483427001,142816973618414816,413887836110423788,1200394300050487934,3484084625456932135,10119592485062548154,29412628894558563850
mov $2,1
mov $3,$0
add $3,1
mov $4,1
lpb $3
mul $1,-1
mul $2,$4
mul $2,$3
mul $2,2
add $5,1
add $5,$4
div $2,$5
add $1,$2
sub $3,1
add $4,2
lpe
mov $0,$1
| 34.409091 | 501 | 0.78996 |
0d93febbe791d18fb3136e6651446906aa6e1af6 | 12 | asm | Assembly | YearI/SemesterI/ComputerSystemArchitecture(CSA)/MachineUno/sta.asm | jarvis-1805/myappsample | 7d36643b18b14832a3cbd341905e850aaed57a44 | [
"MIT"
] | 2 | 2020-08-13T18:00:55.000Z | 2021-12-18T09:45:11.000Z | YearI/SemesterI/CSA/MachineUno/sta.asm | alvistagram1/ducscode | a76e06012335d6ab8bceb863d9284ed6dec04142 | [
"MIT"
] | null | null | null | YearI/SemesterI/CSA/MachineUno/sta.asm | alvistagram1/ducscode | a76e06012335d6ab8bceb863d9284ed6dec04142 | [
"MIT"
] | null | null | null | sta 0x082
| 3 | 9 | 0.666667 |
d82b6a35c409724f1ef3f291fe294da623e2e1c3 | 951 | asm | Assembly | programs/oeis/087/A087049.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/087/A087049.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/087/A087049.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A087049: Characteristic sequence for numbers n>=0 that are either squares or have a square > 1 as factor.
; 1,1,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,1,0,0,1,1,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,1,1,0,1,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,1,0,1,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,1,1,1,1,0,0,1,0
lpb $0
sub $0,1
cal $0,8683 ; Möbius (or Moebius) function mu(n). mu(1) = 1; mu(n) = (-1)^k if n is the product of k different primes; otherwise mu(n) = 0.
add $2,$0
lpe
lpb $2
cal $0,54087 ; s(3n-2), s=A054086; also a bisection of A003511.
sub $0,6
lpb $2
div $2,$0
lpe
lpe
mul $0,2
sub $3,8
sub $0,$3
mov $1,$0
div $1,6
| 45.285714 | 501 | 0.559411 |
a1b5fcea38d477ecd45992bbcd1886036100dd3c | 30,680 | asm | Assembly | osx huc/huc-macosx-dist/include/pce/sound.asm | langel/pce-dev-kit | 21791b3c60eb6b9a1aa7b55c68b28e6cfab1ac12 | [
"Unlicense"
] | 1 | 2021-12-31T01:16:28.000Z | 2021-12-31T01:16:28.000Z | windows huc/include/pce/sound.asm | langel/pce-dev-kit | 21791b3c60eb6b9a1aa7b55c68b28e6cfab1ac12 | [
"Unlicense"
] | null | null | null | windows huc/include/pce/sound.asm | langel/pce-dev-kit | 21791b3c60eb6b9a1aa7b55c68b28e6cfab1ac12 | [
"Unlicense"
] | null | null | null | ; SOUND.ASM
; ---------
;
; A PSG driver which is compatible with the "track data"
; and other bytecodes as used by the CDROM System Card
;
psg_bios: phx
phy
tma #PAGE(psg_on)
pha
lda #BANK(psg_on)
tam #PAGE(psg_on)
lda <_dh
asl A
tax
jsr .indir_jmp
tax
pla
tam #PAGE(psg_on)
txa
ply
plx
rts
.indir_jmp: jmp [.functbl,X]
.functbl: .dw psg_on ; psg_on (00)
.dw psg_off ; psg_off (01)
.dw psg_init ; psg_init (02)
.dw psg_bank ; psg_bank (03)
.dw psg_track ; psg_track (04)
.dw psg_wave ; psg_wave (05)
.dw psg_env ; psg_env (06)
.dw psg_fm ; psg_fm (07)
.dw psg_pe ; psg_pe (08)
.dw psg_pc ; psg_pc (09)
.dw psg_settempo ; psg_settempo (0a)
.dw psg_play ; psg_play (0b)
.dw psg_mstat ; psg_mstat (0c)
.dw psg_sstat ; psg_sstat (0d)
.dw psg_mstop ; psg_mstop (0e)
.dw psg_sstop ; psg_sstop (0f)
.dw psg_astop ; psg_astop (10)
.dw psg_mvoff ; psg_mvoff (11)
.dw psg_cont ; psg_cont (12)
.dw psg_fdout ; psg_fdout (13)
.dw psg_dcnt ; psg_dcnt (14)
;
; Origin is at $C000.
;
; This is normally occupied by "START_BANK" when the program
; is destined for CDROM, but should be OK for HuCard-only
; development (note: PSG player exists in system card when
; developing for CDROM)
;
.bank PSG_BANK,"PSG Driver"
.org $C000
; ----
; PSG_ON
; ----
; CDROM version takes a parameter in _al
; 0=TIMER, 1=VSYNC
;
; This version will only support TIMER interrupt
;
psg_on:
bbs7 <psg_inhibit,.noturnoff
bsr psg_off
smb7 <psg_inhibit
.noturnoff:
lda #1
sta timer_ctrl
rts
; ----
; PSG_OFF
; ----
;
; turn off PSG
; - all sound
; - interrupt service (if TIMER)
;
psg_off:
bbs7 <psg_inhibit,.nostop
jsr psg_astop
.nostop:
stz timer_ctrl
rts
; ----
; PSG_INIT
; ----
;
; Initialize PSG. CDROM version has a parameter:
; 0=main track only; 60Hz
; 1=sub track only; 60Hz
; 2=both tracks; 60Hz
; 3=both tracks; 120Hz
; 4=both tracks; 240Hz
; 5=both tracks; 300Hz
;
; This version only supports "both channels/60Hz" for now
;
psg_init:
; initialize some IRQ stuff & zero values
stz psg_tempo ; clear header info
tii psg_tempo, psg_tempo+1, 19
; stz psg_trkptr_l ; clear per-track info
; tii psg_trkptr_l,psg_trkptr_l+1,????
stz <psg_irqflag
stz <psg_tmpptr
stz <psg_tmpptr+1
stz <psg_tmpptr1
stz <psg_tmpptr1+1
smb7 <psg_inhibit
;
; reset hardware
;
ldx #5
lda #PSG_DDA
.loop1: stx psg_ch_value ; $0800 register value
stx psg_ch ; set channel
sta psg_ctrl ; reset channel
stz psg_ctrl ; reset wave buffer
tin psg_waveforms,psg_wavebuf,$0020 ; simple squarewave
dex
bpl .loop1
lda #$ff ; set global hardware values
sta psg_mainvol
lda #$01
sta psg_lfofreq
stz psg_lfoctrl
;
; set some basic default values
;
lda #$80
sta psg_song
lda #(PSG_MAINPAUSE | PSG_SUBPAUSE)
sta psg_trkctrl
lda #$26 ; is this right ?
jsr psg_settempo
rts
; ----
; PSG_BANK
; ----
psg_bank:
__ldw <_ax
__stw psg_bank1
rts
; ----
; PSG_TRACK
; ----
psg_track:
__ldw <_ax
__stw psg_trkhdr
rts
; ----
; PSG_WAVE
; ----
psg_wave:
__ldw <_ax
__stw psg_wavehdr
rts
; ----
; PSG_ENV
; ----
psg_env:
__ldw <_ax
__stw psg_envhdr
rts
; ----
; PSG_FM
; ----
psg_fm:
__ldw <_ax
__stw psg_fmhdr
rts
; ----
; PSG_PE
; ----
psg_pe:
__ldw <_ax
__stw psg_pehdr
rts
; ----
; PSG_PC
; ----
psg_pc:
__ldw <_ax
__stw psg_percusshdr
rts
; ----
; PSG_SETTEMPO
; ----
psg_settempo:
lda <_al
sub #$23
bpl .okvalue
cla
.okvalue:
tax
lda psg_tempotbl,X
sta psg_tempo
rts
; ----
; PSG_PLAY
;
; play song # in track list (_al = song #)
; ----
psg_play:
lda <_al
sta psg_song
rmb7 <psg_inhibit
rts
; ----
; PSG_MSTAT
;
; return bitmask of voices in use for main track
; ----
psg_mstat:
ldy #5
cla
.loop: ldx psg_voicectrl,Y
beq .empty
sec
rol A
bra .next
.empty: clc
rol A
.next: dey
bpl .loop
rts
; ----
; PSG_SSTAT
;
; return bitmask of voices in use for sub track
; ----
psg_sstat:
ldy #5
cla
.loop: ldx psg_voicectrl+6,Y
beq .empty
sec
rol A
bra .next
.empty: clc
rol A
.next: dey
bpl .loop
rts
; ----
; PSG_MSTOP
;
; Stop voices in main track, as described in bitmask (in _al)
; ----
psg_mstop:
lda <_al
bpl .nopause
lda #PSG_MAINPAUSE ; set pause on MAIN track
tsb psg_trkctrl
lda <_al
.nopause:
tay
clx
.loop: lda psg_voicectrl,X
beq .nextvoice
tya
bmi .pause ; is it a 'pause' for voice ?
lsr A ; no, it is a 'stop'
bcc .nextvoice ; this voice not in mask; skip it
stz psg_voicectrl,X
.pause: lda psg_voicectrl+6,X ; check subtrack
cmp #1
beq .nextvoice
stx psg_ch_value
stx psg_ch
stz psg_ctrl
.nextvoice:
inx
cpx #6
bcs .out
tya
bmi .pause2
lsr A
tay
bra .loop
.pause2:
lsr A
ora #$80 ; retain high-bit set
tay
bra .loop
.out: rts
; ----
; PSG_SSTOP
;
; Stop voices in sub track, as described in bitmask (in _al)
; ----
psg_sstop:
lda <_al
bpl .nopause
lda #PSG_SUBPAUSE ; set pause on SUB track
tsb psg_trkctrl
lda <_al
.nopause:
tay
clx
.loop: lda psg_voicectrl+6,X
beq .nextvoice
tya
bmi .pause ; is it a 'pause' ?
lsr A ; no, it is a 'stop'
bcc .nextvoice ; voice not in mask; skip it
stz psg_voicectrl+6,X
bra .pause1
.pause:
lda #$ff ; pause control
sta psg_voicectrl+6,X
.pause1:
lda psg_voicectrl,X
beq .skipwave
lda psg_wavenum,X
and #$80
sta psg_wavenum,X
.skipwave:
lda psg_trkctrl ; is anything playing on main track ?
bpl .nextvoice ; yes... so don't stop it
stx psg_ch_value
stx psg_ch
stz psg_ctrl
.nextvoice:
inx
cpx #6
bcs .out
tya
bmi .pause2
lsr A
tay
bra .loop
.pause2:
lsr A
ora #$80
tay
bra .loop
.out: rts
; ----
; PSG_ASTOP
;
; Stop all voices
; ----
psg_astop:
smb7 <psg_inhibit
lda #(PSG_MAINPAUSE | PSG_SUBPAUSE)
sta psg_trkctrl
ldx #5
.loop: stz psg_voicectrl,X ; disable main track
stz psg_voicectrl+6,X ; disable sub track
stx psg_ch
stz psg_ctrl ; disable voice
dex
bpl .loop
rts
; ----
; PSG_MVOFF
;
; Main volume off for voices specified in bitmask (in _al)
; ----
psg_mvoff:
lda <_al
clx
.loop: lsr A
bcc .skip
ldy psg_voicectrl,X
beq .skip
pha
lda #$ff ; turn off sound on voice
sta psg_voicectrl,X
pla
ldy psg_voicectrl+6,X
cpy #1
beq .skip
stx psg_ch_value ; turn off voice
stx psg_ch
stz psg_ctrl
.skip: inx
cpx #6
bcc .loop
rts
; ----
; PSG_CONT
;
; "continue"
; ----
;
; parameter:
; 0 = main track
; 1 = sub track
; 2 = both
;
psg_cont:
lda <_al
cmp #1
beq .sub
ldx #5
.loop: lda psg_voicectrl,X
beq .next ; skip if disabled
lda #1 ; restart voice
sta psg_voicectrl,X
.next: dex
bpl .loop
lda #PSG_MAINPAUSE ; release pause on main tracks
trb psg_trkctrl
.sub: lda <_al
beq .end
ldx #5
.loop1: lda psg_voicectrl+6,X
beq .next1 ; skip if disabled
lda #1 ; restart voice
sta psg_voicectrl+6,X
lda psg_wavenum,X
and #$80 ; force re-download of waveform
sta psg_wavenum,X
.next1: dex
bpl .loop1
lda #PSG_SUBPAUSE ; release pause on sub tracks
trb psg_trkctrl
.end: rmb7 <psg_inhibit ; remove pause on irq processing
rts
; ----
; PSG_FDOUT
; ----
psg_fdout:
lda <_al
bpl .positive
eor #$ff ; get absolute value from negative
inc A
.positive:
sta psg_fadespeed ; store it as fade speed
stz psg_fadecount ; reset fade levels
stz psg_fadevolcut
rts
; ----
; PSG_DCNT
;
; set delay counter - sets an up-counter to use if interrupt
; frequency is >60Hz, and this will act as a frequency divider
; (by ignoring interrupts until up-counter value is hit)
;
; Not used in this implementation of PSG driver
; ----
psg_dcnt:
rts
; ----
; psg_drive - driver for MAIN tracks
; ----
psg_drive:
lda psg_song
bmi .skipsong
jsr psg_initsong
.skipsong:
lda #11
sta psg_currvoice
.loop: ldx psg_currvoice
cpx #6
bcc .chkmain
.chksub:
lda psg_trkctrl
and #PSG_SUBPAUSE
bne .next
bra .dovoice
.chkmain:
lda psg_trkctrl
bmi .next
.dovoice:
lda psg_voicectrl,X
beq .next
jsr psg_drivevoice
.next: dec psg_currvoice
bpl .loop
; now loop is done...
; so now we look at general items
jsr psg_dofade
jsr psg_dodata2hdwr
jsr psg_mstat
cmp #$00
bne .mainok
lda #PSG_MAINPAUSE
tsb psg_trkctrl
.mainok:
jsr psg_sstat
cmp #$00
bne .subok
lda #PSG_SUBPAUSE
tsb psg_trkctrl
.subok:
rts
; ----
; psg_initsong - initialize stuff for playing song
; ----
; ???? MAY NOT BE COMPLETE
psg_initsong:
lda psg_song
asl A ; make index for 16-bit data
tay
__ldw psg_trkhdr
__stw <psg_tmpptr1
lda [psg_tmpptr1],Y
sta <psg_tmpptr
iny
lda [psg_tmpptr1],Y
sta <psg_tmpptr+1
lda [psg_tmpptr]
sta <psg_tmpptr1
sta <psg_tmpptr1+1
bmi .subtrack ; starting voice = 0 (main), 6 (sub)
clx
bra .processmask
.subtrack:
ldx #6
.processmask:
cly
lsr psg_tmpptr1+1
lbcc .nextvoice
lda #1
sta psg_voicectrl,X
sta psg_cntdown,X
stz psg_strikephase,X
stz psg_transpose,X
stz psg_mode,X
stz psg_stkoff,X
stz psg_detune,X
stz psg_duratnmult,X
stz psg_fmcorrect,X
stz psg_fmdelay,X
stz psg_fmdelcntdn,X
stz psg_pedelay,X
stz psg_pedelcntdn,X
stz psg_volchg,X
stz psg_volchgaccum,X
stz psg_panpotchg,X
stz psg_panpotaccum,X
lda #4
sta psg_octave,X
lda #8
sta psg_keyonratio,X
sta psg_keycntdown,X
lda #$1f
sta psg_perchvol,X
lda psg_envtbl ; set to basic envelope
sta psg_envptr_l,X
lda psg_envtbl+1
sta psg_envptr_h,X
stz psg_envptr_off,X
lda #$84 ; set default level to $8400
stz psg_envrels_l,X
sta psg_envrels_h,X
iny
lda [psg_tmpptr],Y ; put voice address into correct voice
sta psg_trkptr_l,X
sta psg_savepoint_l,X
iny
lda [psg_tmpptr],Y
sta psg_trkptr_h,X
sta psg_savepoint_h,X
.nextvoice:
inx
lda <psg_tmpptr1
bmi .nextsub
.nextmain:
cpx #6
lbcc .processmask
bra .endloop
.nextsub:
cpx #12
lbcc .processmask
.endloop:
stz psg_fadespeed
stz psg_fadecount
stz psg_fadevolcut
lda psg_song
ora #$80
sta psg_song
rts
; ----
; psg_dofade
; ----
; ???? MAY NOT BE COMPLETE
psg_dofade:
rts
; ----
; psg_dodata2hdwr
; ----
; ???? MAY NOT BE COMPLETE
psg_dodata2hdwr:
rts
; ----
; psg_drivevoice - driver for individual voice
; ----
psg_drivevoice:
jsr psg_dobytecodes ; process track bytecodes
jsr psg_doreladjust ; adjust relative volume/pan
jsr psg_dopercuss
jsr psg_doenvelope
jsr psg_dofreqstuff
rts
; ----
; psg_dobytecodes
; ----
; ???? MAY NOT BE COMPLETE
psg_dobytecodes:
dec psg_cntdown,X ; is last note done yet ?
beq .next
rts
.next: lda psg_trkptr_l,X ; get pointer
sta <psg_tmpptr
lda psg_trkptr_h,X
sta <psg_tmpptr
lda [psg_tmpptr] ; read next bytecode
incw <psg_tmpptr ; increment
cmp #$D0 ; if <$d0, it's a tone
bcc psg_dotone
sxy ; use Y as voice index now
tax ; save byte
sub #$D0 ; table starts with bytecode $D0
asl A ; 2 bytes per entry
sax ; X = index; A = byte value
bsr .tablejump
bsr psg_trkptr_replace
rts
.tablejump:
jmp [psg_bytefunctbl,X]
psg_dotone:
bsr psg_trkptr_replace
rts
psg_trkptr_replace:
ldx psg_currvoice
lda <psg_tmpptr
sta psg_trkptr_l,X
lda <psg_tmpptr+1
sta psg_trkptr_h,X
rts
psg_octavetbl:
.db 0
.db (12*2*1)
.db (12*2*2)
.db (12*2*3)
.db (12*2*4)
.db (12*2*5)
.db (12*2*6)
.db (12*2*7)
psg_bytefunctbl:
.dw psgf_timebase ; d0
.dw psgf_octave ; d1
.dw psgf_octave ; d2
.dw psgf_octave ; d3
.dw psgf_octave ; d4
.dw psgf_octave ; d5
.dw psgf_octave ; d6
.dw psgf_octave ; d7
.dw psgf_octup ; d8
.dw psgf_octdown ; d9
.dw psgf_tie ; da
.dw psgf_tempo ; db
.dw psgf_volume ; dc
.dw psgf_panpot ; dd
.dw psgf_keyratio ; de
.dw psgf_relvolume ; df
.dw psgf_notused ; e0
.dw psgf_contfromsave ; e1
.dw psgf_savepoint ; e2
.dw psgf_rptbegin ; e3
.dw psgf_rptend ; e4
.dw psgf_wave ; e5
.dw psgf_envelope ; e6
.dw psgf_freqmod ; e7
.dw psgf_fmdelay ; e8
.dw psgf_fmcorrect ; e9
.dw psgf_pitchenv ; ea
.dw psgf_pedelay ; eb
.dw psgf_detune ; ec
.dw psgf_sweep ; ed
.dw psgf_sweeptime ; ee
.dw psgf_jump ; ef
.dw psgf_call ; f0
.dw psgf_return ; f1
.dw psgf_transpose ; f2
.dw psgf_reltransp ; f3
.dw psgf_fulltransp ; f4
.dw psgf_voladjust ; f5
.dw psgf_panrtadjust ; f6
.dw psgf_panlftadjust ; f7
.dw psgf_setmode ; f8
.dw psgf_notused ; f9
.dw psgf_notused ; fa
.dw psgf_notused ; fb
.dw psgf_notused ; fc
.dw psgf_notused ; fd
.dw psgf_fadeout ; fe
.dw psgf_dataend ; ff
psgf_inctmpptr:
incw <psg_tmpptr
psgf_notused:
rts
;
; $d0
;
psgf_timebase:
lda [psg_tmpptr]
and #$0f
sta psg_duratnmult,Y
jmp psgf_inctmpptr
;
; $d1-7
;
psgf_octave:
and #$07
sta psg_octave,Y
rts
;
; $d8
;
psgf_octup:
ldx psg_currvoice
inc psg_octave,X
rts
;
; $d9
;
psgf_octdown:
ldx psg_currvoice
dec psg_octave,X
rts
;
; $da
;
psgf_tie:
lda #3
sta psg_strikephase,Y
rts
;
; $db
;
psgf_tempo:
lda [psg_tmpptr]
sub #$23
bpl .okval
cla
.okval: tax
lda psg_tempotbl,X
sta psg_tempo
jmp psgf_inctmpptr
;
; $dc
;
psgf_volume:
lda [psg_tmpptr]
sta psg_perchvol,Y
cla
sta psg_volchg,Y
sta psg_volchgaccum,Y
jmp psgf_inctmpptr
;
; $dd
;
psgf_panpot:
lda [psg_tmpptr]
sta psg_panpot,Y
cla
sta psg_panpotchg,Y
sta psg_panpotaccum,Y
jmp psgf_inctmpptr
;
; $de
;
psgf_keyratio:
lda #8
sub [psg_tmpptr]
sta psg_keyonratio,Y
jmp psgf_inctmpptr
;
; $df
;
psgf_relvolume:
lda psg_perchvol,Y
add [psg_tmpptr]
and #$1f
sta psg_perchvol,Y
jmp psgf_inctmpptr
;
; $e1
;
psgf_contfromsave:
lda psg_savepoint_l,Y
sta <psg_tmpptr
lda psg_savepoint_h,Y
sta <psg_tmpptr+1
rts
;
; $e2
;
psgf_savepoint:
lda <psg_tmpptr
sta psg_savepoint_l,Y
lda <psg_tmpptr+1
sta psg_savepoint_h,Y
rts
;
; $e3
;
psgf_rptbegin:
rts
;
; $e4
;
psgf_rptend:
rts
;
; $e5
;
psgf_wave:
lda [psg_tmpptr]
sta psg_wavenum,Y
jmp psgf_inctmpptr
;
; $e6
;
psgf_envelope:
rts
;
; $e7
;
psgf_freqmod:
rts
;
; $e8
;
psgf_fmdelay:
rts
;
; $e9
;
psgf_fmcorrect:
rts
;
; $ea
;
psgf_pitchenv:
rts
;
; $eb
;
psgf_pedelay:
rts
;
; $ec
;
psgf_detune:
lda [psg_tmpptr]
sta psg_detune,Y
jmp psgf_inctmpptr
;
; $ed
;
psgf_sweep:
rts
;
; $ee
;
psgf_sweeptime:
rts
;
; $ef
;
psgf_jump:
lda [psg_tmpptr]
tax
incw <psg_tmpptr
lda [psg_tmpptr]
__stw <psg_tmpptr
rts
;
; $f0
;
psgf_call:
rts
;
; $f1
;
psgf_return:
rts
;
; $f2
;
psgf_transpose:
lda [psg_tmpptr]
asl A
sta psg_transpose,Y
jmp psgf_inctmpptr
;
; $f3
;
psgf_reltransp:
lda [psg_tmpptr]
asl A
ldx psg_currvoice
add psg_transpose,X
sta psg_transpose,X
jmp psgf_inctmpptr
;
; $f4
;
psgf_fulltransp:
rts
;
; $f5
;
psgf_voladjust:
rts
;
; $f6
;
psgf_panrtadjust:
rts
;
; $f7
;
psgf_panlftadjust:
rts
;
; $f8
;
psgf_setmode:
rts
;
; $fe
;
psgf_fadeout:
lda [psg_tmpptr]
bpl .positive
eor #$ff
inc A
.positive:
sta psg_fadespeed
stz psg_fadecount
stz psg_fadevolcut
rts
;
; $ff
;
psgf_dataend:
lda #2
sta psg_voicectrl
rts
; ----
; PSG_DORELADJUST
; ----
; NOT IMPLEMENTED YET
psg_doreladjust:
rts
; ----
; PSG_DOPERCUSS
; ----
; NOT IMPLEMENTED YET
psg_dopercuss:
rts
; ----
; PSG_DOENVELOPE
; ----
; NOT IMPLEMENTED YET
psg_doenvelope:
rts
; ----
; PSG_DOFREQSTUFF
; ----
; NOT IMPLEMENTED YET
psg_dofreqstuff:
rts
;
;;
;; load a waveform into a PSG channel
;; PSG channel must already be set
;;
;snd_loadwave: lda #0
; sta psg_ctrl
;
; ldx #$20
;.l1: lda [wavptr]
; sta psg_wave
; incw <wavptr
; dex
; bne .l1
;
; lda #PSG_ENABLE
; ora #$1F ; full volume
; sta psg_ctrl
; lda #$ff
; sta psg_pan
; rts
;
; careful with these wave data (etc.)
;
; wave #0
;
psg_waveforms:
.db $00,$00,$00,$00
.db $00,$00,$00,$00
.db $00,$00,$00,$00
.db $00,$00,$00,$00
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
;
; wave #1
;
.db $10,$0d,$0a,$07
.db $05,$03,$02,$01
.db $00,$01,$02,$03
.db $05,$07,$09,$0d
.db $0f,$12,$15,$17
.db $19,$1b,$1d,$1e
.db $1e,$1e,$1d,$1b
.db $19,$17,$15,$13
;
; wave #2
;
.db $10,$11,$12,$13
.db $14,$15,$16,$17
.db $18,$19,$1a,$1b
.db $1c,$1d,$1e,$1f
.db $00,$01,$02,$03
.db $04,$05,$06,$07
.db $08,$09,$0a,$0b
.db $0c,$0d,$0e,$0f
;
; wave #3
;
.db $05,$05,$09,$09
.db $02,$16,$16,$10
.db $10,$1f,$1f,$0e
.db $0e,$04,$04,$12
.db $19,$19,$09,$09
.db $02,$02,$13,$13
.db $07,$07,$1e,$1e
.db $0b,$0b,$15,$15
;
; wave #4
;
.db $0f,$0b,$0f,$11
.db $0f,$0d,$0f,$10
.db $10,$10,$10,$07
.db $07,$07,$10,$07
.db $01,$07,$10,$17
.db $1e,$17,$10,$07
.db $01,$07,$10,$17
.db $0f,$07,$10,$13
;
; wave #5
;
.db $00,$00,$00,$00
.db $00,$00,$00,$00
.db $00,$00,$00,$00
.db $00,$00,$00,$1f
.db $1e,$1c,$1a,$18
.db $16,$14,$12,$10
.db $0e,$0c,$0a,$08
.db $06,$04,$02,$01
;
; wave #6
;
.db $10,$06,$03,$02
.db $01,$00,$00,$00
.db $00,$00,$00,$01
.db $01,$02,$03,$06
.db $10,$19,$1c,$1d
.db $1e,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1e,$1d,$1c,$19
; OK to here -----------------
;
; wave #7
;
.db $1d,$0f,$09,$05
.db $03,$01,$03,$05
.db $09,$0f,$15,$19
.db $1b,$1d,$1b,$19
.db $15,$0f,$07,$03
.db $01,$03,$07,$0f
.db $17,$1b,$1d,$1b
.db $17,$0f,$01,$0f
;
; wave #8
;
.db $10,$13,$16,$18
.db $1b,$1d,$1e,$1f
.db $1f,$1f,$1e,$1d
.db $1b,$18,$16,$13
.db $10,$0c,$09,$07
.db $04,$02,$01,$01
.db $01,$01,$01,$02
.db $04,$07,$09,$0c
;
; wave #9
;
.db $1b,$1d,$1b,$17
.db $0f,$0f,$15,$19
.db $19,$15,$0f,$0f
.db $09,$05,$05,$09
.db $0f,$0f,$0d,$07
.db $03,$01,$03,$09
.db $11,$13,$13,$0f
.db $0b,$0b,$0d,$17
;
; wave #$0a
;
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $01,$01,$01,$01
.db $01,$01,$01,$01
;
; wave #$0b
;
.db $1f,$00,$04,$06
.db $08,$0a,$0c,$0e
.db $10,$12,$14,$16
.db $18,$1a,$1c,$1e
.db $1f,$1e,$1c,$1a
.db $18,$16,$14,$12
.db $10,$0e,$0c,$0a
.db $08,$06,$04,$02
;
; wave #$0c
;
.db $12,$10,$1a,$1f
.db $18,$0d,$14,$1c
.db $18,$12,$18,$1c
.db $10,$01,$05,$0b
.db $05,$01,$09,$10
.db $05,$00,$03,$0d
.db $09,$07,$10,$1a
.db $0d,$03,$10,$14
;
; wave #$0d
;
.db $0f,$15,$17,$18
.db $1a,$1d,$1e,$10
.db $1f,$1f,$1d,$1c
.db $1a,$18,$14,$10
.db $0f,$0f,$0b,$07
.db $05,$03,$02,$10
.db $00,$01,$01,$02
.db $05,$07,$08,$10
;
; wave #$0e
;
.db $1f,$1e,$1b,$17
.db $13,$0f,$0b,$07
.db $03,$0f,$0c,$09
.db $07,$04,$02,$01
.db $00,$00,$01,$02
.db $04,$07,$09,$0c
.db $1f,$1b,$17,$13
.db $0f,$0b,$07,$03
;
; wave #$0f
;
.db $18,$1f,$1d,$1d
.db $1f,$1c,$14,$0f
.db $12,$1c,$1e,$12
.db $05,$02,$03,$0a
.db $15,$1c,$1d,$1a
.db $0d,$01,$03,$0d
.db $10,$0b,$03,$00
.db $02,$02,$00,$07
;
; wave #$10
;
.db $1f,$00,$1f,$00
.db $1f,$00,$1f,$00
.db $1f,$00,$1f,$00
.db $1f,$00,$1f,$00
.db $1f,$00,$1f,$00
.db $1f,$00,$1f,$00
.db $1f,$00,$1f,$00
.db $1f,$00,$1f,$00
;
; wave #$11
;
.db $0d,$0f,$0b,$00
.db $10,$1e,$1d,$1f
.db $13,$10,$0f,$04
.db $0e,$0d,$10,$01
.db $00,$02,$02,$0e
.db $01,$0d,$0f,$10
.db $0e,$01,$01,$03
.db $0e,$01,$01,$00
;
; wave #$12
;
.db $10,$1a,$1f,$1c
.db $14,$10,$11,$14
.db $16,$14,$11,$10
.db $14,$1c,$1f,$1a
.db $10,$05,$01,$03
.db $0b,$0f,$0e,$0b
.db $09,$0b,$0e,$0f
.db $0b,$03,$01,$05
;
; wave #$13
;
.db $16,$1e,$1e,$17
.db $0d,$06,$01,$00
.db $00,$00,$00,$00
.db $01,$03,$07,$0c
.db $13,$18,$1c,$1e
.db $1f,$1f,$1f,$1f
.db $1f,$1e,$19,$12
.db $08,$01,$01,$09
;
; wave #$14
;
.db $14,$1a,$1e,$1f
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1f,$1e,$1a,$14
.db $0b,$05,$01,$00
.db $00,$00,$00,$00
.db $00,$00,$00,$00
.db $00,$01,$05,$0b
;
; wave #$15
;
.db $17,$1e,$1d,$17
.db $10,$16,$1f,$1c
.db $1a,$1e,$1f,$1f
.db $1c,$0e,$07,$0a
.db $14,$18,$11,$03
.db $00,$00,$01,$05
.db $03,$00,$09,$0f
.db $08,$02,$01,$08
;
; wave #$16
;
.db $18,$1e,$19,$0f
.db $12,$1e,$1d,$1e
.db $1e,$1d,$1e,$12
.db $0f,$19,$1e,$18
.db $07,$01,$06,$10
.db $0d,$01,$02,$01
.db $01,$02,$01,$0d
.db $10,$06,$01,$07
;
; wave #$17
;
.db $10,$16,$1a,$1c
.db $1e,$1c,$1a,$16
.db $10,$0a,$06,$04
.db $02,$04,$06,$0a
.db $10,$18,$1c,$1e
.db $1c,$18,$10,$08
.db $02,$08,$10,$1e
.db $10,$02,$10,$02
;
; wave #$18
;
.db $10,$13,$16,$18
.db $1b,$1d,$1e,$1f
.db $1f,$1f,$1e,$1d
.db $1b,$18,$16,$13
.db $10,$01,$04,$08
.db $0c,$10,$14,$18
.db $1c,$01,$04,$08
.db $0c,$10,$14,$18
;
; wave #$19
;
.db $1a,$1c,$1d,$1e
.db $1f,$1f,$1f,$1f
.db $1f,$1f,$1f,$1f
.db $1e,$1d,$1b,$19
.db $06,$04,$02,$01
.db $00,$00,$00,$00
.db $00,$00,$00,$00
.db $01,$02,$04,$06
;
; wave #$1a
;
.db $1b,$14,$10,$0e
.db $0c,$0b,$16,$09
.db $02,$07,$0a,$05
.db $03,$03,$02,$01
.db $0b,$15,$1c,$1e
.db $1a,$0c,$15,$19
.db $0c,$18,$07,$12
.db $0c,$09,$16,$1a
;
; wave #$1b
;
.db $0f,$15,$1a,$1c
.db $1f,$1c,$1a,$15
.db $0f,$08,$04,$02
.db $00,$02,$04,$08
.db $0f,$17,$1c,$1f
.db $1c,$17,$0f,$06
.db $01,$02,$07,$0f
.db $0f,$13,$0f,$00
;
; wave #$1c
;
.db $1f,$1b,$19,$1c
.db $1f,$1c,$1a,$17
.db $0c,$04,$03,$02
.db $08,$0e,$0d,$04
.db $00,$06,$09,$05
.db $00,$00,$00,$01
.db $0a,$10,$11,$12
.db $0e,$0c,$0e,$19
;
; wave #$1d
;
.db $0f,$02,$11,$1f
.db $0f,$1c,$0d,$00
.db $0f,$02,$11,$1f
.db $0f,$1c,$0d,$00
.db $0f,$02,$11,$1f
.db $0f,$1c,$0d,$00
.db $0f,$02,$11,$1f
.db $0f,$1c,$0d,$00
;
; wave #$1e
;
.db $10,$0a,$14,$1c
.db $15,$1d,$16,$10
.db $18,$11,$18,$1f
.db $15,$1b,$12,$0a
.db $10,$08,$0e,$14
.db $0a,$10,$07,$00
.db $08,$01,$09,$12
.db $0a,$12,$0b,$06
;
; wave #$1f
;
.db $12,$19,$1d,$1e
.db $1f,$1f,$1f,$1e
.db $1c,$17,$12,$0c
.db $0d,$12,$16,$11
.db $08,$04,$01,$00
.db $00,$00,$00,$00
.db $00,$00,$00,$00
.db $00,$01,$04,$0c
;
; wave #$20
;
.db $04,$14,$1e,$17
.db $00,$17,$1e,$16
.db $10,$1a,$1f,$1c
.db $12,$16,$18,$10
.db $06,$12,$1c,$10
.db $0c,$0e,$10,$06
.db $02,$08,$12,$0c
.db $04,$08,$0e,$08
;
; wave #$21
;
.db $0a,$0c,$0e,$0f
.db $1f,$1f,$1f,$1f
.db $14,$14,$13,$12
.db $1b,$1b,$1b,$1b
.db $0a,$08,$06,$04
.db $0e,$0e,$0e,$0e
.db $00,$00,$00,$02
.db $13,$13,$13,$13
;
; wave #$22
;
.db $1b,$1b,$05,$05
.db $09,$09,$1f,$1f
.db $1b,$1b,$16,$16
.db $1a,$1a,$07,$07
.db $17,$17,$15,$15
.db $19,$19,$0c,$0c
.db $1b,$1b,$0c,$0c
.db $00,$00,$03,$03
;
; wave #$23
;
.db $1f,$1d,$1b,$19
.db $17,$15,$13,$11
.db $0f,$0d,$0b,$09
.db $07,$05,$03,$01
.db $00,$0f,$11,$0d
.db $13,$0b,$15,$09
.db $17,$07,$19,$05
.db $1b,$03,$1d,$01
;
; wave #$24
;
.db $0b,$0e,$11,$13
.db $1f,$1d,$1a,$17
.db $09,$05,$02,$00
.db $0a,$0b,$0e,$11
.db $0b,$0e,$1b,$1e
.db $14,$12,$1a,$17
.db $09,$05,$0d,$0a
.db $00,$01,$0e,$11
;
; wave #$25
;
.db $0f,$16,$1b,$1e
.db $1f,$1e,$1b,$16
.db $0f,$08,$04,$01
.db $00,$01,$04,$08
.db $0f,$00,$00,$00
.db $1f,$1f,$1f,$1f
.db $1c,$18,$14,$10
.db $0c,$07,$03,$00
;
; wave #$26
;
.db $02,$01,$05,$0b
.db $11,$17,$1b,$1f
.db $1e,$1b,$17,$13
.db $0f,$0b,$09,$0e
.db $18,$1d,$1c,$17
.db $0f,$0a,$07,$06
.db $11,$19,$1a,$19
.db $10,$0b,$06,$03
;
; wave #$27
;
.db $1d,$1d,$1d,$10
.db $10,$10,$1d,$1d
.db $1d,$1d,$1b,$1b
.db $1b,$1b,$1b,$1b
.db $00,$00,$00,$00
.db $00,$00,$02,$02
.db $02,$02,$10,$10
.db $10,$02,$02,$02
;
; wave #$28
;
.db $19,$16,$10,$12
.db $12,$09,$16,$1f
.db $0f,$17,$0f,$10
.db $1d,$13,$11,$10
.db $0e,$19,$1b,$00
.db $0f,$03,$0c,$12
.db $17,$0f,$16,$11
.db $12,$05,$0d,$06
;
; wave #$29
;
.db $00,$07,$0b,$0b
.db $09,$03,$00,$01
.db $17,$17,$15,$10
.db $0c,$0a,$0d,$13
.db $07,$0e,$12,$11
.db $0f,$09,$07,$07
.db $1f,$1e,$1d,$17
.db $13,$11,$13,$1a
;
; wave #$2a
;
.db $19,$04,$03,$03
.db $02,$02,$01,$01
.db $03,$03,$01,$01
.db $01,$01,$00,$01
.db $00,$01,$19,$19
.db $1b,$1b,$1b,$1b
.db $19,$1e,$1e,$1e
.db $0d,$1e,$19,$04
;
; wave #$2b
;
.db $0f,$15,$19,$1b
.db $1d,$1e,$1f,$1e
.db $1d,$1b,$19,$15
.db $0f,$07,$17,$0a
.db $14,$0d,$12,$0f
.db $10,$0a,$06,$04
.db $02,$01,$00,$01
.db $02,$04,$06,$0a
;
; wave #$2c
;
.db $09,$18,$1d,$0b
.db $00,$06,$13,$1c
.db $18,$10,$06,$02
.db $00,$00,$00,$00
.db $02,$08,$16,$1b
.db $09,$03,$10,$1e
.db $1e,$1b,$16,$0b
.db $05,$01,$00,$00
;
; frequency data
;
psg_freqtbl:
.dw $0fe4 ; A0
.dw $0f00 ; A0#
.dw $0e28 ; B0
.dw $0d5d ; C1 (octave starts at 'C')
.dw $0c9d ; C1#
.dw $0be7 ; D1
.dw $0b3d ; D1#
.dw $0a9b ; E1
.dw $0a03 ; F1
.dw $0973 ; F1#
.dw $08eb ; G1
.dw $086a ; G1#
.dw $07f2 ; A1
.dw $0780 ; A1#
.dw $0714 ; B1
.dw $06af ; C2
.dw $064f
.dw $05f4
.dw $059e
.dw $054e
.dw $0502
.dw $04b9
.dw $0476
.dw $0435
.dw $03f9
.dw $03c0
.dw $038a
.dw $0357 ; C3
.dw $0327
.dw $02fa
.dw $02cf
.dw $02a7
.dw $0281
.dw $025d
.dw $023b
.dw $021b
.dw $01fc
.dw $01e0
.dw $01c5
.dw $01ac ; C4
.dw $0193
.dw $017d
.dw $0168
.dw $0153
.dw $0140
.dw $012e
.dw $011d
.dw $010d
.dw $00fe
.dw $00f0
.dw $00e3
.dw $00d6 ; C5
.dw $00ca
.dw $00be
.dw $00b4
.dw $00aa
.dw $00a0
.dw $0097
.dw $008f
.dw $0087
.dw $007f
.dw $0078
.dw $0071
.dw $006b ; C6
.dw $0065
.dw $005f
.dw $005a
.dw $0055
.dw $0050
.dw $004b
.dw $0046
.dw $0043
.dw $0040
.dw $003c
.dw $0039
.dw $0035 ; C7
.dw $0032
.dw $0030
.dw $002d
.dw $002a
.dw $0028
.dw $0026
.dw $0024
.dw $0022
.dw $0020
.dw $001e
.dw $001c
.dw $001b ; C8
;
; TEMPO DATA
;
; starting with value $23 (as sent to PSG_TEMPO),
; these numbers are the timer values to use for
; that tempo
;
psg_tempotbl:
.db $7d,$79,$76,$73
.db $70,$6d,$6b,$68
.db $65,$63,$61,$5f
.db $5d,$5b,$59,$57
.db $56,$54,$52,$51
.db $4f,$4e,$4d,$4b
.db $4a,$49,$48,$46
.db $45,$44,$43,$42
.db $41,$40,$3f,$3e
.db $3e,$3d,$3c,$3b
.db $3a,$3a,$39,$38
.db $37,$37,$36,$35
.db $35,$34,$33,$33
.db $32,$32,$31,$31
.db $30,$30,$2f,$2f
.db $2e,$2e,$2d,$2d
.db $2c,$2c,$2b,$2b
.db $2a,$2a,$2a,$29
.db $29,$28,$28,$28
.db $27,$27,$27,$26
.db $26,$26,$25,$25
.db $25,$24,$24,$24
.db $24,$23,$23,$23
.db $22,$22,$22,$22
.db $22,$21,$21,$21
.db $20,$20,$20,$20
.db $1f,$1f,$1f,$1f
.db $1f,$1e,$1e,$1e
.db $1e,$1e,$1d,$1d
.db $1d,$1d,$1d,$1c
.db $1c,$1c,$1c,$1c
.db $1b,$1b,$1b,$1b
.db $1b,$1b,$1a,$1a
.db $1a,$1a,$1a,$1a
.db $1a,$19,$19,$19
.db $19,$19,$19,$19
.db $18,$18,$18,$18
.db $18,$18,$18,$17
.db $17,$17,$17,$17
.db $17,$17,$17,$17
.db $16,$16,$16,$16
.db $16,$16,$16,$16
.db $16,$15,$15,$15
.db $15,$15,$15,$15
.db $15,$15,$15,$14
.db $14,$14,$14,$14
.db $14,$14,$14,$14
.db $14,$14,$13,$13
.db $13,$13,$13,$13
.db $13,$13,$13,$13
.db $13,$13,$12,$12
.db $12,$12,$12,$12
.db $12,$12,$12,$12
.db $12,$12,$12,$11
.db $11,$11,$11,$11
.db $11
;
; Envelope Data
;
;
; envelope #0
;
psg_env0:
ENV_RLS $8410
ENV_LEV $7c40
ENV_DLY $00,$0000
ENV_END
;
; envelope #1
;
psg_env1:
ENV_RLS $fa05
ENV_LEV $7c40
ENV_DLY $0c,$fe01
ENV_END
;
; envelope #2
;
psg_env2:
ENV_RLS $fd05
ENV_LEV $7c40
ENV_DLY $0c,$fe01
ENV_END
;
; envelope #3
;
psg_env3:
ENV_RLS $ff01
ENV_LEV $7c40
ENV_DLY $0c,$fe01
ENV_END
;
; envelope #4
;
psg_env4:
ENV_RLS $fa05
ENV_LEV $7c40
ENV_DLY $00,$ff81
ENV_END
;
; envelope #5
;
psg_env5:
ENV_RLS $fa05
ENV_LEV $7c40
ENV_DLY $00,$ff01
ENV_END
;
; envelope #6
;
psg_env6:
ENV_RLS $fa05
ENV_LEV $7c40
ENV_DLY $00,$fe01
ENV_END
;
; envelope #7
;
psg_env7:
ENV_RLS $fb05
ENV_LEV $2c40
ENV_DLY $02,$2801
ENV_DLY $00,$ff81
ENV_END
;
; envelope #8
;
psg_env8:
ENV_RLS $fb05
ENV_LEV $3440
ENV_DLY $03,$1801
ENV_DLY $00,$ff81
ENV_END
;
; envelope #9
;
psg_env9:
ENV_RLS $fb05
ENV_LEV $1c40
ENV_DLY $01,$6001
ENV_DLY $02,$fe01
ENV_DLY $08,$fc01
ENV_DLY $32,$0081
ENV_END
;
; envelope #$0a
;
psg_enva:
ENV_RLS $fd01
ENV_LEV $0440
ENV_DLY $03,$2801
ENV_DLY $04,$fe01
ENV_END
;
; envelope #$0b
;
psg_envb:
ENV_RLS $fd01
ENV_LEV $0000
ENV_LEV $0000
ENV_LEV $7c40
ENV_DLY $00,$ffc1
ENV_END
;
; envelope #$0c
;
psg_envc:
ENV_RLS $fa05
ENV_LEV $0000
ENV_LEV $0000
ENV_LEV $6840
ENV_DLY $00,$0061
ENV_END
;
; envelope #$0d
;
psg_envd:
ENV_RLS $fa05
ENV_LEV $7c40
ENV_DLY $04,$f801
ENV_DLY $00,$ff41
ENV_END
;
; envelope #$0e
;
psg_enve:
ENV_RLS $fa05
ENV_LEV $7c40
ENV_DLY $08,$f801
ENV_DLY $00,$ff41
ENV_END
;
; envelope #$0f
;
psg_envf:
ENV_RLS $ff00
ENV_LEV $7c40
ENV_DLY $05,$fc01
ENV_LEV $7040
ENV_DLY $05,$fc01
ENV_LEV $6440
ENV_DLY $05,$fc01
ENV_LEV $5840
ENV_DLY $05,$fc01
ENV_LEV $4c40
ENV_DLY $05,$fc01
ENV_LEV $4040
ENV_DLY $05,$fc01
ENV_DLY $00,$ff01
ENV_END
;
; Envelope Header (pointers to data)
;
psg_envtbl:
.dw psg_env0
.dw psg_env1
.dw psg_env2
.dw psg_env3
.dw psg_env4
.dw psg_env5
.dw psg_env6
.dw psg_env7
.dw psg_env8
.dw psg_env9
.dw psg_enva
.dw psg_envb
.dw psg_envc
.dw psg_envd
.dw psg_enve
.dw psg_envf
;
; now, return context to bank established in
; file which included this
;
.bank START_BANK
| 14.249884 | 64 | 0.55678 |
d8c9ee15db6bdf123777ee6ca5c6d1eef90164f8 | 11,519 | asm | Assembly | projects/07/StackArithmetic/StackTest/StackTest.asm | theapi/nand2tetris | 0e09a7b3f1f1ec68e56b5299128d4b62f5b164d7 | [
"MIT"
] | null | null | null | projects/07/StackArithmetic/StackTest/StackTest.asm | theapi/nand2tetris | 0e09a7b3f1f1ec68e56b5299128d4b62f5b164d7 | [
"MIT"
] | null | null | null | projects/07/StackArithmetic/StackTest/StackTest.asm | theapi/nand2tetris | 0e09a7b3f1f1ec68e56b5299128d4b62f5b164d7 | [
"MIT"
] | null | null | null | // init to SP pointing to 256
@256
D=A
@SP
M=D
// constant
@17
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@17
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// eq
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@eq_true0
D;JEQ // jump if D == 0
D=0 // false
@eq_end1
0;JMP // jump to eq_end
(eq_true0)
D=-1 // true
(eq_end1)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@17
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@16
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// eq
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@eq_true2
D;JEQ // jump if D == 0
D=0 // false
@eq_end3
0;JMP // jump to eq_end
(eq_true2)
D=-1 // true
(eq_end3)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@16
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@17
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// eq
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@eq_true4
D;JEQ // jump if D == 0
D=0 // false
@eq_end5
0;JMP // jump to eq_end
(eq_true4)
D=-1 // true
(eq_end5)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@892
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@891
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// gt
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@lt_true6
D;JLT // jump if D < 0
D=0 // false
@lt_end7
0;JMP // jump to lt_end
(lt_true6)
D=-1 // true
(lt_end7)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@891
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@892
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// gt
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@lt_true8
D;JLT // jump if D < 0
D=0 // false
@lt_end9
0;JMP // jump to lt_end
(lt_true8)
D=-1 // true
(lt_end9)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@891
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@891
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// gt
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@lt_true10
D;JLT // jump if D < 0
D=0 // false
@lt_end11
0;JMP // jump to lt_end
(lt_true10)
D=-1 // true
(lt_end11)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@32767
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@32766
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// gt
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@gt_true12
D;JGT // jump if D > 0
D=0 // false
@gt_end13
0;JMP // jump to gt_end
(gt_true12)
D=-1 // true
(gt_end13)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@32766
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@32767
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// gt
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@gt_true14
D;JGT // jump if D > 0
D=0 // false
@gt_end15
0;JMP // jump to gt_end
(gt_true14)
D=-1 // true
(gt_end15)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@32766
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@32766
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// gt
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // y
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
@gt_true16
D;JGT // jump if D > 0
D=0 // false
@gt_end17
0;JMP // jump to gt_end
(gt_true16)
D=-1 // true
(gt_end17)
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@57
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@31
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@53
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// add
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // the last entered value
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=D+M // x+y
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@112
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// sub
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // the last entered value
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M-D // x-y
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// neg
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=-D // -y
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// and
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // the last entered value
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=D&M // x And y
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// constant
@82
D=A // Store the numeric value in D
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// or
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=M // the last entered value
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=D|M // x Or y
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
// not
// POP
@SP
M=M-1 // decrement (pop) the stack pointer
A=M // set the address to where the SP is pointing
D=!D // !y
// PUSH
@SP
A=M // set the address to where the SP is pointing
M=D // store the value in the stack
@SP
M=M+1 // Advance the stack pointer
| 18.579032 | 53 | 0.639205 |
12cb5a3bfcae3c47a9efcc864f7009ff5b7508f0 | 574 | asm | Assembly | programs/oeis/076/A076627.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/076/A076627.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/076/A076627.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A076627: a(n) = tau(n)*(n-tau(n)), where tau(n) = number of divisors of n (A000005).
; 0,0,2,3,6,8,10,16,18,24,18,36,22,40,44,55,30,72,34,84,68,72,42,128,66,88,92,132,54,176,58,156,116,120,124,243,70,136,140,256,78,272,82,228,234,168,90,380,138,264,188,276,102,368,204,384,212,216,114,576,118,232,342,399,244,464,130,372,260,496,138,720,142,280,414,420,292,560,154,700,380,312,162,864,324,328,332,640,174,936,348,516,356,360,364,1008,190,552,558,819
mov $1,$0
seq $1,5 ; d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.
sub $0,$1
mul $0,$1
add $0,$1
| 63.777778 | 364 | 0.6777 |
2448e7e353e58983931b8575f4bbe7a00be23645 | 7,693 | asm | Assembly | Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_/i3-7100_9_0x84_notsx.log_2466_1407.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_/i3-7100_9_0x84_notsx.log_2466_1407.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/AVXALIGN/_ht_st_zr_un_/i3-7100_9_0x84_notsx.log_2466_1407.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r12
push %r14
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x1a090, %rsi
lea addresses_WC_ht+0x3010, %rdi
nop
nop
nop
nop
dec %r9
mov $120, %rcx
rep movsl
nop
nop
nop
nop
sub $62142, %r9
lea addresses_WC_ht+0x11c50, %r9
and %r12, %r12
movb $0x61, (%r9)
nop
cmp $53621, %r9
lea addresses_WC_ht+0xf1aa, %rsi
lea addresses_UC_ht+0x14810, %rdi
clflush (%rsi)
nop
nop
inc %rbp
mov $6, %rcx
rep movsb
nop
nop
nop
sub $56738, %rdi
lea addresses_WT_ht+0x1c107, %rdi
nop
inc %rbp
movups (%rdi), %xmm1
vpextrq $0, %xmm1, %rax
nop
nop
nop
and %rdi, %rdi
lea addresses_D_ht+0x114aa, %rcx
nop
nop
xor $27593, %r9
movups (%rcx), %xmm5
vpextrq $1, %xmm5, %rbp
dec %rsi
lea addresses_WT_ht+0x2c10, %r12
nop
nop
nop
nop
nop
cmp %rdi, %rdi
movups (%r12), %xmm2
vpextrq $1, %xmm2, %rax
nop
cmp $13245, %rcx
lea addresses_normal_ht+0x15410, %rsi
sub $19744, %rbp
mov (%rsi), %r12w
nop
nop
xor $9167, %rbp
lea addresses_normal_ht+0x6a62, %rax
nop
add $47370, %rsi
movl $0x61626364, (%rax)
nop
nop
nop
sub $53198, %rsi
lea addresses_WT_ht+0x143d0, %rsi
lea addresses_normal_ht+0x10420, %rdi
sub $27056, %r14
mov $55, %rcx
rep movsl
nop
and %rdi, %rdi
lea addresses_normal_ht+0x11430, %rsi
nop
nop
nop
nop
dec %r9
mov (%rsi), %r12
cmp %rax, %rax
lea addresses_A_ht+0x1be10, %rax
nop
nop
xor %r12, %r12
movb (%rax), %cl
nop
sub $34116, %rax
lea addresses_WT_ht+0xcc30, %rsi
nop
sub %rcx, %rcx
mov (%rsi), %rax
nop
nop
nop
nop
xor $31208, %rbp
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r14
push %r8
push %rax
push %rdi
push %rdx
// Load
lea addresses_RW+0x3290, %r14
nop
nop
nop
inc %r8
movups (%r14), %xmm2
vpextrq $1, %xmm2, %rax
nop
and %rdx, %rdx
// Store
lea addresses_WT+0xf410, %rdx
nop
nop
nop
nop
and $2453, %rdi
mov $0x5152535455565758, %r12
movq %r12, %xmm1
vmovntdq %ymm1, (%rdx)
nop
nop
nop
nop
xor $30218, %r8
// Faulty Load
mov $0x61fd7b0000000410, %r14
nop
nop
add %r10, %r10
vmovaps (%r14), %ymm5
vextracti128 $1, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdx
lea oracles, %r10
and $0xff, %rdx
shlq $12, %rdx
mov (%r10,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rax
pop %r8
pop %r14
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': True}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_RW', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_WT', 'same': False, 'size': 32, 'congruent': 10, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'same': True, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': True}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': True}, 'OP': 'REPM'}
{'dst': {'type': 'addresses_WC_ht', 'same': False, 'size': 1, 'congruent': 1, 'NT': False, 'AVXalign': True}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': True}, 'OP': 'REPM'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 16, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 2, 'congruent': 11, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM'}
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_A_ht', 'same': True, 'size': 1, 'congruent': 7, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'same': False, 'size': 8, 'congruent': 5, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'32': 1, 'c5': 5, '93': 1, '54': 1, 'e7': 1, 'ab': 2, '9a': 1, 'c7': 4, '51': 1, '03': 1, '5b': 1, 'd3': 1, 'ff': 1, '17': 1, '00': 2392, 'd6': 2, '63': 1, 'fb': 1, 'c8': 5, '0f': 1, 'f7': 1, 'cd': 1, '37': 1, 'f9': 1, '48': 32, 'ed': 1, '79': 1, '1d': 1, '34': 1, '77': 1, 'c9': 1}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c5 00 00 00 00 00 00 00 00 51 00 00 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ab 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 cd 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 37 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 5b 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ab 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 00 00 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 37.34466 | 2,999 | 0.643312 |
80e1af11fcf28553f8450d0a523332fc60bcc03c | 3,616 | asm | Assembly | ace/assembly/src/exams/feb21-19.asm | ale-cci/Appunti | 9aa76eb46b7a984776f50260e598c9de1fa6317a | [
"MIT"
] | null | null | null | ace/assembly/src/exams/feb21-19.asm | ale-cci/Appunti | 9aa76eb46b7a984776f50260e598c9de1fa6317a | [
"MIT"
] | null | null | null | ace/assembly/src/exams/feb21-19.asm | ale-cci/Appunti | 9aa76eb46b7a984776f50260e598c9de1fa6317a | [
"MIT"
] | null | null | null | ; 1h:44m
; Calcolare la somma degli indici, calcolare anche quanti valori di indice sono sbagliati (fuori dai limiti del vettore)
; Indicare a video il numero di indici sbagliati tramite funzione NumeriSbagliati (parametri per stack)
; La funzione deve scrivere a schermo String, seguito dal numero passato come parametro
; Riportare a video il valore della somma, supponendo che contenga al massimo 3 cifre
CPU 8086
SECTION data
; Vett 8b |N| di valori sia positivi che negativi
; Vett2 di |N2| byte di indici positivi
Vett: db 12, -10, 101, -55, -64, 118, 8, 44, 97, -22
N: db 10
Indici: db 2, 0, 10, 3, 1, 22, 1, 7, 8, 4
N2: db 10
String: DB 'Numero di indici sbagliati = ',0
NewLine: DB 0ah,0dh,0
MsgTotal: DB 'Totale complessivo = ',0
Total: DW 0,0
SECTION code
..start:
mov ax, data
mov ds, ax
mov es, ax
call _main
mov ax, 4c00h
int 21h
_main: mov ax, Vett
push ax
xor ah, ah
mov al, [N]
push ax
mov ax, Indici
push ax
xor ah, ah
mov al, [N2]
push ax
call _calc_sum
add sp, 2*4
mov si, MsgTotal
call _print_string
mov ax, [Total]
push ax
call _print_no
add sp, 2
mov si, NewLine
call _print_string
ret
; N2 = 4, Indici = 6, N = 8, Vett = 10
_calc_sum: push bp
mov bp, sp
xor dx, dx ; Error register
mov cx, [bp + 4]
.loops: mov bx, [bp + 6]
sub bx, cx
add bx, [bp + 4] ; bx = Indici + i
mov al, [bp + 8] ; ax = N
mov bl, [bx] ; bx = *(Indici + i)
cmp bl, al
jnge .ok
inc dx
loop .loops
.ok: mov ax, [Total]
xor bh, bh
add bl, [bp +10] ; bx = Vett[*(Indici +i)]
add al, [bx]
mov [Total], ax
loop .loops
push dx
call _wrong_nums
add sp, 2
pop bp
ret
; Print parameter passed
_print_no: push bp
mov bp, sp
mov cx, [bp + 4]
; If negative print minus
test cx, cx
jns .no_sign
mov al, '-'
xor bx, bx
mov ah, 0eh
int 10h
neg cx
.no_sign:
; Parse cx, content
; if more than 1 cyphre put shifted value to stack and call function
; else print cyphre and quit
cmp cx, 10
jl .just_print
mov ax, cx
mov bx, 10
xor dx, dx
div bx
push dx ; Reminder
push ax ; Result
call _print_no
add sp, 2
pop ax
.just_print: xor bx, bx
mov ah, 0eh
add al, '0'
int 10h
pop bp
ret
_print_string: xor bx, bx
mov ah, 0eh
.sprint: lodsb
test al, al
jz .eprint
int 10h
jmp .sprint
.eprint: ret
; Wrong numbers [bp +4]
_wrong_nums: push bp
mov bp, sp
; Print message
mov si, String
call _print_string
; Print number
mov ax, [bp + 4]
push ax
call _print_no
add sp, 2
; Pring new line
mov si, NewLine
call _print_string
pop bp
ret
| 21.783133 | 120 | 0.465155 |
49a66566714e6fce4851d66360f226b9d3ac535f | 349 | asm | Assembly | oeis/100/A100444.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/100/A100444.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/100/A100444.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A100444: Bisection of A000255.
; Submitted by Jamie Morken(s2)
; 1,3,53,2119,148329,16019531,2467007773,513137616783,138547156531409,47106033220679059,19690321886243846661,9923922230666898717143,5934505493938805432851513,4154153845757163802996059099
mul $0,2
lpb $0
add $1,$0
sub $0,1
add $1,1
sub $2,1
mul $1,$2
lpe
mov $0,$1
add $0,1
| 23.266667 | 186 | 0.765043 |
f7e6ee2632c4781e7a4f5bdc647f5ab0e5fc983d | 8,600 | asm | Assembly | Opus/asm/fieldspn.asm | Computer-history-Museum/MS-Word-for-Windows-v1.1 | 549a2a32e930694df7b91e3273b886d735fa9151 | [
"MIT"
] | 2 | 2018-01-22T14:38:52.000Z | 2019-02-25T02:16:30.000Z | Microsoft DOS/Word 1.1a CHM Distribution/Opus/asm/fieldspn.asm | mindcont/Open-Source | 416917cbe3d4469cc036d05e7c858b05b8081ded | [
"CC0-1.0"
] | null | null | null | Microsoft DOS/Word 1.1a CHM Distribution/Opus/asm/fieldspn.asm | mindcont/Open-Source | 416917cbe3d4469cc036d05e7c858b05b8081ded | [
"CC0-1.0"
] | 1 | 2021-06-25T17:34:43.000Z | 2021-06-25T17:34:43.000Z | include w2.inc
include noxport.inc
include consts.inc
include structs.inc
createSeg fieldsp_PCODE,fieldspn,byte,public,CODE
; DEBUGGING DECLARATIONS
ifdef DEBUG
midFieldspn equ 23 ; module ID, for native asserts
endif ;DEBUG
; EXPORTED LABELS
; EXTERNAL FUNCTIONS
externFP <N_QcpQfooPlcfoo>
externFP <N_PdodDoc>
externFP <CompletelyAdjustHplcCps>
ifdef DEBUG
externFP <AssertProcForNative>
endif ;DEBUG
; EXTERNAL DATA
sBegin data
externW mpdochdod ;extern struct DOD **mpdochdod[];
ifdef DEBUG
externW mpsbps ;extern SB mpsbps[];
endif ;DEBUG
sEnd data
; CODE SEGMENT fieldspn_PCODE
sBegin fieldspn
assumes cs,fieldspn
assumes ds,dgroup
assume es:nothing
assume ss:nothing
;-------------------------------------------------------------------------
; FFillRgwWithSeqLevs(doc, cp, ipad, ifld, hplcpad, hplcfld, rgw)
;-------------------------------------------------------------------------
;NATIVE FFillRgwWithSeqLevs(doc, cp, ipad, ifld, hplcpad, hplcfld, rgw)
;int doc;
;CP cp;
;int ipad;
;int ifld;
;struct PLC **hplcpad;
;struct PLC **hplcfld;
;int *rgw;
;{
; CP cpCur;
; int ipadMac = IMacPlc(hplcpad);
; int ifldMac = IMacPlc(hplcfld);
; struct PAD pad;
; struct FLD fld;
; %%Function:N_FFillRgwWithSeqLevs %%Owner:BRADV
cProc N_FFillRgwWithSeqLevs,<PUBLIC,FAR>,<si,di>
ParmW doc
ParmD cp
ParmW ipad
ParmW ifld
ParmW hplcpad
ParmW hplcfld
ParmW rgw
LocalW LO_qPad
cBegin
;Assembler note: Since we may be running through the entire
;plc anyway, let's unwind the lazy plc optimization and speed
;up the rest of the code.
cCall CompletelyAdjustHplcCps,<[hplcpad]>
cCall CompletelyAdjustHplcCps,<[hplcfld]>
; It is possible that the call later on to QcpQfooPlcfoo for hplcpad
; would force out the sb for hplcfld. This would happen if now
; sbFld was oldest on the LRU list but still swapped in, and sbPad
; was swapped out. In that event ReloadSb would not be called for
; sbFld, the LRU entry would not get updated, and the call to ReloadSb
; for sbPad would swap out sbFld.
; This call to QcpQfooPlcfoo makes that state impossible and so works
; around the LMEM quirk.
; QcpQfooPlcfoo takes hplcfoo in bx, ifoo in si, it returns pplcfoo
; in bx, cbfoo in cx, qcp in es:di, qfoo in es:si.
; if DEBUG it returns hpcp in dx:di, hpfoo in dx:si.
; Changes ax, bx, cx, dx, si, di.
mov bx,[hplcpad]
xor si,si
ifdef DEBUG
mov di,1 ;O.K. to pass ifldMac
endif ;DEBUG
cCall N_QcpQfooPlcfoo,<>
ifdef DEBUG
;Check that es == mpsbps[dx];
call FRWSL13
endif ;DEBUG
; QcpQfooPlcfoo takes hplcfoo in bx, ifoo in si, it returns pplcfoo
; in bx, cbfoo in cx, qcp in es:di, qfoo in es:si.
; if DEBUG it returns hpcp in dx:di, hpfoo in dx:si.
; Changes ax, bx, cx, dx, si, di.
mov bx,[hplcfld]
mov si,[ifld]
ifdef DEBUG
mov di,1 ;O.K. to pass ifldMac
endif ;DEBUG
cCall N_QcpQfooPlcfoo,<>
push es ;save LO_qcpFld
push si ;save HI_qFld
push di ;save HI_qcpFld
ifdef DEBUG
;Check that es == mpsbps[dx];
call FRWSL13
endif ;DEBUG
mov ax,[bx.iMacPlcStr]
neg ax
add [ifld],ax ;ifld now really contains ifld - (*hplcfld)->iMac
; QcpQfooPlcfoo takes hplcfoo in bx, ifoo in si, it returns pplcfoo
; in bx, cbfoo in cx, qcp in es:di, qfoo in es:si.
; if DEBUG it returns hpcp in dx:di, hpfoo in dx:si.
; Changes ax, bx, cx, dx, si, di.
mov bx,[hplcpad]
mov si,[ipad]
ifdef DEBUG
mov di,1 ;O.K. to pass ifldMac
endif ;DEBUG
cCall N_QcpQfooPlcfoo,<>
ifdef DEBUG
;Check that es == mpsbps[dx];
call FRWSL13
endif ;DEBUG
mov ax,[bx.iMacPlcStr]
neg ax
add [ipad],ax ;ipad now really contains ipad - (*hplcpad)->iMac
mov [LO_qPad],si
pop bx ;restore HI_qcpFld
pop si ;restore HI_qFld
pop ds ;restore LO_qcpFld
;ds:si = qFld, ds:bx = qcpFld, es:[LO_qPad] = qPad, es:di = qcpPad
; cpCur = CpPlc(hplcpad, ipad);
mov cx,es:[di]
mov dx,es:[di+2]
; while (ipad < ipadMac && cpCur <= cp)
; {
FRWSL01:
cmp [ipad],0 ;really contains ipad - (*hplcpad)->iMac
jge FRWSL015
cmp [OFF_cp],cx
mov ax,[SEG_cp]
sbb ax,dx
jl FRWSL015
; while (ifld < ifldMac && CpPlc(hplcfld, ifld) < cpCur)
; /* advance to this para */
; ifld++;
dec [ifld] ;cancel following inc [ifld]
jmp short FRWSL03
FRWSL015:
push ss
pop ds ;restore ds
stc ;return fTrue
jmp FRWSL10
;dx:cx = cpCur, ds:si = qFld, ds:bx = qcpFld,
;es:[LO_qPad] = qPad, es:di = qcpPad
FRWSL02:
errnz <cbFldMin - 2>
inc si
inc si
add bx,4
FRWSL03:
inc [ifld] ;really contains ifld - (*hplcfld)->iMac
jge FRWSL04
cmp [bx],cx
mov ax,[bx+2]
sbb ax,dx
jl FRWSL02
FRWSL04:
; cpCur = CpPlc(hplcpad, ipad+1);
;ipad++ is done below in the C version.
;dx:cx = cpCur, ds:si = qFld, ds:bx = qcpFld,
;es:[LO_qPad] = qPad, es:di = qcpPad
inc [ipad] ;really contains ipad - (*hplcpad)->iMac
add [LO_qPad],cbPadMin
add di,4
mov cx,es:[di]
mov dx,es:[di+2]
; while (ifld < ifldMac && CpPlc(hplcfld, ifld) < cpCur)
; {
; GetPlc(hplcfld, ifld++, &fld);
; if (fld.ch == chFieldBegin &&
; (uns)(fld.flt-fltSeqLevOut)<=(fltSeqLevNum - fltSeqLevOut))
; /* this para does have an auto number, count it */
; {
FRWSL05:
cmp [ifld],0 ;really contains ifld - (*hplcfld)->iMac
jge FRWSL01
cmp [bx],cx
mov ax,[bx+2]
sbb ax,dx
jge FRWSL01
inc [ifld] ;really contains ifld - (*hplcfld)->iMac
errnz <cbFldMin - 2>
lodsw
add bx,4
errnz <(chFld) - 0>
errnz <(fltFld) - 1>
and al,maskChFld
ifdef DEBUG
;Make sure we don't carry from al to ah when doing the following
;subtract.
call FRWSL16
endif ;DEBUG
sub ax,(fltSeqLevOut SHL 8) + chFieldBegin
xchg al,ah
cmp ax,fltSeqLevNum - fltSeqLevOut
ja FRWSL05
; GetPlc (hplcpad, ipad, &pad);
;dx:cx = cpCur, ds:si = qFld, ds:bx = qcpFld,
;es:[LO_qPad] = qPad, es:di = qcpPad
; if (pad.lvl == lvlUpdate)
; {
; Assert(fFalse);
; PdodDoc(doc)->fOutlineDirty = fTrue;
; return fFalse;
; }
xchg bx,[LO_qPad]
mov al,es:[bx.lvlPad - cbPadMin]
xchg bx,[LO_qPad]
mov ah,al
and al,maskLvlPad
errnz <maskLvlPad - 0F0h>
cmp al,lvlUpdate SHL 4
je FRWSL08
; if (!pad.fBody && !pad.fInTable)
; {
;dx:cx = cpCur, ds:si = qFld, ds:bx = qcpFld,
;es:[LO_qPad] = qPad, es:di = qcpPad
push bx ;save LO_qcpFld
mov bx,lvlBody SHL 1
and ah,maskFBodyPad + maskFInTablePad
jne FRWSL07
; Assert (pad.lvl < lvlBody && pad.lvl >= 0);
ifdef DEBUG
;Do this assert with a call so as not to mess up short jumps
call FRWSL11
endif ;/* DEBUG */
; rgw [pad.lvl]++;
; SetWords (rgw + pad.lvl + 1, 0, lvlBody - pad.lvl);
; }
push cx ;save LO_cpCur
push di ;save LO_qcpPad
push es ;save HI_qcpPad
errnz <maskLvlPad - 0F0h>
mov cl,3
shr al,cl
sub bx,ax
mov cx,bx
shr cx,1
mov di,[rgw]
xchg ax,bx
lea di,[bx+di+2]
xor ax,ax
push ss
pop es
rep stosw
pop es ;restore HI_qcpPad
pop di ;restore LO_qcpPad
pop cx ;restore LO_cpCur
; else
; rgw [lvlBody]++;
; break;
FRWSL07:
add bx,[rgw]
inc wptr ss:[bx]
pop bx ;restore LO_qcpFld
jmp FRWSL01
; }
; }
;ipad++ is done above in the assembler version.
; ipad++;
; }
FRWSL08:
push ss
pop ds
ifdef DEBUG
push ax
push bx
push cx
push dx
mov ax,midFieldspn
mov bx,1002
cCall AssertProcForNative,<ax,bx>
pop dx
pop cx
pop bx
pop ax
endif ;/* DEBUG */
cCall N_PdodDoc,<[doc]>
xchg ax,bx
or [bx.fOutlineDirtyDod],maskFOutlineDirtyDod
;Note that the preceding "or" clears the carry flag
FRWSL10:
; return fTrue;
sbb ax,ax
;}
cEnd
ifdef DEBUG
FRWSL11:
cmp al,lvlBody SHL 4
jb FRWSL12
push ax
push bx
push cx
push dx
push ds
push ss
pop ds
mov ax,midFieldspn
mov bx,1001
cCall AssertProcForNative,<ax,bx>
pop ds
pop dx
pop cx
pop bx
pop ax
FRWSL12:
ret
endif ;/* DEBUG */
ifdef DEBUG
FRWSL13:
push ax
push bx
push cx
push dx
push es ;save es from QcpQfooPlcfoo
mov bx,dx
shl bx,1
mov ax,mpsbps[bx]
mov es,ax
shr ax,1
jc FRWSL14
;Assembler note: There is no way we should have to call ReloadSb here.
; reload sb trashes ax, cx, and dx
; cCall ReloadSb,<>
mov ax,midFieldspn
mov bx,1003
cCall AssertProcForNative,<ax,bx>
FRWSL14:
pop ax ;restore es from QcpQfooPlcfoo
mov bx,es ;compare with es rederived from the SB of QcpQfooPlcfoo
cmp ax,bx
je FRWSL15
mov ax,midFieldspn
mov bx,1004
cCall AssertProcForNative,<ax,bx>
FRWSL15:
pop dx
pop cx
pop bx
pop ax
ret
endif ;/* DEBUG */
ifdef DEBUG
FRWSL16:
cmp al,chFieldBegin
jae FRWSL17
push ax
push bx
push cx
push dx
push ss
pop ds
mov ax,midFieldspn
mov bx,1005
cCall AssertProcForNative,<ax,bx>
pop dx
pop cx
pop bx
pop ax
FRWSL17:
ret
endif ;/* DEBUG */
sEnd fieldspn_PCODE
end
| 20.52506 | 74 | 0.673605 |
d9e57467055a9008f8a9cce87317b0686170f98c | 264 | asm | Assembly | programs/oeis/033/A033397.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/033/A033397.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/033/A033397.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A033397: a(n) = floor(77/n).
; 77,38,25,19,15,12,11,9,8,7,7,6,5,5,5,4,4,4,4,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
add $0,1
mov $1,77
div $1,$0
mov $0,$1
| 33 | 192 | 0.518939 |
d7592cc4e1a5d828b6f439c174f73240beef98a4 | 202 | asm | Assembly | test7.asm | napobear/py6502 | bdcc27649d46adf343ad212bf44669ef514b6a84 | [
"Apache-2.0"
] | null | null | null | test7.asm | napobear/py6502 | bdcc27649d46adf343ad212bf44669ef514b6a84 | [
"Apache-2.0"
] | null | null | null | test7.asm | napobear/py6502 | bdcc27649d46adf343ad212bf44669ef514b6a84 | [
"Apache-2.0"
] | null | null | null | ; Simple test
BRK
PHP
CLC
PLP
SEC
RTI
PHA
CLI
PHY
RTS
PLA
SEI
PLY
DEY
TXA
TYA
TXS
TAY
TAX
CLV
TXS
INY
DEX
CLD
PHX
INX
NOP
SED
PLX
CPX #12
| 6.121212 | 14 | 0.50495 |
080678a1448d6e1cc18f8af32a9228a53f9c5b23 | 2,357 | asm | Assembly | Driver/Printer/PrintCom/Cursor/cursorPrLineFeedExe.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Driver/Printer/PrintCom/Cursor/cursorPrLineFeedExe.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Driver/Printer/PrintCom/Cursor/cursorPrLineFeedExe.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: print drivers
FILE: cursorPrLineFeedExe.asm
AUTHOR: Dave Durran, 14 March 1990
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 3/14/90 Initial revision
Dave 3/92 moved from epson9 to printcom
DESCRIPTION:
$Id: cursorPrLineFeedExe.asm,v 1.1 97/04/18 11:49:40 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrLineFeed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS:
Executes a vertical line feed of dx <printer units>, and updates
the cursor position accordingly.
CALLED BY:
Jump Table
PASS:
es = segment of PState
dx = length , in <printer units>" to line feed.
RETURN:
carry - set if some transmission error
DESTROYED:
nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 02/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrLineFeed proc near
uses ax,cx,si
.enter
add es:PS_cursorPos.P_y,dx
hiloop:
mov cx,dx
sub cx,PR_MAX_LINE_FEED ;see if there is room to do a max feed.
jle writeoutlowdigit ;if not, send just the low digits.
mov dx,cx ;save new length after max feed.
mov si,offset pr_codes_DoMaxLineFeed
call SendCodeOut ;send PR_MAX_FEED 1/216" feed
jc exit
jmp hiloop ;do [hi digit] times.
writeoutlowdigit:
mov si,offset pr_codes_DoLineFeed
call SendCodeOut ;send following 1/216" feed
jc exit
mov cx,dx ;recover the remaining line length.
;guaranteed less than 256.....
jcxz exit
call PrintStreamWriteByte
exit:
.leave
ret
PrLineFeed endp
| 25.901099 | 79 | 0.482817 |
476f9a40c72a7cc31a82477f0bd1791b5e08e05a | 1,277 | asm | Assembly | cat/cat.asm | jhunt/opus-asm | daf0cee3edec2a917d4fd3796a4d1fc79c77de19 | [
"MIT"
] | 1 | 2020-01-25T14:53:51.000Z | 2020-01-25T14:53:51.000Z | cat/cat.asm | jhunt/opus-asm | daf0cee3edec2a917d4fd3796a4d1fc79c77de19 | [
"MIT"
] | null | null | null | cat/cat.asm | jhunt/opus-asm | daf0cee3edec2a917d4fd3796a4d1fc79c77de19 | [
"MIT"
] | null | null | null | ;; vim:ft=nasm
;; cat - Read from standard input, write to standard output
global _start
section .text
_start:
;; argc is at RSP
;; argv stretches from RSP+8
;; to RSP+8 + (8 * argc)
mov r13, [rsp]
cmp r13, 1
je read1 ;; no arguments, use stdin
xor r12, r12
.next:
inc r12
cmp r13, r12
je .done
;; open(path, O_RDONLY)
mov rax, 2
mov rdi, [rsp+8+8*r12]
mov rsi, 0 ;; O_RDONLY
syscall
cmp rax, 0
jl .failed
mov [fd], rax
call read1
jmp .next
.failed:
;; exit(1)
mov rax, 60
mov rdi, 2
syscall
.done:
;; exit(0)
mov rax, 60
mov rdi, 2
syscall
read1:
.again:
;; read(fd, buf, len)
mov rax, 0
mov rdi, [fd]
mov rsi, buf
mov rdx, len
syscall
cmp rax, 0
je .done ;; RAX = 0 means nothing to reade
jl .failed ;; RAX < 0 means an error
.write:
;; write(1, buf, ...)
mov rdx, rax
mov rax, 1 ; has to be last, since return value of
; read(...) call was in RAX, which we need
; to pass to write(...) via RDX.
mov rdi, 1
;; NB: RSI is unchanged from the read(...) call
syscall
jmp .again
.done:
ret
.failed:
;; exit(1)
mov rax, 60
mov rdi, 1
syscall
section .data
fd dd 0
section .bss
len equ 8192
buf resb $len
| 15.202381 | 59 | 0.571652 |
e469e397d72bd46cc1e26949dbb0ee6e62dcfa38 | 831 | asm | Assembly | oeis/142/A142843.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/142/A142843.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/142/A142843.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A142843: Primes congruent to 45 mod 61.
; Submitted by Jon Maiga
; 167,1021,1753,1997,2729,2851,3217,3461,3583,5413,5657,5779,6389,7121,7243,7487,7853,8219,8707,8951,9439,10781,10903,12611,13099,13709,13831,14197,14563,14929,15173,15661,16759,17491,18223,19687,20297,20663,21517,22859,23957,26153,26641,27617,27739,27983,28349,28837,29569,30911,31033,31277,31643,32009,32497,33107,33961,34327,34693,35059,36523,36767,37987,38231,39451,40427,41281,41647,42013,42257,42379,42989,43721,44087,44453,44819,45307,45673,46649,46771,47137,47381,47869,48479,49211,49333,49943
mov $1,22
mov $2,$0
add $2,2
pow $2,2
lpb $2
sub $2,1
mov $3,$1
mul $3,2
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,61
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
lpe
mov $0,$1
mul $0,2
sub $0,121
| 34.625 | 501 | 0.732852 |
22c790a9000d78ea3fa8e1f8fa37e3f29873b3a5 | 1,063 | asm | Assembly | Driver/Printer/PrintCom/printcomToshibaCursor.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Driver/Printer/PrintCom/printcomToshibaCursor.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Driver/Printer/PrintCom/printcomToshibaCursor.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Toshiba 24-pin print drivers
FILE: printcomToshibaCursor.asm
AUTHOR: Dave Durran, 14 March 1990
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 3/14/90 Initial revision
Dave 3/92 moved from epson9 to printcom
DESCRIPTION:
This file contains most of the code to implement the Toshiba 24pin type
print driver cursor movement support
The cursor position is kept in 2 words: integer 48s in Y and
integer 72nds in X
$Id: printcomToshibaCursor.asm,v 1.1 97/04/18 11:50:26 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
include Cursor/cursorDotMatrixCommon.asm
include Cursor/cursorSetCursorTosh.asm
include Cursor/cursorPrLineFeedSetASCII.asm
include Cursor/cursorPrFormFeedGuess.asm
include Cursor/cursorConvert48.asm
| 26.575 | 79 | 0.621825 |
2f9a0e37749a87f0a76abc67c41c84fde8113b00 | 259 | asm | Assembly | libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sccz80/SMS_loadBGPaletteHalfBrightness.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sccz80/SMS_loadBGPaletteHalfBrightness.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/_DEVELOPMENT/arch/sms/SMSlib/c/sccz80/SMS_loadBGPaletteHalfBrightness.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ; void SMS_loadBGPaletteHalfBrightness(void *palette)
SECTION code_clib
SECTION code_SMSlib
PUBLIC SMS_loadBGPaletteHalfBrightness
EXTERN asm_SMSlib_loadBGPaletteHalfBrightness
defc SMS_loadBGPaletteHalfBrightness = asm_SMSlib_loadBGPaletteHalfBrightness
| 23.545455 | 77 | 0.903475 |
db5c15632d7f4a6a7a66d71921b679d020b9f780 | 2,767 | asm | Assembly | games/HomeLand/Main.asm | BttrDrgn/GC-Translation | 4d9feab9523bc49c5b23542e28565bc50c1152c7 | [
"Unlicense"
] | 1 | 2022-03-27T09:03:45.000Z | 2022-03-27T09:03:45.000Z | games/HomeLand/Main.asm | BttrDrgn/GC-Translation | 4d9feab9523bc49c5b23542e28565bc50c1152c7 | [
"Unlicense"
] | null | null | null | games/HomeLand/Main.asm | BttrDrgn/GC-Translation | 4d9feab9523bc49c5b23542e28565bc50c1152c7 | [
"Unlicense"
] | null | null | null | // GameCube "HomeLand" Japanese To English Translation by krom (Peter Lemon):
endian msb // GameCube PPC requires Big-Endian Encoding (Most Significant Bit)
output "../../output/HomeLand [U].iso", create
origin $000000; insert "../../isos/HomeLand [J].iso" // Include Japanese HomeLand ISO
macro Text(OFFSET, TEXT) {
map 0, 0, 256
origin {OFFSET}
db {TEXT}
}
//Text utilities
// Font Colors
constant BLACK = $B0 // Default
constant BLUE = $B8
constant RED = $BB
//Other text stuff
constant QUOTE = $22
constant NEWLINE = $0A
//Wait for user input/press a
macro Next() {
db $81, $A5
}
//Delays the next message from loading
macro Continue() {
db $81, $A4
}
//Menu prompt next
macro Prompt() {
db $81, $9A
}
//VA macros because %s doesn't like to compile properly
macro DoubleVA() {
db $25, $44
}
macro StringVA() {
db $25, $73
}
//End
macro TextShiftJIS(OFFSET, TEXT) {
// Map Shift-JIS Words
map ' ', $8140
map $2C, $8143 // Comma ","
map '.', $8144
map ':', $8146
map '?', $8148
map '!', $8149
map '~', $8160
map '\'', $8166 // Single Quote "'"
//map '\d', $8168 // Double Quote '"'
map '+', $817B
map '&', $8195
map '0', $824F, 10 // Map Numbers
map 'A', $8260, 26 // Map English "Upper Case" Characters
map 'a', $8281, 26 // Map English "Lower Case" Characters
origin {OFFSET}
dw {TEXT} // Shift-JIS Text To Print
}
macro TextShiftJISCont(TEXT) {
// Map Shift-JIS Words
map ' ', $8140
map $2C, $8143 // Comma ","
map '.', $8144
map ':', $8146
map '?', $8148
map '!', $8149
map '~', $8160
//map '\s', $8166 // Single Quote "'"
//map '\d', $8168 // Double Quote '"'
map '+', $817B
map '&', $8195
map '0', $824F, 10 // Map Numbers
map 'A', $8260, 26 // Map English "Upper Case" Characters
map 'a', $8281, 26 // Map English "Lower Case" Characters
dw {TEXT} // Shift-JIS Text To Print
}
//Not a real assert, just prints the error message in console and doesn't compile further
macro Assert(MESSAGE) {
"{MESSAGE}\n"
}
macro ReplaceAsset(ORIGIN, FILE, SIZE) {
if !file.exists({FILE}) {
print "{FILE} doesn't exist!"
} else if file.exists({FILE}) {
if (file.size({FILE}) > {SIZE} && {SIZE} != -1) {
Assert("File {FILE} is bigger than Size {SIZE}")
} else if (file.size({FILE}) <= {SIZE}) {
origin {ORIGIN}
insert {FILE}
fill {SIZE} - file.size({FILE})
}
}
}
//Region
Text($3, "E")
include "Banner.asm"
include "Menus.asm"
//Names
include "Names/NPC.asm"
include "Names/Monsters.asm"
include "Names/Items.asm"
//---
//Areas
include "Areas/Room.asm"
include "Areas/Park.asm"
include "Areas/Cloots.asm"
//---
include "Chatter.asm"
include "Unsorted.asm"
include "Netcfg.asm"
include "Binary.asm"
| 20.649254 | 89 | 0.607156 |
a7ce77250c5de87648ba18ee722d491e78d6b9b4 | 741 | asm | Assembly | oeis/006/A006256.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/006/A006256.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/006/A006256.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A006256: a(n) = Sum_{k=0..n} binomial(3k,k)*binomial(3n-3k,n-k).
; Submitted by Christian Krause
; 1,6,39,258,1719,11496,77052,517194,3475071,23366598,157206519,1058119992,7124428836,47983020624,323240752272,2177956129818,14677216121871,98923498131762,666819212874501,4495342330033938,30308036621747679,204356509814519712,1378005032263532976,9292688842956544728,62669661931772951364,422664890018243442696,2850727413967754484852,19227995797735456203984,129696870215219937275160,874864240999437901219200,5901551980822011562604712,39811181145265619773289658,268569147742263898383337263
mov $3,$0
mov $5,$0
add $5,1
lpb $5
mov $0,$3
mul $2,2
sub $5,1
sub $0,$5
add $0,$2
bin $0,$2
mov $2,$3
mul $4,3
add $4,$0
lpe
mov $0,$4
| 37.05 | 485 | 0.796221 |
dec090ffed20e1e4da7eecc897028de92bc7bcdd | 2,475 | asm | Assembly | Library/Text/TextRegion/trLargeGState.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Library/Text/TextRegion/trLargeGState.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Library/Text/TextRegion/trLargeGState.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z | COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1992 -- All Rights Reserved
PROJECT: PC GEOS
MODULE:
FILE: trLargeGState.asm
AUTHOR: John Wedgwood, Feb 25, 1992
ROUTINES:
Name Description
---- -----------
REVISION HISTORY:
Name Date Description
---- ---- -----------
John 2/25/92 Initial revision
DESCRIPTION:
GState related stuff.
$Id: trLargeGState.asm,v 1.1 97/04/07 11:21:29 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TextRegion segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
LargeRegionTransformGState
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Transform the gstate so that 0,0 falls at the upper-left
corner of the region.
CALLED BY: TR_RegionTransformGState via CallRegionHandlers
PASS: *ds:si = Instance
cx = Region
dl = Draw flags
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
REVISION HISTORY:
Name Date Description
---- ---- -----------
jcw 2/25/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
LargeRegionTransformGState proc far uses ax, bx, cx, dx, di, si, bp
.enter
class VisTextClass
call TextRegion_DerefVis_DI
mov di, ds:[di].VTI_gstate ; di <- gstate
call GrSetDefaultTransform
push dx
sub sp, size PointDWord
mov bp, sp
call TR_RegionGetTopLeft
movdw dxcx, ss:[bp].PD_x
movdw bxax, ss:[bp].PD_y
add sp, size PointDWord
call GrApplyTranslationDWord
pop dx
; now set the clip rectangle
if 0
test dl, mask DF_PRINT
jnz noSetClip
push di
call LargeRegionGetTrueHeight ;dx = height
ceilwbf dxal, dx
mov bx, 1 ;get width for blt-ing
call LargeRegionGetTrueWidth ;ax = width
pop di
mov_tr cx, ax
clr ax
clr bx
mov si, PCT_REPLACE ; Replace old clip rect
call GrSetClipRect
noSetClip:
endif
if 0
;---------------------------------------
PrintMessage <TONY: Remove hack in LargeRegionTransformGState after graphics bugs are fixed>
push ax, bx, cx, dx
mov ax, -1000
mov bx, -1000
mov cx, -1000+1
mov dx, -1000+1
call GrFillRect
pop ax, bx, cx, dx
;---------------------------------------
endif
.leave
ret
LargeRegionTransformGState endp
TextRegion ends
| 21.336207 | 93 | 0.553939 |
c8eb806e9966588f5696b616bb9bfc683fae3724 | 1,500 | asm | Assembly | bins/mrc_emu/ext/mrc_bios/bios.asm | tiaanl/ees-rs | a3b94d7df4fbfe290822acd8147c8ccc7676c530 | [
"MIT"
] | null | null | null | bins/mrc_emu/ext/mrc_bios/bios.asm | tiaanl/ees-rs | a3b94d7df4fbfe290822acd8147c8ccc7676c530 | [
"MIT"
] | null | null | null | bins/mrc_emu/ext/mrc_bios/bios.asm | tiaanl/ees-rs | a3b94d7df4fbfe290822acd8147c8ccc7676c530 | [
"MIT"
] | null | null | null | BITS 16
ORG 0xFFFF0000
boot:
cli
cld
mov ax, cs
mov es, ax
mov ds, ax
; point the stack to 0000:0900
xor ax, ax
mov ss, ax
mov bp, 0x900
mov sp, bp
mov ax, 0xF0F0
push ax
pop bx
cmp bx, 0xF0F0
jz .stack_works
; if the stack doesn't work, we print a character to the screen; we can't use call here, because it uses the
; supposedly broken stack.
mov ax, 0xB800
mov es, ax
xor di, di
mov al, 0x7F
stosb
hlt ; the stack does not work :(
.stack_works:
; Set cursor position to (0, 0)
mov ah, 0x02
xor bx, bx
xor dx, dx
int 0x10
%include "cpu_test.asm"
jnc .continue_1
mov si, msg_cpu_test_failed
call print_message
hlt
.continue_1
mov si, msg_welcome_string
call print_message
hlt
print_message:
; DS:SI = address of null terminated message
mov ah, 0x0E
xor bx, bx
.loop:
lodsb
int 0x10
cmp al, 0
jz .done
jmp .loop
.done:
ret
init_pic:
cli
; init master pic
mov al, 0x1D
out 0x20, al ; icw1
mov al, 0x6B
out 0x21, al ; icw2
mov al, 0x08
out 0x21, al ; icw3
mov al, 0x6B
out 0x21, al ; icw4
; init slave pic
mov al, 0x1D
out 0xA0, al ; icw1
mov al, 0x6B
out 0xA1, al ; icw2
mov al, 0x03
out 0xA1, al ; icw3
mov al, 0x03
out 0xA0, al
sti
msg_stack_not_working db "Stack not working!",0
msg_cpu_test_failed db "CPU test failed!",0
msg_welcome_string db "Ok!",0
; pad the file so that the reset_vector starts at F000:E000
TIMES 0xFFF0-($-$$) DB 0xFF
reset_vector: ; F000:E000
jmp boot
TIMES 0x10000-($-$$) db 0xFF
| 14.705882 | 109 | 0.683333 |
1ed9c1afe457220e10a71de597d7df5e9e9a74c2 | 9,169 | asm | Assembly | src/sfx.asm | santiontanon/talesofpopolon-ext | a7c7fd1164d506d6b0c6245fdf3ad0b634facd84 | [
"Apache-2.0"
] | 4 | 2019-10-20T08:14:01.000Z | 2021-09-24T19:41:47.000Z | src/sfx.asm | santiontanon/talesofpopolon-ext | a7c7fd1164d506d6b0c6245fdf3ad0b634facd84 | [
"Apache-2.0"
] | 1 | 2019-10-20T12:21:06.000Z | 2019-10-21T21:52:35.000Z | src/sfx.asm | santiontanon/talesofpopolon-ext | a7c7fd1164d506d6b0c6245fdf3ad0b634facd84 | [
"Apache-2.0"
] | null | null | null | SFX_fire_arrow:
db 4,#00,5,#04 ;; frequency
db 10,#10 ;; volume
db 11,#00,12,#10 ;; envelope frequency
db 13 + MUSIC_CMD_TIME_STEP_FLAG,#09 ;; shape of the envelope
; db 7,#b8 ;; sets channels to wave
db MUSIC_CMD_SKIP
db 4,#00,5 + MUSIC_CMD_TIME_STEP_FLAG,#08 ;; frequency
db MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP
db MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP
db MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP
db 10,#00 ;; silence
db SFX_CMD_END
SFX_fire_bullet_enemy:
db 4,#00,5,#02 ;; frequency
db 10,#10 ;; volume
db 11,#00,12,#10 ;; envelope frequency
db 13 + MUSIC_CMD_TIME_STEP_FLAG,#09 ;; shape of the envelope
; db 7,#b8 ;; sets channels to wave
db MUSIC_CMD_SKIP
db 4,#00,5,#04 ;; frequency
db MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP
db MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP
db MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP, MUSIC_CMD_SKIP
db 10,#00 ;; silence
db SFX_CMD_END
SFX_sword_swing:
db 7,#9c ;; noise in channel C, and tone in channels B and A
db 10,#0a ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#16 ;; noise frequency
db 10,#0c ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#14 ;; noise frequency
db 10,#0f ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#12 ;; noise frequency
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#10 ;; noise frequency
db 10,#0c ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#08 ;; noise frequency
db 10,#0a ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#06 ;; noise frequency
db 10,#08 ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#04 ;; noise frequency
db 10,#06 ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#02 ;; noise frequency
db 10,#04 ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#01 ;; noise frequency
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#02 ;; volume
db 10,#00 ;; silence
db SFX_CMD_END
SFX_hit_enemy:
db 7,#b8 ;; SFX all channels to tone
db 10,#0f ;; volume
db 4,#0, 5 + MUSIC_CMD_TIME_STEP_FLAG,4 ;; frequency
db 5 + MUSIC_CMD_TIME_STEP_FLAG,5 ;; frequency
db 5 + MUSIC_CMD_TIME_STEP_FLAG,6 ;; frequency
db 5 + MUSIC_CMD_TIME_STEP_FLAG,7 ;; frequency
db 5 + MUSIC_CMD_TIME_STEP_FLAG,8 ;; frequency
db 10,#0d ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,9 ;; frequency
db 10,#0a ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,10 ;; frequency
db 10,#00 ;; volume
db SFX_CMD_END
SFX_hit_deflected:
db 7,#9c ;; noise in channel C, and tone in channels B and A
db 10,#0f ;; volume
db 6 + MUSIC_CMD_TIME_STEP_FLAG,#04 ;; noise frequency
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; volume
db MUSIC_CMD_SKIP
db 6,#01 ;; noise frequency
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0c ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0a ;; volume
db MUSIC_CMD_SKIP
db 7,#b8 ;; SFX all channels to tone
db 10,#0c ;; volume
db 4,#20, 5 + MUSIC_CMD_TIME_STEP_FLAG,0 ;; frequency
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0a ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#08 ;; volume
db MUSIC_CMD_SKIP
db 10,#00 ;; volume
db SFX_CMD_END
SFX_enemy_kill:
db 7,#b8 ;; SFX all channels to tone
db 10,#0f ;; volume
db 4,0, 5 + MUSIC_CMD_TIME_STEP_FLAG,8 ;; frequency
db MUSIC_CMD_SKIP
db 5 + MUSIC_CMD_TIME_STEP_FLAG,6 ;; frequency
db MUSIC_CMD_SKIP
db 10,#0b ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,4 ;; frequency
db MUSIC_CMD_SKIP
db 10,#08 ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,2 ;; frequency
db MUSIC_CMD_SKIP
db 10,#0d ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,6 ;; frequency
db MUSIC_CMD_SKIP
db 5 + MUSIC_CMD_TIME_STEP_FLAG,4 ;; frequency
db MUSIC_CMD_SKIP
db 10,#08 ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,3 ;; frequency
db MUSIC_CMD_SKIP
db 10,#06 ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,2 ;; frequency
db MUSIC_CMD_SKIP
db 10,#0b ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,4 ;; frequency
db MUSIC_CMD_SKIP
db 5 + MUSIC_CMD_TIME_STEP_FLAG,3 ;; frequency
db MUSIC_CMD_SKIP
db 10,#06 ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,2 ;; frequency
db MUSIC_CMD_SKIP
db 10,#04 ;; volume
db 5 + MUSIC_CMD_TIME_STEP_FLAG,1 ;; frequency
db MUSIC_CMD_SKIP
db 10,#00 ;; silence
db SFX_CMD_END
SFX_weapon_switch:
db 7,#b8 ;; SFX all channels to tone
db 10,#0f ;; volume
db 4,0, 5 + MUSIC_CMD_TIME_STEP_FLAG,#01 ;; frequency
db MUSIC_CMD_SKIP
db MUSIC_CMD_SKIP
db 4,#40,5 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0d ;; volume
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0b ;; volume
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#09 ;; volume
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#07 ;; volume
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#05 ;; volume
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#03 ;; volume
db 10,#00 ;; silence
db SFX_CMD_END
SFX_item_pickup:
db 7,#b8 ;; SFX all channels to tone
db 10,#0f ;; volume
db 4,#80, 5 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db 10,#0d ;; volume
db MUSIC_CMD_SKIP
db 10,#0f ;; volume
db 4,#70, 5 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0d ;; volume
db 10,#0f ;; volume
db 4,#60, 5 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0d ;; volume
db 10,#0f ;; volume
db 4,#50, 5 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0d ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#0b ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#08 ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#06 ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#04 ;; volume
db MUSIC_CMD_SKIP
db 10 + MUSIC_CMD_TIME_STEP_FLAG,#02 ;; volume
db MUSIC_CMD_SKIP
db 10,#00 ;; silence
db SFX_CMD_END
SFX_door_open:
db 7,#b8 ;; SFX all channels to tone
db 10,#0f ;; volume
db 4,#00, 5 + MUSIC_CMD_TIME_STEP_FLAG,#06 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#0e ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#0d ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#0c ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#0b ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#0a ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#08 ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#07 ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#06 ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#05 ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#04 ;; volume
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#80 ;; frequency
db MUSIC_CMD_SKIP
db 10,#00 ;; silence
db SFX_CMD_END
SFX_hourglass:
db 7,#b8 ;; SFX all channels to tone
db 10,#0f ;; volume
db 4,#40, 5 + MUSIC_CMD_TIME_STEP_FLAG,#00 ;; frequency
db MUSIC_CMD_SKIP
db 10,#00 ;; silence
db SFX_CMD_END
SFX_playerhit:
db 7,#b8 ;; SFX all channels to tone
db 10,#0f ;; volume
db 4,#00, 5 + MUSIC_CMD_TIME_STEP_FLAG,#08 ;; frequency
db MUSIC_CMD_SKIP
db 5 + MUSIC_CMD_TIME_STEP_FLAG,#04 ;; frequency
db 5 + MUSIC_CMD_TIME_STEP_FLAG,#02 ;; frequency
db 5 + MUSIC_CMD_TIME_STEP_FLAG,#01 ;; frequency
db 4,#80, 5 + MUSIC_CMD_TIME_STEP_FLAG, #00 ;; frequency
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#40 ;; frequency
db 4 + MUSIC_CMD_TIME_STEP_FLAG,#20 ;; frequency
db MUSIC_CMD_SKIP
db 10,#00 ;; silence
db SFX_CMD_END
| 32.285211 | 71 | 0.681972 |
a4f6134388393d5b8eac99010f6f1034a2ee02da | 506 | asm | Assembly | oeis/037/A037694.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/037/A037694.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/037/A037694.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A037694: Decimal expansion of a(n) is given by the first n terms of the periodic sequence with initial period 1,2,0,3.
; Submitted by Christian Krause
; 1,12,120,1203,12031,120312,1203120,12031203,120312031,1203120312,12031203120,120312031203,1203120312031,12031203120312,120312031203120,1203120312031203,12031203120312031,120312031203120312,1203120312031203120,12031203120312031203
mov $2,1
lpb $0
sub $0,1
add $1,$2
mul $1,10
add $2,23
dif $2,6
div $2,2
mod $2,4
lpe
add $1,$2
mov $0,$1
| 29.764706 | 231 | 0.764822 |
308b3ec75a50db91e97e028976beec5dfeedf09b | 1,924 | asm | Assembly | day_13/ipl.asm | macrat/30days-os | 58514889afd889dbd9d3f95d35592d2f898e4aaa | [
"MIT"
] | 1 | 2020-01-10T03:04:01.000Z | 2020-01-10T03:04:01.000Z | day_16/ipl.asm | macrat/30days-os | 58514889afd889dbd9d3f95d35592d2f898e4aaa | [
"MIT"
] | null | null | null | day_16/ipl.asm | macrat/30days-os | 58514889afd889dbd9d3f95d35592d2f898e4aaa | [
"MIT"
] | null | null | null | ; IPL for hello-os
CYLS EQU 10 ; read number of cylinders.
ORG 0x7c00
; FAT12 on floppy
JMP SHORT entry
DB 0x90
DB "HELLOIPL"
DW 512
DB 1
DW 1
DB 2
DW 224
DW 2880
DB 0xf0
DW 9
DW 18
DW 2
DD 0
DD 2880
DB 0, 0, 0x29
DD 0xffffffff
DB "HELLO-OS "
DB "FAT12 "
TIMES 18 DB 0
entry:
MOV AX, 0
MOV SS, AX
MOV SP, 0x7c00
MOV DS, AX
; read disk
MOV AX, 0x0820
MOV ES, AX
MOV CH, 0
MOV DH, 0
MOV CL, 2
readloop:
MOV DI, 0
retry:
MOV AH, 0x02
MOV AL, 1
MOV BX, 0
MOV DL, 0x00
INT 0x13
JNC readloop_next
ADD DI, 1
CMP DI, 5
JAE error
MOV AH, 0
MOV DL, 0x00
INT 0x13
MOV SI, retrymsg
CALL print
JMP SHORT retry
readloop_next:
MOV AX, ES
ADD AX, 0x0020
MOV ES, AX
ADD CL, 1
CMP CL, 18
JBE readloop
MOV CL, 1
ADD DH, 1
CMP DH, 2
JB readloop
MOV DH, 0
ADD CH, 1
CMP CH, CYLS
JB readloop
done:
MOV [0x0ff0], CH
MOV SI, donemsg
CALL print
JMP 0xc200
error:
MOV SI, errmsg
CALL print
JMP SHORT fin
print:
MOV AL, [SI]
ADD SI, 1
CMP AL, 0
JNE print_next
RET
print_next:
MOV AH, 0x0e
MOV BX, 15
INT 0x10
JMP SHORT print
fin:
HLT
JMP SHORT fin
errmsg:
DB "load error"
DB 0x0d, 0x0a, 0x00
donemsg:
DB "load done"
DB 0x0d, 0x0a, 0x00
retrymsg:
DB "retry..."
DB 0x0d, 0x0a, 0x00
TIMES 0x7dfe-0x7c00-($-$$) DB 0
DB 0x55, 0xaa
| 16.033333 | 46 | 0.439189 |
8ab107c69bbcadb3f098448e6244416f243bbea0 | 4,632 | asm | Assembly | Driver/Printer/PScript/pscriptPDL.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 504 | 2018-11-18T03:35:53.000Z | 2022-03-29T01:02:51.000Z | Driver/Printer/PScript/pscriptPDL.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 96 | 2018-11-19T21:06:50.000Z | 2022-03-06T10:26:48.000Z | Driver/Printer/PScript/pscriptPDL.asm | steakknife/pcgeos | 95edd7fad36df400aba9bab1d56e154fc126044a | [
"Apache-2.0"
] | 73 | 2018-11-19T20:46:53.000Z | 2022-03-29T00:59:26.000Z |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1991 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: PostScript printer driver
FILE: pscriptPDL.asm
AUTHOR: Jim DeFrisco, 14 Feb 1991
ROUTINES:
Name Description
---- -----------
PrintSetPageTransform PDL-specific function to set the transformation
matrix for the current page
PrintGString PDL_specific function to print a gstring
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 2/91 Initial revision
DESCRIPTION:
This file containt the escape functions that are specific to PDL
printers
$Id: pscriptPDL.asm,v 1.1 97/04/18 11:56:09 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
CommonCode segment resource
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrintSetPageTransform
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Set the transformatrion matrix for the current page
CALLED BY: GLOBAL (DR_PRINT_ESC_SET_PAGE_TRANSFORM)
PASS: bx - PState handle
dx:si - pointer to TransMatrix
RETURN: ax - error code as returned from TransExportRaw
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
emit some PostScript code to set the current transformation
matrix variable. This code assumes a function that currently
exists in the PC/GEOS PostScript prolog called SDT (for
SetDefaultTransform). This function (currently) does not
alter the PostScript graphics state, it merely sets a
PC/GEOS-defined PostScript variable, and is used later to
set the default transformation for the page.
Also, the passed TransMatrix should NOT include the
transformation required to conform to the PostScript coordinate
system.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 02/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintSetPageTransform proc far
uses es, di, bx, bp
.enter
; we're passed a PState handle, not the segment here.
push bx ; save handle
call MemLock
mov bp, ax ; usually held here
mov es, ax ; es -> PState
; we need to translate all the values into ascii, then write
; out a buffer with the matrix and the function call. First
; lock down the PState and get the file handle to write to.
mov ds, dx
mov dx, es:[PS_expansionInfo] ; get options blk han
push es ; save PState seg
mov bx, dx
call MemLock
mov es, ax
mov di, es:[GEO_hFile] ; get file handle
call MemUnlock
pop es ; restore PState seg
call EmitTransform ; send transform
; now set the paper size (so the reversal of the coordinate
; system will work OK)
call EmitPaperSize ;
; release the PState before we go
pop bx
call MemUnlock
clc ; just leave carry
.leave
ret
PrintSetPageTransform endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrintGString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Print a graphics string
CALLED BY: GLOBAL (DR_PRINT_ESC_PRINT_GSTRING)
PASS: bx - PState handle
si - GString handle
cx - GString flags (record, type GSControl)
RETURN: ax - stop code returned from GrDrawGString
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
pass off all the work to the PostScript Translation Lib
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 02/91 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintGString proc far
uses ds, dx, di, cx, bx, bp
.enter
; first we need to lock down the PState
push bx
call MemLock
mov bp, ax
; this is easy. Just call the TransExport function in the
; PostScript translation library
mov ds, bp ; ds -> PState
mov dx, ds:[PS_expansionInfo] ; get opts block handle
mov bx, dx
call MemLock
mov ds, ax
mov di, ds:[GEO_hFile] ; get file handle
call MemUnlock
or cx, mask GSC_NEW_PAGE ; make sure this is set
mov ds, bp ; ds -> PState
mov bx, ds:[PS_epsLibrary]
mov ax, TR_EXPORT_LOW
call CallEPSLibrary
mov ax, cx ; return flag fr GrDrawGString
; release the PState
pop bx
call MemUnlock
clc
.leave
ret
PrintGString endp
CommonCode ends
| 25.173913 | 79 | 0.593912 |
0eb704b81a57bf12c57e0c47a7d3fd7a9c305920 | 808 | asm | Assembly | oeis/091/A091527.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/091/A091527.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/091/A091527.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A091527: a(n) = ((3*n)!/n!^2)*(Gamma(1+n/2)/Gamma(1+3n/2)).
; Submitted by Jon Maiga
; 1,4,30,256,2310,21504,204204,1966080,19122246,187432960,1848483780,18320719872,182327718300,1820797698048,18236779032600,183120225632256,1842826521244230,18581317012684800,187679234340049620,1898554215471513600,19232182592635611060,195062884538158940160,1980665038436368775400,20132340083242712432640,204826599735691440534300,2085710432623945008021504,21255328931341321610645544,216771272313736506816593920,2212241139727064219063537016,22591197226942904129122467840,230835920303934356099526310704
mov $1,1
mov $2,1
mov $3,$0
mul $3,2
lpb $3
mul $1,$0
sub $3,1
mul $2,$3
add $1,$2
mov $2,$1
mov $4,$5
cmp $4,0
add $5,$4
div $1,$5
div $2,$5
add $2,$1
mul $1,2
sub $3,1
add $5,1
lpe
mov $0,$2
| 31.076923 | 498 | 0.763614 |
c1e807a986e976a0bbae6ff92ca543053b5d570c | 3,589 | asm | Assembly | engine/constants.asm | richard42/dynosprite | 0b83f640a63656087653266baa2ec2499a39538d | [
"BSD-2-Clause"
] | 10 | 2015-04-16T20:48:06.000Z | 2021-09-07T02:08:30.000Z | engine/constants.asm | jamieleecho/space-bandits | b0f45c4d6e8a2bbf8d1653b7b3c10059fa9ff13d | [
"BSD-2-Clause"
] | 1 | 2016-12-04T23:18:42.000Z | 2016-12-05T01:17:49.000Z | engine/constants.asm | jamieleecho/space-bandits | b0f45c4d6e8a2bbf8d1653b7b3c10059fa9ff13d | [
"BSD-2-Clause"
] | 8 | 2015-01-04T17:05:42.000Z | 2021-01-31T01:46:13.000Z | *********************************************************************************
* DynoSprite - constants.asm
* Copyright (c) 2014, Richard Goedeken
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*********************************************************************************
* Enumerated list of key values
KEY_ATSIGN EQU $00
KEY_A EQU $01
KEY_B EQU $02
KEY_C EQU $03
KEY_D EQU $04
KEY_E EQU $05
KEY_F EQU $06
KEY_G EQU $07
KEY_H EQU $10
KEY_I EQU $11
KEY_J EQU $12
KEY_K EQU $13
KEY_L EQU $14
KEY_M EQU $15
KEY_N EQU $16
KEY_O EQU $17
KEY_P EQU $20
KEY_Q EQU $21
KEY_R EQU $22
KEY_S EQU $23
KEY_T EQU $24
KEY_U EQU $25
KEY_V EQU $26
KEY_W EQU $27
KEY_X EQU $30
KEY_Y EQU $31
KEY_Z EQU $32
KEY_UP EQU $33
KEY_DOWN EQU $34
KEY_LEFT EQU $35
KEY_RIGHT EQU $36
KEY_SPACE EQU $37
KEY_0 EQU $40
KEY_1 EQU $41
KEY_2 EQU $42
KEY_3 EQU $43
KEY_4 EQU $44
KEY_5 EQU $45
KEY_6 EQU $46
KEY_7 EQU $47
KEY_8 EQU $50
KEY_9 EQU $51
KEY_COLON EQU $52
KEY_SEMICOLON EQU $53
KEY_COMMA EQU $54
KEY_MINUS EQU $55
KEY_PERIOD EQU $56
KEY_SLASH EQU $57
KEY_ENTER EQU $60
KEY_CLEAR EQU $61
KEY_BREAK EQU $62
KEY_ALT EQU $63
KEY_CTRL EQU $64
KEY_F1 EQU $65
KEY_F2 EQU $66
KEY_SHIFT EQU $67
| 41.252874 | 81 | 0.483422 |
695700b514e9ec2a1c8ef09a868c73a612fcf6da | 1,334 | asm | Assembly | DeliriOS_64bits/ap_startup_code/ap_startup_code.asm | Izikiel/intel_multicore | 10ab11fa901f555608a75f9256ea7d14f8aab84d | [
"MIT"
] | 3 | 2015-12-16T06:17:14.000Z | 2019-09-01T08:21:21.000Z | DeliriOS_64bits/ap_startup_code/ap_startup_code.asm | Izikiel/intel_multicore | 10ab11fa901f555608a75f9256ea7d14f8aab84d | [
"MIT"
] | null | null | null | DeliriOS_64bits/ap_startup_code/ap_startup_code.asm | Izikiel/intel_multicore | 10ab11fa901f555608a75f9256ea7d14f8aab84d | [
"MIT"
] | null | null | null | ;Este codigo es el codigo de inicializacion de los Application Processors.
;Dado que inician en modo real, deben iniciar el procesador desde cero.
global _start
%define breakpoint xchg bx, bx
BITS 16
section .text
_start:
jmp mr_ap_start
; data_area
align 4
ap_full_code: dd 0xABBAABBA ; puntero al inicio del codigo de modulo estilo sueco
;ver gdt.c
gdt: dq 0x0
code_s32: dd 0x0000FFFF
dd 0x00CF9800
data_s: dd 0x0000FFFF
dd 0x00CF9200
gdt_desc: dw $ - gdt
dd gdt
krnPML4T: dd 0x740000 ; segun defines.h
mr_ap_start:
cli
; A20 YA ESTA HABILITADO POR EL BSP
; cargar la GDT;
lgdt [gdt_desc]
; setear el bit PE del registro CR0
mov eax, CR0;levanto registro CR0 para pasar a modo protegido
or eax, 1;hago un or con una mascara de 0...1 para setear el bit de modo protegido
mov CR0, eax
; pasar a modo protegido
jmp (1<<3):f_mp_ap_start; saltamos a modo protegido, modificamos el cs con un jump y la eip(program counter)
;{index:1 | gdt/ldt: 0 | rpl: 00} => 1000
;aca setie el selector de segmento cs al segmento de codigo del kernel
BITS 32
f_mp_ap_start:
mov ax, 2<<3
mov ds, ax
;apuntar cr3 al PML4
mov eax, [krnPML4T]
mov cr3, eax
jmp [ap_full_code]
;falta para el modulo posta el codigo para medir tiempo
| 21.174603 | 112 | 0.693403 |
48b086b76885603e766ac9bc51325222dc458008 | 287 | asm | Assembly | oeis/021/A021336.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/021/A021336.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/021/A021336.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A021336: Decimal expansion of 1/332.
; 0,0,3,0,1,2,0,4,8,1,9,2,7,7,1,0,8,4,3,3,7,3,4,9,3,9,7,5,9,0,3,6,1,4,4,5,7,8,3,1,3,2,5,3,0,1,2,0,4,8,1,9,2,7,7,1,0,8,4,3,3,7,3,4,9,3,9,7,5,9,0,3,6,1,4,4,5,7,8,3,1,3,2,5,3,0,1,2,0,4,8,1,9,2,7,7,1,0,8
seq $0,173833 ; 10^n - 3.
div $0,332
mod $0,10
| 41 | 199 | 0.54007 |
abb3b89b2cdd1340a8192abe4ef93e62dafc7b2a | 12,686 | asm | Assembly | MSDOS/Virus.MSDOS.Unknown.locate.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | 3 | 2021-05-15T15:57:13.000Z | 2022-03-16T09:11:05.000Z | MSDOS/Virus.MSDOS.Unknown.locate.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | null | null | null | MSDOS/Virus.MSDOS.Unknown.locate.asm | fengjixuchui/Family | 2abe167082817d70ff2fd6567104ce4bcf0fe304 | [
"MIT"
] | 3 | 2021-05-15T15:57:15.000Z | 2022-01-08T20:51:04.000Z | CODE_SEG SEGMENT
ASSUME CS:CODE_SEG,DS:CODE_SEG,ES:CODE_SEG
ORG 100H ;Start off right for a .COM file
ENTRY: JMP LOCATE ;Skip over Data area
COPY_RIGHT DB '(C)1985 S.Holzner' ;Author's Mark
FOUND_MSG DB 13,10,13,10,'FOUND IN $' ;Like it says
LEN DW 1 ;The file length (low word)
PATH_LEN DW 0 ;Length of Path.Dat
NUMBER DW 0 ;Number of bytes read from file
EXTRA_PATHS DB 0 ;=1 if we open & use Path.Dat
OLD_BX DW 0 ;Save pointer to path at CS:DBH
OLD_SI DW 0 ;Save SI as pointer also
START_FLAG DB 0 ;For searches in Path.Dat
PATH_DAT DB "\PATH.DAT",0 ;ASCIIZ string of Path.Dat
LOCATE PROC NEAR ;Here we go
MOV DX,0B0H ;Move Disk Transfer Area to CS:0B0H
MOV AH,1AH ;Matched file information goes there
INT 21H
MOV DI,5CH ;Use CS:5CH to put '*.*'0 at for search
CALL PUT ; in current directory
MOV DX,5CH ;Point to '*.*'0 for search
MOV AH,4EH ; and find first matching file
INT 21H ;Match now at DTA, 0B0H
LOOP: ;Loop over matches now
MOV BX,0CAH ;Get file length, came from match
MOV DX,[BX]
MOV LEN,DX ;Store in Len
CMP DX,60*1024 ;Don't write over stack, allow < 64K files
JB NOT_BIG ;Range extender (Find > 127 bytes ahead)
JMP FIND
NOT_BIG:CMP DX,0 ;Was this a 0 length file (disk dir or label)?
JA FILE_OK ;No, go on and read it
JMP FIND ;Yes, find next file and skip this one
FILE_OK:CALL READ_FILE ;Get the file into memory
MOV CX,NUMBER ;Prepare to loop over all read bytes
MOV DI,OFFSET PATHS+300 ;File starts at Offset Paths+300
SEARCH: ;Use Repne Scasb & DI to search for the
MOV BX,82H ;first letter of the string, which is at CS:82H
MOV AL,BYTE PTR [BX] ;Load into AL for Repne Scasb
REPNE SCASB ;Find first letter
JCXZ FIND ;If out of file to search, find next file
MOV BX,80H ;How many chars in string? Get from CS:80H
XOR DX,DX ;Set DX to zero
MOV DL,[BX] ;Get # of chars in string
DEC DX ;Get rid of space typed after 'Locate'
MOV SI,83H ;Search from second typed letter (1st matched)
CPLOOP: DEC DX ;Loop counter
CMPSB ;See how far we get until no match
JZ CPLOOP
DEC DI ;At end, reset DI (Scasb increments 1 too much)
CMP DX,0 ;If DX is not zero, all letters did not match
JA SEARCH ;If not a match, go back and get next one
LEA DX,FOUND_MSG ;FILE HAS BEEN FOUND, so say so.
MOV AH,9 ;Request string search
INT 21H
MOV AH,2 ;Now to print filename. Without Path.Dat, at
MOV BX,0DBH ; CS:CEH, with Path.Dat at CS:DBH
CMP EXTRA_PATHS,1 ; Using Path.Dat yet?
JE PRINT ;Yes, print
MOV BX,0CEH ;No, reset BX to point to CS:CEH
PRINT: MOV DL,[BX] ;Print out the filename until 0 found
CMP DL,0 ;Is it 0?
JE MORE ;If yes,print out sample at More:
INT 21H ;Print filename character
INC BX ;Point to next character
JMP PRINT ;Go back relentlessly until done
MORE: PUSH DI ;Save DI,BX,CX
PUSH BX
PUSH CX
MOV CX,40 ;Prepare to type out total of 40 characters
MOV AH,2 ;With Int 21H service 2
MOV DL,':' ;But first, add ':' to filename
INT 21H ;And a carriage return linefeed
MOV DL,13
INT 21H
MOV DL,10
INT 21H
SUB DI,20 ;DI points to end of found string, move back
MOV BX,OFFSET PATHS+300 ;Beginning of file
CMP DI,BX ;If before beginning, start at beginning
JA GO
MOV DI,BX
GO: ADD BX,LEN ;Now BX=end of file (to check if we're past it)
SHOW: MOV DL,[DI] ;Get character from file
INC DI ;And point to next one
CMP DI,BX ;Past end?
JA SHOWS_OVER ;Yes, jump out, look for next match
CMP DL,30 ;Unprintable character?
JA POK ;No, OK
MOV DL,' ' ;Yes, make it a space
POK: INT 21H ;Print Character
LOOP SHOW ;And return for the next one
SHOWS_OVER: ;End of printout
POP CX ;Restore the registers used above
POP BX
POP DI
JMP SEARCH ;Return to search more of the file
FIND: CALL FIND_FILE ;This file done, find next match
CMP AL,18 ;AL=18 --> no match
JE OUT ;And so we leave
JMP LOOP ;If match found, go back once again
OUT: INT 20H ;End of Main Program
LOCATE ENDP
PUT PROC NEAR ;This little gem puts a '*.*'0
MOV BYTE PTR [DI],'*' ;Wherever you want it--just send
MOV BYTE PTR [DI+1],'.' ; it a value in DI. '*.*'0 is used as
MOV BYTE PTR [DI+2],'*' ; a universal wilcard in searches
MOV BYTE PTR [DI+3],0
RET
PUT ENDP
WS PROC NEAR ;Strip the bits for WordStar
CMP CX,0 ;If there is a length of 0, e.g.
JE FIN ;Directory entries, etc. do nothing.
WSLOOP: AND BYTE PTR [BX],127 ;Set top bit to zero
INC BX ;Point to next unsuspecting byte
LOOP WSLOOP ;And get it too.
FIN: RET ;To use, send this program BX and CX
WS ENDP
FIND_FILE PROC NEAR ;The file finder
MOV AH,4FH ;Try service 4FH, find next match, first
INT 21H
CMP AL,18 ;AL = 18 --> no match
JE CHECK ;Range extender.
JMP NEW
CHECK: CMP EXTRA_PATHS,1 ;Have we used path.Dat?
JE NEXT_PATH ;Yes, get next path, this one's used up
INC EXTRA_PATHS ;No, set it to 1
MOV AX,3D00H ;Request file opening for Path.Dat
LEA DX,PATH_DAT ;Point to '\PATH.DAT'0
INT 21H
JNC READ ;If there was a carry, Path.Dat not found
DONE: MOV AL,18 ;And so we exit with AL=18
JMP END
READ: MOV CX,300 ;Assume the max length for Path.Dat, 300.
MOV BX,AX ;Move found file handle into BX for read
MOV AH,3FH ;Set up for file read
LEA DX,PATHS ;Put the file at location Paths (at end)
INT 21H ;Read in the file
ADD AX,OFFSET PATHS ;Full offset of end of Path.Dat
MOV PATH_LEN,AX ;Get Path.Dat end point for loop
MOV AH,3EH ;Now close the file
INT 21H ;Close file
MOV OLD_SI,OFFSET PATHS ;Save for future path-readings
MOV CX,300 ;Get ready to Un-WordStar
MOV BX,OFFSET PATHS ;300 bytes at location Paths
CALL WS ;Strip high bit for WS
NEXT_PATH: ;Come here to find next path to search for files
MOV SI,OLD_SI ;Point to start of next path
MOV DI,5CH ;Move will be to CS:5CH for '\path\*.*0' file find
MOV BX,0DBH ;Also to CS:DBH; will assemble full path & filename
MOV START_FLAG,0 ;Start the path search
CHAR: CMP SI,PATH_LEN ;Past end of possible path names?
JGE DONE ;Yes, we're done. Leave with AL=18
CMP BYTE PTR [SI],30 ;Carriage return or linefeed?
JB NEXT ;Yes, get next char
MOV START_FLAG,1 ;First char, stop skipping chars
MOV AL,[SI] ;Get char from Path.Dat
MOV [BX],AL ;Move char to DBH
INC BX ;And increment to next location there
MOVSB ;Also move to 5CH area
JMP CHAR ;And go back for more
NEXT: CMP START_FLAG,1 ;Bad char, have we been reading a real pathname?
JE PDONE ;Yes, we've reached the end of it.
INC SI ;No, keep skipping chars to find pathname
JMP CHAR
PDONE: MOV OLD_SI,SI ;Save SI for the next path.
MOV BYTE PTR [DI],'\' ;Add '\' to both paths
MOV BYTE PTR [BX],'\'
INC BX ;Move BX on for next time
MOV OLD_BX,BX ;And save it.
INC DI ;Move to next location at 5CH and
CALL PUT ;Put '*.*'0 there to find all files.
MOV DX,5CH ;Start the search for all files in
MOV AH,4EH ; the new path.
MOV CX,0 ;Set the file attribute to 0
INT 21H
CMP AL,18 ;Did we find any new files in new path?
JE NEXT_PATH ;No, get the next path.
NEW: CMP EXTRA_PATHS,1 ;Yes,Move found filename to DBH area to
JNE END ; read it in-only if DBH area is active
MOV BX,OLD_BX ; (i.e. Extra_Paths=1). Restore BX
MOV SI,0CDH ;And point to found filename in DTA
CLOOP: INC SI ;Next letter from found filename
MOV AH,[SI] ;Move it to the DBH area so we can read
MOV [BX],AH ; in the file (needs pathname\filename)
INC BX ;Next character in 5CH area.
CMP BYTE PTR [SI],0 ;Is this the last character?
JNE CLOOP ;Nope, get next one
END: RET ;After path & filename assembled, return
FIND_FILE ENDP
READ_FILE PROC NEAR ;Looks for filename at CEH or DBH & reads it
PUSH AX ;Push everything to save it.
PUSH BX
PUSH CX
PUSH DX
MOV DX,0DBH ;Try the DBH area
CMP EXTRA_PATHS,1 ;Has it been used?
JE OK ;Yes
MOV DX,0CEH ;No, not using paths yet, use filename only, at CEH
OK: MOV AX,3D00H ;Prepare for file reading
INT 21H ;And do so.
MOV BX,AX ;Move file handle into BX to read
MOV DX,OFFSET PATHS+300 ;Read into data area at Paths+300 bytes
MOV CX,LEN ;Read the full file's length in bytes
MOV AH,3FH ;Read it in at last
INT 21H
MOV NUMBER,AX ;Number of bytes actually read.
MOV AH,3EH ;Close file
INT 21H
MOV BX,OFFSET PATHS+300 ;Clean up the Word Star high bit.
MOV CX,LEN ;For the full file
CALL WS ;Strip high bit for ws
POP DX ;Pop evrything and return
POP CX
POP BX
POP AX
RET ;Fin of Read_File
READ_FILE ENDP
PATHS: ;Here's the end of program marker
CODE_SEG ENDS
END ENTRY ;End 'Entry' so DOS starts at 'Entry'
| 54.917749 | 80 | 0.474381 |
d9af198ca4c1865a3f62f59fc742e19fb3ff9e55 | 433 | asm | Assembly | programs/oeis/199/A199531.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/199/A199531.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | programs/oeis/199/A199531.asm | jmorken/loda | 99c09d2641e858b074f6344a352d13bc55601571 | [
"Apache-2.0"
] | null | null | null | ; A199531: Number of -n..n arrays x(0..3) of 4 elements with zero sum and no two consecutive zero elements.
; 12,72,212,464,860,1432,2212,3232,4524,6120,8052,10352,13052,16184,19780,23872,28492,33672,39444,45840,52892,60632,69092,78304,88300,99112,110772,123312,136764,151160,166532,182912,200332,218824,238420,259152
mov $3,$0
add $0,5
sub $3,1
add $0,$3
bin $0,3
mov $1,$0
sub $3,3
sub $2,$3
add $1,$2
sub $1,8
mul $1,4
add $1,12
| 27.0625 | 209 | 0.720554 |
26e2316f12f2e85f93e9b77b772f0b50f6554666 | 7,418 | asm | Assembly | Lab 4/Lab4/Caden_Verzino_Felipe_OrricoScognamiglio_Lab4_Sourcecode.asm | felipeorrico/ECE375-Assembly | 68438b9b00778d158f7673fee742f1460cee1bb0 | [
"MIT"
] | null | null | null | Lab 4/Lab4/Caden_Verzino_Felipe_OrricoScognamiglio_Lab4_Sourcecode.asm | felipeorrico/ECE375-Assembly | 68438b9b00778d158f7673fee742f1460cee1bb0 | [
"MIT"
] | null | null | null | Lab 4/Lab4/Caden_Verzino_Felipe_OrricoScognamiglio_Lab4_Sourcecode.asm | felipeorrico/ECE375-Assembly | 68438b9b00778d158f7673fee742f1460cee1bb0 | [
"MIT"
] | null | null | null | ;************************************************************
;*
;* Caden_Verzino_Felipe_OrricoScognamiglio_Lab4_Sourcecode.asm
;*
;* This program implements the ATmega LCD library and prints
;* two different strings depending on which switches are
;* pressed. It can also clear the LCD if S8 is pressed.
;*
;* This is the main code file for Lab4
;*
;************************************************************
;*
;* Author: Felipe Orrico Scognamiglio & Caden Verzino
;* Date: 01/28/2021
;*
;************************************************************
.include "m128def.inc" ; Include definition file
;************************************************************
;* Internal Register Definitions and Constants
;************************************************************
.def mpr = r16 ; Multipurpose register is
; required for LCD Driver
;************************************************************
;* Start of Code Segment
;************************************************************
.cseg ; Beginning of code segment
;************************************************************
;* Interrupt Vectors
;************************************************************
.org $0000 ; Beginning of IVs
rjmp INIT ; Reset interrupt
.org $0046 ; End of Interrupt Vectors
;************************************************************
;* Program Initialization
;************************************************************
INIT: ; The initialization routine
; Initialize Stack Pointer
; Code snippet foud in page 20 of AVR starter guide
LDI mpr, LOW(RAMEND) ; Low Byte of End SRAM Address
OUT SPL, mpr ; Write byte to SPL
LDI mpr, HIGH(RAMEND) ; High Byte of End SRAM Address
OUT SPH, mpr ; Write byte to SPH
; Initialize Port D for input (from Lab 1 example code)
ldi mpr, $00 ; Set Port D Data Direction Register
out DDRD, mpr ; for input
ldi mpr, $FF ; Initialize Port D Data Register
out PORTD, mpr ; so all Port D inputs are Tri-State
; Initialize LCD Display
RCALL LCDInit ; Initialize the LCD
RCALL LCDClr ; Clear the LCD
; NOTE that there is no RET or RJMP from INIT, this
; is because the next instruction executed is the
; first instruction of the main program
;***********************************************************
;* Main Program
;***********************************************************
MAIN: ; The Main program
; Display the strings on the LCD Display
IN mpr, PIND ; Get input from Port D
CPI mpr, $FE ; Check if S1 is pressed
BRNE S2 ; Branch if not pressed to next CPI
RCALL Print1 ; Call function to print names
S2: CPI mpr, $FD ; Check if S2 is pressed
BRNE S8 ; Branch if not pressed to next CPI
RCALL Print2 ; Call function to print names
S8: CPI mpr, $7F ; Check if S8 is pressed
BRNE MAIN ; Branch if not pressed to MAIN
RCALL LCDClr ; Call function to print names
rjmp MAIN ; jump back to main and create an infinite
; while loop. Generally, every main program is an
; infinite while loop, never let the main program
; just run off
;***********************************************************
;* Functions and Subroutines
;***********************************************************
;-----------------------------------------------------------
; Func: Print1
; Desc: Prints contents of both strings if S1 is pressed
;-----------------------------------------------------------
Print1:
; Selected line 1 for printing
LDI YL, $00 ; Pointing Y to $0100
LDI YH, $01 ; Pointing Y to $0100
; Load string1 (address) from memory into Z
LDI ZL, LOW(STRING1_BEG<<1) ; Load String address (LOW) from Program Memory
LDI ZH, HIGH(STRING1_BEG<<1) ; Load String address (HIGH) from Program Memory
Loop: ; Loop for entire string
CPI ZL, LOW(STRING1_END<<1) ; Check if Z(LOW) is pointing to LOW(STRING1_END<<1)
BREQ END ; Branch id ZL is equal to ($10 << 1) to END
LPM mpr, Z+ ; Load character from Z address into mpr and post-increment Z
ST Y+, mpr ; Store mpr into (Y) and post-increment Y
RJMP Loop ; Loop back to Loop
END:
RCALL LCDWrLn1 ; Print First Line to LCD
; Selected line 2 for printing
LDI YL, $10 ; Pointing Y to $0110
LDI YH, $01 ; Pointing Y to $0110
; Load string1 from memory into Z (Address)
LDI ZL, LOW(STRING2_BEG<<1) ; Load String address (LOW) from Program Memory
LDI ZH, HIGH(STRING2_BEG<<1) ; Load String address (HIGH) from Program Memory
Loop2: ; Loop for entire string
CPI ZL, LOW(STRING2_END<<1) ; Check if Z(LOW) is pointing to LOW(STRING2_END<<1)
BREQ END2 ; Branch if ZL is equal to LOW(STRING2_END<<1)
LPM mpr, Z+ ; Load character from Z address into mpr and post-increment Z
ST Y+, mpr ; Store mpr into (Y) and post-increment Y
RJMP Loop2 ; Loop to Loop2
END2:
RCALL LCDWrLn2 ; Print Second Line to LCD
ret
;-----------------------------------------------------------
; Func: Print2
; Desc: Prints contents of both strings if S2 is pressed
;-----------------------------------------------------------
Print2:
; Selected line 1 for printing
LDI YL, $00 ; Pointing Y to $0100
LDI YH, $01 ; Pointing Y to $0100
; Load string1 (address) from memory into Z
LDI ZL, LOW(STRING2_BEG<<1) ; Load String address (LOW) from Program Memory
LDI ZH, HIGH(STRING2_BEG<<1) ; Load String address (HIGH) from Program Memory
Loop3: ; Loop for entire string
CPI ZL, LOW(STRING2_END<<1) ; Check if Z(LOW) is pointing to LOW(STRING1_END<<1)
BREQ END3 ; Branch id ZL is equal to ($10 << 1) to END
LPM mpr, Z+ ; Load character from Z address into mpr and post-increment Z
ST Y+, mpr ; Store mpr into (Y) and post-increment Y
RJMP Loop3 ; Loop back to Loop
END3:
RCALL LCDWrLn1 ; Print First Line to LCD
; Selected line 2 for printing
LDI YL, $10 ; Pointing Y to $0110
LDI YH, $01 ; Pointing Y to $0110
; Load string1 from memory into Z (Address)
LDI ZL, LOW(STRING1_BEG<<1) ; Load String address (LOW) from Program Memory
LDI ZH, HIGH(STRING1_BEG<<1) ; Load String address (HIGH) from Program Memory
Loop4: ; Loop for entire string
CPI ZL, LOW(STRING1_END<<1) ; Check if Z(LOW) is pointing to LOW(STRING2_END<<1)
BREQ END4 ; Branch if ZL is equal to LOW(STRING2_END<<1)
LPM mpr, Z+ ; Load character from Z address into mpr and post-increment Z
ST Y+, mpr ; Store mpr into (Y) and post-increment Y
RJMP Loop4 ; Loop to Loop2
END4:
RCALL LCDWrLn2 ; Print Second Line to LCD
ret
;***********************************************************
;* Stored Program Data
;***********************************************************
STRING1_BEG:
.DB "Felipe Orrico " ; Declaring STRING1 in ProgMem
STRING1_END:
STRING2_BEG:
.DB "Caden Verzino " ; Declaring STRING2 in ProgMem
STRING2_END:
;***********************************************************
;* Additional Program Includes
;***********************************************************
.include "LCDDriver.asm" ; Include the LCD Driver
| 37.654822 | 84 | 0.527905 |
414024e2d995f9ceaad7a7e5ae9ec8fbdf831dab | 7,493 | asm | Assembly | Transynther/x86/_processed/US/_ht_st_zr_un_/i9-9900K_12_0xa0.log_21829_1551.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/US/_ht_st_zr_un_/i9-9900K_12_0xa0.log_21829_1551.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/US/_ht_st_zr_un_/i9-9900K_12_0xa0.log_21829_1551.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r15
push %r8
push %r9
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x82f4, %rbp
lfence
movw $0x6162, (%rbp)
lfence
lea addresses_WC_ht+0x11bb8, %rsi
lea addresses_normal_ht+0x116cc, %rdi
nop
nop
nop
nop
dec %rbp
mov $116, %rcx
rep movsl
nop
nop
nop
nop
sub $9035, %rsi
lea addresses_WT_ht+0x6474, %rsi
lea addresses_normal_ht+0x142f4, %rdi
clflush (%rdi)
nop
sub $64375, %r11
mov $41, %rcx
rep movsq
add %r8, %r8
lea addresses_WT_ht+0xdb74, %r11
nop
nop
nop
inc %r9
movb $0x61, (%r11)
nop
nop
nop
nop
xor %r11, %r11
lea addresses_UC_ht+0x18af4, %r11
nop
nop
nop
nop
nop
add $3733, %rbp
movb $0x61, (%r11)
nop
nop
nop
and $14150, %r11
lea addresses_A_ht+0x5af4, %r11
cmp %rsi, %rsi
mov (%r11), %r8
sub %rdi, %rdi
lea addresses_D_ht+0x8734, %r9
dec %rsi
movl $0x61626364, (%r9)
nop
add $63911, %rbp
lea addresses_UC_ht+0x14ef4, %r8
nop
nop
cmp $19548, %r9
mov $0x6162636465666768, %rdi
movq %rdi, %xmm2
vmovups %ymm2, (%r8)
nop
xor %r8, %r8
lea addresses_UC_ht+0x10cd4, %rsi
lea addresses_normal_ht+0xf35c, %rdi
clflush (%rsi)
nop
nop
cmp %r15, %r15
mov $87, %rcx
rep movsb
cmp %r8, %r8
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %r9
pop %r8
pop %r15
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %r9
push %rax
push %rbp
push %rbx
push %rdi
// Store
lea addresses_US+0x9894, %rax
nop
nop
nop
nop
nop
inc %rdi
movw $0x5152, (%rax)
nop
nop
dec %r12
// Store
lea addresses_D+0x13f34, %rbp
nop
nop
nop
nop
dec %r12
mov $0x5152535455565758, %r14
movq %r14, %xmm6
movups %xmm6, (%rbp)
// Exception!!!
nop
nop
nop
mov (0), %rbp
nop
nop
inc %rbx
// Store
mov $0xa0e, %rdi
clflush (%rdi)
nop
nop
nop
nop
cmp %r9, %r9
movw $0x5152, (%rdi)
and $28683, %r12
// Load
lea addresses_WT+0x13934, %rax
nop
nop
nop
nop
and $23757, %r14
vmovups (%rax), %ymm7
vextracti128 $1, %ymm7, %xmm7
vpextrq $1, %xmm7, %r12
nop
nop
cmp %r9, %r9
// Load
lea addresses_WC+0x62f4, %rbx
nop
nop
nop
nop
dec %rax
movups (%rbx), %xmm1
vpextrq $0, %xmm1, %r12
nop
nop
nop
sub %r12, %r12
// Faulty Load
lea addresses_US+0x1f2f4, %rdi
nop
inc %rbp
movups (%rdi), %xmm4
vpextrq $1, %xmm4, %rax
lea oracles, %r9
and $0xff, %rax
shlq $12, %rax
mov (%r9,%rax,1), %rax
pop %rdi
pop %rbx
pop %rbp
pop %rax
pop %r9
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': True, 'same': False, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 5, 'type': 'addresses_US', 'AVXalign': False, 'size': 2}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_D', 'AVXalign': False, 'size': 16}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_P', 'AVXalign': False, 'size': 2}}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_WT', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_WC', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_US', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2}}
{'src': {'same': False, 'congruent': 2, 'type': 'addresses_WC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}}
{'src': {'same': False, 'congruent': 7, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 11, 'type': 'addresses_normal_ht'}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 7, 'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 1}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 1}}
{'src': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_D_ht', 'AVXalign': False, 'size': 4}}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 10, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'same': False, 'congruent': 5, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'same': False, 'congruent': 2, 'type': 'addresses_normal_ht'}}
{'48': 10751, '49': 10704, 'ff': 1, '00': 371, '31': 2}
48 00 49 49 48 49 48 49 49 49 48 49 48 49 49 48 49 48 48 49 48 49 49 48 49 48 49 48 49 48 49 49 48 49 48 48 49 48 00 49 49 49 00 49 00 49 48 49 49 48 49 48 49 48 49 49 48 49 49 48 49 48 49 49 49 48 49 48 49 49 48 49 49 49 48 48 49 49 48 48 48 49 48 48 49 48 48 48 49 49 48 49 49 49 48 49 48 49 48 49 48 49 48 49 49 48 49 48 49 48 49 49 48 49 48 48 48 49 49 49 48 49 48 49 48 49 48 49 48 49 48 49 48 48 49 48 49 48 49 48 48 49 48 49 48 49 48 49 48 48 48 49 48 49 48 49 48 49 48 48 49 48 49 48 49 49 48 48 49 48 49 49 48 49 49 48 49 49 48 49 49 49 49 48 48 49 48 49 48 49 48 49 48 49 48 49 48 49 48 49 48 48 48 49 48 49 48 49 49 49 49 48 49 48 49 48 49 48 49 48 48 48 48 48 49 48 49 48 49 48 48 49 48 49 48 49 48 49 48 49 48 49 48 49 49 48 49 49 49 48 48 49 49 48 49 49 49 49 48 49 48 49 49 49 48 49 48 49 48 49 48 49 49 49 48 48 48 48 49 49 48 48 49 48 49 48 49 49 48 49 49 48 49 48 49 48 49 48 48 48 48 49 48 49 49 48 49 48 49 48 49 48 48 49 48 49 48 49 49 48 49 48 49 49 48 49 48 49 48 49 48 49 49 49 48 49 49 48 49 49 49 48 49 48 49 49 49 48 48 49 48 49 48 49 49 49 49 48 48 49 48 49 48 49 48 49 48 49 49 48 48 49 48 49 48 49 48 49 48 49 48 49 49 48 49 48 49 48 49 48 49 48 48 48 49 48 49 48 49 48 49 48 49 48 49 49 48 49 48 49 48 49 49 48 49 49 48 49 49 49 49 49 48 49 00 49 49 49 00 49 48 49 49 48 48 49 49 48 48 49 48 49 49 48 48 48 49 48 49 49 48 48 49 48 49 48 49 48 48 48 48 49 48 48 49 48 49 48 48 48 49 49 48 49 48 49 48 49 48 48 48 49 49 48 49 49 49 49 00 49 49 48 49 49 48 48 49 48 48 49 48 49 49 49 48 48 49 49 48 48 49 48 49 48 49 49 48 49 48 49 49 48 49 48 49 49 48 49 48 48 48 49 48 48 49 48 49 48 49 48 49 48 49 48 49 48 49 49 48 49 48 49 48 49 48 49 48 48 49 48 49 48 49 49 49 49 48 49 48 49 48 49 48 49 49 49 48 49 48 49 48 49 48 48 48 49 48 48 49 48 49 49 48 49 48 48 49 48 49 48 48 49 48 49 48 49 48 49 48 49 49 48 49 49 48 49 48 49 48 49 49 49 48 49 48 49 48 48 49 48 49 49 48 49 49 48 48 48 49 48 48 49 48 48 48 49 49 49 48 49 49 48 49 49 48 49 48 49 48 49 48 49 48 49 48 48 49 49 48 48 49 49 48 48 49 49 48 49 48 49 49 48 49 49 49 48 49 48 49 48 49 48 48 49 49 49 48 48 48 49 48 48 49 48 48 48 49 48 49 49 48 49 48 49 48 49 48 49 48 49 48 48 48 49 48 49 49 49 49 48 49 48 49 49 48 49 48 49 48 49 48 49 48 49 48 49 48 49 49 49 48 49 49 49 48 49 48 49 49 48 48 49 48 49 48 49 48 48 48 49 49 48 48 48 49 49 48 49 48 49 48 49 48 49 48 49 48 49 48 49 48 49 48 49 48 49 48 49 48 49 49 48 49 48 49 48 49 49 48 48 48 49 49 48 49 48 49 49 49 48 49 48 49 48 48 49 48 48 49 48 49 48 48 49 49 48 49 48 49 48 49 48 49 48 48 49 49 48 49 48 49 48 48 49 48 49 48 49 49 49 48 49 48 49 49 48 49 48 49 49 48 49 49 49 48 49 48 49 49 48 49 48 49 48 49 48 49 48 49 48 48 49 49 49 49 48 49 48 49 49 48 48 49 49 49 48 49 48 49 48 49 49 48 49 48 49 49 48 48 49 48 49 48 49 48 49 49 48 48 49 48 48 49 48 48 49 48 48 49 48 49 48 49 49 48 49 48 49 49 49 48 48 49 49 49 48 49 49 48 48 49 48 49 48 48 49 48 49 48 48 48 49 49 48 49 48 49 48 49 49 49 48 48 48 49 48 49 49 48 49 48 48 48 48 49 48 49 48 49 48
*/
| 33.752252 | 2,999 | 0.651942 |
5b76c6967acb7b104301cdda79efdfbdc689d72a | 1,127 | asm | Assembly | codigo/capitulo 32/for.asm | codeneomatrix/ENSAMBLADOR-x86-ACEVEDO | 7d5a58179f460ba2a03b0bcf12fc4584b87f93c9 | [
"MIT"
] | 1 | 2021-06-13T08:59:55.000Z | 2021-06-13T08:59:55.000Z | codigo/capitulo 32/for.asm | codeneomatrix/ENSAMBLADOR-x86-ACEVEDO | 7d5a58179f460ba2a03b0bcf12fc4584b87f93c9 | [
"MIT"
] | null | null | null | codigo/capitulo 32/for.asm | codeneomatrix/ENSAMBLADOR-x86-ACEVEDO | 7d5a58179f460ba2a03b0bcf12fc4584b87f93c9 | [
"MIT"
] | null | null | null | segment .data
textosuma db 0xA,0xD,"El resultado de la sumatoria es: "
lentextosuma equ $- textosuma
saltodelinea db 0xA,0xD
lensaltodelinea equ $- saltodelinea
segment .bss
sumatoria resb 1
section .text
global _start
_start:
mov eax, 0 ;sera nuestro acumulador por lo que colocamos un cero
;para no afectar el resultado de la sumatoria
mov ecx, 3 ;servirá como contador en combinación con la
; instruccion loop
loop_for:
add eax,ecx ; en eax se almacena el resultado de la sumatoria
; (3+2+1)
; esto porque LOOP decrementara de forma automática el
; valor de ecx
loop loop_for ; si el valor de ecx es diferente de cero saltara
; a la etiqueta loop_for, de lo contrario no
; realizara ninguna acción.
add eax, 48
mov [sumatoria], eax
mov eax, 4
mov ebx, 1
mov ecx, textosuma
mov edx, lentextosuma
int 0x80
mov eax, 4
mov ebx, 1
mov ecx, sumatoria
mov edx, 1
int 0x80
mov eax, 4
mov ebx, 1
mov ecx, saltodelinea
mov edx, lensaltodelinea
int 0x80
salir:
mov eax, 1
mov ebx, 0
int 0x80 | 21.673077 | 70 | 0.669033 |
c5591f0fc37cee9773be9b597c29ae26d66c2610 | 1,201 | asm | Assembly | hacks/images/m6502/rorschach.asm | MBrassey/xscreensaver_BlueMatrix | 2152a79ec08a676d940158735700087323d4a556 | [
"CC0-1.0"
] | 2 | 2020-07-15T07:40:50.000Z | 2020-09-01T05:51:36.000Z | hacks/images/m6502/rorschach.asm | luc1dLife/xscreensaver_BlueMatrix | 2152a79ec08a676d940158735700087323d4a556 | [
"CC0-1.0"
] | null | null | null | hacks/images/m6502/rorschach.asm | luc1dLife/xscreensaver_BlueMatrix | 2152a79ec08a676d940158735700087323d4a556 | [
"CC0-1.0"
] | null | null | null | ; "Rorschach test"
; Not at all what it was supposed to be,
; but it turns out pretty cool and can
; create some interesting patterns.
lda #8
tax
dr:
sta $3cb,x
sta $40b,x
dex
bpl dr
sta $3f3
sta $3eb
lda #1
sta $3ec
ldx #255
mk:
lda $fe
sta $1200,x
lda $fe
sta $1300,x
lda $fe
sta $1400,x
lda $fe
sta $1500,x
dex
cpx #$ff
bne mk
; smooth it
ldy #0
re:
lda #1
sta $3ec,y
ldx #255
sm:
lda $1201,x
adc $11ff,x
adc $1220,x
adc $11e0,x
lsr
lsr
sta $1200,x
lda $1301,x
adc $12ff,x
adc $1320,x
adc $12e0,x
lsr
lsr
sta $1300,x
lda $1401,x
adc $13ff,x
adc $1420,x
adc $13e0,x
lsr
lsr
sta $1400,x
lda $1501,x
adc $14ff,x
adc $1520,x
adc $14e0,x
lsr
lsr
sta $1500,x
dex
cpx #$ff
bne sm
iny
cpy #7
bne re
lda #1
sta $3f0
;copy it
clc
ldx #255
cp:
lda $1200,x
lsr
lsr
tay
lda colors,y
sta $200,x
lda $1300,x
lsr
lsr
tay
lda colors,y
sta $300,x
lda $1400,x
lsr
lsr
tay
lda colors,y
sta $400,x
lda $1500,x
lsr
lsr
tay
lda colors,y
sta $500,x
dex
cpx #$ff
bne cp
rts
colors:
dcb 0,0,0,0,0,$9,$9,1,1,0,0,0,0,0
| 9.608 | 40 | 0.557868 |
97e94a7ddac419121ea7a28f06cc2a76d77205af | 381 | asm | Assembly | programs/oeis/031/A031131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/031/A031131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/031/A031131.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A031131: Difference between n-th prime and (n+2)-nd prime.
; 3,4,6,6,6,6,6,10,8,8,10,6,6,10,12,8,8,10,6,8,10,10,14,12,6,6,6,6,18,18,10,8,12,12,8,12,10,10,12,8,12,12,6,6,14,24,16,6,6,10,8,12,16,12,12,8,8,10,6,12,24,18,6,6,18,20,16,12,6,10,14,14,12,10,10,14,12,12,18,12,12,12,8,10,10,14,12,6,6,16,20,12,12,12,10,18,14,20,24,16
add $0,1
seq $0,75527 ; A008578(n+3) - A008578(n+1).
| 63.5 | 265 | 0.629921 |
b164c3b5df9150e8097848547d0bf97aedc0120f | 3,936 | asm | Assembly | src/asm/stdlib/arglist.asm | dragazo/csx64-rs-lib | 5413a720bd2bf5ba5599ac0ecc0c1f3db10f23dc | [
"Apache-2.0",
"MIT"
] | 1 | 2022-02-07T00:56:15.000Z | 2022-02-07T00:56:15.000Z | src/asm/stdlib/arglist.asm | dragazo/csx64-rs | b5dd71c6d00462b46919bba6dd43f0bbe0579047 | [
"Apache-2.0",
"MIT"
] | null | null | null | src/asm/stdlib/arglist.asm | dragazo/csx64-rs | b5dd71c6d00462b46919bba6dd43f0bbe0579047 | [
"Apache-2.0",
"MIT"
] | 1 | 2022-01-21T21:56:47.000Z | 2022-01-21T21:56:47.000Z | global arglist_start, arglist_end
; contract: these functions may only modify rax/xmm0
global arglist_i, arglist_f
segment text
arglist: equ 0
.SIZE: equ 136
.int_index: equ 0 ; u32
.float_index: equ 4 ; u32
.stack_pos: equ 8 ; void*
.root_rsp: equ 16 ; void*
.int_arr: equ 24 ; u64[6]
.float_arr: equ 72 ; f64[8]
; arglist *arglist_start(void *rsp_init : r10)
;
; returns an arglist that iterates over all csxdecl function arguments.
; can be called from any csxdecl function (must be before any arg registers are modified).
; any arguments that were passed in registers are preserved.
; any arguments that were passed on the stack must be accessed relative to rsp_init (see below).
; the returned pointer must be passed to arglist_end() at the end of the function.
; arglist_end() must be called when the stack pointer is in the same position as it was when arglist_start() returned.
;
; rsp_init - the initial value of rsp upon entering the csxdecl function (must be passed in r10).
arglist_start:
pop rbx ; pop the return address off the stack
mov r11, rsp ; put current stack pos in r11 (this is the root rsp value for arglist_end)
add r10, 8 ; put caller's stack arg location in r10 (rsp_init+8 to skip their ret address)
sub rsp, arglist.SIZE ; allocate stack space for the arglist struct
; initialize the arglist object
mov dword ptr [rsp + arglist.int_index], 0
mov dword ptr [rsp + arglist.float_index], 0
mov qword ptr [rsp + arglist.stack_pos], r10
mov qword ptr [rsp + arglist.root_rsp], r11
; copy all the integral registers
mov qword ptr [rsp + arglist.int_arr + 0*8], rdi
mov qword ptr [rsp + arglist.int_arr + 1*8], rsi
mov qword ptr [rsp + arglist.int_arr + 2*8], rdx
mov qword ptr [rsp + arglist.int_arr + 3*8], rcx
mov qword ptr [rsp + arglist.int_arr + 4*8], r8
mov qword ptr [rsp + arglist.int_arr + 5*8], r9
; copy all the floating point registers
vmovsd qword ptr [rsp + arglist.float_arr + 0*8], xmm0
vmovsd qword ptr [rsp + arglist.float_arr + 1*8], xmm1
vmovsd qword ptr [rsp + arglist.float_arr + 2*8], xmm2
vmovsd qword ptr [rsp + arglist.float_arr + 3*8], xmm3
vmovsd qword ptr [rsp + arglist.float_arr + 4*8], xmm4
vmovsd qword ptr [rsp + arglist.float_arr + 5*8], xmm5
vmovsd qword ptr [rsp + arglist.float_arr + 6*8], xmm6
vmovsd qword ptr [rsp + arglist.float_arr + 7*8], xmm7
mov rax, rsp ; place arglist pointer in return location
jmp rbx ; jump back to the return address we popped off the stack
; void arglist_end(arglist *list)
; this MUST be called with the return value from arglist_start() (see arglist_start()).
; failure to do so may result in memory leaks or random undefined errors.
; this releases any resources used by list and invalidates it.
arglist_end:
pop rbx ; pop the return address off the stack
mov rsp, qword ptr [rdi + arglist.root_rsp] ; all we need to do is undo our stack allocations by restoring root rsp
jmp rbx ; jump back to the return address we popped of the stack
; ---------------------------------------------
; u64 arglist_i(arglist*)
; gets the next integer argument and stores it in rax.
arglist_i:
mov eax, dword ptr [rdi + arglist.int_index]
cmp eax, 6
jae .get_from_stack
mov rax, qword ptr [rdi + arglist.int_arr + rax*8]
inc dword ptr [rdi + arglist.int_index]
ret
.get_from_stack:
mov rax, qword ptr [rdi + arglist.stack_pos]
mov rax, qword ptr [rax]
add qword ptr [rdi + arglist.stack_pos], 8
ret
; f64 arglist_i(arglist*)
; gets the next floating point argument and stores it in xmm0.
arglist_f:
mov eax, dword ptr [rdi + arglist.float_index]
cmp eax, 8
jae .get_from_stack
vmovsd xmm0, qword ptr [rdi + arglist.float_arr + rax*8]
inc dword ptr [rdi + arglist.float_index]
ret
.get_from_stack:
mov rax, qword ptr [rdi + arglist.stack_pos]
vmovsd xmm0, qword ptr [rax]
add qword ptr [rdi + arglist.stack_pos], 8
ret
| 35.781818 | 118 | 0.711382 |
b2b7b841a0e4f0ec49c1c53ab63fbc6cf4b69c07 | 401 | asm | Assembly | programs/oeis/194/A194508.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/194/A194508.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/194/A194508.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A194508: First coordinate of the (2,3)-Lagrange pair for n.
; -1,1,0,2,1,0,2,1,3,2,1,3,2,4,3,2,4,3,5,4,3,5,4,6,5,4,6,5,7,6,5,7,6,8,7,6,8,7,9,8,7,9,8,10,9,8,10,9,11,10,9,11,10,12,11,10,12,11,13,12,11,13,12,14,13,12,14,13,15,14,13,15,14,16,15,14,16,15,17,16,15,17,16,18,17,16,18,17,19,18,17,19,18,20,19,18,20,19,21,20
mov $2,$0
mul $0,2
lpb $0
sub $0,1
trn $0,4
sub $2,3
lpe
add $2,1
sub $0,$2
| 30.846154 | 255 | 0.598504 |
098fb5efc5bc3e0771197fef507ea0cc8b317d91 | 6,736 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1218.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1218.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0_notsx.log_21829_1218.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 %r8
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_UC_ht+0x47bb, %rsi
lea addresses_WT_ht+0x1567b, %rdi
nop
nop
nop
nop
nop
sub %rbp, %rbp
mov $85, %rcx
rep movsw
nop
nop
nop
sub %r12, %r12
lea addresses_A_ht+0x76f3, %rax
nop
nop
nop
cmp $23087, %r8
mov (%rax), %ecx
nop
nop
nop
nop
add $37754, %r8
lea addresses_WC_ht+0x10c3b, %rdi
sub $13252, %rsi
movw $0x6162, (%rdi)
nop
nop
nop
cmp $46092, %rcx
lea addresses_UC_ht+0xe7d9, %r12
clflush (%r12)
cmp %rdi, %rdi
movups (%r12), %xmm6
vpextrq $1, %xmm6, %rsi
xor %r12, %r12
lea addresses_UC_ht+0x10677, %rsi
nop
sub %r8, %r8
mov (%rsi), %di
nop
nop
nop
cmp $48026, %rax
lea addresses_UC_ht+0xfe3b, %rcx
nop
xor $42313, %rdi
mov (%rcx), %rbp
nop
add %r8, %r8
lea addresses_WC_ht+0x95a0, %rsi
lea addresses_UC_ht+0xb3f7, %rdi
clflush (%rsi)
nop
nop
nop
inc %r14
mov $49, %rcx
rep movsb
nop
nop
nop
nop
xor $9338, %rax
lea addresses_A_ht+0x13860, %rsi
lea addresses_normal_ht+0x1da8, %rdi
nop
nop
nop
sub $30826, %r14
mov $113, %rcx
rep movsq
nop
nop
nop
add %rbp, %rbp
lea addresses_normal_ht+0x1ddfb, %rsi
lea addresses_D_ht+0xc863, %rdi
nop
nop
nop
nop
xor %r8, %r8
mov $110, %rcx
rep movsl
nop
nop
cmp %r8, %r8
lea addresses_WC_ht+0x128fb, %rsi
lea addresses_A_ht+0x7dcb, %rdi
nop
nop
nop
nop
nop
inc %rbp
mov $56, %rcx
rep movsw
nop
nop
nop
cmp $55742, %rbp
lea addresses_WC_ht+0x1c2ab, %rcx
nop
nop
nop
nop
nop
sub $42741, %rsi
movb (%rcx), %al
nop
nop
nop
nop
cmp %r12, %r12
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r8
pop %r14
pop %r12
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %r8
push %r9
push %rcx
push %rdx
// Faulty Load
lea addresses_normal+0xca3b, %r8
nop
add $28522, %rcx
mov (%r8), %r12d
lea oracles, %r9
and $0xff, %r12
shlq $12, %r12
mov (%r9,%r12,1), %r12
pop %rdx
pop %rcx
pop %r9
pop %r8
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_normal', 'AVXalign': False, 'size': 4, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 9}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 10}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 1, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 1}, '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
*/
| 36.410811 | 2,999 | 0.658403 |
49b09f3dca27352a8f722e0e186ebd6bcab7d8dd | 3,895 | asm | Assembly | libsrc/cpc/cpc_PrintGphStrStd0.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 640 | 2017-01-14T23:33:45.000Z | 2022-03-30T11:28:42.000Z | libsrc/cpc/cpc_PrintGphStrStd0.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 1,600 | 2017-01-15T16:12:02.000Z | 2022-03-31T12:11:12.000Z | libsrc/cpc/cpc_PrintGphStrStd0.asm | jpoikela/z88dk | 7108b2d7e3a98a77de99b30c9a7c9199da9c75cb | [
"ClArtistic"
] | 215 | 2017-01-17T10:43:03.000Z | 2022-03-23T17:25:02.000Z | ;
; Amstrad CPC library
;
; ******************************************************
; ** Librería de rutinas para Amstrad CPC **
; ** Raúl Simarro, Artaburu 2009 **
; ******************************************************
;
; Used by cpc_PrintGphStrStd and cpc_PrintGphStrStdXY
;
; $Id: cpc_PrintGphStrStd0.asm $
;
SECTION code_clib
PUBLIC cpc_PrintGphStrStd0
PUBLIC direcc_destino0s_m1
PUBLIC color_uso
EXTERN cpc_Chars8
EXTERN first_char8
.color0
xor a
call metecolor
jp sigue
.color1
ld a,@00001000
call metecolor
jp sigue
.color2
ld a,@10000000
call metecolor
jp sigue
.color3
ld a,@10001000
call metecolor
jp sigue
.metecolor
ld (cc0-1),a
ld (cc4-1),a
srl a
ld (cc1-1),a
ld (cc5-1),a
srl a
ld (cc2-1),a
ld (cc6-1),a
srl a
ld (cc3-1),a
ld (cc7-1),a
ret
.cpc_PrintGphStrStd0
;DE destino
;HL origen
;ex de,hl
;; marcará el color con que se imprime
.color_uso
;ld a,1
or a ; cp 0
jp z,color0
cp 1
jp z,color1
cp 2
jp z,color2
cp 3
jp z,color3
.sigue
;trabajo previo: Para tener una lista de trabajos de impresión. No se interrumpe
;la impresión en curso.
ld a,(imprimiendo)
cp 1
jp z,add_elemento
ld (direcc_destino),hl
ex de,hl
call bucle_texto0
;antes de terminar, se mira si hay algo en cola.
.bucle_cola_impresion
ld a,(elementos_cola)
or a
jp z,terminar_impresion
call leer_elemento
jp bucle_cola_impresion
.terminar_impresion
xor a
ld (imprimiendo),a
ret
.entrar_cola_impresion
;si se está imprimiendo se mete el valor en la cola
ret
.add_elemento
di
ld ix,(pos_cola)
ld (ix+0),l
ld (ix+1),h
ld (ix+2),e
ld (ix+3),d
inc ix
inc ix
inc ix
inc ix
ld (pos_cola),ix
ld hl,elementos_cola
inc (hl)
;Se añaden los valores hl y de
ei
ret
.leer_elemento
di
ld ix,(pos_cola)
ld l,(ix+0)
ld h,(ix+1)
ld e,(ix+2)
ld d,(ix+3)
dec ix
dec ix
dec ix
dec ix
ld (pos_cola),ix
ld hl,elementos_cola
dec (hl)
ei
ret
.bucle_texto0
ld a,1
ld (imprimiendo),a
ld a,(first_char8)
ld b,a ;resto 48 para saber el número del caracter (En ASCII 0=48)
ld a,(hl)
or a ;cp 0
ret z
sub b
ld bc,cpc_Chars8 ;apunto a la primera letra
push hl
ld l,a ;en A tengo la letra que sería
ld h,0
add hl,hl
add hl,hl
add hl,hl ;x8 porque cada letra son 8 bytes
add hl,bc ;ahora HL apunta a los datos de la letra correspondiente
call escribe_letra
ld hl,(direcc_destino)
ld de,letra_decodificada
;ld A,8 ;alto
call cpc_PutSp0
ld hl,(direcc_destino)
inc hl
inc hl
ld (direcc_destino),hl
pop hl
inc hl
jp bucle_texto0
.cpc_PutSp0
ld iyh,8 ; undocumented instruction
ld b,7
ld c,b
.loop_alto_2
.loop_ancho_2
ex de,hl
ldi
ldi
dec iyh ; undocumented instruction
ret z
ex de,hl
.salto_linea
LD C,$fe ;&07f6 ;salto linea menos ancho
ADD HL,BC
jp nc,loop_alto_2 ;sig_linea_2zz ;si no desborda va a la siguiente linea
ld bc,$c050
add HL,BC
ld b,7 ;sólo se daría una de cada 8 veces en un sprite
jp loop_alto_2
.escribe_letra ;; lee el byte y lo interpreta
ld iy,letra_decodificada
ld b,8
.bucle_alto
push bc
;leo el byte... ahora se miran sus bits y se rellena el caracter a imprimir
xor a
ld b,(hl)
bit 7,b
jp z,cc0
or @10001000
.cc0
bit 6,b
jp z,cc1
or @01000100
.cc1
bit 5,b
jp z,cc2
or @00100010
.cc2
bit 4,b
jp z,cc3
or @00010001
.cc3
;primer byte
ld (iy+0),a
inc iy
xor a
bit 3,b
jp z,cc4
or @10001000
.cc4
bit 2,b
jp z,cc5
or @01000100
.cc5
bit 1,b
jp z,cc6
or @00100010
.cc6
bit 0,b
jp z,cc7
or @00010001
.cc7
;segundo byte
ld (iy+0),a
inc iy
inc hl
pop bc
djnz bucle_alto
ret
SECTION bss_clib
.elementos_cola
defw 0
.pos_cola
defw cola_impresion
;pos_escritura_cola defw cola_impresion
.cola_impresion
defs 12
.imprimiendo
defb 0
.direcc_destino0s_m1
.direcc_destino
defw 0
.letra_decodificada
defs 16 ;uso este espacio para guardar la letra que se decodifica
| 13.20339 | 80 | 0.675995 |
4ac6543a704c9684ca126151f544fdf9c3c4f16a | 426 | asm | Assembly | programs/oeis/118/A118226.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/118/A118226.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/118/A118226.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A118226: Start with 1 and repeatedly reverse the digits and add 76 to get the next term.
; 1,77,153,427,800,84,124,497,870,154,527,801,184,557,831,214,488,960,145,617,792,373,449,1020,277,848,924,505,581,261,238,908,885,664,542,321,199,1067,7677,7843,3563,3729,9349,9515,5235,5401,1121,1287,7897
mov $2,$0
mov $0,1
lpb $2
seq $0,4086 ; Read n backwards (referred to as R(n) in many sequences).
add $0,76
sub $2,1
lpe
| 38.727273 | 206 | 0.715962 |
567f24a809bc813cee6e6cc395ac58b3e83e894c | 735 | asm | Assembly | oeis/138/A138639.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/138/A138639.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/138/A138639.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A138639: Nonnegative integers n such that 19*n-1 is prime.
; Submitted by Christian Krause
; 2,6,8,12,20,30,32,36,42,48,56,68,72,78,90,92,96,98,110,116,126,138,140,152,156,158,168,170,176,182,186,188,198,210,212,222,236,242,246,252,272,278,288,296,302,306,308,312,320,330,338,356,368,380,386,396,398,410,422,426,456,470,476,482,498,506,510,516,530,540,552,558,560,566,572,582,588,600,602,608,620,630,632,642,660,662,666,680,686,690,692,702,708,720,728,732,746,750,758,768
mov $1,9
mov $2,$0
add $2,2
pow $2,2
lpb $2
add $1,27
mov $3,$1
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
add $1,11
mov $4,$0
max $4,0
cmp $4,$0
mul $2,$4
sub $2,1
lpe
mov $0,$1
div $0,19
add $0,2
| 30.625 | 380 | 0.67483 |
d39ae2d47e5a01af147fb16b341e3363bfc6fd2e | 101 | asm | Assembly | src/main/fragment/mos6502-common/vwum1=vwum2_minus_vbsaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | 2 | 2022-03-01T02:21:14.000Z | 2022-03-01T04:33:35.000Z | src/main/fragment/mos6502-common/vwum1=vwum2_minus_vbsaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | src/main/fragment/mos6502-common/vwum1=vwum2_minus_vbsaa.asm | jbrandwood/kickc | d4b68806f84f8650d51b0e3ef254e40f38b0ffad | [
"MIT"
] | null | null | null | sta $fe
ora #$7f
bmi !+
lda #0
!:
sta $ff
sec
lda {m2}
sbc $fe
sta {m1}
lda {m2}+1
sbc $ff
sta {m1}+1 | 7.769231 | 10 | 0.564356 |
a656c18d5125261897d6fd913c8005d10e3f8f1f | 3,193 | asm | Assembly | tasks/hard-reverse/wrapper.asm | HackerDom/qctf-starter-2016 | 02fde33d0a9e7f107e787077b26e810de6b8e423 | [
"MIT"
] | 6 | 2016-12-08T17:35:46.000Z | 2019-12-05T07:17:26.000Z | tasks/hard-reverse/wrapper.asm | HackerDom/qctf-starter-2016 | 02fde33d0a9e7f107e787077b26e810de6b8e423 | [
"MIT"
] | 1 | 2020-06-05T17:28:56.000Z | 2020-06-05T17:28:56.000Z | tasks/hard-reverse/wrapper.asm | HackerDom/qctf-starter-2016 | 02fde33d0a9e7f107e787077b26e810de6b8e423 | [
"MIT"
] | 1 | 2017-01-12T17:53:52.000Z | 2017-01-12T17:53:52.000Z | BITS 32
section .text
global _start
_start:
sub esp, 0x1200
push dword [_start_block_key]
push 0
push dword [_start_block_id]
push _jump_block
ret
_jump_block:
pusha
pushf
; stack: [ register (32) ] [ eflag (4) ] [ block_id (4) ] [ block_addr (4) ] [ block_key (4) ]
mov ebx, [esp + 36] ; block id
shl ebx, 2
lea eax, [_blocks_list]
add ebx, eax
lea esi, [_blocks_data]
mov ecx, esi
add esi, [ebx]
add ebx, 4
add ecx, [ebx]
sub ecx, esi
mov [_len], ecx
lea edi, [esp + 48 + 0x200]
mov eax, edi
rep movsb
mov ebx, [esp + 40] ; block addr
add eax, ebx
mov ebx, [esp + 44] ; block key
mov [_key], ebx
mov [esp + 44], eax
lea eax, [esp + 48 + 0x200]
mov esi, eax
mov edi, eax
mov ecx, [_len]
shr ecx, 2
_decrypt:
lodsd
xor edx, edx
mov ebx, _inv_perm
mov [_val], eax
and eax, 0xff
mov dl, [ebx + eax]
ror edx, 8
mov eax, [_val]
shr eax, 8
and eax, 0xff
mov dl, [ebx + eax]
ror edx, 8
mov eax, [_val]
shr eax, 16
and eax, 0xff
mov dl, [ebx + eax]
ror edx, 8
mov eax, [_val]
shr eax, 24
and eax, 0xff
mov dl, [ebx + eax]
ror edx, 8
xor edx, [_key]
mov eax, edx
mov edx, [_val]
xor [_key], edx
ror dword [_key], 3
stosd
loop _decrypt
popf
popa
pop dword [_key]
pop dword [_key]
ret
section .data
_key dd 0x0
_len dd 0x0
_val dd 0x0
_inv_perm db 216, 179, 163, 57, 70, 63, 245, 69, 142, 175, 207, 218, 27
db 29, 17, 146, 111, 67, 194, 252, 211, 20, 107, 15, 122, 78
db 5, 103, 210, 244, 119, 176, 186, 94, 130, 158, 159, 134, 192
db 214, 92, 178, 54, 64, 31, 36, 232, 236, 201, 76, 105, 208
db 37, 45, 169, 135, 240, 117, 139, 99, 193, 189, 234, 183, 68
db 197, 87, 73, 116, 199, 228, 74, 113, 249, 225, 224, 108, 8
db 21, 42, 80, 153, 164, 98, 166, 196, 38, 231, 30, 12, 22
db 133, 65, 132, 60, 195, 44, 102, 97, 144, 106, 46, 202, 217
db 255, 35, 118, 170, 155, 177, 246, 47, 141, 205, 32, 4, 0
db 243, 188, 227, 226, 127, 203, 1, 123, 51, 88, 6, 145, 212
db 104, 206, 91, 3, 204, 86, 151, 49, 239, 125, 7, 39, 150
db 61, 221, 124, 71, 215, 26, 171, 81, 254, 198, 10, 62, 90
db 56, 173, 140, 235, 209, 16, 40, 52, 138, 149, 187, 174, 154
db 79, 120, 237, 109, 112, 24, 101, 55, 95, 9, 41, 219, 77
db 48, 129, 75, 251, 182, 250, 137, 23, 131, 100, 161, 11, 128
db 72, 248, 59, 253, 190, 89, 14, 93, 162, 34, 229, 241, 157
db 136, 223, 43, 33, 143, 160, 233, 168, 19, 220, 184, 50, 53
db 147, 180, 28, 148, 84, 58, 185, 82, 110, 13, 165, 242, 247
db 126, 181, 114, 2, 167, 96, 18, 152, 83, 85, 156, 115, 121
db 66, 25, 172, 222, 200, 213, 230, 238, 191
| 30.701923 | 98 | 0.478547 |
c106fa4b327e737054061a6ff4506fd43ab948b1 | 3,006 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_195_18.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_195_18.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_195_18.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r15
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WC_ht+0x1da39, %r15
nop
nop
inc %r10
mov (%r15), %esi
nop
nop
xor $12136, %rdi
lea addresses_WC_ht+0x1be61, %rsi
lea addresses_normal_ht+0x14345, %rdi
nop
nop
sub %rbx, %rbx
mov $104, %rcx
rep movsb
nop
nop
cmp %rcx, %rcx
lea addresses_normal_ht+0x9889, %rbx
nop
and %r13, %r13
mov $0x6162636465666768, %rcx
movq %rcx, %xmm7
movups %xmm7, (%rbx)
and %r10, %r10
lea addresses_UC_ht+0x196d9, %rdi
clflush (%rdi)
nop
nop
nop
cmp %r13, %r13
movb (%rdi), %bl
nop
nop
inc %r10
lea addresses_UC_ht+0x19ed9, %rdi
nop
nop
nop
dec %rsi
mov (%rdi), %ecx
nop
inc %rbx
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r13
push %rax
push %rbx
push %rcx
push %rdi
push %rsi
// REPMOV
lea addresses_WT+0x7ab1, %rsi
mov $0x4a6bdd0000000189, %rdi
nop
cmp $16517, %r12
mov $4, %rcx
rep movsl
nop
nop
nop
xor $24620, %r12
// Faulty Load
lea addresses_WT+0xeed9, %rsi
nop
nop
nop
add $8618, %rax
vmovups (%rsi), %ymm1
vextracti128 $0, %ymm1, %xmm1
vpextrq $0, %xmm1, %r13
lea oracles, %rax
and $0xff, %r13
shlq $12, %r13
mov (%rax,%r13,1), %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r13
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_NC', 'congruent': 1, 'same': False}}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_WT', 'size': 32, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_WC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 2, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 4, 'NT': False, 'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 8, 'NT': False, 'type': 'addresses_UC_ht', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'same': False, 'congruent': 10, 'NT': True, 'type': 'addresses_UC_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'39': 195}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 24.639344 | 584 | 0.654691 |
afbf831c9be1e495257724879c81b712e1c872e3 | 5,227 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_920.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_920.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xca.log_21829_920.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r15
push %r9
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x18dc6, %rsi
lea addresses_WT_ht+0x19f46, %rdi
nop
sub $9635, %r9
mov $43, %rcx
rep movsb
nop
nop
nop
nop
nop
cmp $62950, %r15
lea addresses_A_ht+0x1c75e, %rsi
lea addresses_normal_ht+0x16818, %rdi
nop
nop
cmp $30163, %r11
mov $122, %rcx
rep movsw
nop
sub %r11, %r11
lea addresses_WT_ht+0x13fbd, %r11
nop
nop
nop
nop
dec %r13
mov $0x6162636465666768, %r9
movq %r9, %xmm5
vmovups %ymm5, (%r11)
sub %r9, %r9
lea addresses_A_ht+0x3ab2, %rsi
lea addresses_D_ht+0xf646, %rdi
nop
nop
nop
nop
nop
add $13391, %r11
mov $116, %rcx
rep movsw
nop
nop
dec %rsi
lea addresses_WC_ht+0x11746, %r9
nop
nop
sub $15072, %r11
movups (%r9), %xmm7
vpextrq $0, %xmm7, %rdi
add %rsi, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %r9
pop %r15
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r8
push %rbp
push %rdi
push %rsi
// Faulty Load
lea addresses_RW+0x13f46, %rsi
nop
nop
nop
nop
nop
sub $35794, %r8
movups (%rsi), %xmm4
vpextrq $1, %xmm4, %rdi
lea oracles, %r8
and $0xff, %rdi
shlq $12, %rdi
mov (%r8,%rdi,1), %rdi
pop %rsi
pop %rdi
pop %rbp
pop %r8
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'size': 1, 'NT': False, 'type': 'addresses_RW', 'same': False, 'AVXalign': False, 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_RW', 'same': True, 'AVXalign': False, 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_WT_ht', 'congruent': 7}, 'dst': {'same': True, 'type': 'addresses_WT_ht', 'congruent': 11}}
{'OP': 'REPM', 'src': {'same': False, 'type': 'addresses_A_ht', 'congruent': 3}, 'dst': {'same': False, 'type': 'addresses_normal_ht', 'congruent': 0}}
{'OP': 'STOR', 'dst': {'size': 32, 'NT': False, 'type': 'addresses_WT_ht', 'same': True, 'AVXalign': False, 'congruent': 0}}
{'OP': 'REPM', 'src': {'same': True, 'type': 'addresses_A_ht', 'congruent': 1}, 'dst': {'same': False, 'type': 'addresses_D_ht', 'congruent': 7}}
{'OP': 'LOAD', 'src': {'size': 16, 'NT': False, 'type': 'addresses_WC_ht', 'same': False, 'AVXalign': False, 'congruent': 9}}
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
| 45.850877 | 2,999 | 0.662522 |
f479a254c2f1147350c46e71b97b843050241a82 | 816 | asm | Assembly | oeis/008/A008534.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/008/A008534.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/008/A008534.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A008534: Coordination sequence for {A_6}* lattice.
; Submitted by Jon Maiga
; 1,14,98,462,1596,4410,10374,21658,41272,73206,122570,195734,300468,446082,643566,905730,1247344,1685278,2238642,2928926,3780140,4818954,6074838,7580202,9370536,11484550,13964314,16855398,20207012,24072146,28507710,33574674,39338208,45867822,53237506,61525870,70816284,81197018,92761382,105607866,119840280,135567894,152905578,171973942,192899476,215814690,240858254,268175138,297916752,330241086,365312850,403303614,444391948,488763562,536611446,588136010,643545224,703054758,766888122,835276806
mov $3,2
mov $5,$0
lpb $3
mov $0,$5
sub $3,1
add $0,$3
trn $0,1
seq $0,222410 ; Partial sums of A008534, or crystal ball sequence for {A_6}* lattice.
mov $2,$3
mul $2,$0
add $4,$2
lpe
min $5,1
mul $5,$0
mov $0,$4
sub $0,$5
| 38.857143 | 497 | 0.773284 |
7988192ff12b90db0fd846a0425f61b346c2b533 | 4,675 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1899.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1899.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i9-9900K_12_0xa0.log_21829_1899.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 %r15
push %r9
push %rax
push %rcx
push %rdx
lea addresses_UC_ht+0x17019, %r15
nop
nop
nop
add %rax, %rax
mov $0x6162636465666768, %r9
movq %r9, %xmm1
vmovups %ymm1, (%r15)
nop
nop
nop
add %r10, %r10
lea addresses_A_ht+0x2e89, %rcx
and %rdx, %rdx
movb (%rcx), %r15b
nop
and $2565, %rdx
pop %rdx
pop %rcx
pop %rax
pop %r9
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r14
push %rax
push %rdi
push %rdx
// Store
lea addresses_D+0x83ff, %r14
nop
nop
nop
nop
xor %rdx, %rdx
mov $0x5152535455565758, %rdi
movq %rdi, %xmm4
movups %xmm4, (%r14)
nop
nop
nop
nop
inc %rdi
// Faulty Load
lea addresses_PSE+0xd749, %r10
nop
nop
nop
nop
nop
sub $15648, %r11
vmovups (%r10), %ymm2
vextracti128 $1, %ymm2, %xmm2
vpextrq $0, %xmm2, %r12
lea oracles, %rax
and $0xff, %r12
shlq $12, %r12
mov (%rax,%r12,1), %r12
pop %rdx
pop %rdi
pop %rax
pop %r14
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 2}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_D', 'AVXalign': False, 'size': 16}}
[Faulty Load]
{'src': {'NT': False, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 32}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 3, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 32}}
{'src': {'NT': False, 'same': False, 'congruent': 6, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 1}, 'OP': 'LOAD'}
{'33': 21829}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 48.195876 | 2,999 | 0.66139 |
ffc03364efe8bfe872ee7731379e1f741e03d744 | 647 | asm | Assembly | programs/oeis/134/A134977.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/134/A134977.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/134/A134977.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A134977: Period 6: repeat [1, 4, 2, 3, 0, 2].
; 1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3,0,2,1,4,2,3
mov $2,$0
add $0,1
mod $2,2
mov $3,431
mul $3,$2
sub $3,1
mul $0,$3
mod $0,3
mov $1,$0
add $1,2
| 46.214286 | 501 | 0.506955 |
9499e5ca2322f89693b5fb6694bc7bcd2c54c395 | 3,994 | asm | Assembly | old/arithmetic/fptostr.asm | paulscottrobson/mega65-basic | 33c87e8b67f6c39b47286264976f6a63ab2673d6 | [
"MIT"
] | null | null | null | old/arithmetic/fptostr.asm | paulscottrobson/mega65-basic | 33c87e8b67f6c39b47286264976f6a63ab2673d6 | [
"MIT"
] | null | null | null | old/arithmetic/fptostr.asm | paulscottrobson/mega65-basic | 33c87e8b67f6c39b47286264976f6a63ab2673d6 | [
"MIT"
] | null | null | null | ; *******************************************************************************************
; *******************************************************************************************
;
; Name : fptostr.asm
; Purpose : Convert A_Mantissa to string.
; Date : 13th August 2019
; Author : Paul Robson (paul@robsons.org.uk)
;
; *******************************************************************************************
; *******************************************************************************************
FPToString:
pha
phx
phy
lda #0 ; reset the index.
sta NumBufX
lda A_Type
bne _FPTSIsFloat ; if zero, go to floating point code.
jsr INTToString ; convert it as a simple int, it's an integer.
_FPTSExit:
ply
plx
pla
rts
;
_FPTSZero:
lda #"0"
jsr ITSOutputCharacter
bra _FPTSExit
;
_FPTSIsFloat:
lda A_Zero ; is it zero ?
bne _FPTSZero ; output a zero ?
;
lda A_Sign ; is it signed ?
beq _FPTSNotSigned
lda #0 ; clear sign flag
sta A_Sign
lda #"-" ; output a minus
jsr ITSOutputCharacter
;
_FPTSNotSigned:
lda A_Exponent
cmp #20 ; 0-20 as standard
bcc _FPTSStandard
cmp #240 ; -16..-1 as standard
bcc _FPTSExponent ;
;
; Standard format e.g. aaaaa.xxxxxx
;
_FPTSStandard:
jsr FPTOutputBody ; output the body.
bra _FPTSExit
;
; Output in exponent format
;
_FPTSExponent:
ldx #0 ; this is the exponent count.
_FPTSExponentLoop:
lda A_Exponent ; exponent < 0, x by 10
bmi _FPTSTimes
cmp #5 ; exit when in range 0..4
bcc _FPTSScaledToExp
lda #-1 ; divide by 10.
jsr FPScaleABy10PowerAC
inx
bra _FPTSExponentLoop
_FPTSTimes: ; same but x10.
lda #1
jsr FPScaleABy10PowerAC
dex
bra _FPTSExponentLoop
;
_FPTSScaledToExp:
phx ; save exponent
jsr FPTOutputBody ; output the body.
lda #"E" ; output E
jsr ITSOutputCharacter
plx
phx
bpl _FPTSOutExponent
lda #"-" ; output - ?
jsr ITSOutputCharacter
pla ; negate the exponent.
eor #$FF
inc a
pha
_FPTSOutExponent:
plx
cpx #10
bcc _FPTSNoTens
ldy #0 ; high digit.
_FPTSHighLoop:
iny ; / 10, keep subtracting 10.
txa
sec
sbc #10
tax
cpx #10
bcs _FPTSHighLoop
tya
ora #"0"
jsr ITSOutputCharacter
_FPTSNoTens: ; low digit
txa
ora #"0"
jsr ITSOutputCharacter
bra _FPTSExit
nop
_FPTSScaled:
; *******************************************************************************************
;
; Output float as integer.decimals
;
; *******************************************************************************************
FPTOutputBody:
jsr FPUCopyAtoB ; save in B
ldx #0
jsr FPUAToInteger ; convert A to integer
jsr INTToString ; output integer part as string.
jsr FPUCopyBToA ; get back.
jsr FPFractionalPart ; get the fractional part.
lda A_Zero ; any fractional part ?
bne _FPTOExit ; exit if so.
lda #"." ; output a decimal place
jsr ITSOutputCharacter
_FPDecimalLoop:
lda A_Zero ; zeroed out A
bne _FPTOExit2
lda NumBufX ; too many characters out.
cmp #11
bcs _FPToExit2
;
ldx #0 ; multiply A by 10
jsr FPUTimes10X
jsr FPUCopyAToB ; copy to B
jsr FPUAToInteger ; make integer
lda A_Mantissa ; output digit
ora #"0"
jsr ITSOutputCharacter
jsr FPUCopyBToA ; get it back.
jsr FPFractionalPart ; get fractional part
bra _FPDecimalLoop
_FPTOExit2:
ldx NumBufX ; strip trailing DPs.
_FPStrip:
dex ; back one.
bmi _FPToExit ; too far
lda Num_Buffer,x ; 0 ?
cmp #"0"
beq _FPStrip
inx ; first zero.
stx NumBufX ; save position
lda #0 ; trim
sta Num_Buffer,X
_FPTOExit:
rts
| 24.060241 | 93 | 0.51978 |
e899034ce9d20a973240365b0dfa2acc909a7903 | 39,516 | asm | Assembly | user/kill.asm | Vidhi1109/Modified-XV6 | 691430b9f9be91cb556f138918c1fc0e57bcabdf | [
"MIT-0"
] | null | null | null | user/kill.asm | Vidhi1109/Modified-XV6 | 691430b9f9be91cb556f138918c1fc0e57bcabdf | [
"MIT-0"
] | null | null | null | user/kill.asm | Vidhi1109/Modified-XV6 | 691430b9f9be91cb556f138918c1fc0e57bcabdf | [
"MIT-0"
] | null | null | null |
user/_kill: file format elf64-littleriscv
Disassembly of section .text:
0000000000000000 <main>:
#include "kernel/stat.h"
#include "user/user.h"
int
main(int argc, char **argv)
{
0: 1101 addi sp,sp,-32
2: ec06 sd ra,24(sp)
4: e822 sd s0,16(sp)
6: e426 sd s1,8(sp)
8: e04a sd s2,0(sp)
a: 1000 addi s0,sp,32
int i;
if(argc < 2){
c: 4785 li a5,1
e: 02a7dd63 bge a5,a0,48 <main+0x48>
12: 00858493 addi s1,a1,8
16: ffe5091b addiw s2,a0,-2
1a: 02091793 slli a5,s2,0x20
1e: 01d7d913 srli s2,a5,0x1d
22: 05c1 addi a1,a1,16
24: 992e add s2,s2,a1
fprintf(2, "usage: kill pid...\n");
exit(1);
}
for(i=1; i<argc; i++)
kill(atoi(argv[i]));
26: 6088 ld a0,0(s1)
28: 00000097 auipc ra,0x0
2c: 1ae080e7 jalr 430(ra) # 1d6 <atoi>
30: 00000097 auipc ra,0x0
34: 2d0080e7 jalr 720(ra) # 300 <kill>
for(i=1; i<argc; i++)
38: 04a1 addi s1,s1,8
3a: ff2496e3 bne s1,s2,26 <main+0x26>
exit(0);
3e: 4501 li a0,0
40: 00000097 auipc ra,0x0
44: 290080e7 jalr 656(ra) # 2d0 <exit>
fprintf(2, "usage: kill pid...\n");
48: 00000597 auipc a1,0x0
4c: 7b858593 addi a1,a1,1976 # 800 <malloc+0xe6>
50: 4509 li a0,2
52: 00000097 auipc ra,0x0
56: 5e2080e7 jalr 1506(ra) # 634 <fprintf>
exit(1);
5a: 4505 li a0,1
5c: 00000097 auipc ra,0x0
60: 274080e7 jalr 628(ra) # 2d0 <exit>
0000000000000064 <strcpy>:
#include "kernel/fcntl.h"
#include "user/user.h"
char*
strcpy(char *s, const char *t)
{
64: 1141 addi sp,sp,-16
66: e422 sd s0,8(sp)
68: 0800 addi s0,sp,16
char *os;
os = s;
while((*s++ = *t++) != 0)
6a: 87aa mv a5,a0
6c: 0585 addi a1,a1,1
6e: 0785 addi a5,a5,1
70: fff5c703 lbu a4,-1(a1)
74: fee78fa3 sb a4,-1(a5)
78: fb75 bnez a4,6c <strcpy+0x8>
;
return os;
}
7a: 6422 ld s0,8(sp)
7c: 0141 addi sp,sp,16
7e: 8082 ret
0000000000000080 <strcmp>:
int
strcmp(const char *p, const char *q)
{
80: 1141 addi sp,sp,-16
82: e422 sd s0,8(sp)
84: 0800 addi s0,sp,16
while(*p && *p == *q)
86: 00054783 lbu a5,0(a0)
8a: cb91 beqz a5,9e <strcmp+0x1e>
8c: 0005c703 lbu a4,0(a1)
90: 00f71763 bne a4,a5,9e <strcmp+0x1e>
p++, q++;
94: 0505 addi a0,a0,1
96: 0585 addi a1,a1,1
while(*p && *p == *q)
98: 00054783 lbu a5,0(a0)
9c: fbe5 bnez a5,8c <strcmp+0xc>
return (uchar)*p - (uchar)*q;
9e: 0005c503 lbu a0,0(a1)
}
a2: 40a7853b subw a0,a5,a0
a6: 6422 ld s0,8(sp)
a8: 0141 addi sp,sp,16
aa: 8082 ret
00000000000000ac <strlen>:
uint
strlen(const char *s)
{
ac: 1141 addi sp,sp,-16
ae: e422 sd s0,8(sp)
b0: 0800 addi s0,sp,16
int n;
for(n = 0; s[n]; n++)
b2: 00054783 lbu a5,0(a0)
b6: cf91 beqz a5,d2 <strlen+0x26>
b8: 0505 addi a0,a0,1
ba: 87aa mv a5,a0
bc: 4685 li a3,1
be: 9e89 subw a3,a3,a0
c0: 00f6853b addw a0,a3,a5
c4: 0785 addi a5,a5,1
c6: fff7c703 lbu a4,-1(a5)
ca: fb7d bnez a4,c0 <strlen+0x14>
;
return n;
}
cc: 6422 ld s0,8(sp)
ce: 0141 addi sp,sp,16
d0: 8082 ret
for(n = 0; s[n]; n++)
d2: 4501 li a0,0
d4: bfe5 j cc <strlen+0x20>
00000000000000d6 <memset>:
void*
memset(void *dst, int c, uint n)
{
d6: 1141 addi sp,sp,-16
d8: e422 sd s0,8(sp)
da: 0800 addi s0,sp,16
char *cdst = (char *) dst;
int i;
for(i = 0; i < n; i++){
dc: ca19 beqz a2,f2 <memset+0x1c>
de: 87aa mv a5,a0
e0: 1602 slli a2,a2,0x20
e2: 9201 srli a2,a2,0x20
e4: 00a60733 add a4,a2,a0
cdst[i] = c;
e8: 00b78023 sb a1,0(a5)
for(i = 0; i < n; i++){
ec: 0785 addi a5,a5,1
ee: fee79de3 bne a5,a4,e8 <memset+0x12>
}
return dst;
}
f2: 6422 ld s0,8(sp)
f4: 0141 addi sp,sp,16
f6: 8082 ret
00000000000000f8 <strchr>:
char*
strchr(const char *s, char c)
{
f8: 1141 addi sp,sp,-16
fa: e422 sd s0,8(sp)
fc: 0800 addi s0,sp,16
for(; *s; s++)
fe: 00054783 lbu a5,0(a0)
102: cb99 beqz a5,118 <strchr+0x20>
if(*s == c)
104: 00f58763 beq a1,a5,112 <strchr+0x1a>
for(; *s; s++)
108: 0505 addi a0,a0,1
10a: 00054783 lbu a5,0(a0)
10e: fbfd bnez a5,104 <strchr+0xc>
return (char*)s;
return 0;
110: 4501 li a0,0
}
112: 6422 ld s0,8(sp)
114: 0141 addi sp,sp,16
116: 8082 ret
return 0;
118: 4501 li a0,0
11a: bfe5 j 112 <strchr+0x1a>
000000000000011c <gets>:
char*
gets(char *buf, int max)
{
11c: 711d addi sp,sp,-96
11e: ec86 sd ra,88(sp)
120: e8a2 sd s0,80(sp)
122: e4a6 sd s1,72(sp)
124: e0ca sd s2,64(sp)
126: fc4e sd s3,56(sp)
128: f852 sd s4,48(sp)
12a: f456 sd s5,40(sp)
12c: f05a sd s6,32(sp)
12e: ec5e sd s7,24(sp)
130: 1080 addi s0,sp,96
132: 8baa mv s7,a0
134: 8a2e mv s4,a1
int i, cc;
char c;
for(i=0; i+1 < max; ){
136: 892a mv s2,a0
138: 4481 li s1,0
cc = read(0, &c, 1);
if(cc < 1)
break;
buf[i++] = c;
if(c == '\n' || c == '\r')
13a: 4aa9 li s5,10
13c: 4b35 li s6,13
for(i=0; i+1 < max; ){
13e: 89a6 mv s3,s1
140: 2485 addiw s1,s1,1
142: 0344d863 bge s1,s4,172 <gets+0x56>
cc = read(0, &c, 1);
146: 4605 li a2,1
148: faf40593 addi a1,s0,-81
14c: 4501 li a0,0
14e: 00000097 auipc ra,0x0
152: 19a080e7 jalr 410(ra) # 2e8 <read>
if(cc < 1)
156: 00a05e63 blez a0,172 <gets+0x56>
buf[i++] = c;
15a: faf44783 lbu a5,-81(s0)
15e: 00f90023 sb a5,0(s2)
if(c == '\n' || c == '\r')
162: 01578763 beq a5,s5,170 <gets+0x54>
166: 0905 addi s2,s2,1
168: fd679be3 bne a5,s6,13e <gets+0x22>
for(i=0; i+1 < max; ){
16c: 89a6 mv s3,s1
16e: a011 j 172 <gets+0x56>
170: 89a6 mv s3,s1
break;
}
buf[i] = '\0';
172: 99de add s3,s3,s7
174: 00098023 sb zero,0(s3)
return buf;
}
178: 855e mv a0,s7
17a: 60e6 ld ra,88(sp)
17c: 6446 ld s0,80(sp)
17e: 64a6 ld s1,72(sp)
180: 6906 ld s2,64(sp)
182: 79e2 ld s3,56(sp)
184: 7a42 ld s4,48(sp)
186: 7aa2 ld s5,40(sp)
188: 7b02 ld s6,32(sp)
18a: 6be2 ld s7,24(sp)
18c: 6125 addi sp,sp,96
18e: 8082 ret
0000000000000190 <stat>:
int
stat(const char *n, struct stat *st)
{
190: 1101 addi sp,sp,-32
192: ec06 sd ra,24(sp)
194: e822 sd s0,16(sp)
196: e426 sd s1,8(sp)
198: e04a sd s2,0(sp)
19a: 1000 addi s0,sp,32
19c: 892e mv s2,a1
int fd;
int r;
fd = open(n, O_RDONLY);
19e: 4581 li a1,0
1a0: 00000097 auipc ra,0x0
1a4: 170080e7 jalr 368(ra) # 310 <open>
if(fd < 0)
1a8: 02054563 bltz a0,1d2 <stat+0x42>
1ac: 84aa mv s1,a0
return -1;
r = fstat(fd, st);
1ae: 85ca mv a1,s2
1b0: 00000097 auipc ra,0x0
1b4: 178080e7 jalr 376(ra) # 328 <fstat>
1b8: 892a mv s2,a0
close(fd);
1ba: 8526 mv a0,s1
1bc: 00000097 auipc ra,0x0
1c0: 13c080e7 jalr 316(ra) # 2f8 <close>
return r;
}
1c4: 854a mv a0,s2
1c6: 60e2 ld ra,24(sp)
1c8: 6442 ld s0,16(sp)
1ca: 64a2 ld s1,8(sp)
1cc: 6902 ld s2,0(sp)
1ce: 6105 addi sp,sp,32
1d0: 8082 ret
return -1;
1d2: 597d li s2,-1
1d4: bfc5 j 1c4 <stat+0x34>
00000000000001d6 <atoi>:
int
atoi(const char *s)
{
1d6: 1141 addi sp,sp,-16
1d8: e422 sd s0,8(sp)
1da: 0800 addi s0,sp,16
int n;
n = 0;
while('0' <= *s && *s <= '9')
1dc: 00054683 lbu a3,0(a0)
1e0: fd06879b addiw a5,a3,-48
1e4: 0ff7f793 zext.b a5,a5
1e8: 4625 li a2,9
1ea: 02f66863 bltu a2,a5,21a <atoi+0x44>
1ee: 872a mv a4,a0
n = 0;
1f0: 4501 li a0,0
n = n*10 + *s++ - '0';
1f2: 0705 addi a4,a4,1
1f4: 0025179b slliw a5,a0,0x2
1f8: 9fa9 addw a5,a5,a0
1fa: 0017979b slliw a5,a5,0x1
1fe: 9fb5 addw a5,a5,a3
200: fd07851b addiw a0,a5,-48
while('0' <= *s && *s <= '9')
204: 00074683 lbu a3,0(a4)
208: fd06879b addiw a5,a3,-48
20c: 0ff7f793 zext.b a5,a5
210: fef671e3 bgeu a2,a5,1f2 <atoi+0x1c>
return n;
}
214: 6422 ld s0,8(sp)
216: 0141 addi sp,sp,16
218: 8082 ret
n = 0;
21a: 4501 li a0,0
21c: bfe5 j 214 <atoi+0x3e>
000000000000021e <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
21e: 1141 addi sp,sp,-16
220: e422 sd s0,8(sp)
222: 0800 addi s0,sp,16
char *dst;
const char *src;
dst = vdst;
src = vsrc;
if (src > dst) {
224: 02b57463 bgeu a0,a1,24c <memmove+0x2e>
while(n-- > 0)
228: 00c05f63 blez a2,246 <memmove+0x28>
22c: 1602 slli a2,a2,0x20
22e: 9201 srli a2,a2,0x20
230: 00c507b3 add a5,a0,a2
dst = vdst;
234: 872a mv a4,a0
*dst++ = *src++;
236: 0585 addi a1,a1,1
238: 0705 addi a4,a4,1
23a: fff5c683 lbu a3,-1(a1)
23e: fed70fa3 sb a3,-1(a4)
while(n-- > 0)
242: fee79ae3 bne a5,a4,236 <memmove+0x18>
src += n;
while(n-- > 0)
*--dst = *--src;
}
return vdst;
}
246: 6422 ld s0,8(sp)
248: 0141 addi sp,sp,16
24a: 8082 ret
dst += n;
24c: 00c50733 add a4,a0,a2
src += n;
250: 95b2 add a1,a1,a2
while(n-- > 0)
252: fec05ae3 blez a2,246 <memmove+0x28>
256: fff6079b addiw a5,a2,-1
25a: 1782 slli a5,a5,0x20
25c: 9381 srli a5,a5,0x20
25e: fff7c793 not a5,a5
262: 97ba add a5,a5,a4
*--dst = *--src;
264: 15fd addi a1,a1,-1
266: 177d addi a4,a4,-1
268: 0005c683 lbu a3,0(a1)
26c: 00d70023 sb a3,0(a4)
while(n-- > 0)
270: fee79ae3 bne a5,a4,264 <memmove+0x46>
274: bfc9 j 246 <memmove+0x28>
0000000000000276 <memcmp>:
int
memcmp(const void *s1, const void *s2, uint n)
{
276: 1141 addi sp,sp,-16
278: e422 sd s0,8(sp)
27a: 0800 addi s0,sp,16
const char *p1 = s1, *p2 = s2;
while (n-- > 0) {
27c: ca05 beqz a2,2ac <memcmp+0x36>
27e: fff6069b addiw a3,a2,-1
282: 1682 slli a3,a3,0x20
284: 9281 srli a3,a3,0x20
286: 0685 addi a3,a3,1
288: 96aa add a3,a3,a0
if (*p1 != *p2) {
28a: 00054783 lbu a5,0(a0)
28e: 0005c703 lbu a4,0(a1)
292: 00e79863 bne a5,a4,2a2 <memcmp+0x2c>
return *p1 - *p2;
}
p1++;
296: 0505 addi a0,a0,1
p2++;
298: 0585 addi a1,a1,1
while (n-- > 0) {
29a: fed518e3 bne a0,a3,28a <memcmp+0x14>
}
return 0;
29e: 4501 li a0,0
2a0: a019 j 2a6 <memcmp+0x30>
return *p1 - *p2;
2a2: 40e7853b subw a0,a5,a4
}
2a6: 6422 ld s0,8(sp)
2a8: 0141 addi sp,sp,16
2aa: 8082 ret
return 0;
2ac: 4501 li a0,0
2ae: bfe5 j 2a6 <memcmp+0x30>
00000000000002b0 <memcpy>:
void *
memcpy(void *dst, const void *src, uint n)
{
2b0: 1141 addi sp,sp,-16
2b2: e406 sd ra,8(sp)
2b4: e022 sd s0,0(sp)
2b6: 0800 addi s0,sp,16
return memmove(dst, src, n);
2b8: 00000097 auipc ra,0x0
2bc: f66080e7 jalr -154(ra) # 21e <memmove>
}
2c0: 60a2 ld ra,8(sp)
2c2: 6402 ld s0,0(sp)
2c4: 0141 addi sp,sp,16
2c6: 8082 ret
00000000000002c8 <fork>:
# generated by usys.pl - do not edit
#include "kernel/syscall.h"
.global fork
fork:
li a7, SYS_fork
2c8: 4885 li a7,1
ecall
2ca: 00000073 ecall
ret
2ce: 8082 ret
00000000000002d0 <exit>:
.global exit
exit:
li a7, SYS_exit
2d0: 4889 li a7,2
ecall
2d2: 00000073 ecall
ret
2d6: 8082 ret
00000000000002d8 <wait>:
.global wait
wait:
li a7, SYS_wait
2d8: 488d li a7,3
ecall
2da: 00000073 ecall
ret
2de: 8082 ret
00000000000002e0 <pipe>:
.global pipe
pipe:
li a7, SYS_pipe
2e0: 4891 li a7,4
ecall
2e2: 00000073 ecall
ret
2e6: 8082 ret
00000000000002e8 <read>:
.global read
read:
li a7, SYS_read
2e8: 4895 li a7,5
ecall
2ea: 00000073 ecall
ret
2ee: 8082 ret
00000000000002f0 <write>:
.global write
write:
li a7, SYS_write
2f0: 48c1 li a7,16
ecall
2f2: 00000073 ecall
ret
2f6: 8082 ret
00000000000002f8 <close>:
.global close
close:
li a7, SYS_close
2f8: 48d5 li a7,21
ecall
2fa: 00000073 ecall
ret
2fe: 8082 ret
0000000000000300 <kill>:
.global kill
kill:
li a7, SYS_kill
300: 4899 li a7,6
ecall
302: 00000073 ecall
ret
306: 8082 ret
0000000000000308 <exec>:
.global exec
exec:
li a7, SYS_exec
308: 489d li a7,7
ecall
30a: 00000073 ecall
ret
30e: 8082 ret
0000000000000310 <open>:
.global open
open:
li a7, SYS_open
310: 48bd li a7,15
ecall
312: 00000073 ecall
ret
316: 8082 ret
0000000000000318 <mknod>:
.global mknod
mknod:
li a7, SYS_mknod
318: 48c5 li a7,17
ecall
31a: 00000073 ecall
ret
31e: 8082 ret
0000000000000320 <unlink>:
.global unlink
unlink:
li a7, SYS_unlink
320: 48c9 li a7,18
ecall
322: 00000073 ecall
ret
326: 8082 ret
0000000000000328 <fstat>:
.global fstat
fstat:
li a7, SYS_fstat
328: 48a1 li a7,8
ecall
32a: 00000073 ecall
ret
32e: 8082 ret
0000000000000330 <link>:
.global link
link:
li a7, SYS_link
330: 48cd li a7,19
ecall
332: 00000073 ecall
ret
336: 8082 ret
0000000000000338 <mkdir>:
.global mkdir
mkdir:
li a7, SYS_mkdir
338: 48d1 li a7,20
ecall
33a: 00000073 ecall
ret
33e: 8082 ret
0000000000000340 <chdir>:
.global chdir
chdir:
li a7, SYS_chdir
340: 48a5 li a7,9
ecall
342: 00000073 ecall
ret
346: 8082 ret
0000000000000348 <dup>:
.global dup
dup:
li a7, SYS_dup
348: 48a9 li a7,10
ecall
34a: 00000073 ecall
ret
34e: 8082 ret
0000000000000350 <getpid>:
.global getpid
getpid:
li a7, SYS_getpid
350: 48ad li a7,11
ecall
352: 00000073 ecall
ret
356: 8082 ret
0000000000000358 <sbrk>:
.global sbrk
sbrk:
li a7, SYS_sbrk
358: 48b1 li a7,12
ecall
35a: 00000073 ecall
ret
35e: 8082 ret
0000000000000360 <sleep>:
.global sleep
sleep:
li a7, SYS_sleep
360: 48b5 li a7,13
ecall
362: 00000073 ecall
ret
366: 8082 ret
0000000000000368 <uptime>:
.global uptime
uptime:
li a7, SYS_uptime
368: 48b9 li a7,14
ecall
36a: 00000073 ecall
ret
36e: 8082 ret
0000000000000370 <waitx>:
.global waitx
waitx:
li a7, SYS_waitx
370: 48d9 li a7,22
ecall
372: 00000073 ecall
ret
376: 8082 ret
0000000000000378 <trace>:
.global trace
trace:
li a7, SYS_trace
378: 48e1 li a7,24
ecall
37a: 00000073 ecall
ret
37e: 8082 ret
0000000000000380 <set_priority>:
.global set_priority
set_priority:
li a7, SYS_set_priority
380: 48dd li a7,23
ecall
382: 00000073 ecall
ret
386: 8082 ret
0000000000000388 <putc>:
static char digits[] = "0123456789ABCDEF";
static void
putc(int fd, char c)
{
388: 1101 addi sp,sp,-32
38a: ec06 sd ra,24(sp)
38c: e822 sd s0,16(sp)
38e: 1000 addi s0,sp,32
390: feb407a3 sb a1,-17(s0)
write(fd, &c, 1);
394: 4605 li a2,1
396: fef40593 addi a1,s0,-17
39a: 00000097 auipc ra,0x0
39e: f56080e7 jalr -170(ra) # 2f0 <write>
}
3a2: 60e2 ld ra,24(sp)
3a4: 6442 ld s0,16(sp)
3a6: 6105 addi sp,sp,32
3a8: 8082 ret
00000000000003aa <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3aa: 7139 addi sp,sp,-64
3ac: fc06 sd ra,56(sp)
3ae: f822 sd s0,48(sp)
3b0: f426 sd s1,40(sp)
3b2: f04a sd s2,32(sp)
3b4: ec4e sd s3,24(sp)
3b6: 0080 addi s0,sp,64
3b8: 84aa mv s1,a0
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
3ba: c299 beqz a3,3c0 <printint+0x16>
3bc: 0805c963 bltz a1,44e <printint+0xa4>
neg = 1;
x = -xx;
} else {
x = xx;
3c0: 2581 sext.w a1,a1
neg = 0;
3c2: 4881 li a7,0
3c4: fc040693 addi a3,s0,-64
}
i = 0;
3c8: 4701 li a4,0
do{
buf[i++] = digits[x % base];
3ca: 2601 sext.w a2,a2
3cc: 00000517 auipc a0,0x0
3d0: 4ac50513 addi a0,a0,1196 # 878 <digits>
3d4: 883a mv a6,a4
3d6: 2705 addiw a4,a4,1
3d8: 02c5f7bb remuw a5,a1,a2
3dc: 1782 slli a5,a5,0x20
3de: 9381 srli a5,a5,0x20
3e0: 97aa add a5,a5,a0
3e2: 0007c783 lbu a5,0(a5)
3e6: 00f68023 sb a5,0(a3)
}while((x /= base) != 0);
3ea: 0005879b sext.w a5,a1
3ee: 02c5d5bb divuw a1,a1,a2
3f2: 0685 addi a3,a3,1
3f4: fec7f0e3 bgeu a5,a2,3d4 <printint+0x2a>
if(neg)
3f8: 00088c63 beqz a7,410 <printint+0x66>
buf[i++] = '-';
3fc: fd070793 addi a5,a4,-48
400: 00878733 add a4,a5,s0
404: 02d00793 li a5,45
408: fef70823 sb a5,-16(a4)
40c: 0028071b addiw a4,a6,2
while(--i >= 0)
410: 02e05863 blez a4,440 <printint+0x96>
414: fc040793 addi a5,s0,-64
418: 00e78933 add s2,a5,a4
41c: fff78993 addi s3,a5,-1
420: 99ba add s3,s3,a4
422: 377d addiw a4,a4,-1
424: 1702 slli a4,a4,0x20
426: 9301 srli a4,a4,0x20
428: 40e989b3 sub s3,s3,a4
putc(fd, buf[i]);
42c: fff94583 lbu a1,-1(s2)
430: 8526 mv a0,s1
432: 00000097 auipc ra,0x0
436: f56080e7 jalr -170(ra) # 388 <putc>
while(--i >= 0)
43a: 197d addi s2,s2,-1
43c: ff3918e3 bne s2,s3,42c <printint+0x82>
}
440: 70e2 ld ra,56(sp)
442: 7442 ld s0,48(sp)
444: 74a2 ld s1,40(sp)
446: 7902 ld s2,32(sp)
448: 69e2 ld s3,24(sp)
44a: 6121 addi sp,sp,64
44c: 8082 ret
x = -xx;
44e: 40b005bb negw a1,a1
neg = 1;
452: 4885 li a7,1
x = -xx;
454: bf85 j 3c4 <printint+0x1a>
0000000000000456 <vprintf>:
}
// Print to the given fd. Only understands %d, %x, %p, %s.
void
vprintf(int fd, const char *fmt, va_list ap)
{
456: 7119 addi sp,sp,-128
458: fc86 sd ra,120(sp)
45a: f8a2 sd s0,112(sp)
45c: f4a6 sd s1,104(sp)
45e: f0ca sd s2,96(sp)
460: ecce sd s3,88(sp)
462: e8d2 sd s4,80(sp)
464: e4d6 sd s5,72(sp)
466: e0da sd s6,64(sp)
468: fc5e sd s7,56(sp)
46a: f862 sd s8,48(sp)
46c: f466 sd s9,40(sp)
46e: f06a sd s10,32(sp)
470: ec6e sd s11,24(sp)
472: 0100 addi s0,sp,128
char *s;
int c, i, state;
state = 0;
for(i = 0; fmt[i]; i++){
474: 0005c903 lbu s2,0(a1)
478: 18090f63 beqz s2,616 <vprintf+0x1c0>
47c: 8aaa mv s5,a0
47e: 8b32 mv s6,a2
480: 00158493 addi s1,a1,1
state = 0;
484: 4981 li s3,0
if(c == '%'){
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
486: 02500a13 li s4,37
48a: 4c55 li s8,21
48c: 00000c97 auipc s9,0x0
490: 394c8c93 addi s9,s9,916 # 820 <malloc+0x106>
printptr(fd, va_arg(ap, uint64));
} else if(c == 's'){
s = va_arg(ap, char*);
if(s == 0)
s = "(null)";
while(*s != 0){
494: 02800d93 li s11,40
putc(fd, 'x');
498: 4d41 li s10,16
putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]);
49a: 00000b97 auipc s7,0x0
49e: 3deb8b93 addi s7,s7,990 # 878 <digits>
4a2: a839 j 4c0 <vprintf+0x6a>
putc(fd, c);
4a4: 85ca mv a1,s2
4a6: 8556 mv a0,s5
4a8: 00000097 auipc ra,0x0
4ac: ee0080e7 jalr -288(ra) # 388 <putc>
4b0: a019 j 4b6 <vprintf+0x60>
} else if(state == '%'){
4b2: 01498d63 beq s3,s4,4cc <vprintf+0x76>
for(i = 0; fmt[i]; i++){
4b6: 0485 addi s1,s1,1
4b8: fff4c903 lbu s2,-1(s1)
4bc: 14090d63 beqz s2,616 <vprintf+0x1c0>
if(state == 0){
4c0: fe0999e3 bnez s3,4b2 <vprintf+0x5c>
if(c == '%'){
4c4: ff4910e3 bne s2,s4,4a4 <vprintf+0x4e>
state = '%';
4c8: 89d2 mv s3,s4
4ca: b7f5 j 4b6 <vprintf+0x60>
if(c == 'd'){
4cc: 11490c63 beq s2,s4,5e4 <vprintf+0x18e>
4d0: f9d9079b addiw a5,s2,-99
4d4: 0ff7f793 zext.b a5,a5
4d8: 10fc6e63 bltu s8,a5,5f4 <vprintf+0x19e>
4dc: f9d9079b addiw a5,s2,-99
4e0: 0ff7f713 zext.b a4,a5
4e4: 10ec6863 bltu s8,a4,5f4 <vprintf+0x19e>
4e8: 00271793 slli a5,a4,0x2
4ec: 97e6 add a5,a5,s9
4ee: 439c lw a5,0(a5)
4f0: 97e6 add a5,a5,s9
4f2: 8782 jr a5
printint(fd, va_arg(ap, int), 10, 1);
4f4: 008b0913 addi s2,s6,8
4f8: 4685 li a3,1
4fa: 4629 li a2,10
4fc: 000b2583 lw a1,0(s6)
500: 8556 mv a0,s5
502: 00000097 auipc ra,0x0
506: ea8080e7 jalr -344(ra) # 3aa <printint>
50a: 8b4a mv s6,s2
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
50c: 4981 li s3,0
50e: b765 j 4b6 <vprintf+0x60>
printint(fd, va_arg(ap, uint64), 10, 0);
510: 008b0913 addi s2,s6,8
514: 4681 li a3,0
516: 4629 li a2,10
518: 000b2583 lw a1,0(s6)
51c: 8556 mv a0,s5
51e: 00000097 auipc ra,0x0
522: e8c080e7 jalr -372(ra) # 3aa <printint>
526: 8b4a mv s6,s2
state = 0;
528: 4981 li s3,0
52a: b771 j 4b6 <vprintf+0x60>
printint(fd, va_arg(ap, int), 16, 0);
52c: 008b0913 addi s2,s6,8
530: 4681 li a3,0
532: 866a mv a2,s10
534: 000b2583 lw a1,0(s6)
538: 8556 mv a0,s5
53a: 00000097 auipc ra,0x0
53e: e70080e7 jalr -400(ra) # 3aa <printint>
542: 8b4a mv s6,s2
state = 0;
544: 4981 li s3,0
546: bf85 j 4b6 <vprintf+0x60>
printptr(fd, va_arg(ap, uint64));
548: 008b0793 addi a5,s6,8
54c: f8f43423 sd a5,-120(s0)
550: 000b3983 ld s3,0(s6)
putc(fd, '0');
554: 03000593 li a1,48
558: 8556 mv a0,s5
55a: 00000097 auipc ra,0x0
55e: e2e080e7 jalr -466(ra) # 388 <putc>
putc(fd, 'x');
562: 07800593 li a1,120
566: 8556 mv a0,s5
568: 00000097 auipc ra,0x0
56c: e20080e7 jalr -480(ra) # 388 <putc>
570: 896a mv s2,s10
putc(fd, digits[x >> (sizeof(uint64) * 8 - 4)]);
572: 03c9d793 srli a5,s3,0x3c
576: 97de add a5,a5,s7
578: 0007c583 lbu a1,0(a5)
57c: 8556 mv a0,s5
57e: 00000097 auipc ra,0x0
582: e0a080e7 jalr -502(ra) # 388 <putc>
for (i = 0; i < (sizeof(uint64) * 2); i++, x <<= 4)
586: 0992 slli s3,s3,0x4
588: 397d addiw s2,s2,-1
58a: fe0914e3 bnez s2,572 <vprintf+0x11c>
printptr(fd, va_arg(ap, uint64));
58e: f8843b03 ld s6,-120(s0)
state = 0;
592: 4981 li s3,0
594: b70d j 4b6 <vprintf+0x60>
s = va_arg(ap, char*);
596: 008b0913 addi s2,s6,8
59a: 000b3983 ld s3,0(s6)
if(s == 0)
59e: 02098163 beqz s3,5c0 <vprintf+0x16a>
while(*s != 0){
5a2: 0009c583 lbu a1,0(s3)
5a6: c5ad beqz a1,610 <vprintf+0x1ba>
putc(fd, *s);
5a8: 8556 mv a0,s5
5aa: 00000097 auipc ra,0x0
5ae: dde080e7 jalr -546(ra) # 388 <putc>
s++;
5b2: 0985 addi s3,s3,1
while(*s != 0){
5b4: 0009c583 lbu a1,0(s3)
5b8: f9e5 bnez a1,5a8 <vprintf+0x152>
s = va_arg(ap, char*);
5ba: 8b4a mv s6,s2
state = 0;
5bc: 4981 li s3,0
5be: bde5 j 4b6 <vprintf+0x60>
s = "(null)";
5c0: 00000997 auipc s3,0x0
5c4: 25898993 addi s3,s3,600 # 818 <malloc+0xfe>
while(*s != 0){
5c8: 85ee mv a1,s11
5ca: bff9 j 5a8 <vprintf+0x152>
putc(fd, va_arg(ap, uint));
5cc: 008b0913 addi s2,s6,8
5d0: 000b4583 lbu a1,0(s6)
5d4: 8556 mv a0,s5
5d6: 00000097 auipc ra,0x0
5da: db2080e7 jalr -590(ra) # 388 <putc>
5de: 8b4a mv s6,s2
state = 0;
5e0: 4981 li s3,0
5e2: bdd1 j 4b6 <vprintf+0x60>
putc(fd, c);
5e4: 85d2 mv a1,s4
5e6: 8556 mv a0,s5
5e8: 00000097 auipc ra,0x0
5ec: da0080e7 jalr -608(ra) # 388 <putc>
state = 0;
5f0: 4981 li s3,0
5f2: b5d1 j 4b6 <vprintf+0x60>
putc(fd, '%');
5f4: 85d2 mv a1,s4
5f6: 8556 mv a0,s5
5f8: 00000097 auipc ra,0x0
5fc: d90080e7 jalr -624(ra) # 388 <putc>
putc(fd, c);
600: 85ca mv a1,s2
602: 8556 mv a0,s5
604: 00000097 auipc ra,0x0
608: d84080e7 jalr -636(ra) # 388 <putc>
state = 0;
60c: 4981 li s3,0
60e: b565 j 4b6 <vprintf+0x60>
s = va_arg(ap, char*);
610: 8b4a mv s6,s2
state = 0;
612: 4981 li s3,0
614: b54d j 4b6 <vprintf+0x60>
}
}
}
616: 70e6 ld ra,120(sp)
618: 7446 ld s0,112(sp)
61a: 74a6 ld s1,104(sp)
61c: 7906 ld s2,96(sp)
61e: 69e6 ld s3,88(sp)
620: 6a46 ld s4,80(sp)
622: 6aa6 ld s5,72(sp)
624: 6b06 ld s6,64(sp)
626: 7be2 ld s7,56(sp)
628: 7c42 ld s8,48(sp)
62a: 7ca2 ld s9,40(sp)
62c: 7d02 ld s10,32(sp)
62e: 6de2 ld s11,24(sp)
630: 6109 addi sp,sp,128
632: 8082 ret
0000000000000634 <fprintf>:
void
fprintf(int fd, const char *fmt, ...)
{
634: 715d addi sp,sp,-80
636: ec06 sd ra,24(sp)
638: e822 sd s0,16(sp)
63a: 1000 addi s0,sp,32
63c: e010 sd a2,0(s0)
63e: e414 sd a3,8(s0)
640: e818 sd a4,16(s0)
642: ec1c sd a5,24(s0)
644: 03043023 sd a6,32(s0)
648: 03143423 sd a7,40(s0)
va_list ap;
va_start(ap, fmt);
64c: fe843423 sd s0,-24(s0)
vprintf(fd, fmt, ap);
650: 8622 mv a2,s0
652: 00000097 auipc ra,0x0
656: e04080e7 jalr -508(ra) # 456 <vprintf>
}
65a: 60e2 ld ra,24(sp)
65c: 6442 ld s0,16(sp)
65e: 6161 addi sp,sp,80
660: 8082 ret
0000000000000662 <printf>:
void
printf(const char *fmt, ...)
{
662: 711d addi sp,sp,-96
664: ec06 sd ra,24(sp)
666: e822 sd s0,16(sp)
668: 1000 addi s0,sp,32
66a: e40c sd a1,8(s0)
66c: e810 sd a2,16(s0)
66e: ec14 sd a3,24(s0)
670: f018 sd a4,32(s0)
672: f41c sd a5,40(s0)
674: 03043823 sd a6,48(s0)
678: 03143c23 sd a7,56(s0)
va_list ap;
va_start(ap, fmt);
67c: 00840613 addi a2,s0,8
680: fec43423 sd a2,-24(s0)
vprintf(1, fmt, ap);
684: 85aa mv a1,a0
686: 4505 li a0,1
688: 00000097 auipc ra,0x0
68c: dce080e7 jalr -562(ra) # 456 <vprintf>
}
690: 60e2 ld ra,24(sp)
692: 6442 ld s0,16(sp)
694: 6125 addi sp,sp,96
696: 8082 ret
0000000000000698 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
698: 1141 addi sp,sp,-16
69a: e422 sd s0,8(sp)
69c: 0800 addi s0,sp,16
Header *bp, *p;
bp = (Header*)ap - 1;
69e: ff050693 addi a3,a0,-16
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
6a2: 00000797 auipc a5,0x0
6a6: 1ee7b783 ld a5,494(a5) # 890 <freep>
6aa: a02d j 6d4 <free+0x3c>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
bp->s.size += p->s.ptr->s.size;
6ac: 4618 lw a4,8(a2)
6ae: 9f2d addw a4,a4,a1
6b0: fee52c23 sw a4,-8(a0)
bp->s.ptr = p->s.ptr->s.ptr;
6b4: 6398 ld a4,0(a5)
6b6: 6310 ld a2,0(a4)
6b8: a83d j 6f6 <free+0x5e>
} else
bp->s.ptr = p->s.ptr;
if(p + p->s.size == bp){
p->s.size += bp->s.size;
6ba: ff852703 lw a4,-8(a0)
6be: 9f31 addw a4,a4,a2
6c0: c798 sw a4,8(a5)
p->s.ptr = bp->s.ptr;
6c2: ff053683 ld a3,-16(a0)
6c6: a091 j 70a <free+0x72>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
6c8: 6398 ld a4,0(a5)
6ca: 00e7e463 bltu a5,a4,6d2 <free+0x3a>
6ce: 00e6ea63 bltu a3,a4,6e2 <free+0x4a>
{
6d2: 87ba mv a5,a4
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
6d4: fed7fae3 bgeu a5,a3,6c8 <free+0x30>
6d8: 6398 ld a4,0(a5)
6da: 00e6e463 bltu a3,a4,6e2 <free+0x4a>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
6de: fee7eae3 bltu a5,a4,6d2 <free+0x3a>
if(bp + bp->s.size == p->s.ptr){
6e2: ff852583 lw a1,-8(a0)
6e6: 6390 ld a2,0(a5)
6e8: 02059813 slli a6,a1,0x20
6ec: 01c85713 srli a4,a6,0x1c
6f0: 9736 add a4,a4,a3
6f2: fae60de3 beq a2,a4,6ac <free+0x14>
bp->s.ptr = p->s.ptr->s.ptr;
6f6: fec53823 sd a2,-16(a0)
if(p + p->s.size == bp){
6fa: 4790 lw a2,8(a5)
6fc: 02061593 slli a1,a2,0x20
700: 01c5d713 srli a4,a1,0x1c
704: 973e add a4,a4,a5
706: fae68ae3 beq a3,a4,6ba <free+0x22>
p->s.ptr = bp->s.ptr;
70a: e394 sd a3,0(a5)
} else
p->s.ptr = bp;
freep = p;
70c: 00000717 auipc a4,0x0
710: 18f73223 sd a5,388(a4) # 890 <freep>
}
714: 6422 ld s0,8(sp)
716: 0141 addi sp,sp,16
718: 8082 ret
000000000000071a <malloc>:
return freep;
}
void*
malloc(uint nbytes)
{
71a: 7139 addi sp,sp,-64
71c: fc06 sd ra,56(sp)
71e: f822 sd s0,48(sp)
720: f426 sd s1,40(sp)
722: f04a sd s2,32(sp)
724: ec4e sd s3,24(sp)
726: e852 sd s4,16(sp)
728: e456 sd s5,8(sp)
72a: e05a sd s6,0(sp)
72c: 0080 addi s0,sp,64
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
72e: 02051493 slli s1,a0,0x20
732: 9081 srli s1,s1,0x20
734: 04bd addi s1,s1,15
736: 8091 srli s1,s1,0x4
738: 0014899b addiw s3,s1,1
73c: 0485 addi s1,s1,1
if((prevp = freep) == 0){
73e: 00000517 auipc a0,0x0
742: 15253503 ld a0,338(a0) # 890 <freep>
746: c515 beqz a0,772 <malloc+0x58>
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
748: 611c ld a5,0(a0)
if(p->s.size >= nunits){
74a: 4798 lw a4,8(a5)
74c: 02977f63 bgeu a4,s1,78a <malloc+0x70>
750: 8a4e mv s4,s3
752: 0009871b sext.w a4,s3
756: 6685 lui a3,0x1
758: 00d77363 bgeu a4,a3,75e <malloc+0x44>
75c: 6a05 lui s4,0x1
75e: 000a0b1b sext.w s6,s4
p = sbrk(nu * sizeof(Header));
762: 004a1a1b slliw s4,s4,0x4
p->s.size = nunits;
}
freep = prevp;
return (void*)(p + 1);
}
if(p == freep)
766: 00000917 auipc s2,0x0
76a: 12a90913 addi s2,s2,298 # 890 <freep>
if(p == (char*)-1)
76e: 5afd li s5,-1
770: a895 j 7e4 <malloc+0xca>
base.s.ptr = freep = prevp = &base;
772: 00000797 auipc a5,0x0
776: 12678793 addi a5,a5,294 # 898 <base>
77a: 00000717 auipc a4,0x0
77e: 10f73b23 sd a5,278(a4) # 890 <freep>
782: e39c sd a5,0(a5)
base.s.size = 0;
784: 0007a423 sw zero,8(a5)
if(p->s.size >= nunits){
788: b7e1 j 750 <malloc+0x36>
if(p->s.size == nunits)
78a: 02e48c63 beq s1,a4,7c2 <malloc+0xa8>
p->s.size -= nunits;
78e: 4137073b subw a4,a4,s3
792: c798 sw a4,8(a5)
p += p->s.size;
794: 02071693 slli a3,a4,0x20
798: 01c6d713 srli a4,a3,0x1c
79c: 97ba add a5,a5,a4
p->s.size = nunits;
79e: 0137a423 sw s3,8(a5)
freep = prevp;
7a2: 00000717 auipc a4,0x0
7a6: 0ea73723 sd a0,238(a4) # 890 <freep>
return (void*)(p + 1);
7aa: 01078513 addi a0,a5,16
if((p = morecore(nunits)) == 0)
return 0;
}
}
7ae: 70e2 ld ra,56(sp)
7b0: 7442 ld s0,48(sp)
7b2: 74a2 ld s1,40(sp)
7b4: 7902 ld s2,32(sp)
7b6: 69e2 ld s3,24(sp)
7b8: 6a42 ld s4,16(sp)
7ba: 6aa2 ld s5,8(sp)
7bc: 6b02 ld s6,0(sp)
7be: 6121 addi sp,sp,64
7c0: 8082 ret
prevp->s.ptr = p->s.ptr;
7c2: 6398 ld a4,0(a5)
7c4: e118 sd a4,0(a0)
7c6: bff1 j 7a2 <malloc+0x88>
hp->s.size = nu;
7c8: 01652423 sw s6,8(a0)
free((void*)(hp + 1));
7cc: 0541 addi a0,a0,16
7ce: 00000097 auipc ra,0x0
7d2: eca080e7 jalr -310(ra) # 698 <free>
return freep;
7d6: 00093503 ld a0,0(s2)
if((p = morecore(nunits)) == 0)
7da: d971 beqz a0,7ae <malloc+0x94>
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
7dc: 611c ld a5,0(a0)
if(p->s.size >= nunits){
7de: 4798 lw a4,8(a5)
7e0: fa9775e3 bgeu a4,s1,78a <malloc+0x70>
if(p == freep)
7e4: 00093703 ld a4,0(s2)
7e8: 853e mv a0,a5
7ea: fef719e3 bne a4,a5,7dc <malloc+0xc2>
p = sbrk(nu * sizeof(Header));
7ee: 8552 mv a0,s4
7f0: 00000097 auipc ra,0x0
7f4: b68080e7 jalr -1176(ra) # 358 <sbrk>
if(p == (char*)-1)
7f8: fd5518e3 bne a0,s5,7c8 <malloc+0xae>
return 0;
7fc: 4501 li a0,0
7fe: bf45 j 7ae <malloc+0x94>
| 29.292809 | 60 | 0.46199 |
ed7fb9735b1c5045aa27b42b3306d7b4fba5c765 | 429 | asm | Assembly | oeis/182/A182828.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/182/A182828.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/182/A182828.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A182828: Array of the numbers (3*i+1)*3^j, i>=0, j>=0, read by antidiagonals.
; Submitted by Christian Krause
; 1,3,4,9,12,7,27,36,21,10,81,108,63,30,13,243,324,189,90,39,16,729,972,567,270,117,48,19,2187,2916,1701,810,351,144,57,22,6561,8748,5103,2430,1053,432,171,66,25,19683,26244,15309,7290,3159
lpb $0
add $1,1
sub $0,$1
mov $2,$1
sub $2,$0
lpe
mov $1,3
pow $1,$2
mov $2,$1
mul $2,3
mul $2,$0
add $2,$1
mov $0,$2
| 23.833333 | 189 | 0.648019 |
a4c3b52008620eea48355427c819173e04154bcf | 740 | asm | Assembly | nes/hello/hello.asm | honux77/practice | f92481740190b20ef352135c392c8a9bea58dcc7 | [
"MIT"
] | 152 | 2015-01-12T07:40:53.000Z | 2022-03-20T15:51:35.000Z | nes/hello/hello.asm | Brielle-Choi/practice | f92481740190b20ef352135c392c8a9bea58dcc7 | [
"MIT"
] | 11 | 2015-01-12T07:45:54.000Z | 2021-09-02T02:46:52.000Z | nes/hello/hello.asm | Brielle-Choi/practice | f92481740190b20ef352135c392c8a9bea58dcc7 | [
"MIT"
] | 32 | 2015-01-12T09:10:04.000Z | 2022-03-02T09:18:17.000Z | .segment "HEADER"
.byte "NES"
.byte $1a
.byte $02
.byte $01
.byte %00000000
.byte $00
.byte $00
.byte $00
.byte $00
.byte $00,$00,$00,$00,$00
.segment "STARTUP"
.segment "ZEROPAGE"
flag: .res 1
counter: .res 1
.segment "CODE"
WAITVBLANK:
:
BIT $2002
BPL :-
RTS
RESET:
LDA #$01 ; square 1
STA $4015
LDA #$08 ; period low
STA $4002
LDA #$02 ; period high
STA $4003
LDA #$bf ; volume
STA $4000
FOREVER:
JMP FOREVER
VBLANK:
INC counter
LDA counter
CMP #$3C
BNE SkipColorChange
LDA flag
EOR #%10000000
STA flag
STA $2001
LDA #$00
STA counter
SkipColorChange:
RTI
.segment "VECTORS"
.word VBLANK
.word RESET
.word 0
.segment "CHARS" | 12.982456 | 29 | 0.589189 |
d6a3f5a671e0cecb6b89241497285ea51edb1ec8 | 1,830 | asm | Assembly | unittests/ASM/H0F38/66_17.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 628 | 2020-03-06T14:01:32.000Z | 2022-03-31T06:35:14.000Z | unittests/ASM/H0F38/66_17.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 576 | 2020-03-06T08:25:12.000Z | 2022-03-30T04:05:29.000Z | unittests/ASM/H0F38/66_17.asm | cobalt2727/FEX | 13087f8425aeaad28dc81bed46a83e1d72ff0db8 | [
"MIT"
] | 38 | 2020-03-07T06:10:00.000Z | 2022-03-29T09:27:36.000Z | %ifdef CONFIG
{
"RegData": {
"R15": "0x000000000003a759",
"XMM1": ["0", "0"],
"XMM2": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF"],
"XMM3": ["0x4142434445464748", "0x5152535455565758"],
"XMM4": ["0", "0"],
"XMM5": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF"],
"XMM6": ["0x4142434445464748", "0x5152535455565758"],
"XMM7": ["0", "0"],
"XMM8": ["0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFF"],
"XMM9": ["0x4142434445464748", "0x5152535455565758"]
}
}
%endif
; Uses AX and BX and stores result in r15
; CF:ZF
%macro zfcfmerge 0
lahf
; Shift CF to zero
shr ax, 8
; Move to a temp
mov bx, ax
and rbx, 1
shl r15, 1
or r15, rbx
shl r15, 1
; Move to a temp
mov bx, ax
; Extract ZF
shr bx, 6
and rbx, 1
; Insert ZF
or r15, rbx
%endmacro
lea rdx, [rel .data]
mov rax, 0
mov rbx, 0
mov r15, 0
movaps xmm1, [rdx + 16 * 0]
movaps xmm2, [rdx + 16 * 1]
movaps xmm3, [rdx + 16 * 2]
movaps xmm4, [rdx + 16 * 0]
movaps xmm5, [rdx + 16 * 1]
movaps xmm6, [rdx + 16 * 2]
movaps xmm7, [rdx + 16 * 0]
movaps xmm8, [rdx + 16 * 1]
movaps xmm9, [rdx + 16 * 2]
ptest xmm1, [rdx + 16 * 3]
zfcfmerge
ptest xmm2, [rdx + 16 * 4]
zfcfmerge
ptest xmm3, [rdx + 16 * 5]
zfcfmerge
ptest xmm4, [rdx + 16 * 6]
zfcfmerge
ptest xmm5, [rdx + 16 * 7]
zfcfmerge
ptest xmm6, [rdx + 16 * 8]
zfcfmerge
ptest xmm7, [rdx + 16 * 9]
zfcfmerge
ptest xmm8, [rdx + 16 * 10]
zfcfmerge
ptest xmm9, [rdx + 16 * 11]
zfcfmerge
hlt
align 16
.data:
dq 0, 0
dq 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF
dq 0x4142434445464748, 0x5152535455565758
; Match
dq 0, 0
dq 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF
dq 0x4142434445464748, 0x5152535455565758
; Match on not
dq 0xFFFFFFFFFFFFFFFF, 0xFFFFFFFFFFFFFFFF
dq 0, 0
dq 0xBEBDBCBBBAB9B8B7, 0xAEADACABAAA9A8A7
; No match on either case
dq 1, 1
dq 2, 2
dq 3, 3
| 17.428571 | 57 | 0.645902 |
fe5f950bc4a6bdbeefcc3853ccd41d19c5f40daa | 349 | asm | Assembly | oeis/205/A205824.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/205/A205824.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/205/A205824.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A205824: (3n)!/[3n*n!*(n+1)!]
; Submitted by Jon Maiga
; 1,10,280,13860,1009008,98017920,11972188800,1766895530400,306261891936000,61040779261862400,13761921142674432000,3464298995338621440000,963455812901426718720000,293441113300834537758720000
mov $2,$0
seq $0,319578 ; a(n) = (1/3)*(n+2)^2*(3*n+3)!/(n+2)!^3.
lpb $2
mul $0,$2
sub $2,1
lpe
| 31.727273 | 190 | 0.724928 |
18ba3bdc965c5096ce3846db232169a2be453f78 | 580 | asm | Assembly | data/mapObjects/CeladonMart4F.asm | AmateurPanda92/pokemon-rby-dx | f7ba1cc50b22d93ed176571e074a52d73360da93 | [
"MIT"
] | 9 | 2020-07-12T19:44:21.000Z | 2022-03-03T23:32:40.000Z | data/mapObjects/CeladonMart4F.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 7 | 2020-07-16T10:48:52.000Z | 2021-01-28T18:32:02.000Z | data/mapObjects/CeladonMart4F.asm | JStar-debug2020/pokemon-rby-dx | c2fdd8145d96683addbd8d9075f946a68d1527a1 | [
"MIT"
] | 2 | 2021-03-28T18:33:43.000Z | 2021-05-06T13:12:09.000Z | CeladonMart4F_Object:
db $f ; border block
db 3 ; warps
warp 12, 1, 0, CELADON_MART_3F
warp 16, 1, 1, CELADON_MART_5F
warp 1, 1, 0, CELADON_MART_ELEVATOR
db 1 ; signs
sign 14, 1, 4 ; CeladonMart4Text4
db 3 ; objects
object SPRITE_MART_GUY, 5, 7, STAY, NONE, 1 ; person
object SPRITE_BLACK_HAIR_BOY_2, 15, 5, WALK, 2, 2 ; person
object SPRITE_BUG_CATCHER, 5, 2, WALK, 2, 3 ; person
; warp-to
warp_to 12, 1, CELADON_MART_4F_WIDTH ; CELADON_MART_3F
warp_to 16, 1, CELADON_MART_4F_WIDTH ; CELADON_MART_5F
warp_to 1, 1, CELADON_MART_4F_WIDTH ; CELADON_MART_ELEVATOR
| 27.619048 | 60 | 0.737931 |
76eb5e4cb3df171fc1ce23a3aee114ff36554cff | 5,698 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1393.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1393.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_1393.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_D_ht+0x1ee77, %rsi
nop
nop
nop
nop
nop
xor $59034, %rdx
vmovups (%rsi), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rbp
nop
nop
xor $19591, %r14
lea addresses_WC_ht+0x71f, %rsi
lea addresses_UC_ht+0x1091f, %rdi
nop
nop
nop
nop
sub %r13, %r13
mov $61, %rcx
rep movsq
nop
nop
nop
add %rdx, %rdx
lea addresses_UC_ht+0x1100b, %r14
nop
nop
nop
nop
nop
cmp $58758, %rbp
movb (%r14), %dl
nop
nop
nop
nop
nop
inc %r13
lea addresses_D_ht+0x2fc1, %r13
nop
cmp %r14, %r14
movb $0x61, (%r13)
cmp $56090, %rdi
lea addresses_UC_ht+0x8dc7, %rsi
lea addresses_normal_ht+0x7f77, %rdi
nop
nop
inc %r10
mov $97, %rcx
rep movsl
nop
nop
nop
nop
add %rdi, %rdi
lea addresses_normal_ht+0xba9f, %rbp
clflush (%rbp)
nop
nop
nop
xor $53561, %rcx
movb (%rbp), %r14b
nop
nop
nop
add $37123, %rcx
lea addresses_UC_ht+0xe31f, %r10
nop
nop
inc %rbp
mov $0x6162636465666768, %rdx
movq %rdx, %xmm5
movups %xmm5, (%r10)
nop
inc %r14
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %r8
push %rax
push %rbp
push %rsi
// Faulty Load
lea addresses_WT+0x891f, %rsi
nop
nop
cmp $13537, %r15
movb (%rsi), %al
lea oracles, %r11
and $0xff, %rax
shlq $12, %rax
mov (%r11,%rax,1), %rax
pop %rsi
pop %rbp
pop %rax
pop %r8
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT', 'congruent': 0}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT', 'congruent': 0}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 2}}
{'dst': {'same': False, 'congruent': 9, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 7, 'type': 'addresses_WC_ht'}}
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_UC_ht', 'congruent': 1}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D_ht', 'congruent': 1}, 'OP': 'STOR'}
{'dst': {'same': False, 'congruent': 1, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 3, 'type': 'addresses_UC_ht'}}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal_ht', 'congruent': 6}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 9}, 'OP': 'STOR'}
{'39': 21829}
39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
*/
| 40.126761 | 2,999 | 0.660583 |
69d142f6a47b4cbe03ea6bab10e3098ea4367eeb | 597 | asm | Assembly | programs/oeis/048/A048840.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 22 | 2018-02-06T19:19:31.000Z | 2022-01-17T21:53:31.000Z | programs/oeis/048/A048840.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 41 | 2021-02-22T19:00:34.000Z | 2021-08-28T10:47:47.000Z | programs/oeis/048/A048840.asm | neoneye/loda | afe9559fb53ee12e3040da54bd6aa47283e0d9ec | [
"Apache-2.0"
] | 5 | 2021-02-24T21:14:16.000Z | 2021-08-09T19:48:05.000Z | ; A048840: Expansion of (1 - x + 2*x^2 + 2*x^3 - x^4 - x^5)/(1-x)^3.
; 1,2,5,12,22,34,48,64,82,102,124,148,174,202,232,264,298,334,372,412,454,498,544,592,642,694,748,804,862,922,984,1048,1114,1182,1252,1324,1398,1474,1552,1632,1714,1798,1884,1972,2062,2154,2248,2344,2442,2542,2644,2748,2854,2962,3072,3184,3298,3414,3532,3652,3774,3898,4024,4152,4282,4414,4548,4684,4822,4962,5104,5248,5394,5542,5692,5844,5998,6154,6312,6472,6634,6798,6964,7132,7302,7474,7648,7824,8002,8182,8364,8548,8734,8922,9112,9304,9498,9694,9892,10092
mov $2,$0
mul $0,3
trn $0,7
add $0,1
mov $3,$2
mul $3,$2
add $0,$3
| 54.272727 | 459 | 0.713568 |
19f007dde61bb3589749bbce33444cc2a7da663d | 338 | asm | Assembly | oeis/021/A021733.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/021/A021733.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/021/A021733.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A021733: Decimal expansion of 1/729.
; Submitted by Jon Maiga
; 0,0,1,3,7,1,7,4,2,1,1,2,4,8,2,8,5,3,2,2,3,5,9,3,9,6,4,3,3,4,7,0,5,0,7,5,4,4,5,8,1,6,1,8,6,5,5,6,9,2,7,2,9,7,6,6,8,0,3,8,4,0,8,7,7,9,1,4,9,5,1,9,8,9,0,2,6,0,6,3,1,0,0,1,3,7,1,7,4,2,1,1,2,4,8,2,8,5,3
seq $0,42 ; Unary representation of natural numbers.
div $0,81
mod $0,10
| 42.25 | 199 | 0.591716 |
46619c0e67cde6c43fd29f61d634cb945af5f3bf | 3,775 | asm | Assembly | Transynther/x86/_processed/NONE/_ht_st_zr_un_/i3-7100_9_0x84_notsx.log_183_645.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_ht_st_zr_un_/i3-7100_9_0x84_notsx.log_183_645.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_ht_st_zr_un_/i3-7100_9_0x84_notsx.log_183_645.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r13
push %r14
push %r15
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_normal_ht+0x483e, %r13
nop
nop
nop
sub $10350, %rbx
mov (%r13), %r14d
nop
nop
nop
nop
nop
xor $19629, %r10
lea addresses_WC_ht+0x1404b, %r15
nop
nop
nop
nop
nop
inc %rdx
mov (%r15), %di
nop
nop
nop
nop
add $54871, %rbx
lea addresses_D_ht+0x923e, %r14
nop
nop
nop
add %rdx, %rdx
movw $0x6162, (%r14)
nop
xor $53837, %r10
lea addresses_normal_ht+0x273e, %rdx
and %r15, %r15
movups (%rdx), %xmm3
vpextrq $0, %xmm3, %r14
nop
cmp %r10, %r10
lea addresses_normal_ht+0xa63e, %rsi
lea addresses_A_ht+0xb73e, %rdi
nop
add %r15, %r15
mov $103, %rcx
rep movsq
nop
nop
nop
nop
sub $3250, %r15
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %r15
pop %r14
pop %r13
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r8
push %rbx
push %rdi
push %rdx
push %rsi
// Store
lea addresses_PSE+0x1f00, %rdi
nop
nop
nop
nop
nop
sub $60629, %rsi
movw $0x5152, (%rdi)
nop
nop
nop
nop
cmp $19104, %rbx
// Store
lea addresses_UC+0xdc24, %rsi
nop
nop
and $63358, %rbx
mov $0x5152535455565758, %rdx
movq %rdx, (%rsi)
nop
and $38842, %rdx
// Store
lea addresses_normal+0x16bbe, %rdi
and %r12, %r12
movw $0x5152, (%rdi)
nop
nop
cmp %r8, %r8
// Store
lea addresses_PSE+0x1f7de, %r12
nop
nop
nop
nop
nop
xor %rdx, %rdx
mov $0x5152535455565758, %r8
movq %r8, %xmm5
vmovntdq %ymm5, (%r12)
nop
nop
nop
nop
and %r12, %r12
// Faulty Load
lea addresses_A+0x1223e, %rbx
clflush (%rbx)
nop
xor $5276, %r11
mov (%rbx), %rdi
lea oracles, %r11
and $0xff, %rdi
shlq $12, %rdi
mov (%r11,%rdi,1), %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rbx
pop %r8
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_A', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 2, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_UC', 'same': False, 'size': 8, 'congruent': 1, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_normal', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'dst': {'type': 'addresses_PSE', 'same': False, 'size': 32, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'STOR'}
[Faulty Load]
{'src': {'type': 'addresses_A', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_normal_ht', 'same': False, 'size': 4, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 2, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'}
{'src': {'type': 'addresses_normal_ht', 'same': True, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM'}
{'47': 23, '48': 2, '3b': 1, '44': 32, '00': 123, 'de': 2}
00 00 47 00 00 00 00 47 00 00 47 00 47 00 00 de 00 44 00 00 00 00 00 00 44 00 00 44 00 00 00 00 de 44 44 00 00 00 47 00 47 00 47 44 44 00 00 00 00 00 47 00 47 47 00 00 00 00 00 00 00 00 44 44 44 47 00 00 00 44 00 00 44 00 00 00 00 00 00 00 47 44 00 00 47 00 44 00 00 44 00 00 00 00 47 00 00 00 47 47 47 44 00 00 00 00 00 00 44 00 00 00 00 00 00 00 44 00 00 00 00 00 48 00 00 00 00 00 00 48 00 00 00 3b 00 00 00 00 44 44 00 47 00 00 00 00 00 00 00 00 44 47 00 00 47 44 47 47 44 00 44 44 00 44 00 00 44 00 00 44 44 00 47 00 44 44 44 00 00 00 00 00 00
*/
| 22.076023 | 548 | 0.645563 |
656895f0c17bc72a47e970955f78ad16956c530a | 119 | asm | Assembly | libmikeos/src.os/__imul.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null | libmikeos/src.os/__imul.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null | libmikeos/src.os/__imul.asm | mynameispyo/InpyoOS | b6ddb6d9715b027ab65891bd4c4f46dbe5c9890d | [
"BSD-3-Clause",
"MIT"
] | null | null | null |
section .text
use16
; (signed, unsigned) ax * bx = ax
global imul_
global imul_u
imul_:
imul_u:
imul bx
ret
| 9.153846 | 34 | 0.663866 |
ff2580d9dde2e6399eae933a0c0b15bd233ba924 | 573 | asm | Assembly | oeis/005/A005430.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/005/A005430.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/005/A005430.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A005430: Apéry numbers: n*C(2*n,n).
; 0,2,12,60,280,1260,5544,24024,102960,437580,1847560,7759752,32449872,135207800,561632400,2326762800,9617286240,39671305740,163352435400,671560012200,2756930576400,11303415363240,46290177201840,189368906734800,773942488394400,3160265160943800,12893881856650704,52567364492499024,214163336821292320,871950728486690160,3547937446945842720,14428278950913093728,58643972510162897088,238241138322536769420,967403410158179609160,3926519723583199590120,15930451449966124051344,64606830880418169763784
mov $1,$0
mul $0,2
bin $0,$1
mul $0,$1
| 71.625 | 494 | 0.870855 |
33d71ed9cb2883c2fd788954044c2ce1e1ef51df | 1,308 | asm | Assembly | samples/dice.asm | Idorobots/asm | 37ebdef318ef7fc01b8e55a50baac57f74ddbe38 | [
"MIT"
] | 2 | 2017-03-02T20:24:31.000Z | 2020-03-26T03:20:12.000Z | samples/dice.asm | Idorobots/asm | 37ebdef318ef7fc01b8e55a50baac57f74ddbe38 | [
"MIT"
] | null | null | null | samples/dice.asm | Idorobots/asm | 37ebdef318ef7fc01b8e55a50baac57f74ddbe38 | [
"MIT"
] | null | null | null | ################################################################################
# Dice example:
#
# > (roll d6)
# 5
# > (roll dHIT)
# "right leg"
# > (attack)
# You hit the Orc in the head for 6 damage!
####################
(function roll [dice] # Dice rolling function.
(if (tuple? dice)
(random dice)))
(function rollRandom []
(roll (roll dRANDOM)))
(function d [dice] # An additional dice rolling function.
(roll (range 1 (+ dice 1))))
(var d4 (range 1 5))
(var d6 (range 1 7))
(var d8 (range 1 9))
(var d10 (range 1 11))
(var d100 (range 1 101))
(var d% d100) # An alias for the d100
(var d20 (range 1 21))
(var d30 (range 1 31))
(var dHIT '("head" "upper body" "lower body"
"left arm" "right arm" "left leg"
"right leg"))
(var dRANDOM (tuple d4 d6 d8 d10 d% d20 d30))
## Roll some dice:
(roll 2) # Fnord!
(rollRandom)
(roll d4)
(* 2 (roll d20))
(d 4)
(+ (* 2 (d 4)) 3)
(function hitTheOrc [] # Ouch!
`(You hit the Orc in the $(roll dHIT) for $(+ (d 8) 4) damage!))
(function attack [] # Ouch^2!
(map (lambda (arg) (write arg \s))
(append (hitTheOrc) \n)))
| 26.16 | 86 | 0.454128 |
f159ea6efae26044bab8c24c1dc30a0895fe490e | 237 | asm | Assembly | lab2/assignment_1.asm | 0000Blaze/Microprocess | 8d2bf8f7f55e50800c2b82f4b8d3b2d113fc3330 | [
"MIT"
] | null | null | null | lab2/assignment_1.asm | 0000Blaze/Microprocess | 8d2bf8f7f55e50800c2b82f4b8d3b2d113fc3330 | [
"MIT"
] | null | null | null | lab2/assignment_1.asm | 0000Blaze/Microprocess | 8d2bf8f7f55e50800c2b82f4b8d3b2d113fc3330 | [
"MIT"
] | null | null | null | # ORG 8000
LHLD 9000
MOV B,H
MOV C,L
LHLD 9010
MOV A,H
ADC B
OUT 40
MOV H,A
MOV A,L
ADC C
OUT 41
MOV L,A
HLT
# ORG 9000
# DB 47
# ORG 9001
# DB 90
# ORG 9010
# DB 62
# ORG 9011
# DB 83
| 10.304348 | 13 | 0.49789 |
cc7e73ac2fb55eb0b671b7ac7475ff5ce46589d7 | 479 | asm | Assembly | programs/oeis/114/A114890.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/114/A114890.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/114/A114890.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A114890: First differences of A114889.
; 2,1,3,2,1,1,1,1,6,2,1,3,2,1,1,1,1,1,1,1,1,1,1,1,1,1,15,2,1,3,2,1,1,1,1,6,2,1,3,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,42,2,1,3,2,1,1,1,1,6,2,1,3,2,1,1,1,1,1,1,1,1,1,1,1
mov $3,2
mov $5,$0
lpb $3,1
mov $0,$5
sub $3,1
add $0,$3
cal $0,167878 ; A167877(n) + n.
mov $2,$3
mov $4,$0
lpb $2,1
mov $1,$4
sub $2,1
lpe
lpe
lpb $5,1
sub $1,$4
mov $5,0
lpe
div $1,2
add $1,1
| 19.958333 | 213 | 0.515658 |
5ae906d0d5a7fd3c280edd56aef1969aa1386fb5 | 190 | asm | Assembly | libsrc/target/z1013/graphics/respixl.asm | dikdom/z88dk | 40c55771062b0ea9bb2f0d5b73e2f754fc12b6b0 | [
"ClArtistic"
] | 1 | 2022-03-08T11:55:58.000Z | 2022-03-08T11:55:58.000Z | libsrc/target/z1013/graphics/respixl.asm | dikdom/z88dk | 40c55771062b0ea9bb2f0d5b73e2f754fc12b6b0 | [
"ClArtistic"
] | 2 | 2022-03-20T22:17:35.000Z | 2022-03-24T16:10:00.000Z | libsrc/target/z1013/graphics/respixl.asm | jorgegv/z88dk | 127130cf11f9ff268ba53e308138b12d2b9be90a | [
"ClArtistic"
] | null | null | null |
SECTION code_clib
PUBLIC respixel
EXTERN res_MODE0
EXTERN res_MODE1
EXTERN __z1013_mode
respixel:
ld a,(__z1013_mode)
cp 1
jp z,res_MODE1
and a
ret nz
jp res_MODE0
| 11.176471 | 21 | 0.715789 |
c52c27a7c6561902cb1c48720b2eaeda55a02fcb | 1,897 | asm | Assembly | programs/oeis/291/A291582.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | 1 | 2021-03-15T11:38:20.000Z | 2021-03-15T11:38:20.000Z | programs/oeis/291/A291582.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | programs/oeis/291/A291582.asm | karttu/loda | 9c3b0fc57b810302220c044a9d17db733c76a598 | [
"Apache-2.0"
] | null | null | null | ; A291582: Maximum number of 6 sphinx tile shapes in a sphinx tiled hexagon of order n.
; 30,132,306,552,870,1260,1722,2256,2862,3540,4290,5112,6006,6972,8010,9120,10302,11556,12882,14280,15750,17292,18906,20592,22350,24180,26082,28056,30102,32220,34410,36672,39006,41412,43890,46440,49062,51756,54522,57360,60270,63252,66306,69432,72630,75900,79242,82656,86142,89700,93330,97032,100806,104652,108570,112560,116622,120756,124962,129240,133590,138012,142506,147072,151710,156420,161202,166056,170982,175980,181050,186192,191406,196692,202050,207480,212982,218556,224202,229920,235710,241572,247506,253512,259590,265740,271962,278256,284622,291060,297570,304152,310806,317532,324330,331200,338142,345156,352242,359400,366630,373932,381306,388752,396270,403860,411522,419256,427062,434940,442890,450912,459006,467172,475410,483720,492102,500556,509082,517680,526350,535092,543906,552792,561750,570780,579882,589056,598302,607620,617010,626472,636006,645612,655290,665040,674862,684756,694722,704760,714870,725052,735306,745632,756030,766500,777042,787656,798342,809100,819930,830832,841806,852852,863970,875160,886422,897756,909162,920640,932190,943812,955506,967272,979110,991020,1003002,1015056,1027182,1039380,1051650,1063992,1076406,1088892,1101450,1114080,1126782,1139556,1152402,1165320,1178310,1191372,1204506,1217712,1230990,1244340,1257762,1271256,1284822,1298460,1312170,1325952,1339806,1353732,1367730,1381800,1395942,1410156,1424442,1438800,1453230,1467732,1482306,1496952,1511670,1526460,1541322,1556256,1571262,1586340,1601490,1616712,1632006,1647372,1662810,1678320,1693902,1709556,1725282,1741080,1756950,1772892,1788906,1804992,1821150,1837380,1853682,1870056,1886502,1903020,1919610,1936272,1953006,1969812,1986690,2003640,2020662,2037756,2054922,2072160,2089470,2106852,2124306,2141832,2159430,2177100,2194842,2212656,2230542,2248500
add $0,1
mul $0,6
bin $0,2
mul $0,2
mov $1,$0
| 210.777778 | 1,761 | 0.845018 |
51365de2f5b9ab935b19d9ad91a1a532db20624b | 145 | asm | Assembly | libsrc/_DEVELOPMENT/adt/p_list/c/sccz80/p_list_back.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/p_list/c/sccz80/p_list_back.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null | libsrc/_DEVELOPMENT/adt/p_list/c/sccz80/p_list_back.asm | meesokim/z88dk | 5763c7778f19a71d936b3200374059d267066bb2 | [
"ClArtistic"
] | null | null | null |
; void *p_list_back(p_list_t *list)
SECTION code_adt_p_list
PUBLIC p_list_back
p_list_back:
INCLUDE "adt/p_list/z80/asm_p_list_back.asm"
| 13.181818 | 47 | 0.786207 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.