MASL

From Esolang
Jump to navigation Jump to search
This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by adding some more information.

Matto's Assembly-Styled Language[1] is an interpreted esoteric programming language that looks like assembly but really isn't assembly. It was made by Matto. The first version (v1.0.0-beta1) was released on August 5th 2022 and the latest version (v1.0.0-beta6.1) was released on September 1st 2022. The language is still in beta development. There have been a total of 8 releases and pre-releases.

Changelog[2]

This is a stripped down version of the changelog available here.

v1.0.0-beta1

  • Initial release.

v1.0.0-beta2

  • Fixed commands jmp and jmr
  • Added command cnl

v1.0.0-beta3

  • Fixed jmp and jmr commands
  • New argument: -sc / --show-current

v1.0.0-beta4

  • New commands: rng, flr, frl, flw
  • New argument: -ri / --remove-intro
  • New feature: intro!

v1.0.0-beta4.1

  • Fixed jmp, jmr

v1.0.0-beta5

  • Commands cnt and cnl have been updated to have customizable colors!
  • Errors are now red!
  • Lines displayed with -vl / --view-lines are now gray!
  • The intro is colorful!
  • New arguments: -mc / --monochrome, -h / --help!

v1.0.0-beta6

  • Bang operations!
  • The ability to run stuff without putting them in a file!
  • Use * to pass multiple arguments!
  • Code arguments!
  • Pass with -a or --pass-arg!
  • Separate arguments with :!
  • Arrow references!
  • Get values from registers and use them as arguments!
  • Like this: >(bank):(register)
  • Works with cnt and cnl for now.
  • New arguments:
  • --show-warns / -sw
  • --show-args / -sa
  • --pass-arg / -a

v1.0.0-beta6.1

  • Fixed jmp command


Example code

Hello World[3]

 
  # Hello World in MASL v1.0.0
  psh 0,0,0x48
  psh 0,1,0x65
  psh 0,2,0x6c
  psh 0,3,0x6f
  
  psh 1,0,0x57
  psh 1,1,0x72
  psh 1,2,0x64
  
  psh 2,0,0x2c
  psh 2,1,0x21
  
  cnt 0,0,ch
  cnt 0,1,ch
  cnt 0,2,ch
  cnt 0,2,ch
  cnt 0,3,ch
  
  cnt 2,0,ch
  cnt 3,3,ch
  
  cnt 1,0,ch
  cnt 0,3,ch
  cnt 1,1,ch
  cnt 0,2,ch
  cnt 1,2,ch
  
  cnt 2,1,ch
  

Output:

 Hello, World!

For loop[4]

 
  # For loop in MASL v1.0.0
  psh 0,0,0
  psh 0,1,1
  psh 0,2,9
  adr 0,0,0,0,0,1
  cnt 0,0,nm
  jmr 4,0,0,0,2,<
  

Output:

 123456789

Fibonacci sequence[5]

 
  # Fibonacci sequence in MASL v1.0.0
  # Gets the nth number in the fibonacci sequence
  # n = bank 0, register 0
  psh 0,0,100
  psh 3,3,0
  psh 3,2,1
  psh 1,0,0
  psh 1,1,1
  psh 1,2,0
  adr 1,2,1,0,1,1
  adr 1,0,1,1,3,3
  adr 1,1,1,2,3,3
  sbr 0,0,0,0,3,2
  jmr 10,0,0,3,3,>
  cnt 1,0,nm
  

Output:

 354224848179262000000