go-first

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 851e14e221f26bfe3d4b2f3ffc4d2f412b7fc534
parent f01086fd069a2d02dc651a539c8c384ee99e5839
Author: Pavel Renev <an2qzavok@gmail.com>
Date:   Mon,  4 Oct 2021 13:20:21 +0300

start copying the THIRD code

Diffstat:
Athird.go | 74++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+), 0 deletions(-)

diff --git a/third.go b/third.go @@ -0,0 +1,74 @@ +package main + +const third string = ` +: r 1 exit + +: ] + r @ + 1 - + r ! + _read + ] + +: main immediate ] + +main + +: '"' 32 exit +: ')' 41 exit +: '\n' 10 exit +: 'space' 32 exit +: '0' 48 exit +: '-' 45 exit + +: cr '\n' echo exit + +: _x 3 @ exit +: _x! 3 ! exit +: _y 4 @ exit +: _y! 4 ! exit + +: swap _x! _y! _x _y exit + +: + + 0 swap - + - + exit + +: dup _x! _x _x exit + +: h 0 exit + +: inc + dup @ + 1 + + swap + ! exit + +: , + h @ + ! + h inc + exit + +: ' + r @ + @ + dup + 1 + + r @ ! + @ + exit + +: ; immediate + ' exit + , + exit + +: drop 0 * + ; + +: dec dup @ 1 - swap ! ; + + +` +