Guest User

Simple Compiler

a guest
Feb 22nd, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. include cpp_compi.pkgrar
  2. end PUSH << "Compile.exe";
  3. PUSH STACK VERTEX BUFFER 234.ff2::"VertexCompile435"
  4. ADD SDDDDR3DRIVE to Vertex.Buffer(Stackx.y)
  5. INT x as Buffer;
  6. ;------------------------- Here we declare the commands to compile -------------------------
  7. reg.new(Buffer.StackPush(00008.pkg)regcomm("-compile"))
  8. reg.new(Buffer.StackPush(00208.pkg)regcomm("-run"))
  9. reg.new(Buffer.StackPush(00108.pkg)regcomm("-compilerun"))
  10. ;------------------------- Make sure they are registered -------------------------
  11. if {{reg.checkex(("-compile")) && if {{reg.checkex(("-run")) || if {{reg.checkex("-compilerun")):>>
  12. PUSH STACK BUFFER x0000f2::"VertexCompilerWork"
  13. >>else< do{{
  14. reg.new(Buffer.StackPush(00008.pkg)regcomm("-compile"))
  15. reg.new(Buffer.StackPush(00208.pkg)regcomm("-run"))
  16. reg.new(Buffer.StackPush(00108.pkg)regcomm("-compilerun"))
  17. }}while !({{reg.checkex(("-compile")) && if {{reg.checkex(("-run")) || if {{reg.checkex("-compilerun")))
  18. ;------------------------- Now, we add the Stack Pointers -------------------------
  19. INT {{}x as INT^CHAR && y as CHAR((^mind)).RegNewVars))>push.stack.vertexbuffer(newstackpointer)))
  20. CHARLONG {{x as new longint ^>> do{for(i=reg.new(CompilerCode;Compiler;Compiler++}__+)
  21. ;------------------------- Make sure no buffer overflows (Basically when your CPU starts melting) -------------------------
  22. FUNC(CheckBOF) for i as INT not BOF{if BOF do{[PUSH STACK VERTEX BUFFER 23411.x0000f::"-rShutdown" && push msg == "Computer immediate shutdown to prevent Buffer Overflow !"
  23. MOV STACK.x000f2 as INT to MOV OPR2.PreventBOF({})
  24. ;------------------------- Now that this is done... YAY! Be happy, here is the simple part. We basically register new stacks to be pushed in memory by the compiler when the algorithms execute.. Simple.-------------------------
  25. ;------ OH YEAH, Here I also integrate ASM. So don't be surprised if the syntax changes. This is the compiler **>> code.
  26.         add $t3, $a0, $zero
  27.  
  28.         add $t1, $zero, $zero
  29.         leggimatrice_cicloi:
  30.                 add $t2, $zero, $zero
  31.                 leggimatrice_cicloj:
  32.                         addi $v0, $zero, 4      
  33.                         la $a0, valore                  
  34.                         syscall
  35.  
  36.                         addi $v0, $zero, 1              
  37.                         add $a0, $t1, $zero    
  38.                         addi $a0, $a0, 1
  39.                         syscall
  40.                        
  41.                         addi $v0, $zero, 4              
  42.                         la $a0, cqaq    
  43.                         syscall
  44.  
  45.                         addi $v0, $zero, 1              
  46.                         add $a0, $t2, $zero            
  47.                         addi $a0, $a0, 1
  48.                         syscall
  49.  
  50.                         addi $v0, $zero, 4              
  51.                         la $a0, dp                                      
  52.                         syscall
  53.  
  54.                         addi $v0, $zero, 5              
  55.                         syscall
  56.  
  57.                         sw $v0, 0($t3)                          
  58.                         addi $t3, $t3, 4                        
  59.  
  60.                         addi $t2, $t2, 1                      
  61.                 bne $t2, $a1, leggimatrice_cicloj
  62.  
  63.                 addi $t1, $t1, 1                              
  64.         bne $t1, $a1, leggimatrice_cicloi
  65.  
  66.         jr $ra
  67.         add $v0, $a0, $zero
  68.         mul $t0, $a1, $a1
  69.         sll $t0, $t0, 2                        
  70.         add $v0, $v0, $t0
  71.        
  72.         add $t4, $a1, $zero
  73.         sll $t4, $t4, 2
  74.         add $t4, $t4, $a0
  75.         sub $t4, $t4, 4  
  76.     ecx,dword ptr [esp+24h]
Advertisement
Add Comment
Please, Sign In to add comment