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
firefish (781)

c-assembler hybrid? Huh.. I wonder how the preprocessor works...

firefish (781)

@TheForArkLD The C pre-processor? gcc -E?

firefish (781)

@TheForArkLD It basically replaces the #include statements with the raw source code of the header files included, when you #define something it replaces all instances of that reference to the value of the macro

TheForArkLD (734)

@firefish ahhhh, so you want know how does #include work?

firefish (781)

@TheForArkLD in obratnaya yeah, I want to look at the source, but I can't find it easily, and my C# decompiler is acting up

firefish (781)

@TheForArkLD Forgot to look at GitHub my question is answered

slft += File.ReadAllText(path).Split(new char[]{'\n'}).Length - 1;
all = (File.ReadAllText(path) + "\n" + Regex.Replace(code.Replace("\r",""),@"#include " + oldpath + "\n","")).Split(new char[]{'\n'});
code = File.ReadAllText(path) + "\n" + Regex.Replace(code.Replace("\r",""),@"#include " + oldpath + "\n","");

it works the same way as in c

firefish (781)

@TheForArkLD you said o, and i said bratnaya?

TheForArkLD (734)

@firefish ahhhh ok
(btw my o means oh)

firefish (781)

@TheForArkLD I know, it's just jokes are.... aaarrrggrhaghgharghgahghagrhghgrarghargharghagrhgarhgarhg,