Quick Search for:  in language:    
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
C/ C++ Stats

 Code: 451,578 lines
 Jobs: 605 postings

Sponsored by:


You are in:


Latest Code Ticker for C/ C++.
Visual Pi Hex
By jo122321323 on 8/25

Click here to see a screenshot of this code!ShortCutSample
By Massimiliano Tomassetti on 8/25

(Screen Shot)

AnPMoneyManager beta
By Anthony Tristan on 8/24

A calculator (english/polish )
By Tom Dziedzic on 8/24

MMC (Mouse Move Counter)
By Laszlo Hegedüs on 8/24

By Jerome A. Simon on 8/24

By Jerome A. Simon on 8/23

Game 1945X
By Ozgun Harmanci on 8/23

Find hidden "back streamed" files on NTFS partitions. This code is a must for sec consultants.
By Israel B. Bentch on 8/22

Click here to put this ticker on your site!

Add this ticker to your desktop!

Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites


Master Assembly Script( MAS ) Beta


Submitted on: 3/4/2002 3:22:03 AM
By: Jared Bruni  
Level: Advanced
User Rating: By 14 Users
Compatibility:Microsoft Visual C++

Users have accessed this article 2502 times.

(About the author)
     Mas Release 1, MasterX SDK 2.2, MVX with MAS, and a Mas Demo

Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.

Master Assembly Script (MAS)

Mas is a scripting language designed for use in video game programming. It is meant to allow aspects of the game to be scripted rather then hard coded so they can be changed without the actual executable being changed. It is a simple scripting language and in its first ful release has very limited functionality.

A mas program is simple, and is layed out as follows

    mas ProgramName {
        var {
        var& variable ; comment var& means long integer
        var# float ; means floating point 
        var$ string ; means string variable

begin { start: mov variable, 0 jmp start ; jump to start code label }
Mas is similar to assembly language, in that you use code labels, do compares, and then use instructions to jump based on the flags register. However there are no registers and the instructions directly operate on variables.


Mas Demo
MasterX SDK with Mas (2.2)
MVX Game Engine with Mas

Instruction List

mov - takes 2 operands
mov source,from
cls - takes 1 operand
cls 0
println takes 1 operand
println variable
input takes 1 operand
input variable
return takes 1 operand
return 0
cmp takes 2 operands
cmp variable1,variable2
jmp takes 1 operand
jmp label
jne takes 1 operand
jne label
jg takes 1 operand
jg label
jl takes 1 operand
jl label
jge takes 1 operand
jge label
jle takes 1 operand
jle label
pause takes 1 operand
pause 0
inc takes 1 operand
inc variable
dec takes 1 operand
dec variable
add takes 2 operands
add var1 , var2
sub takes 2 operands
sub var1, var2
mul takes 2 operands
mul var1, var2
div takes 2 operands
div var1, var2
finc takes 1 operand
finc variable
fdec takes 1 operand
fdec varaible
fadd takes 2 operands
fadd var1, var2
fsub takes 2 operands
fsub var1, var2
fmul takes 2 operands
fmul var1, var2
fdiv takes 2 operands
fdiv var1, var2
int takes 1 operand
int interupt number for callback
push takes 1 operand
push variable to push into stack
pop takes 1 operand
pop variable to pop off of stack

Other 273 submission(s) by this author


Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Your Vote!

What do you think of this article(in the Advanced category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
Other User Comments
3/4/2002 11:46:25 AM:Thushar
hanx for this fine peace of code
Keep the Planet clean! If this comment was disrespectful, please report it:

3/4/2002 1:31:18 PM:Dan Anderson
I just had one question. Do you think an MAS script file could be compiled to a ready to run file? Sort of like how Java has byte code .class files. Just a thought
Keep the Planet clean! If this comment was disrespectful, please report it:

3/4/2002 3:43:55 PM:Lee Trager
tight code. you should try maken ur own lang ;)
Keep the Planet clean! If this comment was disrespectful, please report it:

3/4/2002 5:18:21 PM:Jared Bruni
the first version of MAS I had a bytecode like java, but for the second version I decided to just have it interpet the script as is.
Keep the Planet clean! If this comment was disrespectful, please report it:

Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.


Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | C/ C++ Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.