diff options
Diffstat (limited to 'blob2xex.rst')
-rw-r--r-- | blob2xex.rst | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/blob2xex.rst b/blob2xex.rst index 4166f64..3f80a0b 100644 --- a/blob2xex.rst +++ b/blob2xex.rst @@ -77,6 +77,47 @@ not **-l0x2000**. EXAMPLES ======== -TODO: come up with a few examples. +Simple Example +-------------- + +You've written an Atari 8-bit program that loads at **$2000**, which +is also the run address. The assembler you used doesn't create Atari +.xex files, so you've got a **program.bin** that's just raw object +code. To turn it into a runnable .xex file, use: + + blob2xex program.xex -l '$2000' -r '$2000' program.bin + +Notice the use of quotes around the addresses? That's because the +$ character must be quoted, or the shell will try to interpret it +as a variable reference. You could also have typed **\$2000** or +**0x2000**. + +More Complex Example +-------------------- + +Suppose you want to write a program that can run on an Atari 800, +but you want to use the International Character Set font from the +XL/XE machines. Also suppose that you have the XL ROM image as +*atarixl.rom*. + +The way to use the XL ICS font on the 800 is to load it somewhere +in memory, on a 1K boundary. Suppose you've decided to load it at +**$8000**. + +Any good reference book or other documentation on the Atari XL/XE +computers will tell you the ICS font is located at **$CC00**. The ROM +image starts at **$C000** (the start of XL/XE ROM), so the font is +located at offset **$0C00** within the ROM image. As always for Atari +fonts, it's 1KB, or **$0400** bytes. + +So you can create a .xex file of the ROM font with: + + blob2xex romfont.xex -l 0x8000 -o 0x0c00 -s 0x0400 atarixl.rom + +Since fonts aren't executable programs, there are no run (**-r**) or +init (**-i**) address options. + +The resulting *romfont.xex* can be combined with the rest of your +program with **xexcat**\(1). .. include:: manftr.rst |