diff options
| author | U-Lameguy64-LT\Lameguy64 <lameguy64@gmail.com> | 2022-01-17 09:13:54 +0800 |
|---|---|---|
| committer | U-Lameguy64-LT\Lameguy64 <lameguy64@gmail.com> | 2022-01-17 09:13:54 +0800 |
| commit | 08de895e8582dbc70b639ae5f511ab9ebfb4d68a (patch) | |
| tree | bbc41c578a239117d9fb03d2b353c287424571a3 /examples/graphics/tilesasm/data.s | |
| parent | 45123e1b968d1883fed9b8526157ce2c4bffc4a7 (diff) | |
| download | psn00bsdk-08de895e8582dbc70b639ae5f511ab9ebfb4d68a.tar.gz | |
Removed old libn00bref.odt document, added tilesasm example, examples in source form now copied on installation, more graphics primitives documented, some changes to readme
Diffstat (limited to 'examples/graphics/tilesasm/data.s')
| -rw-r--r-- | examples/graphics/tilesasm/data.s | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/graphics/tilesasm/data.s b/examples/graphics/tilesasm/data.s new file mode 100644 index 0000000..c64ebbc --- /dev/null +++ b/examples/graphics/tilesasm/data.s @@ -0,0 +1,35 @@ +#
+# LibPSn00b Example Programs
+#
+# Drawing Tile-maps with Assembler Routines
+# 2022 Meido-Tek Productions / PSn00bSDK Project
+#
+# Example by John "Lameguy" Wilbert Villamor (Lameguy64)
+#
+# This assembler file is used to include the file tiles.tim as an array named
+# 'tim_tileset' for use in this example program. Note how the variable name
+# itself is leading with an underscore (_) in this file. This is because
+# GNU C requires leading underscores for global variables, perhaps to prevent
+# function names and variable names from mixing up during the linking stage.
+
+# Tell assembler that the contents that follow must be in the .data section
+.section .data
+
+# This directive define the 'tim_tileset' label as a global symbol so that
+# main.c and other program modules can see this symbol during linking
+.global tim_tileset
+
+# This directive is not really required, but its best to define symbols
+# not pointing to program code as an object to help identify it as a
+# variable in debuggers
+.type tim_tileset, @object
+
+# The following line defines the variable 'tim_tileset' itself filled with the
+# contents of the file 'tiles.tim' by using the .incbin directive
+#
+# Remember the variable type of a symbol is always governed by how it is
+# declared in the C code
+#
+tim_tileset:
+ .incbin "../tiles_256.tim"
+
\ No newline at end of file |
