Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
6099e49
[Sync Iteration] arm64-assembly/hello-world/1
exercism-solutions-syncer[bot] Apr 23, 2026
ba3dfba
[Sync Iteration] arm64-assembly/leap/1
exercism-solutions-syncer[bot] Apr 23, 2026
68fc973
[Sync Iteration] arm64-assembly/collatz-conjecture/1
exercism-solutions-syncer[bot] Apr 23, 2026
8c31e7f
[Sync Iteration] arm64-assembly/eliuds-eggs/1
exercism-solutions-syncer[bot] Apr 23, 2026
1d44d69
[Sync Iteration] arm64-assembly/square-root/1
exercism-solutions-syncer[bot] Apr 23, 2026
d16c0c4
[Sync Iteration] arm64-assembly/difference-of-squares/1
exercism-solutions-syncer[bot] Apr 23, 2026
9a6e38d
[Sync Iteration] arm64-assembly/grains/1
exercism-solutions-syncer[bot] Apr 23, 2026
a7e1a7d
[Sync Iteration] arm64-assembly/pangram/1
exercism-solutions-syncer[bot] Apr 23, 2026
c6b5f3b
[Sync Iteration] arm64-assembly/isogram/1
exercism-solutions-syncer[bot] Apr 23, 2026
ebd90aa
[Sync Iteration] arm64-assembly/isbn-verifier/1
exercism-solutions-syncer[bot] Apr 23, 2026
3ffe8c2
[Sync Iteration] arm64-assembly/bob/1
exercism-solutions-syncer[bot] Apr 23, 2026
dd28e8f
[Sync Iteration] arm64-assembly/all-your-base/1
exercism-solutions-syncer[bot] Apr 23, 2026
9c03c12
[Sync Iteration] arm64-assembly/hamming/1
exercism-solutions-syncer[bot] Apr 23, 2026
8f10575
[Sync Iteration] arm64-assembly/atbash-cipher/1
exercism-solutions-syncer[bot] Apr 23, 2026
2d75485
[Sync Iteration] arm64-assembly/rotational-cipher/1
exercism-solutions-syncer[bot] Apr 23, 2026
fc3293d
[Sync Iteration] arm64-assembly/two-fer/1
exercism-solutions-syncer[bot] Apr 23, 2026
1ec0335
[Sync Iteration] arm64-assembly/rna-transcription/1
exercism-solutions-syncer[bot] Apr 23, 2026
f3fc459
[Sync Iteration] arm64-assembly/matching-brackets/1
exercism-solutions-syncer[bot] Apr 23, 2026
1d65c1b
[Sync Iteration] arm64-assembly/reverse-string/1
exercism-solutions-syncer[bot] Apr 23, 2026
d4ab046
[Sync Iteration] arm64-assembly/micro-blog/1
exercism-solutions-syncer[bot] Apr 23, 2026
2dba848
[Sync Iteration] arm64-assembly/phone-number/1
exercism-solutions-syncer[bot] Apr 23, 2026
964f699
[Sync Iteration] arm64-assembly/prime-factors/1
exercism-solutions-syncer[bot] Apr 23, 2026
f4aced7
[Sync Iteration] arm64-assembly/luhn/1
exercism-solutions-syncer[bot] Apr 23, 2026
c9c239e
[Sync Iteration] arm64-assembly/binary-search/1
exercism-solutions-syncer[bot] Apr 23, 2026
4854488
[Sync Iteration] arm64-assembly/raindrops/1
exercism-solutions-syncer[bot] Apr 23, 2026
2c472d3
[Sync Iteration] arm64-assembly/scrabble-score/1
exercism-solutions-syncer[bot] Apr 23, 2026
f8fcdde
[Sync Iteration] arm64-assembly/pascals-triangle/1
exercism-solutions-syncer[bot] Apr 23, 2026
526ecb0
[Sync Iteration] arm64-assembly/triangle/1
exercism-solutions-syncer[bot] Apr 23, 2026
122f5a0
[Sync Iteration] arm64-assembly/nucleotide-count/1
exercism-solutions-syncer[bot] Apr 23, 2026
80521dc
[Sync Iteration] arm64-assembly/diamond/1
exercism-solutions-syncer[bot] Apr 23, 2026
72f544f
[Sync Iteration] arm64-assembly/queen-attack/1
exercism-solutions-syncer[bot] Apr 23, 2026
e747fcd
[Sync Iteration] arm64-assembly/rectangles/1
exercism-solutions-syncer[bot] Apr 23, 2026
419dc42
[Sync Iteration] arm64-assembly/sum-of-multiples/1
exercism-solutions-syncer[bot] Apr 23, 2026
1dd784c
[Sync Iteration] arm64-assembly/armstrong-numbers/1
exercism-solutions-syncer[bot] Apr 23, 2026
7371bab
[Sync Iteration] arm64-assembly/pythagorean-triplet/1
exercism-solutions-syncer[bot] Apr 23, 2026
aa0e342
[Sync Iteration] arm64-assembly/knapsack/1
exercism-solutions-syncer[bot] Apr 23, 2026
3c227f9
[Sync Iteration] arm64-assembly/roman-numerals/1
exercism-solutions-syncer[bot] Apr 23, 2026
a948dc8
[Sync Iteration] arm64-assembly/sieve/1
exercism-solutions-syncer[bot] Apr 23, 2026
5267d09
[Sync Iteration] arm64-assembly/nth-prime/1
exercism-solutions-syncer[bot] Apr 23, 2026
87c5d2f
[Sync Iteration] arm64-assembly/proverb/1
exercism-solutions-syncer[bot] Apr 23, 2026
24ee918
[Sync Iteration] arm64-assembly/resistor-color/1
exercism-solutions-syncer[bot] Apr 23, 2026
46c51e4
[Sync Iteration] arm64-assembly/resistor-color-duo/1
exercism-solutions-syncer[bot] Apr 23, 2026
261e6f2
[Sync Iteration] arm64-assembly/perfect-numbers/1
exercism-solutions-syncer[bot] Apr 23, 2026
7824414
[Sync Iteration] arm64-assembly/acronym/1
exercism-solutions-syncer[bot] Apr 23, 2026
2ab40b4
[Sync Iteration] arm64-assembly/variable-length-quantity/1
exercism-solutions-syncer[bot] Apr 23, 2026
533c97f
[Sync Iteration] arm64-assembly/house/1
exercism-solutions-syncer[bot] Apr 23, 2026
158a913
[Sync Iteration] arm64-assembly/pig-latin/1
exercism-solutions-syncer[bot] Apr 23, 2026
6de0bce
[Sync Iteration] arm64-assembly/twelve-days/1
exercism-solutions-syncer[bot] Apr 23, 2026
feb7473
[Sync Iteration] arm64-assembly/kindergarten-garden/1
exercism-solutions-syncer[bot] Apr 23, 2026
f1539ad
[Sync Iteration] arm64-assembly/secret-handshake/1
exercism-solutions-syncer[bot] Apr 23, 2026
8ae1a5b
[Sync Iteration] arm64-assembly/largest-series-product/1
exercism-solutions-syncer[bot] Apr 23, 2026
8277fa0
[Sync Iteration] arm64-assembly/state-of-tic-tac-toe/1
exercism-solutions-syncer[bot] Apr 23, 2026
5886c77
[Sync Iteration] arm64-assembly/affine-cipher/1
exercism-solutions-syncer[bot] Apr 23, 2026
59c919b
[Sync Iteration] arm64-assembly/resistor-color-trio/1
exercism-solutions-syncer[bot] Apr 23, 2026
28783e1
[Sync Iteration] arm64-assembly/run-length-encoding/1
exercism-solutions-syncer[bot] Apr 23, 2026
7d70c0e
[Sync Iteration] arm64-assembly/meetup/1
exercism-solutions-syncer[bot] Apr 23, 2026
3bda4a6
[Sync Iteration] arm64-assembly/food-chain/1
exercism-solutions-syncer[bot] Apr 23, 2026
46f9708
[Sync Iteration] arm64-assembly/bottle-song/1
exercism-solutions-syncer[bot] Apr 23, 2026
2199bb3
[Sync Iteration] arm64-assembly/book-store/1
exercism-solutions-syncer[bot] Apr 23, 2026
d9d068a
[Sync Iteration] arm64-assembly/dominoes/1
exercism-solutions-syncer[bot] Apr 23, 2026
7da34ec
[Sync Iteration] arm64-assembly/darts/1
exercism-solutions-syncer[bot] Apr 23, 2026
ce3f7ac
[Sync Iteration] arm64-assembly/space-age/1
exercism-solutions-syncer[bot] Apr 23, 2026
3330251
[Sync Iteration] arm64-assembly/sublist/1
exercism-solutions-syncer[bot] Apr 23, 2026
238cf9e
[Sync Iteration] arm64-assembly/allergies/1
exercism-solutions-syncer[bot] Apr 23, 2026
d234c10
[Sync Iteration] arm64-assembly/crypto-square/1
exercism-solutions-syncer[bot] Apr 23, 2026
a682322
[Sync Iteration] arm64-assembly/yacht/1
exercism-solutions-syncer[bot] Apr 23, 2026
673b8ad
[Sync Iteration] arm64-assembly/protein-translation/1
exercism-solutions-syncer[bot] Apr 23, 2026
b93624f
[Sync Iteration] arm64-assembly/anagram/1
exercism-solutions-syncer[bot] Apr 23, 2026
5e1ffb6
[Sync Iteration] arm64-assembly/list-ops/1
exercism-solutions-syncer[bot] Apr 23, 2026
f954d64
[Sync Iteration] arm64-assembly/say/1
exercism-solutions-syncer[bot] Apr 23, 2026
0ae55ce
[Sync Iteration] arm64-assembly/game-of-life/1
exercism-solutions-syncer[bot] Apr 23, 2026
a607911
[Sync Iteration] arm64-assembly/wordy/1
exercism-solutions-syncer[bot] Apr 23, 2026
25247c3
[Sync Iteration] arm64-assembly/spiral-matrix/1
exercism-solutions-syncer[bot] Apr 23, 2026
54e8fd7
[Sync Iteration] arm64-assembly/intergalactic-transmission/1
exercism-solutions-syncer[bot] Apr 23, 2026
9074a2c
[Sync Iteration] arm64-assembly/rail-fence-cipher/1
exercism-solutions-syncer[bot] Apr 23, 2026
7177b37
[Sync Iteration] arm64-assembly/flower-field/1
exercism-solutions-syncer[bot] Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions solutions/arm64-assembly/acronym/1/acronym.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For Shree DR.MDD

.text
.globl abbreviate

abbreviate:
ldrb w5, [x1], #1 /* load byte, post-increment */
cbz w5, .done_abbrev

and w6, w5, #-33 /* force upper case */
sub w7, w6, #'A'
cmp w7, #26
bhs abbreviate /* jump if word has not yet started */

strb w6, [x0], #1 /* store byte, post-increment */

.scan_word:
ldrb w5, [x1], #1 /* load next byte */
cbz w5, .done_abbrev

cmp w5, #'\'' /* check for apostrophe */
beq .scan_word

and w6, w5, #-33 /* force upper case */
sub w7, w6, #'A'
cmp w7, #26
blo .scan_word /* keep scanning if letter */

b abbreviate /* move to next word */

.done_abbrev:
strb wzr, [x0] /* null-terminate output */
ret
68 changes: 68 additions & 0 deletions solutions/arm64-assembly/affine-cipher/1/affine_cipher.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Dedicated to Shree DR.MDD

.data
inverses: .byte 0, 1, 0, 9, 0, 21, 0, 15, 0, 3, 0, 19, 0, 0, 0, 7, 0, 23, 0, 11, 0, 5, 0, 17, 0, 25

.text
.globl encode
.globl decode

encode:
adrp x14, inverses
add x14, x14, :lo12:inverses
ldrb w11, [x14, x2]
cbz w11, finish

mov w11, w2
mov w12, w3
mov x2, #5
b cipher_loop

decode:
adrp x14, inverses
add x14, x14, :lo12:inverses
ldrb w11, [x14, x2]
cbz w11, finish

sub w12, w3, #4082
mneg w12, w12, w11
mov x2, #-1
b cipher_loop

finish:
strb wzr, [x0]
ret

cipher_loop:
mov x13, x2
mov w8, #' '
mov w9, #26

input_read:
ldrb w5, [x1], #1
cbz w5, finish

sub w10, w5, #'0'
cmp w10, #10
blo .process_char

orr w10, w5, #32
sub w10, w10, #'a'
cmp w10, w9
bhs input_read

madd w10, w11, w10, w12
udiv w15, w10, w9
msub w5, w15, w9, w10
add w5, w5, #'a'

.process_char:
cbnz x13, .store_char

strb w8, [x0], #1
mov x13, x2

.store_char:
strb w5, [x0], #1
sub x13, x13, 1
b input_read
60 changes: 60 additions & 0 deletions solutions/arm64-assembly/all-your-base/1/all_your_base.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.equ BAD_BASE, -1
.equ BAD_DIGIT, -2

.text
.globl rebase

rebase:
cmp w0,#1
b.le badbase
cmp w3,#1
b.le badbase
eor x6,x6,x6
inbaseloop:
cbz x2,outbase
ldr w5,[x1],#4
cmp w5,#0
b.lt baddigit
cmp w5,w0
b.ge baddigit
madd w6,w6,w0,w5
sub x2,x2,#1
b.al inbaseloop
outbase:
mov x5,#0
eor x9,x9,x9
outbaseloop:
add x5,x5,#1
udiv x7,x6,x3
msub x8,x7,x3,x6
str w8,[x4,x9]
cbz x7,reverse
mov x6,x7
add x9,x9,#4
b.al outbaseloop
reverse:
lsl x9,x5,#2
sub x9,x9,#4
eor x6,x6,x6
mov x10,x5
lsr x5,x5,#1
cbz x5,endofproc
reverseloop:
ldr w7,[x4,x6]
ldr w8,[x4,x9]
str w7,[x4,x9]
str w8,[x4,x6]
add x6,x6,#4
sub x9,x9,#4
sub x5,x5,#1
cbnz x5,reverseloop
endofproc:
mov x0,x10
ret
badbase:
mov x0,BAD_BASE
ret
baddigit:
mov x0,BAD_DIGIT
ret

39 changes: 39 additions & 0 deletions solutions/arm64-assembly/allergies/1/allergies.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.text
.equ MAX_ITEMS, 8

.globl allergic_to
.globl list

allergic_to:
mov x2, #1
lsl x2, x2, x0
and x0, x2, x1
ret

list:
mov x3, xzr
and x0, x0, #0xFF
cbz x0, .return

mov x2, xzr
mov x4, #1

.next:
cmp x2, #MAX_ITEMS
beq .return
lsl x5, x4, x2
and x6, x0, x5
cbnz x6, .add
add x2, x2, #1
b .next

.add:
add x3, x3, #1
lsl x6, x3, #2
str w2, [x1, x6]
add x2, x2, #1
b .next

.return:
str w3, [x1]
ret
86 changes: 86 additions & 0 deletions solutions/arm64-assembly/anagram/1/anagram.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
.text
.globl find_anagrams

find_anagrams:
eor x5,x5,x5
mainloop1:
ldrb w4,[x3,x5]
cbz w4,addcandidatemaybe
cmp w4,'A'
b.lt lower1
cmp w4,'Z'
b.gt lower1
add w4,w4,32
lower1:
eor x8,x8,x8
eor x9,x9,x9
mov x6,x3
innerloop2:
ldrb w7,[x6],#1
cbz w7,endofinner2
cmp w7,'A'
b.lt lower2
cmp w7,'Z'
b.gt lower2
add w7,w7,32
lower2:
cmp w4,w7
b.ne notequal2
add x8,x8,#1
notequal2:
add x9,x9,#1
b.al innerloop2
endofinner2:
ldr x6,[x1]
innerloop3:
ldrb w7,[x6],#1
cbz w7,endofinner3
cmp w7,'A'
b.lt lower3
cmp w7,'Z'
b.gt lower3
add w7,w7,32
lower3:
cmp w4,w7
b.ne notequal3
sub x8,x8,#1
notequal3:
sub x9,x9,#1
b.al innerloop3
endofinner3:
eor x4,x4,x4
cbnz x8, donotadd
cbnz x9, donotadd
add x5,x5,#1
b.al mainloop1
addcandidatemaybe:
eor x5,x5,x5
ldr x6,[x1]
cmploop:
ldrb w4, [x3, x5]
cbz w4,donotadd
ldrb w7, [x6, x5]
cmp w4,'A'
b.lt lower4
cmp w4,'Z'
b.gt lower4
add w4,w4,32
lower4:
cmp w7,'A'
b.lt lower5
cmp w7,'Z'
b.gt lower5
add w7,w7,32
lower5:
add x5,x5,#1
cmp w4,w7
b.eq cmploop
addcandidate:
mov x4,#1
donotadd:
eor x5,x5,x5
str w4,[x0],#4
add x1,x1,#8
sub x2,x2,#1
cbnz x2,mainloop1
ret
40 changes: 40 additions & 0 deletions solutions/arm64-assembly/armstrong-numbers/1/armstrong_numbers.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Dedicated to Shree DR.MDD

.text
.globl is_armstrong_number

is_armstrong_number:
mov x1, #10
mov x8, x0 /* number */
mov x11, xzr /* digit count */
mov x12, xzr /* sum of digit powers */

.count_digits_loop:
add x11, x11, #1
udiv x0, x0, x1
cbnz x0, .count_digits_loop

mov x0, x8

.extract_loop:
udiv x2, x0, x1
msub x3, x2, x1, x0
mov x0, x2
mov x13, #1
mov x14, x11

.power_loop:
mul x7, x13, x3
tst x14, #1
csel x13, x7, x13, ne

mul x3, x3, x3
lsr x14, x14, #1
cbnz x14, .power_loop

add x12, x12, x13
cbnz x2, .extract_loop

cmp x12, x8
cset x0, eq
ret
51 changes: 51 additions & 0 deletions solutions/arm64-assembly/atbash-cipher/1/atbash_cipher.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Dedicated to Shree DR.MDD

.text
.globl encode
.globl decode

encode:
mov x9, #5
b core_process
ret

decode:
mov x9, #-1
b core_process

core_process:
mov x10, x9
mov w14, #' '
mov w15, #'z'

read_loop:
ldrb w12, [x1], #1
cbz w12, end_loop

sub w13, w12, #'0'
cmp w13, #10
blo accept_char

orr w13, w12, #32
sub w13, w13, #'a'
cmp w13, #26
bhs read_loop

sub w13, w15, w13
and w12, w12, #32
orr w12, w12, w13

accept_char:
cbnz x10, write_char

strb w14, [x0], #1
mov x10, x9

write_char:
strb w12, [x0], #1
sub x10, x10, 1
b read_loop

end_loop:
strb w12, [x0]
ret
Loading