Im Making An Interpreter,Need Some Help.

Discuss popular GCS tools like ZZT, Megazeux and Adventure Game Studio, as well as programming and other topics related to game design.
Locked
tinman47
Lord of Gaming
Lord of Gaming
Posts: 230
Joined: Sat Feb 24, 2007 1:07 pm

Im Making An Interpreter,Need Some Help.

Post by tinman47 »

Im Making An Interpreter Out Of Raw Batch Code,And Its Working Very Well,But Im Having A Few Problems.

1.How Do I Make Syntax Highlighting Out Of Batch?

2.How Do I Make A Variable That Does Not Require Putting The % On Each Side Of It.

3.How Do I Display An Image Out Of Batch?

4.How Do I Play A Sound Out Of Bacth?

5.How Do You Perform Arithmetic Out Of Batch Without It Displaying An Error Message?

6.Can You Make DLL Files Out Of Batch,If So,Can You Call It In A Batch Script?

Reply If You Guys Know,And Show The Code.Thank You. :bday: [/code]
User avatar
MiniMax
Expert
Expert
Posts: 149
Joined: Thu Jan 25, 2007 8:03 am
Location: Stockholm, Sweden

Re: Im Making An Interpreter,Need Some Help.

Post by MiniMax »

tinman47 wrote:5.How Do You Perform Arithmetic Out Of Batch Without It Displaying An Error Message?

Code: Select all

set /a value=4+7*2 > NUL:
echo Result is %value%
DOSBox ReadMe | DOSBox Wiki | DOSBox 60 seconds guide | How to ask questions
_________________
Shuttle SN41G2 | Athlon XP 2600+ | IGP@128 MB | NEC 3520A DVD | Win XP Home/SP2
User avatar
emmzee
Site Admin
Site Admin
Posts: 2476
Joined: Sat Sep 14, 2002 2:25 pm
Location: Ontario, Canada

Post by emmzee »

Okay, this is just a style thing, but could you please not put capital letters on every word? It makes your posts difficult to read. Thanks!

Re your questions ...

#1 Depends what program you're using to edit your code. You can use TextPad or WordPad+ to do syntax hilighting.

#2 Dunno if that's possible.

#3 & #4 You can't do that using batch language alone. You'd need to use an additional DOS program to do that. So you'd have to find a command-line based DOS application that plays sound or shows images, then run it from your batch file.

#6 I really don't think so.
Owner / Webmaster of DOSGames.com for over 20 years

Download my free ebook: The Historical Reliability of the New Testament
tinman47
Lord of Gaming
Lord of Gaming
Posts: 230
Joined: Sat Feb 24, 2007 1:07 pm

Post by tinman47 »

Hey Mimzee,Batch can do anything and you don't even realize it.What the hell do you think made Qbasic and all the other BASIC languages.My interpreter is actually working,so dont post me shit like "Oh tinman,you can't do it,its not expansive enough,Oh its impossible,No,No,you should learn another language!"
Shutup!!!!I am almost done with it and people are starting to doubt me,some people are actually tring to get my source code,well guess what?Batch is awesome!!! Batch is what made Python,Batch made so much.I have been studying Batch for a full Year now,and its getting better every day.Im happy,but others are not.The interpreter is actually working,so don't post me that crap,just post the answer to my questions.I'll release the source code next year. :Angry:
User avatar
Larry Laffer
Admin
Admin
Posts: 4143
Joined: Sun Feb 19, 2006 8:06 am
Location: Romania

Post by Larry Laffer »

Huh? Now, what got you fired up like that? Everybody, until now, was polite and answered your questions, you have no right to flame... er? emmzee, or er... MiniMax?

Also, just to make things clear, are we talking about the batch that creates batch files?

Because, if that's so, really, you have to understand that it's limited!
<center>
abyss wrote:I don't even know if starcraft 1 was a windows or dos games.
</center>

ModBot™ - Faster than the speed of spam!(and always taking it to where it belongs!)
User avatar
emmzee
Site Admin
Site Admin
Posts: 2476
Joined: Sat Sep 14, 2002 2:25 pm
Location: Ontario, Canada

Post by emmzee »

No need to get so riled up, tinman. BTW, who's "Mimzee"?

Anywho, maybe the problem is that we're using the same term ("batch") to refer to different things. When I say "batch" I'm referring to MS-DOS batch files, like this:
http://en.wikipedia.org/wiki/Batch_files

If you are referring instead to <i>assembly language</i> (aka assembler, aka machine code) like this:
http://en.wikipedia.org/wiki/Assembly_language
... then that's something entirely different. QBasic and other BASIC languages certainly would have been coded in assembly language (or perhaps in C or something) but not MS-DOS batch files; these are totally different things.
Owner / Webmaster of DOSGames.com for over 20 years

Download my free ebook: The Historical Reliability of the New Testament
User avatar
dosraider
Admin
Admin
Posts: 9243
Joined: Tue Mar 15, 2005 2:06 pm
Location: ROTFLMAO in Belgium.

Post by dosraider »

I'm wondering if tinman47 isn't talking about somekind of converter that he is creating. You know, batch to *.exe or *.com converting.
Sounds as it.
If that's the case, it has been developed long time ago in many variations.
Several professional and freeware programs do such, so no need to getting excited about it.
tinman47
Lord of Gaming
Lord of Gaming
Posts: 230
Joined: Sat Feb 24, 2007 1:07 pm

Post by tinman47 »

Sorry about the overeaction I made,I was in a very bad mood that day,and I use profanity all the time.(BECAUSE IM 13 :shame: )
Really sorry Mimzee(I like to call people with in EM in their name
a MIM :D )I didnt mean to explode on you like that.IM SORRY.
But anyways,the interpreter Im making is mostly MS-DOS code.
The other parts of it are Qbasic and raw Assembly.But Im probably
going to postpone the project since Im having problems with the
FASM Assembler. :cry: And NO its not no fucking converter,thats
too boring :sleep: and a waste of time to make.SO JUST GIVING
YOU A NOTICE MIMZEE.

TRUST ME,MS-DOS MADE QBASIC...I LOOKED AT THE SOURCE CODE!
MaryBeth
Member
Member
Posts: 16
Joined: Fri Nov 17, 2006 5:16 am

Post by MaryBeth »

I thought MS-DOS was an operating system,
could you give me an example of DOS "code"?

Now don't bite my head off, :no:

I'm just wondering what you are talking about,
I'm young and just learning, too.
User avatar
Larry Laffer
Admin
Admin
Posts: 4143
Joined: Sun Feb 19, 2006 8:06 am
Location: Romania

Post by Larry Laffer »

MaryBeth wrote:I thought MS-DOS was an operating system,
could you give me an example of DOS "code"?
Maybe he means a DOS programming language such as Borland C++...

/me shrugs
<center>
abyss wrote:I don't even know if starcraft 1 was a windows or dos games.
</center>

ModBot™ - Faster than the speed of spam!(and always taking it to where it belongs!)
User avatar
MiniMax
Expert
Expert
Posts: 149
Joined: Thu Jan 25, 2007 8:03 am
Location: Stockholm, Sweden

Post by MiniMax »

I think a Babel-fish would be in order here.
DOSBox ReadMe | DOSBox Wiki | DOSBox 60 seconds guide | How to ask questions
_________________
Shuttle SN41G2 | Athlon XP 2600+ | IGP@128 MB | NEC 3520A DVD | Win XP Home/SP2
User avatar
Dogbreath
Admin
Admin
Posts: 4620
Joined: Sat Sep 14, 2002 7:02 pm
Location: In the back of a jacked-up Ford.

Post by Dogbreath »

tinman47 wrote:TRUST ME,MS-DOS MADE QBASIC...I LOOKED AT THE SOURCE CODE!
Now that's sig worthy...

Locked, btw. If you honestly still need help with your project you can start another thread in the future, but it'll probably get locked pretty quickly if continue to carry on so rudely. (DON'T "SHOUT" AT PEOPLE PLEASE!!!!!)

And, as MiniMax said, there are plenty of excellent translation services around... don't really see why you need to make your own.
Locked