added more files in between, expanded code significantly

This commit is contained in:
Bob Polis 2020-09-28 14:11:51 +02:00
parent 6ea02554cf
commit 6626600c6a
5 changed files with 342 additions and 2 deletions

41
code/4812-9-6727.txt Normal file
View File

@ -0,0 +1,41 @@
>main
gto
:slicer
=step
=to
=from
=str
$from
=i
\
=result
:loop
$result
$str
$i
idx
cat
=result
$i
$step
add
=i
$i
$str
len
>loop
glt
$result
ret
:main
\Avans Hogeschool
=text
$text
0
$text
len
2
>slicer
fun
\.txt
cat

95
code/AasHgsho.txt Normal file
View File

@ -0,0 +1,95 @@
>main
gto
:find
=i
=term
=text
:loop
$text
$i
$i
$term
len
add
slc
=part
$i
$i
inc
=i
$i
$text
len
$term
len
sub
>not-found
ggt
$part
$term
>loop
gne
ret
:not-found
neg
ret
:replace-all
=replacement
=quest
=target
\
=result
0
=from
:replace-loop
$target
$quest
$from
>find
fun
=pos
$pos
0
>replace-done
glt
$result
$target
$from
$pos
slc
$replacement
cat
cat
=result
$pos
$quest
len
add
=from
>replace-loop
gto
:replace-done
$result
$target
$from
$target
len
slc
cat
ret
:main
\Bananen hangen in warme landen aan de bananenboom.
\an
\os
>replace-all
fun
=zin
$zin
dup
7
idx
\-
>replace-all
fun
\txt
cat

View File

@ -0,0 +1,90 @@
\ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
=printable-ascii
>main
gto
:shifter
=to-be-shifted
\
=shifted
0
=j
:shifter-loop
$shifted
$to-be-shifted
$j
idx
>asc
fun
inc
>chr
fun
cat
=shifted
$j
inc
=j
$j
$to-be-shifted
len
>shifter-loop
glt
$shifted
ret
:asc
=ch
$printable-ascii
$ch
0
>find
fun
32
add
ret
:chr
=code
$printable-ascii
$code
32
sub
idx
ret
:find
=i
=term
=text
$i
:loop
=_
$text
$i
dup
$term
len
add
slc
=part
$i
dup
inc
=i
$i
$text
len
$term
len
sub
>not-found
ggt
$part
$term
>loop
gne
ret
:not-found
neg
ret
:main
\sws-`miha,qd,mihy,dv
>shifter
fun
rev

View File

@ -1,4 +1,67 @@
\avans-minor-swa-cpp1
rot
>main
gto
:gcd
=v
=u
$u
$v
>gcd-loop
gge
$u
=t
$v
=u
$t
=v
:gcd-loop
$v
0
>gcd-ret
gle
$v
=t
$u
$v
mod
=v
$t
=u
>gcd-loop
gto
:gcd-ret
$u
ret
:lcm
=b
=a
$a
$a
$b
>gcd
fun
div
$b
mul
ret
:main
214
68
>lcm
fun
\-
cat
765
27
>gcd
fun
cat
\-
cat
56
78
>lcm
fun
cat
rev
\.txt
cat

51
code/we-zijn-er-bijna.txt Normal file
View File

@ -0,0 +1,51 @@
\abcdefghijklmnopqrstuvwxyz
=alfabet
$alfabet
0
idx
$alfabet
21
idx
$alfabet
67
dup
sub
idx
$alfabet
5
8
add
idx
$alfabet
9
2
mul
idx
\-
cat
cat
cat
cat
cat
\ronim
rev
\-
cat
cat
\verswaren
3
6
slc
cat
\ppc-
rev
55
2
neg
mod
abs
cat
cat
rot
\.txt
cat