From 01b51167301fe75415ea2d2a16f89e34204f3bfa Mon Sep 17 00:00:00 2001 From: Ian C Date: Sun, 8 May 2016 21:45:50 +0100 Subject: Changes for V1.2: * Finished library support. * Finished SNES support * Fixed bad email in copyleft headers. --- doc/casm.html | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) (limited to 'doc/casm.html') diff --git a/doc/casm.html b/doc/casm.html index 07b2c91..5628b8d 100644 --- a/doc/casm.html +++ b/doc/casm.html @@ -345,6 +345,13 @@ Align the PC so that (PC modulus value) is zero. Will error if the skipped bytes unless the optional fill is supplied. + +import filename + + +Includes a simple library file as generated by casm. See the section on simple library files for more details. + + include filename @@ -926,6 +933,14 @@ A Nintendo Gameboy ROM file. A SNES ROM file. + +lib + + +A simple library format that allows the importing of pre-built memory and +labels. + + @@ -1200,6 +1215,72 @@ driver would generate. +

Simple Library Output Format

+ +

This mode produces a simple library file that can be imported using the +import command. This is of use if you wish to split a large project +into smaller assembly jobs, for example, to stop you needing to assemble large +chunks of graphics data every time. The library contains all the memory from +the assembled file and records the values of all global labels. Note that +private macro variables and local labels aren't saved, but they'd be useless +anyway.

+ +

.e.g.

+ +Makefile +
+game.sfc: game.lib gfx.lib
+        casm link.asm
+
+game.lib: game.asm
+        casm game.asm
+
+gfx.lib: gfx.asm
+        casm gfx.asm
+
+ +link.asm +
+        processor 65c816
+
+        option  output-file,"game.sfc"
+        option  output-format,snes
+
+        ; These labels actually come from game.asm
+        ;
+        option  snes-irq,vbl,vbl_handler
+        option  snes-irq,irq,irq_handler
+
+        import  "game.lib"
+        import  "gfx.lib"
+
+ +game.asm +
+        processor 65c816
+
+        org     $8000
+        bank    0
+
+        ;
+        ; Lots of code....
+        ;
+
+ + +gfx.asm +
+        processor 65c816
+
+        org     $8000
+        bank    1
+
+        ;
+        ; Lots of gfx data....
+        ;
+
+ +

Listing

-- cgit v1.2.3