Qbasicnews.com

Full Version: New Language?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Can someone compe up with with a new programming language, unlike one that has ever been made before? Not in qbasic though. Not using runtime or libraries. Make one with assembly , make one that takes each action in the programming language and translates it to assembley when it compiles it. Only, one that can be run on 32 bit windows, or just off of boot on a floppy of cd (if the perticular program is designed for that use). I am not in this challenge. It's something I just want to see if it can be done.
http://www.freebasic.net :roll: :winkwink:

Anonymous

haha yeah, if you compile a program with -r, you can see the asm output.

FB code:

Code:
Print "Hello world! I can count to 10, watch!"
Print
For a = 1 To 10
  Print a
  
Next
Print
Print "See? I'm a genius!"


Outputted ASM:

Code:
    .intel_syntax noprefix

    #fbdemo.bas' compilation started at 02:47:25 (FreeBASIC v0.17b)

.section .text
.balign 16

.globl _main
_main:
push ebp
mov ebp, esp
and esp, 0xFFFFFFF0
sub esp, 8
mov dword ptr [ebp-4], 0
mov dword ptr [ebp-8], 0
call ___main
push dword ptr [ebp+12]
push dword ptr [ebp+8]
call _fb_Init@8
.Lt_0001:
push 1
push 38
push offset _Lt_0003
call _fb_StrAllocTempDescZEx@8
push eax
push 0
call _fb_PrintString@12
push 1
push 0
call _fb_PrintVoid@8
mov dword ptr [ebp-8], 1
.Lt_0007:
push 1
push dword ptr [ebp-8]
push 0
call _fb_PrintInt@12
.Lt_0005:
inc dword ptr [ebp-8]
.Lt_0004:
cmp dword ptr [ebp-8], 10
jle .Lt_0007
.Lt_0006:
push 1
push 0
call _fb_PrintVoid@8
push 1
push 18
push offset _Lt_0008
call _fb_StrAllocTempDescZEx@8
push eax
push 0
call _fb_PrintString@12
.Lt_0002:
push 0
call _fb_End@4
mov eax, dword ptr [ebp-4]
mov esp, ebp
pop ebp
ret
    #fbdemo.bas' compilation took 1.906669568469965e-003 secs

.section .data
.balign 4
_Lt_0003:    .ascii    "Hello world! I can count to 10, watch!\0"
.balign 4
_Lt_0008:    .ascii    "See? I'm a genius!\0"
Want a wicked programming language? Check Shakespeare Programming Language:

http://shakespearelang.sourceforge.net/r...peare.html
:o
It's not the weirdest, but it's rather funny :lol:
Holy OMG that's crazy.

Anonymous

HAHA I love it!
Made by Swedes ofcourse :roll:








:b
I remember staring at that before, and feeling like an idiot because I didn't get the joke. I thought they were just trying to make it as hard as possible to hack. :lol:
Pages: 1 2