V810Asm V0.5
(C) 1998 the David Tucker & the VB-98 Team...

-----------------------------------------------------------------
changes:
-----------------------------------------------------------------
7-16-98  Released V0.1  with some known bugs....
7-17-98  Released V0.2 Fixed some confusion in the Number lexer now it can identify hex, oct, and dec without guessing.  This fixed the EOF error as well... now the outputed .obj file has the same name as the inputed .asm file...  Now it properly tells the difference between 'add 34, $4'  and 'add $3, $4'.
7-20-98  Added suport for db. dh. dw. ds. and org. (dataByte/HWord/Word/String and origin of code)  Now you can embed graphics and text code right into the asm, also you can use org to align certen parts of the rom.  Dont use org. to try to access memory outside of the rom, you will not be hapy with the results...
9-24-98  Released V0.4 Fixed a bug in the Mode 6b instructions.  I was swaping the register, and constant variables when writing it to disk...
1-22-99 updated the vasm.bat file, now you dont need to set antlr.jar to your classpath...
-----------------------------------------------------------------
Purpose:
-----------------------------------------------------------------
  Hear is a fully functional V810 asembler.  It is in the pelimnary stages, so It hase a fewe problems...  Primarily, it has no suport for variables.  So It is not posible to define a number, or tag a line to jump to later...  Otherwise It works just fine =0)

-----------------------------------------------------------------
Bugs:
-----------------------------------------------------------------
* Does Not delete the old *.obj, fix this please....
* No tags, should not be that bad to Implement
* No Defines (Just a tag that represents a num instead of a loc...)
* Zipo Syntax and error checking (What do you expect for nothing =)
* Note this will not generate address out of bounds warnings.
  ie. cmp     -34, $3.  -34 is way out of bounds (This is a 5 bit var...)
  But it will asemble without complaining, It just truncates the number!
* Need to rework the syntax closer to real V8xx asmbly.
* Need to add teh FPU and BitStr subopcodes.
-----------------------------------------------------------------
Usage:
-----------------------------------------------------------------
  (Not needed)add the antlr.jar file to your class path 'set classpath=.\antlr.jar;%classpath%'
  java V810Asm <file.asm>+
  Returns a File.obj file witch needs to be processed before becomming a true VB game...

  Suports allmost all V810 opcodes (See vtest.asm for a compleat list of suported opcodes).
  Suports // and /* */ style comments
  $# (Register)
  [$#](memory accessed through register referencing)
  #[$#](same with aditional offset..)
  # (Decimal)
  0x# (Hex)
  0# (Oct)
  db. #, #, #.....
  dh. dw.
  ds. "bla bla..."  (No returns!)
  org. ########

  Add this code to the end of your programm to run it in the Emu or the VB
  XXX = the end of your rom (the Size fo your rom....) asuming that your rom ends on an evin boundary.  Ie 0x800000
//--------------------------------
// Rom Info...
//--------------------------------
        org. 0x07XXXDE0 // Game Title, 20 chrs...
        ds.  "XYZ abc             " // Telero Boxer
        
        org. 0x07XXXDF4 // Reserved
        db.  00, 00, 00, 00, 00
        
        org. 0x07XXXDF9 // Manufac Code
        ds.  "#x"       //8b
        
        org. 0x07XXXDFB //Game Code
        ds.  "Vxxx"     //VTBJ
        
        org. 0x07XXXDFF // Rom Ver
        db.  00

//--------------------------------
// Int Handlers...
// Add your own code...
//--------------------------------
        org. 0x07XXXE00  // Key Interupt

        org. 0x07XXXE10  // Timer Interupt

        org. 0x07XXXE20  // Expantion Port Interupt?

        org. 0x07XXXE30  // Link Port Interupt

        org. 0x07XXXE40  // Video Proc Interupt
        
//--------------------------------
// Reset Vector... 
//--------------------------------
        org. 0x07XXXFF0 
        movhi           0x0700, $0, $1   //upper address of jump
        movea           0x0000, $1, $1   //lower address of jump
        jmp             [$1]             //Jump to 0x0700 0000
        nop                              // Fluf, any code so that this takes 
        nop                              // Up exactly 16 bytes
        nop
//--------------------------------
// No code beyond this point!!!
//--------------------------------

  A feaw notes on Java.  Get the Java Runtime Enviroment from Sun Microsystems (JRE).  and folow there Instructions for Installing (Its easy, unzip, set the path, and set the classpath)  Also you will need to add in the antlr.jar file to your classpath.  To recompile you will need the compleat antlr package from http://www.antlr.org  as well as the Java Development Kit from Sun Microsystems (All packages are free to the public)

-----------------------------------------------------------------
Notes:
-----------------------------------------------------------------
  This product is Copywrite 1998 by David Tucker and the VB-98 team.  All rights reserved.  You are free to use this product in a non comercial fashion, but you must recieve explicit permision to sell this product or to use it in a commershial context.  The source is freely avalible, and you may do what you want with it, But you may not sell the source or a product you made from the source without permision...  Finaly I am not responcible for any damages Incured by you, your computer, your family life, or your dog.  This software is provided as is.  Use at your own risk....

-----------------------------------------------------------------
David Tucker
dbt@dana.ucc.nau.edu
http://dana.ucc.nau.edu/~dbt/VBMain.html
-----------------------------------------------------------------

Java is a trademark of Sun, ANTLR is a trademark of Magelang Institute, all wrights reserved

http://java.sun.com/index.html
http://www.magelang.com
