PDA

Click to See Complete Forum and Search --> : A NEW programming/script language


made_of_asp
Jul 25th, 2001, 12:31 AM
Hello i have just created my own first programming language. It is called KBL and is very simple and yet only contains five commands cause i ddidnt have much tiem to work with it. (I will add more commands soon :)

Im sending a program and 3 sample kbl files. (You can create your own)

Here is an example of my KBL language program


SUBKBL;MOV
MOV MSG
Hello!!!!


It will display a mesage box with a text Hello. A ;MOV function will show debugger window.

Could anyone test my KBL execution file please? It requies a richtextbox control for VB6

Any ideas you have?

Thanks for help,
:rolleyes: :)

made_of_asp
Jul 25th, 2001, 12:49 AM
It is not a compilator (YET) it works like scripting host but it allows file operations, killfile functions and all that stuff which has been cut OUT of vbscript. :)

Wynd
Jul 25th, 2001, 12:53 AM
Cool :) Post when you have more stuff, sounds interesting.

made_of_asp
Jul 25th, 2001, 12:55 AM
I worked just 1 day on it. Yep im adding more stuff to it. Currently there are functions supported:

PRINT TO A CONSOLE
MAKE A MESSAGEBOX
WRITE TO A FILE
RESIZE A CONSOLE WINDOW
SLEEP

made_of_asp
Jul 25th, 2001, 01:17 AM
ENUMKBL
INPUT 07h0
C:\hello.txt
Hello World!!!
MOV MSG
A file hello.txt has been created in the disc C: It contains Hello World!
INPUT E?FILE
C:\hello.txt
MOV MSG
A file C:\hello.txt has been deleted on the disc C:
ET 0001
ET 0010
ET 0011


Kbl is a bit longer than VB. The things above and below are completely the same. :rolleyes: I have added time/date operations (require updated version of kbl) and a kill file operation


Open "C:\hello.txt" For Binary As #1
Put #1, , "Hello World!"
Close #1
MsgBox "A file hello.txt has been created in the disc C: It contains Hello World!"
Kill "C:\hello.txt"
MsgBox "A file C:\hello.txt has been deleted on the disc C:"
MsgBox Time
MsgBox Date
MsgBox Now

made_of_asp
Jul 25th, 2001, 02:16 AM
:) Variable Declarations

I have inserted a variable declaration and output!



SUBKBL
VAR p8h0
pCOM
This is a test variable of the name pCOM
INT p8h0
pCOM
MOVINT &H008
MOVINT &H007
;INT DISRUPT?
;This function will destroy ALL variables ^^^

made_of_asp
Jul 25th, 2001, 06:23 AM
Anyone help?

made_of_asp
Jul 26th, 2001, 12:41 AM
:( :confused: Anyone has any comments?

Wynd
Jul 26th, 2001, 12:54 AM
Did you base it on assembly, it looks a lot like it.

made_of_asp
Jul 26th, 2001, 12:58 AM
No ;) I did not base it on anything. I just saw the functions there and i liked MOV and INT to i decided to put it there.

Here is assembly code compared to KLB: Hello world:


jmp start
Message1 db "Hello World!$"

start:
mov ah, 09h
mov dx, offset Message1
int 21h

mov ax, 4c00h
int 21h



SUBKBL
MOV P
Hello Word


Assembly is muuuuch harder

j2k
Jul 26th, 2001, 06:35 AM
And VB is muuuuch easier still: MsgBox "Hello World"

made_of_asp
Jul 26th, 2001, 11:57 PM
Yes agree....

Msgbox Is easy

but this is a SCRIPTING language while VISUAL BASIC isnt

u still can compare it to VBScript but VBScript is soooooo empty. No file/registry operations.

devmax
Aug 4th, 2001, 04:53 AM
Your scripting language sounds good, but it looks very hard to understand for newbies, since you put some numbers instead of a function name full-explicit, it will be hard to understand...

Anyway, i post this subject because VBScript DOES use registry/file operations ( see WSH objects )...

Why did you say it didn't ???

made_of_asp
Aug 5th, 2001, 08:55 PM
Hmmm i though it didnt.

The numbers are just an example of the first release. I have currently completely recreated my language + dev envionment and compiler ;). I also added registration of OCX and DLL's on the machine.


My language is pretty simple. Here: This is a redone NEW version. No numbers :)


DEFINE TLB[me(cap)];[Great Western Pages Installation]
DEFINECLNG[TYPECLASS];[H06];[H02]
DEFINECLNG[font];[Tahoma]
DEFINECLNG[textsize];[12]
MSGID @RET[It looks like you are running Great Western Pages the first time. Great Western Pages requries your computer to install components to continue. Would you like to start setup?];[Great Western Pages Components]
MOV <%PR%>[Please wait while the program performs registration of components]
MOV <%PR%>[Please do not shutdown your computer while this happens]
@STATUSCNT[200];[100];[ timeout%]
DEFINECLNG[fullbreak]
DEFINE TLB[reg(tlb)];[tmr42.tlb]
DEFINECLNG[fullbreak]
DEFINE TLB[reg(ocX)];[Msflxgrd.ocx]
DEFINE TLB[reg(tlb)];[vbalNCSM6.dll]
DEFINE TLB[reg(tlb)];[SSubTmr6.dll]
MOV <%PR%>[Registration of Type Liblaries is complete!]
MSGID @RET[Installation is complete. Would you like to start Great Western Pages CD now?];[Great Western Pages Components]
@SHELLPROG[gwpmain];[H02]



This code just displayes messages and registers ocx and dlls on the machine.