Open kamil-adam opened 1 year ago
But HaPyLi should look more like Scheme.
Try using scripting style. Like Schema scripts. I know, It is assembler, but try. The function has number of parameters. But also has size of result.
Types:
0
'a
[0 1 2]
"string"
Syntax:
[a b c d]
(begin first-line second-line)
{first-line second-line}
(asm first-line second-line)
<first-line second-line>
We need standard Schema expression:
We need special expression:
asm
(asm 2 1 body)
defines [a b] = (div-mod 16 3)
define x
defines [x]
Functions:
define a = (alloc 4)
(define alloc (lambda [n] (asm (ld 0) (cp 1) (cp 3) (add) (st 0) ))) (define + (lambda [] asm (add)))
But HaPyLi should look more like Scheme.
Try using scripting style. Like Schema scripts. I know, It is assembler, but try. The function has number of parameters. But also has size of result.
Types:
0
or'a
[0 1 2]
or"string"
Syntax:
[a b c d]
(begin first-line second-line)
{first-line second-line}
?(asm first-line second-line)
<first-line second-line>
?We need standard Schema expression:
We need special expression:
asm
has type, how many cells returns, and how many cells gets(asm 2 1 body)
gets 2 cells and returns onedefines [a b] = (div-mod 16 3)
. Sodefine x
is shortcut fordefines [x]
Functions:
define a = (alloc 4)
Examples