Skip to main content

Tagged “mouse”

  1. The Rev Programming Language

    This is a description of a programming language I am working on, #Rev, based on the Mouse Programming Language by Peter Grogono, originally written in 1979. This language is not compatible with Mouse, but is based on it and shares many common concepts with it. See Wikipedia for details on #Mouse.

    Some of the operation (#, for example) differ in the order of operations, and others (^) have differences to be more "C" like.

    Symbol Description
    (space) No action.
    $ End the program. Not necessary, unless the program needs to exit immediately.
    (number) Number. Push a number onto the stack.
    + Add. Pop two operands from the stack and push their sum.
    - Subtract. Pop two operands from the stack and push their difference. 3 2 - results in 1.
    * Multiply. Pop two operands from the stack and push their product.
    / Divide. Pop two operands from the stack and push their quotient. 9 3 / results in 3.
    % Remainder (modulus). Pop two operands from the stack and push the remainder of the first divided by the second.
    ? Input number. Read a number from the keyboard and push it onto the stack.
    ?' Input character. Read a character from the keyboard and push its ASCII code onto the stack.
    ! Output number. Pop a number from the stack and display it on the terminal.
    !' Output character. Pop an ASCII code from the stack and display the corresponding character on the terminal.
    '(char) Character literal. Push the ASCII code corresponding the the character onto the stack.
    " Output string. Display each character between the " and the next " on the terminal. Translate the character ! to a new line.
    (letter) Declare a variable and push the name onto the stack. The value pushed on the stack will vary depending on nesting level.
    : Assignment. Pop two operands from the stack and store the value of the second at the address specified by the second. To assign 3 to x, use "3 x:" (no quotes)
    . Dereference. Pop an address from the stack and push the value stored at that address onto the stack.
    < Comparison. Pop two operands from the stack. If the first is less than the second, push 1, else push 0 onto the stack.
    = Comparison. Pop two operands from the stack. If they are equal, push 1, else push 0 onto the stack.
    > Comparison. Pop two operands from the stack. If the first is greater than the second, push 1, else push 0 onto the stack.
    [ Conditional. Pop a value from the stack. If it is zero, skip over the character until a matching ] is found.
    ] Matches opening bracket
    ( Start loop. No action.
    ) Go back to top of loop.
    ^ Pops a value; if it is nonzero, exit loop.
    (letter)# Call a function. To call function 'a', type 'a#'.
    @ Return early from a function
    (letter){ Start of function named letter.
    } End of function
    ~ Start of comment. Comment goes until end of line.
    _ Allocate memory

    Other references:

    Peter Grogono's Mouse webpage

    David Simpson's Mouse software

    Lee Bradley's Mouse page

  2. Playing with the blog look and feel again

    It's been a while since I've played with the blog. I got rid of the right index bar; things look a bit different. Empty? Not sure. At least it's a change and I'm keeping this thing alive. Something to do while I'm still working on The Rev Programming Language.

  3. Working on Mouse-ish interpreter

    If you visit this page, you can read some details about a Mouse-ish programming language that I am writing and playing with.

  4. Rev

    The programming language I'm working on, Rev, is getting close to an initial release. It's a tiny language, but supports things like memory allocation, dynamic function changes, linked lists, in only about 22 commands, most of which are mathematics. If you have ever heard of the Mouse Programming Language, it looks similar, but is, internally, much more complicated and flexible.

See all tags.