Obratnaya
h
TheForArkLD (734)

Obratnaya repl
Source
@SixBeeps @RaidTheWeb @NoNameByProgram Here is post!

Table for features

JavaScriptC#Obratnaya
No undefined⭕️⭕️
Null⭕️⭕️⭕️
Library⭕️⭕️⭕️
Function or Section⭕️⭕️⭕️
Class⭕️⭕️
Type⭕️⭕️
Type Generic⭕️
Goto⭕️⭕️
Data section⭕️
Section⭕️
Function⭕️⭕️
Readable⭕️⭕️⭕️
Word for operator⭕️
Exact equality operator⭕️⭕️

Samples

Hello world

#include <stdout.oba>
.main:
    push Hello, world!
    push msgln
    call @
    ret

What does this program do?

  1. Include stdout.oba (It contains section for output text with \r\n)
  2. Declare "This is main section"
  3. Push "Hello, world!"
  4. Push "msgln"
  5. Call "msgln"
  6. End program by exit code 0

99 Bottles of beer

#include <stdout.oba>
.data:
    .empty
    .empty
    .empty
    .decimal 100
.main:
    mov 3,@
    sub @,1
    movd @,3
    mov 3,@
    push  bottles of beer on the wall, 
    concat @,@
    mov 3,@
    push  bottles of beer,
    concat @,@
    concat @,@
    push msgln
    call @
    mov 3,@
    sub @,1
    movd @,3
    push Take on down, pass it around,
    push msgln
    call @
    mov 3,@
    push  bottles of beer on the wall
    concat @,@
    push msgln
    call @
    jmp 5

What does this program do?

  1. Include stdout.oba
  2. Declare "This is data section"
  3. Push empty / empty / empty / 100 to data section
  4. Declare "This is main section"
  5. Get value from Index 3
  6. Subtract it by 1
  7. Move value to data section
  8. Get value from Index 3
  9. Push " bottles of beer on the wall,"
  10. Concat
  11. Get value from Index 3
  12. Push " bottles of beer,"
  13. Concat
  14. Concat
  15. Push "msgln"
  16. Call "msgln"
  17. Get value from Index 3
  18. Subtract it by 1
  19. Move value to data section
  20. Push "Take on down, pass it around,"
  21. Push "msgln"
  22. Call "msgln"
  23. Get value from Index 3
  24. Push " bottles of beer on the wall"
  25. Concat
  26. Push "msgln"
  27. Call "msgln"
  28. Jump to line 5
You are viewing a single comment. View All
fuzzyastrocat (1270)

Cool!
Suggestion: Make it compile to x86! Since it seems fairly low-level the translation probably wouldn't be hard (in some cases, near-direct translation might work). That way it would be blazingly fast and have a speed advantage

TheForArkLD (734)

@fuzzyastrocat yea, but transpiler is failed 😭
i'll add transpiler 😁

fuzzyastrocat (1270)

@TheForArkLD Oh, you had a transpiler to x86? (That would be a compiler actually)

TheForArkLD (734)

@fuzzyastrocat no lol
i transpiled Obratnaya to C#, and compiled it only.

fuzzyastrocat (1270)

@TheForArkLD Wait, now I'm confused. What do you mean by "compiled it only"?

TheForArkLD (734)

@fuzzyastrocat ok look at this
1. transpile Obratnaya to C#
2. compile it to x86

fuzzyastrocat (1270)

@TheForArkLD Ok, so you do both/either? (either because you said you stopped the transpiling version)

fuzzyastrocat (1270)

@TheForArkLD Ok, so you already compile. I understand now, sorry for the confusion! :D

TheForArkLD (734)

@CSharpIsGud huh ur brain is bit old
use System.Reflection.Emit

TheForArkLD (734)

@CSharpIsGud oh, thanks for fix my brain