Skip to content

Commit

Permalink
feat : new champ
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-labadie committed May 17, 2024
1 parent ad8953c commit 9d897f5
Show file tree
Hide file tree
Showing 5 changed files with 381 additions and 0 deletions.
247 changes: 247 additions & 0 deletions bonus/42.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
.name "42"
.comment "Just a basic Winner Program"

entree: live %42
fork %:tir
ld %0,r5
zjmp %:bite

tir: sti r1,%:tirb,%1
ld %2304,r10
ld %1,r5
ld %0,r11

ld %4,r3
tirf: live %42
fork %:tirop
live %742
sub r3,r5,r3
zjmp %:top
ld %0,r11
fork %:tirvd
live %42
sti r10,%-510,%0
sti r10,%-404,%0
sti r10,%-303,%0
sti r10,%-202,%0
ld %0,r11
zjmp %:tirf

tirop: ld %368,r2
ld %0,r3
ld %4,r4

tirb: live %1
sti r10,%-510,r2
sti r10,%-510,r3
add r4,r5,r4
add r3,r4,r3
sub r2,r4,r2
zjmp %:tirop
ld %0,r11
zjmp %:tirb
zjmp %:infi

p32deb: zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0

zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0

p32: sub r6,r4,r6
add r6,r6,r11
ldi %:p32deb,r6,r7
sti r7,%-510,r11
p32li: live %1
ld %0,r10
sti r7,%-250,r6
zjmp %-192

tirvd: zjmp %:tirvd2

bite: sti r1,%:copie,%2
ldi %:copie,%3,r2
sti r2,%:entree,%-4
ldi %:copie,%-1,r2
sti r2,%:entree,%-8

sti r1,%:p32li,%1
sti r1,%:b0,%1

ld %0,r2
ld %8,r3
ld %1,r4
ld %0,r6

b0: live %1
sub r3,r4,r3
zjmp %:tart
fork %:b1
st r5,r2
xor r10,r10,r10
add r10,r10,r10
add r6,r6,r6
ld %0,r10
zjmp %:b0
b1: add r2,r4,r2
add r6,r6,r6
add r6,r4,r6
ld %0,r10
zjmp %:b0


top: live %42
ld %9,r3
sti r3,%:p32deb,%-6
ld %2,r3
sti r3,%:p32deb,%-16
ld %0,r3
zjmp %:topd


infi: sti r1,%:l0,%1
sti r1,%:l1,%1
sti r1,%:l2,%1
sti r1,%:l3,%1
sti r1,%:l4,%1
sti r1,%:l5,%1
sti r1,%:l6,%1
sti r1,%:l7,%1
sti r1,%:l8,%1
sti r1,%:l9,%1
sti r1,%:l10,%1

l0: live %1
l1: live %1
l2: live %1
l3: live %1
l4: live %1
l5: live %1
l6: live %1
l7: live %1
l8: live %1
l9: live %1
l10: live %1
zjmp %:l0


p1: zjmp %:infi

live %0
copie: ld %1,r1


tart: sti r1,%:p64li,%1
or r2,r2,r2
zjmp %:p64
sub r2,r4,r2
zjmp %:p32
# sub r2,r4,r2
# zjmp %:infi
# sub r2,r4,r2
# zjmp %:infi
# sub r2,r4,r2
# zjmp %:infi
# sub r2,r4,r2
# zjmp %:infi
ld %0,r2
zjmp %:infi


tirvd2: zjmp %:tirdow

topd: ld %9,r3
sti r3,%:fin,%-6
ld %2,r3
sti r3,%:fin,%-16
ld %0,r3
zjmp %:infi

p64deb: zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0

zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0

zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0

zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0
zjmp %0

p64: ld %10,r8
sub r6,r8,r6
zjmp %:cont
ld %118,r8
add r6,r8,r6
cont: add r6,r6,r6
ld %272,r8
ld %29,r9
sti r7,r8,r6
sti r7,r9,r6
p64li: live %1
ld %0,r10
zjmp %186

tirdow: ld %425,r2
ld %0,r3
ld %4,r4

tird: live %42
sti r10,%:fin,r2
sti r10,%:fin,r3
add r4,r5,r4
add r3,r4,r3
sub r2,r4,r2
zjmp %:tirdow
ld %0,r11
zjmp %:tird
zjmp %:p1

fin: live %633
10 changes: 10 additions & 0 deletions bonus/bunker.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.name "Bunker"
.comment "STOP"

tank: live %666
ld 9 r4
ld 900 r5
sti r4 r5 %0
sub r5 r10 r5
ld %0 r12
zjmp %:tank
11 changes: 11 additions & 0 deletions bonus/farmer.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.name "Farmer"
.comment "Is my life !"

life: live %0
live %0
live %0
live %0
live %0
live %0
ld %0 r12
zjmp %:life
67 changes: 67 additions & 0 deletions bonus/killer.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.name "ArAg0rn"
.comment "La mort viens d'en haut"

sti r1, %:live, %1
sti r1 %:survie %1
fork %:live
begin: ld %76, r1
ld %29910 r2
ld %21910 r3
ld %139213 r4
ld %72893 r5
ld %92293 r6
ld %123922 r7
ld %89123, r8
ld %123, r9
ld %92, r10
ld %1233, r11
ld %7261, r14
ld %981, r15
ld %257, r16
ld %0, r13
sub r4, r13, r11
live %1
fork %:live
live %1
fork %:topille1
zjmp %:topille2
live: live %666
ld %0, r1
zjmp %:live
survie:
live %666
st r8, 100
add r7 r9 r9
sti r9 r9 r4
add r6, r7, r7
sti r7, r7, r1
add r2 r9 r2
sti r2 r2 r8
ld %15, r4
sub r4, r13, r11
ld %0, r13
zjmp %:survie

topille1:
live %1
fork %:survie
live %1
fork %511
live %1
lfork %1500
live %1
lfork %2000
live %1
ld %0, r16
zjmp %2200

topille2:
live %1
lfork %2750
live %1
lfork %3500
live %1
lfork %4250
live %1
ld %0, r16
zjmp %5000
46 changes: 46 additions & 0 deletions bonus/scan.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.name "Scanneur"
.comment "Si je te trouve tu es mort"

st r1, :l1
st r1, :l2
st r1, :l3
st r1, :l4
st r1, :golive
st r1, :live
xor r2,r2,r2
fork %:f1
ld %-15, r3
ld %1, r4
loop: add r3, r4, r3
zjmp %:golive
xor r5, r5, r5
zjmp %:loop
golive: live %1
ld %-25, r3
ld %1, r4
lock: add r3, r4, r3
zjmp %:nolock
xor r5, r5, r5
zjmp %:lock
nolock:
xor r1, r1, r1
add r1, r1, r1
live: live %1


f1: fork %:f2
f2: fork %:f3
f3: fork %:f4
f4: fork %:f5
f5: fork %:f6
f6: fork %:f7
f7: fork %:f8
f8: fork %:f9
f9: fork %:f10
f10:

l1: live %1
l2: live %1
l3: live %1
l4: live %1
zjmp %:l1

0 comments on commit 9d897f5

Please sign in to comment.