1argasm

From Esolang
Jump to: navigation, search

Overview

here's an asm, command-colon-argument.

commands take only 1 argument.

"this" is the result of the last command.

"about" puts something in "this".

verbose ini file style version

 [fib]
 about: argument
 if less than: 3
 return: 1
 about: argument
 decrement: 1
 fib: this
 store as: z
 about: argument
 decrement: 2
 fib: this
 increment: z
 return: this


1 character names for common commands version

 [fib]
 ? @
 < 3
 ^ 1
 ? @
 - 1
 fib #
 $ z
 ? @
 - 2
 fib #
 + z
 ^ #

loose the brackets and newlines so it looks like hell version

 fib: ? @ < 3 ^ 1 ? @ - 1 fib # $ z ? @ - 2 fib # + z ^ #

main vocabulary

 f:    [f] - define function f
 f     call a previously defined function f
 ?     about - assigns value to "this"
 $     store - assigns value to variable name
 ^     return - ends function and returns value
 @     argument - returns the function argument
 #     this - returns the value in "this"
 <     less than - skip next command unless this < value
 >     greater than - skip next command unless this > value
 =     equals - skip next command unless this = value

Beyond that, you'd create the vocabulary that suits your needs. Boring, isn't it?