View previous topic :: View next topic |
Author |
Message |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Tue Nov 06, 2012 4:46 pm Post subject: Making a quick programming language called Retarded |
|
|
Just doing it for shiggles so I can play around with writing an interpreter in java.
Keywords:
STERT [val] :Begins the program, a byte value after defines stack size
CANHAZ [name] [val] : Defines a variable [name] with the byte value [val]. Register is set to this value
POTATO [name] : Sets the register to the value at variable [name]
HUR[R...] : Increments the operation wheel position by the amount of Rs present
DUR[R...] : Decrements the operation wheel position by the amount of Rs
HERP : Executes the operation at the current operation position
DERP : Executes the inverse/companion operation
ANHERO : Terminates the program
Operation wheel:
HERPs
1.Push the byte at the current register onto the stack. Leave the register unchanged.
2.Output the stack byte to STDOUT as an ASCII char. Leave the stack unchanged.
3.Move the stack pointer up 1 ("fake push"). This operation causes an error if the stack pointer is at the top of the stack.
4.Bit sort the stack byte in place.
5.AND the stack byte with the current register, and replace the stack byte with the result.
6.Left ROT the current register in place.
7.Add the stack byte and the current register, and replace the stack byte with the result.
DERPs
1.Pop the stack byte into the current register. This operation causes an error if the stack pointer is at the top of the stack.
2.Push a byte from STDIN onto the stack.
3.Move the stack pointer down 1 ("fake pop"). This operation causes an error if the stack pointer is at the bottom of the stack.
4.Reverse bit sort the stack byte in place.
5.NOT the stack byte in place.
6.Right ROT the current register in place.
7.Subtract the current register from the stack byte, and replace the stack byte with the result.
|
|
Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Tue Nov 06, 2012 4:53 pm Post subject: |
|
|
sell it to infinity ward
|
|
Back to top |
|
 |
br0l0ck Cheater
Reputation: 63
Joined: 15 Aug 2007 Posts: 38
|
Posted: Tue Nov 06, 2012 5:21 pm Post subject: |
|
|
yeah but it will never be as retarded as FiM++
|
|
Back to top |
|
 |
orlaub How do I cheat?
Reputation: 0
Joined: 04 Oct 2012 Posts: 4
|
Posted: Tue Nov 06, 2012 6:00 pm Post subject: |
|
|
uhm.. LOLCODE?
And I'm sorry, but however cool it is, it can never be more retarded than Shakespeare.
|
|
Back to top |
|
 |
teeigeryuh Master Cheater
Reputation: 25
Joined: 13 Oct 2008 Posts: 261 Location: The netherlands
|
Posted: Tue Nov 06, 2012 6:19 pm Post subject: |
|
|
http://en.wikipedia.org/wiki/LOLCODE
Quote: |
HAI
CAN HAS STDIO?
PLZ OPEN FILE "LOLCATS.TXT"?
AWSUM THX
VISIBLE FILE
O NOES
INVISIBLE "ERRROR!"
KTHXBYE |
_________________
ლ(╹◡╹ლ) |
|
Back to top |
|
 |
br0l0ck Cheater
Reputation: 63
Joined: 15 Aug 2007 Posts: 38
|
Posted: Tue Nov 06, 2012 6:22 pm Post subject: |
|
|
brainfuck is cooler
|
|
Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Tue Nov 06, 2012 7:00 pm Post subject: |
|
|
orlaub wrote: | uhm.. LOLCODE?
And I'm sorry, but however cool it is, it can never be more retarded than Shakespeare. |
This works on a operation wheel. The inspiration came from ReMorse. I added support for variables instead of a register wheel and trimmed the operations list down a tad, added in a shorthand for flicking through the wheel and added stupid text. So it's quite different than lolcode. Haven't started writing the interpreter yet, but here's some code that should work.
Adds 20 and 10
Code: | STERT PLZ 1
CANHAZ A 20
HERP
CANHAZ B 10
HURRRRRR
HERP
DURRRRR
HERP
ANHERO |
Gets 2 numbers from input, outputs first-second
Code: | STERT PLZ 1
CANHAZ A
HUR
DERP
DUR
DERP
CANHAZ B
HUR
DERP
DUR
DERP
POTATO A
HERP
POTATO B
HURRRRRR
DERP
DURRRRR
HERP
ANHERO |
|
|
Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Wed Nov 07, 2012 7:47 pm Post subject: |
|
|
So whats the architecture definition? I mean, you state register, is there only one?
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
Back to top |
|
 |
Evil_Intentions Expert Cheater
Reputation: 65
Joined: 07 Jan 2010 Posts: 214
|
Posted: Wed Nov 07, 2012 8:03 pm Post subject: |
|
|
Aviar³ wrote: | So whats the architecture definition? I mean, you state register, is there only one? |
Yea, one register, no limit to variables, stack is limited by user.
It, obviously, wasn't anything serious. I just wanted to try coding up an interpreter.
|
|
Back to top |
|
 |
|