Skip to content

GrenDrake/glulx-assemble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glulx-assemble

glulx-assemble is an assembler for creating glulx program files. It is a re-imagined version of my previous project GGASM. The main intent behind this program is to serve as a backend for other applications, but I have tried to design it so that it can create programs in pure glulx assembly as well.

License

glulx-assemble is released under the MIT license. Program files created by glulx-assemble are not covered by this license and may be licensed as the copyright holder desires.

Building

glulx-assemble is written using standard C99 code and does not depend on any other libraries. It should be possible to build it using any standard C99 compiler.

Usage

glulx-assemble is a command line program. It can be run without arguments, in which case it will read from input.ga and create output.ulx. It can also be passed a number of arguments, as seen in the table below, as well as the names of an input and output file (in that order).

A short header will be added after the standard glulx header that includes the 4-byte string "gasm" and a twelve byte timestamp in the format "YYYYMMDDHHMM". The contents of the timestamp can be customized through the command line to consist of any text up to twelve bytes, including an empty string.

Most of these options are intended for debugging the assembler and will not be generally useful.

Argument Description
-dump-labels Dumps a list of all labels and named constants defined in the program after all assembly was completed.
-dump-patches Dumps a list of all the back-patches used by the assembler in creating the final program file.
-dump-pretokens Dumps a list of all the tokens in a the main source file before the preprocessing phase begins.
-dump-tokens Dumps a list of all the tokens in a program after the preprocessing phase has completed.
-dump-debug Dumps assorted debugging information produced during parsing to a file.
-no-time Exclude the current time from the default timestamp included in the generated file.
-start Specify the label to be used as the program entry point. Label name must follow this argument.
-timestamp Replace the default timestamp with a custom timestamp provided after this argument.
glulx-assemble -dump_tokens basic.ga basic.ulx

Documentation

The current documentation can be found in the docs directory. This currently consists of two files:

source-files.md: A description of how to construct source files and a list of valid directives.

demos.md: Descriptions of the demo programs.

About

Simple assembler for glulx game files.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published